## WB8NBS

This Blog will document projects I have
in progress or completed. You can search for my
for photos. I will link some of those here.

## Sand Clock: Settings

I’m making a separate post here on the clock’s settings menus so as not to clutter up the first page. There are three buttons on the rear panel, Function, Up, and Down.

There may be a reset switch in the future because of a software bug.

The Up and Down buttons do exactly what they say. Function has two jobs depending on if it has been a short time pressed (less than 1.5 seconds) or a long press (greater than 1.5 seconds). Generally hold the F button down for a count of 3 to trigger a long press.

Short press is used to select something. Long press enters a menu item.

There are 12 menus. The current operating display is stored in flash memory so normally a power cycle or reset brings the clock back to the display that was running before the interruption. But selecting a different display through the menu may activate a bug in the software. The act of writing something to flash does something to the processor clock and causes the display to flicker. If this happens, the fix is to cycle power or reset the processor.

When you enter the Setup Menu mode with a long press the clock will go to the menu item associated with whatever display was running. Once in the Setup Menu mode, use the up or down buttons to move to the display you want.

### Digital Clock

This menu selects the original digital clock which started this whole project. The digital display will melt into sand for 30 seconds if the clock is shaken 3 times in less than three seconds. Sand runs for 30 seconds after which it fades to black and the digital clock fades back in. If the clock is shaken during the fade to black period, you get another 30 seconds of sand. A short press of the Function will exit the menu and display the digital clock.

### Random One and Random Two

Two stand alone random color items are available just to get a mood display. These were extracted from FastLED_Functions, part of the SmartMatrix demo library. The two selections are very similar but Random Two has warmer colors. Short press Function to begin the display.

### Random One and Random Two with Digital Clock

Selects the Random One or Two background display with the Digital Clock overlay on top. The colored background precludes doing the sand simulation. Short Press Function to engage the display.

### Analog Clock

Selects the Analog clock display derived from a project found on the Arduino Project Hub. This is the bare clock but it has the melt into sand when shaken feature. As with the Digital Clock, the sand runs for 30 seconds but gets an extra life if you shake the clock while it’s fading out. Short press the Function button to select this display.

### Random One and Random Two with Analog Clock

These menu items select the Random Color background screen with the Analog Clock on top. These can’t do the sand simulation. Short press Function to select one of these displays.

### Hour Glass

This starts the Hour Glass display. Turn the clock upside down to continue the Hour Glass time. As programmed, it takes about one minute to empty top to bottom. Short press Function to select this display.

### Magic Eight Ball

Selects the Magic 8 Ball function, best described by this Wikipedia article. There is a flowing sand display, but a random answer appears when the clock is shaken. It’s suitable for answering Yes/No questions like, “Will I Ever Find True Love?” If you just want to play with pouring sand, go here and don’t shake it. As usual, short press Function to start.

### Brightness

This is the first menu where the up/down buttons affect the selected item. Here, a short Function press takes you to a sub-menu where a numerical setting can be made using the up/down buttons. You exit the sub-menu with a long press then use the up/down buttons to change the setup to what ever display you want to run and start that display with a short Function press.

A short press with the Settings Menu item displayed takes you to the following screen where the up/down buttons can change the number. A practical range is 0 to 255. I usually run it at about 150 in average room lighting but it can be toned down for darker environments. A Long Press selects the number displayed, also writing the number to flash memory so the clock will remember when power cycled, then returns to the Settings Menu where you can move to one of the other displays.

### Set the Clock

This is the second Setup item where the up/down buttons are active. Short press Function to enter the sub-menu.

Each group of digits can be set individually, Hour, Minute, Second, AM/PM, Month, Day, Year. The group being changed will flash. Up/Down buttons will change the number in that group. A short Function press will advance the flashing to the next group.

A long Function press selects the displayed time, writes it to the internal clock, and exits back to the Settings Menu. From there, use the up/down buttons to select a display and use a short press to activate that display.

I lied about being done with this project. Right after I finished this web log page I discovered an implementation of Conway’s Game of Life by Jason Coon. I got that working easily and added it to the main clock sketch, there are now thirteen menu screens in Setup. As with most of the non-interactive screens you enter this option with a Function short press. A long press exits the running display and returns to the Setup Menu.

## Source Code:

The original code on which all this is based uses the MIT license. I will continue that here. The various examples I used for code have their own license paragraph.

I uploaded a .zip file containing source code for the clock to DropBox. That file also contains several stand alone programs that run on the clock hardware, these were used for development and debugging before being incorporated into the main program, SandClock.
Another Analog Clock
HourGlass3
Magic_8_Ball
Matrix Clock

Version 6.4 7/16/22:
DropBox source archive is now updated to SandClock2.zip and includes the Jason Coon Life example.

## A Clock with Benefits

In 2021, Adafruit announced a 64×64 LED matrix display with 2 millimeter pitch (5362). These are subpanels made for those large animated LED advertising signs popping up everywhere, which drives prices down. They are almost (see later) five inches square. I thought 64×64 might be sufficient to display photos. But as with many fresh products from Adafruit, the display was sold out by the time I tried to order one. I got on their back order list.

Fast forward to April 2022. I got email saying the product was back in stock. These panels use a connection standard known as HUB75 so I also ordered a SmartMatrix Shield that would adapt the panel to the Teensy 3.6 controller I already had. Teensy 3.6 is probably going to be discontinued in favor of the new, faster Teensy 4.0 and 4.1. All of these are back ordered as of this writing. Series 4 Teensys use a different SmartMatrix shield. Adafruit has a similar shield, Matrix Portal, optimized for their products.

Parts arrived and I soon had some of the demos working from the SmartMatrix library including animated GIF code. I could display GIF files but JPEG photos did not work well. The demo program only worked with GIF format, and only images that had been resized to fit the display, so to display jpg photos meant working in GIMP to resize each file and export as a .GIF. The GIF files then have to be loaded on to a micro SD card which can be plugged into the Teensy 3.6. This is not practical for something that will probably end up as a Christmas present for one of my relatives. And the shrunken images were barely recognizable so I abandoned the idea.

So what to do with the display? Searching for examples using LED matrix hardware turned up an Adafruit Learning Guide “Shake away 2021 with MatrixPortal” written by Phil Burgess. Phil is the author of the PixelDust library that handles the display LEDs as individual grains of sand which pour over the display. That requires an accelerometer chip so the sketch knows which way is up. I ordered the LIS3DH breakout from Adafruit and soon had the Shake Away code(1) ported to my Teensy/SmartMatrix hardware.

Shaking away the year was a great demo but not something that would age well. I decided to implement a digital clock that would melt into sand when shaken as the Learning Guide demo did. Teensy 3.6 processors have a built in digital clock function complete with internal precision 32 KHz timing source. No crystal necessary. With the help of the library demos that come with the TeensyDuino installation, I had a working clock. It took more code to get the digits to dissolve into sand when shaken and quite a bit more to get those sand pixels to be a consistent color. The Adafruit PixelDust library just tells the sketch where to put the gravity influenced pixels. It’s up to the SmartMatrix library to write the pixel to the display, and neither one keeps track of the color. I added an array to remember each pixel’s color as they moved. The sand display stays for 30 seconds when triggered by shaking the clock. It then fades out and the clock display fades back in. But if it sees another shake while fading out the sand, it will give another 30 seconds of sand.

At this point, the hardware evolved to it’s final configuration. Three push buttons were added for “Function”, “Up”, and “Down”. Most Teensy clock demos use the PC and Arduino IDE to set the clock which would not be practical in a stand alone application, so code was added to set using the buttons – a more difficult task than I thought. I made a nice Walnut box about six inches square and 2 1/4″ deep, constructed from trim scraps salvaged from a Centennial Farm home that is in our family. All driver electronics are mounted on a thin plywood rear panel and a black diffuser was added in front. I discovered too late that the matrix panel was just slightly larger that five inches, wouldn’t fit in the box. I added veneer strips at each corner to enlarge the box a small amount but still had to do some scraping inside to get the panel to seat. It’s tight and I screwed on bent paper clips as handles to help pull the panel out if needed. The LED matrix can draw up to four amps at full white brightness. There are 4096 pixels in the display with a Red, Green, and Blue LED in each one. A total of 12,288 individual LEDs managed by the processor. Each LED only draws a few milliamps but it adds up. I’m using a 2 1/2 amp power supply and it seems adequate. The display is never at full white in this implementation and the software uses a scanning technique, so only two rows are really powered at any given time. Sparkfun has a good paper on how these displays operate.

What else could I do with this nice display platform? I found code for an analog clock on the Arduino web site. I got that working and improved the display greatly by using floating point math to reduce the round off errors. That change made the hands straighter and allowed adding minutes as a fraction to the hour hand, and seconds to the minute hand as a fraction so the analog movement is more realistic.

The bare analog clock is also arranged to transform into pixel sand when shaken.

One of the library demo programs created a soft undulating color pattern I really liked. I isolated that code and added it as a background option to both the digital and analog clocks. Love the look but the digital sand transformation is not possible as every pixel is lit by the pattern.

I found several Arduino-ish sketches on the internet implementing a digital hour glass. Most of those examples use small discrete LED panels but I took it as a challenge to do an hour glass on my clock hardware. This required learning how to do pixel blocking as shown in the Adafruit PixelDust guide. My program draws a triangle on the top half of the display and an inverted triangle on the bottom. A small overlap makes the channel between the triangles possible after erasing a few pixels and I set blocking on the whole outline. Then programmed the top half to fill with colored sand and let it run. It leaked! Seems the PixelDust library can move pixels diagonally. Any location inside the blocking triangle that had a clear diagonal would let the pixels escape. After some experimenting, I came up with a simple solution. When setting outline pixels to block sand, also set the adjacent pixel outside to block. The hourglass now works as it should. It is set to empty in about one minute by adding a small delay to the sand iterations.

Simply displaying random text from the answer file after a shake seemed inadequate. So I implemented a sand display that runs over the top. This was a coding challenge as blocking has to be set up when an answer is triggered and erased when it is disappears. But in the end it looks good and works well. Sand bounces off the text but still can flow between letters. If you just want to play with pouring sand around, go to the Magic 8 function and don’t shake it.

Thanks to Phil Burgess (PixelDust) and Louis Beaudoin (SmartMatrix)for the libraries needed.

See this wordpress page for details on the settings menus.

### Version 6.3:

Well I thought I was done with the clock software but I came on this great implementation of Conway’s Game of Life from Jason Coon (Evil Genius Labs). See this fascinating Wikipedia article for more insight. And after changing the sketch settings to agree with the 64×64 LED panel, it compiled and ran on the first try! A short while later the code was running inside the clock sketch. It is set to run for one minute, then resets to another random screen. There are now 13 items in the Sand Clock Setup Menu.

Updated source code with several of the development examples can be downloaded from Dropbox. I absolutely love this display, thank you Jason.

### Version 6.5, 6.6

Fixes a bug in the AM/PM display that an 8 year old niece pointed out. Available from Dropbox.
Version 6.6 tweaks the time setting function to better show the digits changing.

Parts List:
SmartMatrix V4 shield
PJRC Teensy 3.6

## Using a General 809 Honing Guide

I somehow have two of these. Did not like them initially, but a few weeks ago I acquired an old spoke pointer which has a very thin, short blade, and I had to use the 809. I can not find instructions anywhere on the internet so here is what I learned.

Besides regular plane blades and chisels, the 809 can be used for very narrow things like a 1/8″ chisel, short blades like from a spokeshave, or even skewed cutters. Those $10 Eclipse clone guides just don’t work for these. On the downside, an 809 is made to hone only a 30 degree bevel. It has a roller foot that rides along the bench instead of on the stone and that means the foot has to be reset each time you change to a stone with a different thickness. There is a flat area on the bottom underneath the blade clamp. That flat is thirty degrees to the surface that clamps the blade. Retract the blade so it does not touch the stone. Loosen the knuckle knob in the center of the guide so the foot swings free, then place a business card on the stone under the flat area. Press down and hold the front of the guide so the flat rests securely on the business card. At the rear, move the foot down so it touches the bench and tighten the knuckle knob. With the business card still in place under the guide flat, loosen the blade clamp and slide the blade down to touch the stone evenly. Tighten the blade clamp, remove the business card and commence honing. When you advance to the next higher grit, it’s likely the stone will not be the same thickness. I have stones ranging from 3/8″ to 1″. So on each change, repeat the foot setting process – press the flat against business card, loosen knuckle knob, adjust foot to touch bench, tighten knuckle knob. Do not change the blade setting. The stock 809 clamp only works for blades 2 inches or longer. For shorter blades we have to help it. To handle this short cutter from the spoke pointer, I sandwiched the blade with three rulers, one on top of the blade, one underneath and one a bit thinner than the cutter in the middle. It honed up great and the spoke pointer works like a charm. ## Notes on a StewMac Ukulele Kit I bought myself a StewMac kit last Christmas and it’s finally warmed up enough to go in the garage and put it together. I got the tenor size with optional spruce top. My aging fingers won’t cooperate well enough to play smaller versions and besides, tenors were on sale. Their kit includes pre-cut, pre-surfaced, and pre-bent components. The neck is shaped and the fretboard is slotted in the correct positions. You can download a copy of the assembly manual from their web site. They use the same manual for all their ukulele products. Dan Erlewine appears in a series of ten YouTube videos showing a typical StewMac assembly. StewMac has gone to great lengths to make their kits practical for people with a limited set of tools and they succeeded for the most part. I used tools I have on hand that fit the task, in some cases deviating from their recommendation. This is the result and it sounds really good. There were a few issues with the supplied components. • Neck and tail blocks were too tall. Fixed with my table saw. • Two of the braces were bowed slightly, fixed with a hand plane. • The bridge support plate was smaller than it needed to be. • Curved edge banding broke when forced around the body curve. Fixed by wetting, heating, and re-bending strips to fit better. • Curved sides did not fit the template. Fixed with a hacked together clamp. • The shaped neck had twisted. Fixed with hand planes and sandpaper. • Dowel holes in neck were off center. Used dowel centers to mark the holes. The dowels themselves were too small I used 1/4″ dowels from the Home Center. Assembly begins by gluing braces to the inside surfaces of the top and bottom plates. Carbon paper was useful for transferring the pattern to the wooden plate. I used the plywood scrap I found for the body mold as a support and glued the braces on in pairs allowing the Titebond III to set up an hour between pairs. Weight and cauls worked well. StewMac’s body mold is just plywood with six angle bracket stanchions around the periphery of the body. The pasted on drawing has the final outline as well as the outline of the top and bottom plates. There is about a quarter inch difference to allow for small deviations in the body shape. It wasn’t enough. Some notes on the body mold. Several Internet posts I read recommended making a full body mold e.g. a plywood template with the entire shape cut out. I found the StewMac method to be adequate. Side stanchions would work better if they could be adjusted a bit. I think leaving out the screw on the “L” bracket tails would allow the bracket to swivel enough to fit better. I used a “T” plate at the large end to save room. This turned out to be an advantage later as loosening the screws there allowed the body to be inserted or removed more easily. The eight large cup hooks were straightened a bit with vise grip pliers to allow them to position closer to the body. Waxed paper was taped over the template to repel glue. Here the shaped body sides have been glued up. The two sides are mainly held together by glue on the neck and tail blocks. The ends of those blocks have to be flush with the side edge for a successful glue up later. Bracing is finished on the top and bottom plates in this photo. Note the wide part of the body overhanging the edge of the paper template. I could have added two more stanchions to fix that but see the following photo. Banding is applied to the top and bottom edges to add additional glue surface for the top and bottom plates. This will strain your supply of small clamps. StewMac recommends using clothes pins, but try to find old clothespins, the Chinese pins you get in the stores today have weak springs. Note the curve at the body waist where the larger orange clamps are. That’s where the first band broke. My remedy was to mark the bandings where that curve would be, spritz with water, and heat with a heat gun. In a minute I could recurve the banding to fit the body better. It’s very important to get the banding flush with the body edge or it won’t do it’s job. I had one spot where the banding was low. If I had used hide glue I could have repositioned it but Titebond is unforgiving Also in this photo you can see the remedy for the too fat body. Two strips of plywood lashed together at one end and a big clamp at the other. With that I could squeeze the wide body to fit within the template. When the banding glue was set, it was good. When the banding is fully dried and flushed (quality time with a big hand plane and sandpaper) and the bracing trimmed to fit per the StewMac spec, the bottom is centered and glued. StewMac’s supplied giant rubber bands worked well, though I helped with a few iron weights. Note the tape applied to the body edge to help keep squeeze out under control. I used Old Brown liquid hide glue here because of the longer open time. The top and bottom plates are larger than the final body outline and will not fit in the body mold without being trimmed flush with the sides. I used a flush trim bit in a router table for this operation. It left a one tape thickness ridge around the plate which was sanded off later. The previous operations were repeated to glue on the top. I heat the glue to about 140 degrees in a tea pot. A small amount at a time is squirted into the heated white dish where the brush can pick it up. And the same rubber band and weight technique clamps on the spruce top, followed by a session on the router table to flush the top plate to the body side. I had one small chip out with the router, there are four areas where it’s going against the grain. Have to take several small passes. Move quickly or the wood will burn DAMHIKT. At this point the body is complete. When the body sanded to suit, it’s time to assemble the neck. StewMac supplies a Walnut fret board already slotted. The “T” shaped fret wire comes as a single length which you cut to individual fret lengths with dikes, leaving a small amount sticking out the sides to get filed down later. The StewMac instructions are to hammer the fret wires into the slots. I found hammering dented the frets so I switched to pressing them in with the bench vise. Start the fret by tapping with the hammer straight in the slot, place a scrap of Oak over the protruding fret, then squeeze the sandwich down in the vise to seat the wire. It worked perfectly. My first eyeball inspection of the pre-shaped neck showed that it had a significant twist which would really screw up the fret board. So I could have complained to StewMac and gotten the neck replaced but Hey, I’m a woodworker. I have a drawer full of planes. I used a #5 to remove the twist, pretty sure it’s true now. I glued the fret board to the neck per the StewMac directions using liquid hide glue. Later I had trouble getting the fret board flat and true, some of that problem I believe was due to using glue that has water as a solvent. Water causes the wood to swell which makes the neck curve slightly. I saw a YouTube where a professional luthier used only marine epoxy between the fret board and neck to avoid that problem. My neck’s curve is slight and improving with time as moisture dissipates. The fret board is a bit wider than the neck so at this time the board and the frets are evened with files and sandpaper to be flush with the sides of the neck. The neck is pinned to the body with dowels. I found one of the dowel holes in the neck was off center, possibly caused by the blank twisting before it was drilled. So I made a jig on my drill press. Drilled the top hole first using a dowel center to locate, then used another dowel center to locate the second hole. Positioning the jig against the body allowed the drill to make accurate holes. I did not use the supplied dowels as I thought they were too loose in the neck. I used compressed wood dowels from the local home center, sanded a couple of them down to use during the test fits. Fitting the neck to the body took quite a bit of time. It has to be trued and centered on the body at the correct angle for the strings to work right, and that angle is not obvious. You adjust by selectively removing wood from the foot of the neck. StewMac’s instructions and videos do this by sliding strips of sandpaper under the foot. I used sandpaper, also chisels and gouges. Once the neck is assembled and trued to the body, take a deep breath and glue it on. I used extensive blue tape to minimize squeeze out, though hide glue washes off easily. I used a small “F” clamp to capture the high end of the fret board, StewMac instructions help here as you have to work around the internal bracing, and I used a long parallel jaw clamp to apply horizontal pressure. This did put a dent in the point of the neck but the dent came out with my standard home remedy, spit on it. I don’t have any photos of installing the bridge. That required the one C clamp I own that is long enough to reach through the sound hole back to where that blue tape is in the picture above. That clamp also has to work around internal bracing. Applying a finish is straight forward. I applied two coats of Formby’s Tung Oil Varnish which is what I had on hand. StewMac recommends wipe on Poly which I tried with poor results. Everything is finished except the fret board, which later will get a coat of lemon oil. The only thing left was to install the four tuners and tie on the strings. But then several hours of fussing the height of the bridge and nut to get a good action. This was a rewarding project. Not quite as easy as Stewart MacDonald makes it out to be, but in the end looks great and has a nice ringing tone. Part of the tone quality is the thin spruce top. All the body pieces are an eighth of an inch thick, the whole thing weighs only 20 ounces ready to play. I also made a three-quarter scale guitar stand for the Uke but that’s a story for another time. ## Eye Candy for Bluetooth Speaker I’ve been watching the weblog “Accidental Woodworker” for some time. Last winter he made several small speakers using the Rockler Bluetooth Speaker kit. They’re about$25 when on sale, Rockler here had demo versions in their store. They sound pretty good though with a two inch speaker not with huge volume. Anyway, my project here is building one with LEDs for visual appeal.

I was searching for an Arduino project I could work on in the house. Too cold in February for woodworking in the garage. I have two of the 24 LED Adafruit NeoPixel rings I won in one of their trivia drawings years ago. Who knew Hedy LaMarr invented spread spectrum communications? I did. These rings just fit just right under the 2″ speaker and I hatched the idea of adding the LED rings to the speaker kit. This photo shows the NeoPixel ring recessed into a half inch plywood prototype. It is covered by four layers of soft white to diffuse the light, then a thin transparent plastic ring. Actual Bluetooth parts are on another module, intended to be mounted on the opposite side of the box.

The speaker press fits into the hole and holds everything together.

The Arduino sketch I came up with is a mashup from several sources. First, was the Strandtest demo program included with the Adafruit NeoPixel library. I wired up one of the rings and quickly got a display working. Next, I thought it would be great to have a light display that changed in time with the music. I found a paper on doing Fast Fourier Transforms (FFT) on the Adafruit learn site. This could not only provide a dancing with the music display, but show the spectrum of the sound as well. Tony DiCola‘s Spectrum code runs on a PJRC Teensy 3.2 processer with which I am familiar. The Teensy has considerably more horsepower than a traditional Arduino, which is needed to do real time audio signal processing. I have no idea how FFT works but it does.

The first problem was getting an audio signal into the Teensy for the FFT to work on. The Rockler Bluetooth board has an LTK5130 audio amplifier for which I found a spec sheet, but the Bluetooth part AC208P01722-2884 is unknown to Google. So going with information available, I tapped the audio signal running between the Bluetooth chip and the amplifier. My scope showed approximately line level, but only at full volume. If I could implement an AGC circuit, it would even out the signal over a range of levels. A search turned up the MAX9814 chip, and Adafruit has a board with that chip with a microphone on board. I could use the microphone instead of a hard wire connection to the Bluetooth amp. I ordered a pair of Teensys and two of the Adafruit microphone boards. The rechargeable battery in the Rockler kit was way too small to run the NeoPixels. They draw 175 milliamps when full on so I replaced the Bluetooth battery with an 18650.

Menu and button code were lifted from my previous Arduino sketches. I used a 10k pot to tune the audio signal from the microphone board, then added a hack to use the same pot to adjust the brightness of the non-audio displays. This writes a digital high to the top of the pot overriding the audio signal. The pot can then be read as a varying DC voltage, and that used to adjust LED brightness. At full voltage, the LEDs almost hurt your eyes so I restricted the range of brightness from about 10 percent to 40 percent. PJRC has a Teensy version of the Adafruit NeoPixel library which does all the heavy lifting. This is the final breadboard:

And this is a drawing and schematic of the circuit. My first attempt at Fritzing, not all that happy with how it works, but I couldn’t find an Eagle drawing of the Teensy I liked.

Other parts in the schematic are R5, R6, and C3, these divide and filter the pot voltage used to set brightness; C2 a coupling capacitor for audio; C1 and R7 form a debounce network for the push button; R8 and R9 pick off and divide the 3.3 volt supply buss so A14 can measure the battery voltage. R4 protects the microphone output when D4 goes high to turn the pot into brightness mode. Power for the microphone amp is supplied by setting D2 high. This allows the microphone circuit to go dormant under program control in battery save mode.

The pushbutton scrolls through five display options.
1. Rotating color
2. Marquee display
3. Solid color
4. Rainbow
5. Audio Spectrum display
Items 1, 2, and 3 cycle through six different color combinations of the RGB LEDs.

This is the prototype display in Rainbow mode. The colors slowly rotate around the ring. Very difficult to photograph LEDs because they are usually much brighter than the background.

A late addition to the code was a function to shut down everything possible on a low battery indication, less than 3 volts. This is needed for the light display only as the Bluetooth chip quits first at a higher voltage. R8 and R9 feed divided voltage to Analog 14. The divider is necessary as the sketch chooses the stable 1.1 volt internal analog reference. The function “Suicide” periodically monitors the battery voltage and when finding less than 3 volts, turns off all NeoPixels, powers down the microphone amp and puts the Teensy into hibernation mode. A charged battery and a power cycle will bring everything back to life. This is possible using Colin Duffy’s great Snooze library for the Teensy processors.

Revision: 5/13/21 On testing the assembled box, found that the NeoPixel ring would sometimes stop working. I discovered that in that condition the A0 pin would be measuring 3.3 volts. This analog input was left floating in the original breadboard, the audio signal is capacitively coupled. I added a 100k resistor (R10) from A0 to ground and the problem seems to have gone away.

In the revised schematic, the power switch is rotated 180 degrees. I did that so I could use the back contact as a tie point for all the grounds in the control panel.

## Building the Box

I chose a slab of Cherry paneling I had for the box. I ripped it to 4 1/2″ width and used my 733 planer to reduce it to a half inch thickness. This would yield a cube with 3 1/2 inch inside dimension, plenty of room. The frame was built with 45 degree miters using a jig, a process similar to the sliding lid boxes I’ve made hundreds of over the last five years.

Instead of a sliding lid this cube would have a half inch Cherry panel let into a quarter inch rabbit. After marking out and sawing the four mitered pieces I had about a foot of stock left over to make the two four inch panels for front and back. These needed 1 7/8″ holes for the two Rockler speaker components. Rockler has a plan for an enclosure but only 3″ square. I needed more room. I don’t have a Forstner bit that large so I opted for using a circle cutter. These are a PITA to set up accurately and the speaker side hole came out a bit large. Three layers of tape fixed that.

A larger circle, about 2 5/8″ diameter, was needed to embed the NeoPixel ring under the speaker. I judged that a quarter inch depth would contain the ring, a couple layers of tissue to diffuse the light, and a thin clear plastic layer to hold it in place. This photo shows the circle cutter having finished cutting the NeoPixel cavity to depth. The triangular cutter leaves quite a bit of wood that must be removed.

A Stanley #71 router plane was used to finish excavating the cavity. It did a good job.

And here is the NeoPixel ring test fitted into the cavity.

1/8″ holes were drilled around the periphery of the cavity for the five wires to pass. I also used the circle cutter to cut a doughnut from 1/16″ Plexiglass to form the protective cover.

A cavity was excavated into the right side of the box to contain a steel panel having the three controls mounted. There is a push button to select the LED mode, a pot to set brightness or audio level, and a switch to turn on the Eye Candy display. It is independent from the bluetooth module, the microphone and LED drivers will run without the bluetooth being activated.

After gluing up the box and carefully fitting the front and back panels, a 3/8″ hole was drilled into the front panel to accommodate the microphone module.

After gluing up the box and carefully fitting the front and back panels, a 3/8″ hole was drilled into the front panel to accommodate the microphone module. Much fussing with the components and wires followed. Brass screws hold everything together. There’s lots of room inside the box but it can’t be buttoned up until all the wiring is done. I used connectors for everything. This photo shows the box and all the parts that are stuffed inside.

All the external components were assembled either on or connected to the control panel which made for a messy back side. There are several flying wires. Most of the connectors were 0.1″ push ons salvaged long ago from junked PC display panels. I also cut up a few of the “Dupont” style Arduino jumpers to mate with 0.1″ headers soldered to the Teensy processor. All three component panels can be removed without unsoldering anything.

Here are three mug shots showing the sides of the box that have components.

This picture has the Spectrum display running. A still photo doesn’t do it justice and LEDs are notoriously difficult to photograph.

A fun project that will probably end up as a gift for someone. I bought enough components to construct a second one which will probably also be gifted. It isn’t cheap and I would not have attempted this project if I didn’t already have the LED rings. Here is a run down:
24 NeoPixel Ring Adafruit 1586 $17 Teensy 3.2 microcontroller$20
Microphone/Amp Adafruit 1713 $8 Rockler Bluetooth Speaker$ 30

Update: 5/18/21 Made a three minute video showing the project
https://www.dropbox.com/s/wz37q1v7ug45dn5/NeoPixel06.mp4?dl=0

## Arduino Based Voltage Logger

Twice this year I have gone out to my garage and found the car’s battery dead. It’s a C-Max hybrid and when that happens, nothing works. You don’t start a hybrid, you boot it up, the computers control everything – even the door locks. Based on googling, this is a common problem with the 2013 model. Apparently, some times the radio doesn’t shut off when you park the car and the battery is soon dead. I have seen this mode twice, once the radio wouldn’t turn on and once it wouldn’t turn off. The fix is fairly simple, pull and replace the fuse. A power cycle brings the radio back to sanity. Maybe a coincidence, but the software was written by Microsoft.

So now it’s winter, I’m recuperating from surgery and the bicycle is hung up until spring. I needed a COVID lockdown project I could work on indoors. I decided to build something to monitor the state of the car’s low voltage battery. A hybrid has a high voltage battery to drive it’s motors and a low voltage battery to run accessories. There is no alternator as on a normal gasoline powered vehicle, instead the engine turns a generator (one of the two motors reversed by magic) to pump up the 300 volt traction battery. There is a DC-DC converter that steps the high voltage down to charge the conventional 12 volt battery. My project would need a measurement range of 0 to 18 volts, measure periodically and log the results with a time stamp to an SD card. I will leave the device connected for months at a time. It would be better to measure idle current drain but I don’t know how.

I bought an Arduino Logging Shield from Adafruit (product 1141). It plugs onto an UNO, provides an SD card socket and a Real Time Clock based on the NXP PCF8523 chip. I also bought a 128×64 pixel OLED display (product 326). I have used the OLED before in Arduino projects and like the flexibility. The display is small but very readable. The UNO I’m using is a Sparkfun RedBoard. It has a perfectly flat bottom which made mounting easier.

I tested the three main outboard components separately by using demonstration programs included with each respective library. The RTC and OLED worked out of the box but I had a hard time with the SD card. I had missed soldering on a six pin female connector that plugs on to the Arduino ICSP pins. Adafruit steals an SPI connection from that port, which is needed to talk to the SD card. Oh well…

On to software. A sketch was quickly put together that would read the RTC and write a time stamp to the SD card. No problem. But when I added the OLED to the mix the Arduino crashed. Apparently, the OLED library and the SD card library won’t fit together in the meager 2k of RAM on the ATMega328 processor. The SD library has a lot of code to handle a FAT file system. The OLED bit maps each pixel in RAM which by itself is 128 * 64 / 8 = 1024 bytes of memory. No wonder the processor barfed. So lowering my expectations, I hogged out the one inch hole I’d made in the plastic case to 3 inches wide and fitted a more familiar 16×2 Liquid Crystal Display.

I had an I2C adapter for these LCD modules ($3 from All Electronics catalog LCD-SI). Soldered it onto the LCD and connected to the I2C terminals on the Logger Shield. Didn’t work. After an entire afternoon checking wires and downloading different LCD libraries (apparently the All Electronics part has a different pinout than the Adafruit equivalent), I ran the I2C_scanner program in the Wire library examples. Turns out that the All Electronics board has a different I2C address, 0x3F instead of 0x20 which was in the documentation. Once the correct address was set, the LCD worked as advertised. All Electronics’ backpack has one advantage over some of the other vendors, it has a switch transistor on board that can turn off the back light on the LCD module saving some power. ## Operation: Three buttons are installed, Function, Up, and Down. These let me move around in the settings menus. The switch componants can be seen just above the LCD module. My usual practice is to solder a 0.1 uFd capacitor across the switch, ground one side, then wire a 10k pullup on the Arduino side. I have a function that analog reads the switch state and returns high or low. It is a very effective de-bouncer which is a good thing with these cheap button switches. On a reset, or applying power, the logger boots up by reading the last log interval and file name from nonvolatile memory. Unless the settings menu is requested, it will enter continuous timed measurement mode. The display will light for two seconds then goes dark and the processor sleeps for the rest of the current log interval. This is what the records look like on the SD card. Here the interval is set to thirty minutes. The Comma Separated Value format is easy to import into a spread sheet. It only takes about six mouse clicks to produce a usable graph of the measurements. jbh@junkbox-2:~/Desktop$ cat /media/jbh/LOGGER1/G.CSV
2020/12/06 20:34:42,09.1
2020/12/06 21:04:00,09.1
2020/12/06 21:34:00,09.1
2020/12/06 22:04:00,09.1
2020/12/06 22:34:00,09.1

It turned out that programming read and save voltage readings was the easy part – about 65 lines in the sketch. More fun was doing setup menus. I wanted:

1. to set the Real Time Clock
2. to set the logging interval
(5 sec, 10 sec, 30 sec, 1 min, 5 min, 10 min, 30 min)
3. to set the log file name
restricted to letter.CSV where letter is A-Z to make things easier
4. to list a directory of the SD card and to browse any file

This forms the rest of the sketch, about 800 lines (so far). There were serious memory problems getting it all running. I have in fact ordered an Adafruit Metro M0 which has much more RAM, but with moving some code into functions it is working OK now on the RedBoard. (update: The sketch will require minor changes to compile on the M0).

Setup mode is triggered by holding the Function button down on reset. Arduino will not check the buttons while sleeping, pressing the reset button wakes everything up. In general, a short press of the Function button selects things, a long press exits the task. Up and Down buttons move through the menu items.

At this point, releasing the Function button displays the setup menu categories. Pressing the Up or Down button will move through the list. Pressing Function will enter the option currently in the display. There are four choices:

## SD Directory:

This section allows scrolling through the SD card directory and optionally examining saved records in a selected file.

The Up/Down buttons scroll through the directory of files on the SD card. File names and sizes are shown:

A short press of Function will open the file in the display and begin displaying records, the most recent shown first. This screen is displayed on entry for two seconds:

Followed immediately by the contents of the last file record. The information on the top line is: record number, first letter of file name, and the voltage measured. The second line shows the date and time the measurement was recorded. I couldn’t fit in the year.

A Function long press exits the file browser. Another long press exits the directory option and returns to the main menu. You can select another menu category or do a third long press to exit Setup altogether and begin timed measuring.

## New Logfile Name:

Twenty six files are allowed, A.CSV through Z.CSV. Only the first letter changes which simplified programming. A short press on Function while “New Logfile Name” is displayed enters the change code, displaying the currently selected file. Pressing Up or Down will scroll through all names possible. If a named file is already in the SD card directory, the second line will show “Exists”. Short pressing Function at that point will select the file and append future readings.

If the displayed name is not currently on the SD card, the second line will show “Available”. Short pressing Function will then create the file.

In either case a long press of Function will exit the change code, returning to the main Setup menu.

Seven different logging intervals can be selected.

1. 5 seconds
2. 10 seconds
3. 30 seconds
4. 1 minute
5. 5 minutes
6. 10 minutes
7. 30 minutes

Up and Down buttons will scroll through the seven choices, a short press on Function will select one of the values and automatically return to the main Setup menu. A long press will return without changing the previous setting.

Intervals are implemented in hardware. A selection is sent to the RTC chip which generates a pulse when the interval has expired. That pulse on the Square Wave output is hard wired to Arduino digital pin 3 which triggers an interrupt to wake up the processor. Selecting different intervals obviously has an effect on file size. Examples: 30 Minute interval – 37.4 kilobytes in a month, 5 Second interval – 13.5 megabytes in a month. My sixteen gigabyte SD card could easily store 5 second measurements for three years. Might be tough loading that into a spread sheet.

Set Clock:

This should not have to be done often. Code in the Adafruit RTC library detects a virgin clock (no battery backup installed for some time) and sets the RTC chip to the compile time of the sketch – which in turn should be traceable to the clock time on the computer hosting the IDE. There is a way to calibrate the PCF8523 but it is not implemented in this sketch. The only time I see changing the clock is if I move to a different time zone.

Short pressing the Function button while “Set Clock” is displayed produces this display:

There is a cursor which can be moved back and forth to the digit that needs changing by short presses on the Function button. It is under the ones digit of seconds in the above photo. Use the Up and Down buttons to make needed changes, then long press Function to finalize and return to the Setup menu.

At this point I have not implemented the hard wire connection to the car battery. It will require some sort of protection circuit and scale the voltage down to the 0-5 volts needed at the ATMega328 analog read pin (A3). I also have to find a way to hide the logger in the back of the car. Thus this is a work in progress.

## Input Circuit:

Cars are notorious for large transients on the battery buss. I’ve seen quoted figures from +100 to -75 volts, the worst is seen when the alternator is actively charging and the connection to the battery is suddenly lost. So I spent some time working up a circuit to interface the battery to expensive electronics. It was suggested I use an off the shelf cigarette lighter USB adapter and I did some experiments with one. The problem is the buck converter drops out at about 8.5 volts and also if it stops bucking, you get 12 volts on the output. Also requires a third wire to pick off the battery voltage being measured.

On my experimental breadboard I replaced the auto USB adapter with a good old 7805 regulator. This produced the expected five volts with the input as low as 6.5 volts, so 7805 it is. This is the schematic of the input circuit:

D1 protects against negative transients, R1 and C1 soak up positive transients. I will add an 18 volt zener diode in the future when I find one. D2 and C3 clamp the measurement voltage to 5 volts.

These input components were glued into the box top, ugly but it works. Calibration components were added on the Logger Shield breadboard area.

## Testing:

Did much testing today with a variable power supply to see how the logger behaved under brownout conditions. It ramped down good at first, but any input voltage below about 9 did not register. The processor held up down to about 6.5 volts though you could not read the LCD. At 6.0 volts everything stopped.

Thinking it over I realized that the 5 volt regulator was dropping out. That caused the analog reference used for voltage measurements to dip in sync with the dropping input so no wonder it was showing the same voltage every time. The fix was obvious, lower the analog reference voltage to a point where it would stay steady and recalibrate. Only one change to the sketch, adding analogReference(INTERNAL) in setup produced this run:

Which is pretty much what I hoped the device would do. The real fix for this dropout problem will be replacing the five volt regulator with an Adafruit Buck-Boost converter. I thought I had one of those but I can’t find it.

## Installation:

I found a pair of copper clips like those on a small battery charger and attached them to the logger power cable. The problematic C-Max battery is in the rear of the car in the area where the spare tire would be if it had one. Rear mounted batterys are usual on a hybrid, which has no 12 volt starter motor and therefore a super low resistance connection is not necessary. But storing the logger where it could access the battery directly might trigger my wife if she saw it, so I picked a location where she would never go. Under the hood.

A C-Max has a pair of heavy metal terminals near the engine. These are designated points where jumper cables or a battery charger can connect to feed or drain power from the low voltage battery. There is a fuse/relay box inches away with about a 6″x10″ flat removable lid. I removed the lid and glued on a chunk of sheet metal cut from an old tape drive enclosure. A big magnet salvaged from a defunct hard drive bolted to the bottom of the logger completed the mounting. It is now stuck on the fuse box lid, happily logging the battery voltage every 30 seconds.

It’s hard to see what’s going on in this photo, but you can see the logger atop the gray metal plate. There is a zip lock baggie protecting the unit from soon to come road salt. Left and below center you can see the positive jumper terminal with the logger wire clipped on. About eight inches up the positive wire, inside the baggie, is an in-line 3 amp fuse holder. The logger negative lead can be seen at the lower left corner clipped to the chassis ground terminal that forms the other half of the jumper cable connection.

## First Data Run:

The Logger has been in the C-Max for 8 days over Christmas. The interval was set to 30 seconds, the log file is 600K. During that time we made two short three-five mile trips. Here is the complete capture:

It’s about what I expected from a properly functioning charge system and I don’t think it shows any major phantom drain. This is not a precision instrument but it was calibrated at 12.0 volts against my Simpson 360, so should be close. The important thing is the trend over several days, we typically only go out twice a week.

Following is a blow up of the first peak, on 12/21 You can see it charging at about 15 volts, dropping to 12.5 while waiting in the parking lot of the grocery store.

## Buck-Boost Converter:

I thought a better power converter than the 7805 would solve the low voltage range problem. The Adafruit Buck-Boost (#2190) I tried works only to 12 volts. Searching the net for a converter that would work from 2 to 20 volts input did not turn up anything. I finally found and ordered a converter from Pololu (#S10V4F5) which is spec’ed to work to 18 volts. Close enough. It is tiny, even smaller than the 7805 it replaced.

The BBC is a mixed blessing. Switching regulators trade current for voltage, basically tries to transfer power, not voltage or current specifically. The good news is input current went down at 14 volts from 30 Ma sleeping to 10 Ma. The bad news is at the low end, current went up as high as 250 Ma as the boost kicked in to maintain 5 volts. I could not get a good measurement below 3.5 volts as the power supply I have for testing would go into current limiting.

Testing revealed that the low end of the measurement range was severely affected by the series resistor installed to help protect the circuit from transients. The 22 ohm series resistor in fact went up in smoke. I did the math figuring a drop across that protection resistor of one volt would be acceptable, at 300 Ma that comes out to a value of 3.3 ohms. The 22 ohm resistor was replaced by four 10 ohm resistors in parallel, giving a comfortable margin. At the same time the input protection diode was change to a Schottky type which measured half the voltage drop of the 1N4004. These changes can be seen in the above photo. Voltage drop across the protection components does affect calibration significantly at the low end.

Here is the schematic of the final input circuit:

## January 2021

Logger has been in the car from December 31 to January 31. There have been no voltage fades. Did have some trouble with Libre Calc manipulating the chart, there are 88,600 thirty second measurements in a 2.2 meg file.

## February 2021

Logger data for February shows no significant voltage drop. Even though the first two weeks were mostly single digit temperatures.

## April 2021

This is data from April (through May 5th when I remembered to retrieve the SD card). Sometime during the last week of April, the C-Max radio locked up and would not turn on. So that’s happened twice, and once it locked in the On state and wouldn’t turn off. The graph shows a slight voltage droop that week a couple of tenths. I reset the radio by pulling and replacing the fuse on May 1.

## Future:

I’m considering the project done for now and putting it back in the car. I am however experimenting with an Adafruit Metro M0 I bought when I thought there was no hope of the sketch working in an UNO’s 2K of RAM. Most of the code compiles but the M0 does not have EEPROM so changes are in order. There is enough memory on the Metro to add code for an ESP32 coprocessor so an email voltage alert might be possible. Would probably be a whole new build to make room. Maybe next winter.

While this device is intended to monitor a 12 volt battery in my car, it could be modified easily to measure and log anything that can be scaled to the 0-5 volt range of the Arduino (0-1.1 volts with the current analogReference(INTERNAL)). It would require changing the input scaling resistors and implementing a separate power supply. I can do this by adding jacks to the enclosure. Adding code would be a problem If I keep the ATMega328 processor. It’s now using pretty much every last byte of memory.

Two other projects come to mind, three years ago I started building a temperature controller for a modified toaster oven. The objective was to do surface mount PC board soldering, also to retemper hardened steel tool cutters. Both of these applications require specific heat and cool cycles and the logger will be ideal for graphing the temperature profile. Another back burner project I have is monitoring water level in the house sump pump. I have constructed a capacitance based level sensor and could use the logger to watch levels change as the pump cycles, sometimes every 15 seconds in the spring rains.

## Failure May 2022

On an oil change and general checkup spring 2022 I was warned the battery was down to only 160 CCA. Since the C-Max does not have a starter motor and my wife is agitating to trade in the vehicle on a new car (C-Max has only 26,000 miles on it), I ignored the recommendation. The battery failed on May 19, I had to jump start it. C-Max, like most hybrids, does not have an alternator. The low voltage battery is charged by circuitry in the high voltage battery – as long as the computer tells it to do so. But the computer runs off the low voltage battery so if the 12 Volt side is dead the high voltage battery never gets the signal to charge. If you put a charger on the 12 volt terminals for just a few seconds, the car will boot up and drive normally, which is what I did, driving to the dealer for a new 200 battery. The second one in 9 years. This is the logger graph after the failure: The voltage went from 12 to less than three which is the threshold for the logger in just a few hours. I suspect the old battery was not to blame for the problem. I don’t think six cell storage batteries fail like that unless there is a significant drain. I checked the headlight switch it was off so I suspect some system in the car was stuck in the on state. Its worth noting however that the new battery shows about a half volt higher than the old one in the resting state. ## Revision History: • Dec 8 2020 Initial software release Beta V07.2 dropbox link • Dec 14 2020 Added information on the protection and calibration circuit Changed analog reference. Updated dropbox file link • Dec 15 2020 changed prot ckt R2 to 33k to make cal less touchy. Better voltage graph. • Dec 31 2020 Rebuilt input circuit with Pololu Buck-Boost converter ## Analyzing a Sector In March I saw an article from the Lost Art Press weblog advertising a free plan on the First Light Works web site, for making a paper Sector. Just to pass time during the quarantine. I’d heard of the Sector but never looked into it as a woodworking tool so I download and printed the design and instructions. I think I’m hooked, but how does it work? Down the rabbit hole I go. A Sector is a very old tool to graphically lay out proportions with dividers. Based on the principles of similar triangles, it’s mainly used for scaling drawings but can be directly applied to a project if necessary. The tool opens to a wide V where you can, on the Line of Lines, see that the distance between the “6” markings is half the distance between the “12” markings, and the “4” marking separation is a third of the “12” separation. That much is intuitive, useful for scaling a drawing up by say, a third. Quick – how tall is a 7 1/2” drawer front if scaled up by a third? Set your dividers to the height of the front, open the sector so the divider just spans the “9” markings, then open your dividers to span the “12”. No math involved, and mathematicians were scarce in the 17th century. There is also a scale labeled “Line of Circles”. It has markings for “Radius”, Diameter”, and “Circumference”. These are also intuitive proportions. Diameter = 2 X Radius and Circumference = Pi X Diameter. Linear relationships. Similar models of the Sector are freely available on Jim Tolpin’s By Hand And Eye web site. He will sell you an 11 inch assembled model. Also Brenden Gaffney’s web site has information and a link to a useful YouTube video on the subject. Brenden appears to have an obsession with ancient measuring techniques, you can buy a ruler calibrated in Cubits from him. Brendon also teaches occasional classes at Lost Art Press on making your own Sector. The description file that accompanies the Tolpin, Gaffney, or FirstLightWorks models give several examples of a Sector in use. Gaffney’s YouTube video above, is also filled with information. Galileo is often credited with the invention of the Sector in the 1690s, but there are versions known from at least a century earlier. Galileo perfected and expanded the idea of a proportioning tool as an aid to military operations and his design includes scales dealing with solid objects, like cannonballs. He made a hundred copies in brass of his design, which he called a “Proportional Compass”, then wrote a document on using the tool, but printed 80 copies only for those who bought one of his instruments. There were no pictures in the tutorial so it was useless unless you had the purchased tool in hand. That’s how you copyrighted things in the 17th century. The front of Galileo’s compass carries four pairs of scales: arithmetic lines, 245 mm in length, divided into 260 equal parts, used for a variety of proportional calculations; geometric lines, for solving the following problem: given a regular polygon, find the side of another polygon with the same number of sides, but with area n times the area of the first polygon; these lines can also be used to extract of the square root of a number; stereometric lines, for finding the solid with a volume n times that of a given solid; metal lines, used, as Galileo says, to give “proportions and differences in weight between the materials indicated on them”—in other words, to determine the specific weights of metals. On the back are engraved: polygraphic lines, for finding, from a side of given length, the circle circumscribed around a regular polygon with any number of sides; tetragonic lines, for finding the side of a square, pentagon, hexagon or other polygon with the same area as a circle of given radius, and vice versa; adjunct lines, “added” to the tetragonic lines for finding the square of the same area as a circular segment of given chord and radius. The FirstLightWorks and Tolpin Sectors have a third scale: “Line of Polygons”. You draw a circle, transfer the radius to the Sector Polygon scale at the “6” division, then with the dividers pick off the correct side length to inscribe a Polygon with 4 to 12 sides inside the circle. This is very useful, but not as intuitive as the Line or Circle scales. IF I can find a suitable hinge, I’d like to make my own copy of the Tolpin Sector. The “Line of Circles” and “Line of Lines” are linear and easy to lay out but “Line of Polygons” is decidedly not-linear. There are web sites that calculate the length of a polygon side (some giving wrong answers) but Google could not find a description that showed how the Polygon line worked. After many pages of crossed out equations and a less than satisfactory prototype, I found a geometric hint that led to a solution to the problem: How far from the pivot point is the mark for the various polygons? Skipping over all the details, the solution is $x = l \sqrt{ 1 - cos (\frac{360}{n})}$ where n is number of polygon sides, l the total length of the Polygon Line, x is the distance from the pivot point. These calculated distances agree with the Tolpin rule I have. This is the formula from the University of Regina web site for the side length of an nth degree polygon inscribed in a circle with radius R. The formula was developed from the familiar “Law of Cosines” $c{^2} = a{^2} + b{^2} - 2ab \ cos (C)$ where C is the angle opposite side c. 1.0 $c = \sqrt 2 R \sqrt{ 1 - cos (\frac{360}{n})}$ The farthest mark on the Polygon line is n = 4, a square. At this point the side length formula reduces to $c = \sqrt 2 R$ because $cos (90)$ is zero. Drawing a line perpendicular to side $c$ through the center of the circle divides the Sector triangle into a pair of right triangles with far end $c' = \frac {c}{2}$, the apex angle is $C' = \frac {C}{2}$. Since the 4 mark is at the far end of the Polygon line, the sine of the apex angle is 2.0 $sin C' = \frac {\sqrt 2 R}{2 l}$ or 2.1 $sin C' = \frac {R}{\sqrt 2 l}$. For all the other Line of Polygon markings, the general formula 1.0 above applies. The c side of those similar triangles will be half of eq. 1.0 3.0 $c' = \frac { R \sqrt {1 - cos (\frac {360}{n})}}{\sqrt 2}$ Dividing that opposite side by x, the hypotenuse which is the quantity we are trying to derive gives again the sine of the angle C’ 3.0 $sin C' = \frac { R \sqrt {1 - cos (\frac {360}{n})}}{\sqrt 2 x}$ Now we can equate the two sine formulas. 4.0 $sin C' = \frac { R \sqrt {1 - cos (\frac {360}{n})}}{\sqrt 2 x} = \frac {R}{\sqrt 2 l}$ Cancelling like terms gives: 4.0 $\frac { \sqrt {1 - cos (\frac {360}{n})}}{ x} = \frac {1}{l}$ and re-arranging finally shows: 4.1 $l \sqrt {1 - cos (\frac {360}{n})} = x$ Which gives the distance x from the Sector pivot to any nth degree polygon mark, for a given length of scale l. So of course I made a spread sheet. What ancient tool is complete without it’s own spread sheet? Input the length of your Sector’s scale and the sheet gives distance from the pivot for each graduation. You can also change the number of graduations on the Line of Lines scale. You can download a copy of the spread sheet from Dropbox https://www.dropbox.com/s/8q7elf674e1omqe/Sector.zip?dl=0 ## More Boxes – Triangles I’ve mastered the creation of Rectangular sliding lid boxes, and Hexagonal sliding lid boxes. What’s next? How about three sided boxes? Can’t do a sliding lid because there would be no parallel sides for the lid to slide in. I did a few lift off lid boxes last year and that might work for a triangular configuration. I realized a triangular miter corner box would need miters cut to a 30 degree angle. This is a problem because the table saw blade will only tilt to 45 degrees. Some discussion on the Dupage Woodworkers forum uncovered two methods – tilt the blade 30 degrees from vertical and clamp the work piece vertically, the other method tilts the blade to 45 and shims up the work so the cut is at 30 degrees. The former method is used in making flag cases where the miters are at 22.5 degrees but I wanted to precisely control the width of the box sides which means using a stop of some kind and don’t see a way to implement a stop with the work sticking straight up. So I chose the shim method. I have a cross cut sled built specifically for mitering 45 degree rectangular box corners, that could be modified for this purpose. I sawed a 16 degree ramp from a 2×8 and attached it to the sled. I quickly found my homemade flip stop T Tracked across the back fence wasn’t going to work. I used the cutoff from making the ramp to add a bit of T Track at the same angle as the ramp. The flip stop has to drop slightly below the ramp surface because the work is cut face down and the sharp arris would slide under the end. There’s a shallow rabbit to allow that to happen. The ramp was made to 16 degrees to provide a small amount of blade tilt range so the cut can be tuned. It works well and later a DeStaCo style clamp was added to save fingers. Calculations for sizing the components are not complicated, basically dividing the problem into a series of 30-60–90 triangles. I assumed the construction would be from a single board, though it is certainly possible to use a different board for the lids than for the sides. It’s very important for the stock to have parallel edges and a uniform thickness. The critical measurements are the board width which determines the lid size, and the board thickness which along with width determines the length of each side. I made a spread sheet. A 1/8″ allowance for saw kerf works well for me, but I use a Diablo 7 1/4″ thin kerf blade that makes a cut only .066 wide. Your Mileage May Vary. To make the sled work, you cut the side pieces square, then bevel them later. Dimension the side blanks 1/8″ longer than the sheet specifies to give a bit of leeway in the crosscut jig. I used my miter gauge with an aux fence and stop added to make these cuts. Once the first side blank is dimensioned, it can be used to set the flip stop for the rest of the sides. Keep in mind you might be making many of these boxes so the stop setting can be used over and over. The next set of cuts with the blade straight up is for making two lid blanks. I trust the 60 degree click stops on my miter gauge, and do this free hand after drawing an initial line on the board. Five prepared pieces result ready for miters and rabbits. The next few steps cut the thirty degree miters on each side piece. I use a Wixey angle gauge to set the blade angle which as discussed above, works with the ramp to make the correct bevel. I found after considerable trial and error with my first box that a blade angle of 45.6 degrees is best for my sled. A tenth of a degree make a noticeable difference in how the box sides fit together so accuracy is important. I use the small square to ensure the Wixey is perpendicular to the table. An initial bevel is cut on all side pieces with the flip stop raised. Here you can see the DeStaCo clamp I added in use. Now mark one of the side pieces for the position of the second bevel. (5.086″ here from the spread sheet) Position the side piece on the sled, drop the flip stop, and sneak up to the mark by making thin cuts while moving the stop. Check the overall length. It’s a good idea (though not necessary) to keep the side pieces in order so the grain flows nicely around the box. Lay the three sides down, align them, and use a marker to print dots on adjacent bevels. Those dots will come in real handy when you have glue applied to the bevels and have to quickly assemble the box. Also, this is a good point to decide and mark which edge will be the top. With all six bevels cut, you can dry fit the box and see how your angles worked out. It doesn’t get any better than this. All the remaining milling is done with a 1/8″ wide blade with flat teeth. I use one of the side blades from my Freud Stacked Dado set. A wide ATB blade will work but not look as good on the finished box. Note here that it’s best to make the bevels first then do the grooves which minimizes tear out of the grooves. The fat blade is swapped into the saw, a zero clearance insert installed and blade height set to 1/8″. The grooves for the lid plates in this project are assumed to be 1/8″ and that is built into the spread sheet. Practically though, I make the lid plate grooves a few thousandths deeper that 1/8″ to allow for wood movement. Bring the saw fence up to 1/8″ from the blade and we are ready to cut grooves for the top and bottom lid plates in all three side pieces. Note that one groove uses the top edge as reference, the second groove uses the bottom edge as reference. This is why it is important the stock has a uniform width. A similar blade set up is used to make the rabbits around the edge of each lid blank. The lid is held vertically against the fence, so the height of the blade sets the depth of the tenon, the distance between blade and fence sets the thickness. I always make two passes as the wood has a tendency to ride up over the blade. Initially set the fence a little too far from the blade. This will allow sneaking up on the final tenon thickness. You want the lid to float, it should fit easily in the groove but without a lot of play. Once a good fit is found, run all the lid edges. Short grain edges first, long grain edge last will minimize tearout. Make a small mark on one of the sides to indicate how far down the inside surface of the lid comes. When the lids are fully rabbited, you can do a dry fit of all five components. Check that the miters can fully come together. If they don’t, it’s probably because the lid plate is a bit too big or the rabbit not deep enough. Fix with a shoulder plane or tweak the rabbit set up on the table saw. The inside surface of the lid plate should have a small amount of clearance around the edge in case the wood expands. You can check this by dry fitting the lids one at a time or just set the lid in it’s groove. There should be a small space between the inside corner of the lid and the start of the groove. Now comes the interesting part, cutting the two grooves that will nest together after the box is glued up and cut open. This is an upside down detail of what it will look like. The lid plate fits in the groove at the bottom, the lip of the sawn off top is formed by the middle groove and the lip on the sides is formed by the top groove. The bottoms of those two grooves must meet precisely. Between middle and top grooves is a small bit of wood where the assembled box will be sawn open. Measure from the top edge of a side to the previous mark that indicates how far down the inside of the lid comes. Add about .020 to that measurement and set the saw fence to that dimension away from the blade. This will be the position of the groove that forms the lip on the sawn off lid. Paying attention to which edge you previously selected as the top edge, cut the groove in all three pieces. Now to position the final groove that will form the lip on the side pieces, set the calipers to the bottom edge of the lid lip groove plus the width of the blade you will be using to cut the box open plus .020″. Set the saw fence that distance from the blade. Carefully measure the distance from the bottom of the lid lip groove to the outside surface of the side piece. Set the saw blade height to that dimension. If all goes well, the inside of the next groove will coincide perfectly with the inside of the lid lip. It may be best to make this dimension a few thousandths short which will allow for fine tuning of the lid fit later with a shoulder plane. Cut the final groove. Note this is on the OUTSIDE of the box, the side pieces are face down on the saw table. The stack of side plates are now completed ready for a glue up. You can do a final dry fit to check everything out. The entire process outlined above including taking photos took about 3 hours. I did have all the jigs made and debugged but that’s an indication of how long it would take to make these in quantity. Dry fitting or gluing up something with many parts requires a third hand. This is the fixture I use to assemble triangular boxes. It is a bit of 2×4 with a deep 60 degree channel cut in the center. It is very effective holding the side plates together for a dry fit, and will be invaluable during the glue up. There’s a small amount of room at the apex of the V notch so glue won’t accumulate. I also use this V block later against one jaw of the bench vise while planing top and bottom edges true. I decided to pre-finish the lid plates. It’s always a problem wiping down pooled oil at the edge of the lid and the 60 degree corners of these boxes makes that even worse. I made a quick rack from scraps to support the parts while the Watco oil cures for a day or two. I’m not going to cover my finishing process here, maybe that will be the subject of a future article. I’ll just point out the secret weapon – A small block covered with 1/16 sheet of wet/dry sandpaper. Wet the piece with oil and sand it in. Wipe it off not immediately but later when the oil has begun to congeal. Time the wiping right and you will have a baby smooth surface. Using a series of jigs to construct parts helps when you are producing more than one item. You do one setup, run that on all the boxes, then move to the next setup. This run made twelve boxes. Everything for the 12 boxes is kitted up here, so on to gluing. I use Old Brown, liquid hide glue. I use OBG for it’s long open time, easy squeeze out cleanup with warm water, does not interfere with my Watco oil finish, and most important, if you get it on your shirt it will come out in the wash. It needs to be 120-140F degrees to work well and the work temperature should be above 60F. An electric tea pot preheats my bottle of OBG, then I squirt enough to do one box into a ceramic dish that’s warmed by a modified coffee cup warmer. It’s much more controllable to apply with a cut down acid brush than squirting it on from the bottle. Glue ups should always be organized and rehearsed, the matching dots are critical. This was my working area. Red Rosin Paper protecting my beautiful plywood bench top. Small blocks of scrap keep the glue surfaces off the paper. Rubber bands and bicycle inner tube sections do the clamping. This is the only (poor) photo I got of the actual glue application. Paint a good bead across the bevel near the outside edge then draw the glue up to the inner edge. Make sure the area around the grooves is covered as the top will be weak if the glue is thin there. Try not to get it in the grooves themselves but it can be cleaned out later. Paint all six bevels. Set two of the sides in the V block, paying attention to the dots. I’m usually putting the no dot faces in there but any pair will do. Insert both lid plates, choosing the best one to be the top. I always grain align the top and bottom plates but that’s not necessary. This photo shows the top plate seated in it’s grooves. Set the final side piece in place and slip a rubber band around the middle. I rock the box back in the V groove to do this. The rubber band will hold the box together while stretching stronger bands around the ends. Pinch the outside corners together all around, checking that the outside edges of the miters meet correctly. I glued up all 12 boxes in about 2 hours including fussing with the Camera. Then set them all outside to warm in the sun. When the glue has set and the clamps removed, I true up both top and bottom edges. It usually takes only one or two strokes with a hand plane. This is a number 3, always use a long enough plane to rest the heel on an adjacent edge. With a flat and true bottom edge to use as a reference, we can now saw the box top free from the body. Seat the box bottom firmly against the fence and tweak the fence so the saw blade leaves a tiny slice of wood above the groove. In the paragraph above on grooving, we allowed an extra 0.020″ width so leave about half of that. Proceed with the three cuts needed to free the lid. Do NOT press against the lid on the last pass, let the lid fall free else the lid will kick back and be damaged. Don’t Ask Me How I Know This. Another way to handle the kick back problem is to adjust the blade low so it leaves 1/16″ of wood for support. Then finish the cut with a fine hand saw. Because we allowed a little extra at the cut site, when the lid is separated there will be a thin strip of wood remaining on one or both pieces. Remove this with a hand plane, keeping the heel of the plane on an adjacent surface as reference. Note the use of a second spacer block to keep the relatively narrow lid assembly under control. Test fit the lid on the body. It is unlikely that it will fit perfectly. I purposely adjust the depth of the grooves so the lids are always too tight. That allows tuning with a shoulder plane at this point. Take thin shavings from the lip on all three sides of the body until the lid fits perfectly. I’m using a Miller Falls 85 here, it’s equivalent to a Stanley 78. I’m not covering details of applying an oil finish here. I did two experiments with this run of boxes. First I applied finish to the top and bottom lid plates before gluing up the box. That was because I could see wiping the oil down in those 60 degree points was going to be a pain. This mostly worked but I still got Watco on the lids so had to wipe them down anyway. Second, I oiled the inside of the boxes separately with Formbys Tung Oil. It’s hard to wipe down the inside of the box with those sharp corners, and the Formbys sets up almost too fast. The inside came out OK but I notice in a few places, the Tung Oil got on the outside of the box and showed light spots later after applying the Watco Natural. Won’t be doing that again. This is a family picture of the twelve mass produced boxes and the three prototypes. They came out well though I made a few mistakes along the way, resulting in some boxes being shorter than others. This is a novel design but too impractical to make a large quantity. Ted Baldwin, one of the Box Gurus on YouTube says you should never make something with corners so sharp you can’t get your finger in there to clean it out. ## Rust Removal Using Electrolysis ### Why would you do this? If you are a person who only buys new stuff at the big orange store you probably won’t need to remove rust. Myself, I am retired and have more time than money. In other words, “Cheapskate”. I watch for garage and estate sales with old tools I can use. My garage is full of restored tools, most tuned to be as good or better than when they were new. “They don’t make them like they used to” is certainly true for woodworking hand tools. This is my current favorite hand plane. Found at a flea market, all exposed surfaces had a good coat of rust and to further insult, someone had varnished over the rust. It now works beautifully. Stanley 5 1/4 Derusted and Tuned Rust removal is not limited to tools. There is an active Facebook group for people using electrolysis in large tanks to clean flea market cast iron cookware. Old car parts need it. I even saw someone had de-rusted a whole car. Near my home there used to be a restaurant “Key Wester”, in the lobby there was a Spanish cannon retrieved from the waters off Florida that had been cleaned with electrolysis. The sign said it was in the tank for months. There are degrees of rust. I avoid tools with areas that look like scabs. Those will clean (with difficulty) but leave a pit in the surface that may or may not affect the function of the tool. An even layer of surface rust, even if heavy, will usually clean off to a usable surface. Electrolysis won’t damage underlying iron but doesn’t actually remove the rust. It just changes the red oxide to a black form that is easily scrubbed off, so there’s still elbow work involved. Electrolysis in itself won’t remove paint or plating. But if the paint is loose, it may come off in the scrubbing. I have not had a problem with the Japanning used on hand planes coming off, though any coating that is rusted underneath may separate regardless of the cleaning method used. ## Components These are the things you need to get started. A waterproof container large enough to submerge the subject. Best to use plastic. A metal container will possibly trigger a short circuit though I have seen people using steel tubs with good results. I usually use either a six gallon bucket or a three gallon bucket. Some of the cast iron cookware people use barrels. Small Tank in Action Objects that won’t fit in a bucket can be handled by making a tank to suit. I have de-rusted several full size hand saw blades in a homemade tray consisting of a plywood bottom and scrap molding for the sides. I lined the tray with plastic sheeting and laid electrodes flat in the bottom. Saw Cleaning Tray From Scraps A flat tray like this will only do one side of the iron. You have to turn it over every half hour or so. Also I found the plastic grid insulators left a pattern on the saw blade. To reduce that, just move the blade a bit every 15 minutes. Hand Saw Blade Under Electrolysis De-rusting and scrubbing can be a dirty mess so it’s best to do it outside the house. I usually move to the driveway and do scrubbing on an old plastic sign. It’s a good use for those placards left up after election day. An anode (or anodes) at the inside edge of the tank. Anodes are connected to the positive terminal of the power supply. Steel plates are good, I have seen cut up coffee cans, discarded hacksaw blades, even rebar. Remove paint or other coating facing the inside of the tank or they won’t work. Some people warn against using stainless steel because of possible heavy metal contamination of the electrolyte. However the cookware people on Facebook recommend ONLY using stainless, and I use stainless plate salvaged from electronic equipment, bent to clip over the sides of the buckets. Avoid aluminum and galvanized steel. Aluminum will disappear and Zinc contaminates the electrolyte. It’s a good idea to add a layer of porous electrical insulation. Too often one of the objects falls into the tank and can short circuit the power supply. I use plastic grid cut from a milk crate over my larger anodes. Occasionally the plates need to be cleaned, so make any insulation removable. Multiple anode electrodes must be electrically bonded together. Small Electrodes, Large Electrodes A source of Direct Current. This can be from 3 to 24 volts, an automotive battery charger is typically used. A small one with 6-15 amp capacity is fine, lots of these show up at garage sales. Try to get one with a meter so you can see if you are drawing too much or too little current, and bonus points if the charger has a six volt setting. Switching down from 12 to 6 volts is an easy way to bring the current into range if you mix the electrolyte too strong. Battery Chargers Some newer chargers have short circuit protection built in and will not start if they don’t see at least some voltage on the leads. The charger above on the right has an “Activate” position that will source current no matter what into a dead battery. Also watch out for really old chargers that have Selenium rectifiers. They work but are inefficient and if you short one long enough to blow out the rectifier you can’t believe how bad it smells. DAMHIKT. There are people using cast off PC power supplies for electrolysis but that’s way beyond the scope of this article. Electrolyte to make the solution electrically conductive. The classic electrolyte is Arm and Hammer Washing Soda (Sodium Carbonate) dissolved in plain water. Many supermarkets carry it. Baking soda (Sodium Bicarbonate) works but is more expensive. People also use Borax but I have not tried it. All these are non-toxic, you can pour it down the drain or on the lawn when you’re finished. Sodium Carbonate The starting recipe is one tablespoon per gallon of water. That’s about a handful in five gallons. Washing Soda doesn’t dissolve easily in cold water, if you heat the first gallon it will dissolve better. I fill the tank half way then pour in water heated in an old coffee pot. Stir until the Carbonate dissolves then fill the tank the rest of the way. Undissolved powder left in the bottom of the tank will eventually go into solution because the mixture warms from the heating effect of the current which gradually increases the power draw, possibly overloading the charger long after you’ve started it up. Scrubbing tools. Again, electrolysis doesn’t remove the rust, it changes it to a form that is easily scrubbed off. Most chemical de-rusting methods are the same in this regard. My favorite scrubbing tool is a brass bristled brush. Stiff enough to remove black oxide but not so stiff that it scratches cast iron. Brass won’t round over edges that shouldn’t be rounded over, like the mouth of a plane. Rotary steel wire brushes will do that. Brass brushes used to be common in the barbecue section of hardware stores, but I only see steel these days. Another source is suede brushes from a shoe repair shop. Stiff plastic brushes may also work, and Scotch Brite scrubbing pads are used often. Scrubbing Station Keep a bucket of clean water next to the scrubbing area. When a piece of iron is scrubbed clean it will flash rust again very quickly in the air. The easiest way to avoid re-rusting is to store the cleaned parts submerged in fresh water. That may be counter intuitive but it keeps oxygen away from the metal until you are ready to dry the piece. Scrubbing with a brass brush when the part is still wet with carbonate solution will transfer a small amount of brass to the surface of the iron giving the part a goldish cast. I like it, I think it looks antiquey. If you don’t want color, just rinse the part good in clean water before scrubbing. I scrubbed the saw plate in the above picture with a copper brillo pad and, surprise, the saw has a copper tint now. Set up the electrolysis tank. So far we have a bucket full of Carbonate solution with anode electrodes around the inside surface. The iron components to be de-rusted must be carefully hung in the middle of that solution so they don’t touch the anodes. I use a board with fat copper wire threaded through numerous holes, this forms the cathode and is connected to the negative terminal of the charger. The board has screws near the ends spaced so it can be wedged onto the sides of the bucket, providing some security against parts accidentally moving and causing a short circuit. Battery clips soldered to the Copper buss support smaller items while larger parts like a plane body get dangled from their own wire wrapped around the cathode buss. A large part may be drawing several amps so you need at least #18 wire. Remember, positive to the outside anodes, negative to the tool. Cathode Hangers, Large Tank & Small Tank Another caveat, the process is essentially line of sight from the anode to the part. If you have one part shadowed by another part, it won’t get cleaned well, so you have to arrange dangling objects carefully. Once the parts are in the tank make one last visual check for potential short circuits. You won’t be able to see through the soup when the process is running. If you’re sure every thing is separated, start the charger and read the current. A good initial amount would be 2/3 rated current as it will increase a bit as the solution warms up. If the current is not high enough, add more carbonate. You can just stir some in, but a better way is to make a hot, concentrated solution in the coffee pot then pour some of that into the tank. If the current is too high you can either lower the voltage or add water to the tank to dilute the carbonate. Six Gallon Tank Small Tank in Action It will take from one to six hours in the tank to get most parts back to an clean state. I usually remove parts every hour and scrub them a bit just to see how the reaction is going. Unlike some chemical methods, it doesn’t hurt to leave the parts in longer than necessary. After the final scrubbing, one at a time pull the parts out of the rinse pail and thoroughly dry them with towels, heat, and compressed air if there are any holes. Apply oil or paste wax to the bare iron to inhibit future rusting. ## Other ways to de-rust an iron object. Search “electrolysis rust removal” on Google or YouTube. Many chemical methods use a mild acid. Vinegar is popular, it’s usually 6% acetic acid and sometimes salt is added. Naval Jelly works quickly, it contains phosphoric acid. Christopher Schwarz mixes up a citric acid solution, you can get citric acid powder from Amazon. Acid techniques will eat away the underlying metal if the part is left in the soup too long. Electrolysis uses a basic solution which is more iron friendly. Evapo-Rust is the chemical mentioned most often. Nobody knows what’s in it, the MSDS says “Proprietary non-hazardous chelating agent”. It supposedly will not attack bare iron if you leave it too long. Mechanical methods remove rust quickly but run the risk of also removing or scratching the iron. Years ago I restored my very rusted garage sale table saw with Wet/Dry sandpaper lubricated with WD40. Scraping the rust with a razor blade is not perfect but is good for something like an old saw where you want to keep the etch intact. A rotary wire brush in a grinder works quickly but will erode a cast iron part. If you don’t care about flat surfaces and crisp edges go for it. This is an estate sale plane I’m using as a before/after electrolysis demonstrator. The parts were laid on their side in a shallow pan half submerged with a sheet anode in the bottom. I masked the still rusty side with duct tape before scrubbing. I thought the plane was a generic piece of crap when I bought it but after revealing the Zenith logo stamp and some research, I find it is a very nice tool – Sargent OEMed to Marshall Wells Hardware Co. It’s identical to a Sargent 14C which was only made from 1910 to 1918 and well worth restoring. Zenith Electrolysis Example Zenith Cleaned Side Zenith Before and After Bottom ## Method for Sharpening Hollow Plane Blades I recently acquired two wooden beading planes, a 1/4 inch and a 1/2 inch. A beaded edge on a wooden project is decorative and more resistant to damage than a plain square edge. Planes that do beading are not particularly rare, this one came from the MWTCA tool show at Garfield Farm August 4, 2019. Quarter Inch Beading Plane This is what a beading plane does. The bottom beads are single, the top two have been cut in from each of the two sides. The small notch that forms the inside of the round is called the quirk. Quarter Inch Beads Cut A Stanley 45 came with seven beading cutters, 1/8″ to 1/2″. Because of the design of the skates, a Stanley 45 bead has a fat quirk. Wooden bead planes make a more desirable, delicate profile. Here are the blades from my two beading planes. See how the profile lines up with the bottom right or the top left bead in the above picture. The small flat part on the left edge cuts the quirk and it, plus the concave part, must match the profile of the plane’s bed precisely. The quirk is extra important because it is the first thing that touches the wood and guides the plane through the rest of the cut. Thus it receives heavy wear and most beading planes have hard boxwood reinforcement there. Half Inch and Quarter Inch Beading Cutters ## Shaping the Cutter The half inch beading plane had a seriously abused cutter. The quirk part had been improperly sharpened so the first order of business was to grind that back to a proper square edge on the bench grinder. Inserting the cutter back in the plane with the quirk edge aligned showed the concave part was now about an eighth of an inch too high. Shaping the concave edge was done by scribing the bed profile on the back of the blade, then using a rotary die grinder. I have also used a Dremel tool on Stanley 45 cutters with a similar process. It’s important the tools not move, so the grinder was secured in a jig I made years ago for a different purpose. Grinder Support Jig Some fussing with shims was required before the grinding point was parallel to the workbench. Checking that Grinding Point is Parallel to Workbench Now that the grinder is true to the bench, I can make a 30 degree block to hold the cutter at the right bevel angle. This 30-60-90 block was made with dozens of cutoff corners from making hexagonal box lids. I used to use it as a bicycle wheel chock. It just needed a 3/8″ spacer to bring the ramp up to the grinding point. The small bit of cherry under the left edge registers against my workbench to hold the block true. Note that not all cutters are made to 30 degrees. Stanley 45 beaders are 35 degrees and you have to make a ramp to match that or you will spend a long time grinding. Thirty Degree Cutter Support Block A photo of the ramp from the top. Black stains are from grinding swarf. The pine spacer has been planed off to match the ramp surface. Thirty Degree Cutter Support Block All the pieces are together and I could reshape the concave part of the half inch cutter. I noted cheap grinding points are not straight or very round so spent some time with a diamond grinding wheel dresser to clean it up. It took about an hour to remove an 1/8″ of hardened edge. Have to be real careful around the quirk, and don’t burn the steel. Shaping the Curved Bevel ## Sharpen and Hone the Cutter Shaping is not sharpening. You need finer grits to create a cutting edge. Flattening the back is the same exercise as for any other plane blade or chisel and I honed the quirk by setting the blade up in a jig. These narrow blades are not happy in the cheap side clamp honing jigs. I found the best way to clamp one up was to lay the blade flat on the rods that connect the two sides of the jig. Check after every adjustment that the cutter is still tight against the rods. I honed the quirk first by using the jig just at the edge of my stones. Then did the flat on the other side, then the concave edge. Bead Cutter Locked in Side Clamp Honing Jig Here’s how to set the side clamp jig for the proper angle. Lock the protractor at 30 degrees. Hold as in this photo, when the edge of the protractor is flat against the back of the cutter and the beam of the protractor just touches the roller, the jig is at 30 degrees. Slide the cutter back and forth until this happens then tighten the clamp screw. This technique will work for any plane blade or chisel. You have to do this for each of the three edges on the beading blade, one setting will NOT work for all. Adjusting the Guide for Proper Angle Now to the actual honing of the concave surface. Clamp a dowel a bit smaller than the curved opening in the bench vise. Then hold a quarter sheet of sandpaper around the dowel with one hand while sliding the blade back with the other hand. Repeat, repeat, repeat. I have sandpaper from 50 to 1500 grit available, mostly wet/dry lubed with WD40 and will work up through most of the grits. Remove the burr from the back on a 4000 grit waterstone after every grit change. Just keep that roller on the dowel and it works well. Be careful not to remove much material from the inside of the quirk, else the plane will bind badly. Sanding the Curved Bevel with Honing Guide Smaller dowels will flex in the bench vise so I made three wooden bridges for additional support. Collection of Dowels for Various Hollow Blade Sizes Here I am using one of the bridges to support a dowel rod. Using a Support Stick for Thinner Dowels It’s a real joy to use a plane that’s properly tuned and beading planes are no exception. I’m looking forward to my next batch of boxes having beaded edges. ## Tin Can Projects Altoids tins. Aren’t they wonderful? The Standard Arduino Enclosure. I have four of them sitting in front of me on the desk mostly because I haven’t found an appropriate spot in this crowded room to store them. So I decided to gather them all and take a family portrait. There are at least six years worth of winter projects, most of them are documented elsewhere on this web log. Clockwise from 12:00: Morse keyer 2016: The most elaborate evolution of my romance with the KC4IFB Iambic Keyer software. Uses a Teensy 3.2, has seven memories, LCD display of code sent, class D audio amplifier, software to monitor the two 18650 batteries, real time clock, and code practice. Toastmasters Timing Light: This project doesn’t contain an Arduino. Just a 555 timer and some switched LEDs. This was a commission from 2015. Morse Keyer 2017: Made to be small enough that I could listen to code practice while walking in the neighborhood. A 32U4 Adafruit Feather is inside. Morse Keyer 2014: This was the first and smallest of the KC4IFB keyers. It has an ATTiny85 inside, a 2032 battery and little else. Technically not an Arduino but programmable through the Arduino IDE. A Tiny85 sells for less than a dollar. It’s amazing what you can do for cheap these days. Capacitance Based Water Level Sensor: The current project, not written up yet. It will send water level measurements from my sump pump well to a remote alarm and display unit. Nothing inside but a Pro Mini Arduino. The PVC pipe is the sensor. At 6:00 Capacity and Resistance Measurement Instrument: 2019 project, battery powered Pro Mini. Uses the same capacity measuring code that is inside the Water Level Sensor. I added programming to measure resistance as well. PL Tone Generator This was my first microcontroller project. There’s a Diavolino from Evil Mad Scientist Laboratories inside. I Downloaded the Arduino IDE and got it working in one weekend. It has a pair of thumbwheel switches used to select from a couple dozen sub audible tone frequencies which are used to trigger repeaters on the two meter ham band. I have never gotten around to installing it in the radio though. Audio Adapter for Si5351 Signal Generator Divides an RF signal down to audio frequency and filters that into a sine wave. It will go down to One Hertz easily. Based on an article in QST, there is no Arduino inside, just battery, TTL dividers, and MAX294 filter chips. It has two independant channels and is the most densely packed of all the Altoids tin projects I’ve done. Si5351 Signal Generator: A late 2017 project, with the 18650 battery it would not quite fit in an Altoids tin. That box was intended to hold a gift credit card. Has a Teensy LC inside for control and has three independent outputs, each can generate frequencies from 100 Khz to 160 Mhz. At Center Morse Keyer 2015 This was my final hack of the KC4IFB iambic code with memories, sine wave audio, sending decode, buffered PS2 keyboard, and code practice implemented. A Pro Mini inside but no battery. I’ve had lots of fun doing these projects. Learned a lot – and the most outstanding thing I’ve learned is that the time required to complete a project is inversely proportional to the size of the box you’re putting it in. Thanks to all the people whose programs I pilfered to construct my own. That’s how Open Source works. ## Arduino Based Capacitance Meter Thirty five years ago I made a capacitance measuring meter from an article in 73 magazine. It’s built into a metal recipe card box about 3″ by 5″ and uses a timer chip similar to a 555 in different frequency ranges to apply AC to the capacitor under test. A microamp meter measures the current passed. Simple but each range has a separate pot for calibration. There’s two 9 volt batteries that seem to always be dead when you need the meter. It’s so old the Sharpie markings have faded out. The 35 Year Old Capacitance Meter Some time ago I built a prototype water level sensor that uses the fact that water has a very high dielectric constant. Immersing a capacitor in water should result in a significant increase in capacitance. I’ve been looking for a reliable capacitance measuring circuit ever since. I found an article on the Circuit Basics weblog that analyzed and tested three different Arduino techniques. They found the most promising method was a sketch from the Pic Tutorials web site in the UK. Test results indicated a range from a few picofarads to 1000 microfarads. Best of all, it uses no external parts! Just two wires connected to the Arduino A0 and A2 pins. So this created a diversion from the water level project – building a stand alone C meter. I tested the sketch on a Diavolino and on a 3.3 volt Pro Mini and it worked well. I adapted the code to output to a 16×2 LCD then started the build in an SAE (Standard Arduino Enclosure, Altoids tin) with selecting a pair of banana jacks from the junk box for the measurement connection. I spaced the jacks so I could use a standard two pin banana plug if needed, then discovered I didn’t have quite enough room to fit in the LCD. I wish somebody would make a 3.3 volt, 3/4 size 16×2 LCD. So.. I ordered a 128×64 OLED display from Adafruit. It cost twice as much as an LCD but would fit easily and could display more information. Locating the Adafruit OLED on the Altoids lid With the small display size, there would also be room for a couple of slide switches in the lid. While waiting for the OLED to arrive I parted out a small phone charger pack. Most of these contain a single 18650 cell and a small PC board with a charger and boost converter. I’ve used them before, they are sometimes on sale for as little as2.  The main problem is creating a hole for the USB jack and firmly attaching the PC board to  the box. The holes are a drill and file exercise. Here you can see the board is tack soldered at the top of the micro connector and at the side of the USB A jack.

Soldering Salvaged Charger Board Into the Altoids Tin

I brought out the boosted five volt leads but since the final build is all 3.3 volt parts, did not use them.  The 18650 itself is fastened by a soldered tin strap. I also squirted in a bit of RTV sealant to make sure there would be no movement. Both plus and minus tabs are insulated with Kapton tape as I did not want the SAE to be grounded in this design.

Soldered Tin Strap Restrains the Battery

The OLED is held in the lid by four screws and the Sparkfun Pro Mini is mounted directly on the back of the OLED by a five pin header soldered into digital 2, 3, 4, 5 and 6. These make the Data, Clock, D/C, Reset and Chip Select connections. Two wires complete the OLED power and ground – orange and green in this photo.

Showing How Pro Mini is Attached to the OLED

This is a top view of the arduino/OLED assembly. You can see power and ground wires on the right and leads to the A0 and A2 pins on the left. These are all that are required for the sketch to measure capacitance!

The Pro Mini/OLED Sandwich

First trial with the measurement sketch. Very happy with the result.

First Test with 18650 Battery

Now to put it into the SAE. A rectangular opening was cut in the lid with a Dremel cutoff wheel, filed to fit. A thin plastic layer fits across that opening to protect the OLED, and four #2 screws attach the assembly.  Two DPDT slide switches fit between the Pro Mini and the measurement jacks, one switches the power leads between charger and the Arduino, the other switches the measurement jacks between capacitance pins and future resistance measuring pins. The black heat shrunk object is a 3 amp fuse.

Box Interior

Here the device is powered up from it’s internal battery and measuring a capacitor marked 4n7. Close enough for me.  I have a few 1% capacitors and did better calibration later on in the build.

Working with Capacitance Sketch

Measuring resistors with an Arduino is a well developed application. Construct a divider with a known resistor and the part to measure, then use an analog input to measure voltage at the junction.  I did a spread sheet analysis of quantization errors with this technique. The calculated value can be off a lot if the measurement is anywhere near the limits of the A/D reading. My code keeps the analog reading near the center by using four resistance ranges in the known part of the divider. 100 Ω, 1000 Ω, 10,000 Ω, and 100,000 Ω. This should give repeatable measurements from 10 ohms to 1 meg ohm.

Working in Resistance Measuring Mode

I also added a 10k/10k divider between power and ground of the Pro Mini. This is connected to A3 to monitor battery voltage. In this photo you can see some of the resistor measuring tree tucked under the left end of the board.  The 100 Ω resistor between 11 and 12 is used to sense ground on the measurement jacks because I didn’t have a free contact on the R-C switch to tell the processor which mode it’s in. I look for a hard ground on the negative measurement jack to indicate R mode (thin blue wire). Pin 11 goes high to apply a strong pull up to pin 12 .

Note: V1.1 The sense resistor is revised to 200 Ω and connected to A7 instead of D12. This allows detection of ground in 5 milliseconds instead of 100 with no overload on the digital pins.

Pro Mini with Battery Monitor Divider and Resistance Range Tree

I calibrated with a handful of precision caps and some 3% resistors from Frys.

Calibrating

This is the “Calling It Done” shot. Resistance and capacitance measuring is working, that cap is marked 330 uF but that’s near the end of analog measurement range. The circuit is not very accurate above 200 uF.

Current drain with the display as pictured is about 12.5 milliamps,  a full charge on the 18650 should run the device for a week.

Final R/C Meter

##### Update Jan 29:

Added code to check battery voltage and display an on screen alarm if less than 3.0 volts. That’s complicated because the reference for analogRead by default IS the battery, which doesn’t matter to the resistance or capacitance code because they measure a ratio not an absolute voltage. So… VREF has to be switched to the stable internal 1.1 volt supply and it turns out, that’s not a straight forward process. The Arduino.cc page on analogReference says: “After changing the analog reference, the first few readings from analogRead() may not be accurate.” You have to do an initial dummy analog read to get the change started then delay at least 5 millisec for an internal capacitor to equalize.

The battery measuring voltage divider is changed to 39k on the RAW pin and 10k to the ground pin. That puts the divided voltage in range of the INTERNAL reference.

##### Update Jan 31:

Banana jacks and alligator clips work great for leaded parts but surface mount, not so much. I made an adapter to make it easier to measure those tiny capacitors and resistors. An old ISA prototype card was sacrificed, (didn’t think I needed one of those these days), the fingers are about the right spacing and they’re gold plated. I cut out a small section and  firmly bolted it to a two prong banana test plug.

The small bit of epoxied on wooden coffee stirrer makes a fence to help corral the part. You place the surface mount component across two of the fingers and press down with a toothpick to do a reading. One contact finger is skipped at the right end to make a wider spaced dock for larger components like electrolytic caps. In this shot I got lucky, the capacitor stayed contacted after I released the toothpick.