Thursday, December 11, 2014

Omnidirectional sonar antenna

Because I'm interested in collecting indoor sonar data that has lots of multipath, it is useful to have an omnidirectional antenna either for reception or transmission.  Here's a simple design for an antenna that radiates omnidirectionally in the azimuthal plane, but rejects sound from above and below.  Roughly, it consists of two round disks with a speaker or microphone placed in the center of one of them.  This acts like a cylindrical waveguide.

Before building this, I wrote a simple boundary element method simulator in GNU Octave to test the radiation pattern.  This was helpful to choose dimensions for the disks and the spacing between them.  The simulator used a dense grid of boundary points (blue below) and propagated to a dense slice of points (green).
After a bit of tweaking, I settled on a separation of 20 cm and a diameter of 60 cm.  This yielded a radiation pattern that's roughly flat for equatorial elevations, and drops off sharply beyond that.
Here's a near field plot as well, showing the standing wave structure between the disks.
I constructed the antenna from 1/4" plywood, using 1" dowels as standoffs between the disks.  To ensure the standoffs were reasonably precisely made, I faced off their ends in the lathe, and used the lathe to drill pilot holes for mounting screws. 

I also cut a tripod mounting bracket using the router.





The speaker is mounted in the center of the top disk. 



Here is the finished antenna.


The antenna seems to reject sound from above and below pretty noticeably, but as could be expected from an omni, its overall gain is not very high.

Sonar sounder

Computer sound cards can record at 44.1 kHz, and the CPU can process this data in real time.  With a little thought, this can be pressed into service to make a simple sonar setup.  I wrote a small Python program that uses NumPy, GStreamer, and GTK to make a real-time sonar display.  With a microphone and reasonable speakers, you can sense moving targets pretty easily.  I used cheap, 10 W speakers, and made a low-ultrasound sonar waveform that works well enough.

This picture below shows the setup.  The two white speakers emit the waveform.  The microphone is a small electret wired microphone and is sitting on the laptop keyboard.  The big wooden disk is a target.



The program plays a pre-recorded waveform on the speakers while simultaneously recording audio from the microphone.  In essence, the program implements two GStreamer pipelines.  A transmit pipeline

gst-launch filesrc location=<whatever.wav> ! wavparse ! pulsesink

which gets restarted every time it finishes, and a receive pipeline

gst-launch pulsesrc ! fakesink

from which the recorded data are snatched from the fakesink using signal handoffs right before the data are deleted.  Once the data are recorded, they're sliced into equal pulses (the pulse durations are known beforehand) and aligned so that the peaks are all at the start of the recorded pulses.  Consecutive blocks of pulses are averaged sample-by-sample to reduce noise without impacting resolution.  The result looks like the following screenshot, in which the target's echo appears between 77 cm and 166 cm.



Next steps for this project:
1. Apply a constant false alarm rate (CFAR) detector to the data with a user-defined trigger and window. 
2. Locate targets using the centroid of CFAR detection blobs. From that,
3. Estimate target velocity.
4. (Farther out.)  Switch to a dual pulse repetition frequency (PRF) waveform to improve velocity and range resolution simultaneously.

Saturday, December 6, 2014

My lathe tailstock is misaligned

Given the fact that lathes can be used to drill very precise concentric holes, I thought a fun project would be to make a fire piston.  So I took my default 1/4" brass rod stock, chucked a 3/16" bit into the tailstock and started drilling....
... but to my surprise and disappointment, the hole burst out the side!
Clearly the tailstock isn't quite parallel to the lathe axis.  Upon further inspection, it doesn't look like the sole plate of the tailstock is worn badly, and the spindle fits snugly.  However, the barrel has a bit of vertical wobble, and appears to droop down a little bit.  I guess the barrel has worn the bottom surface of the barrel ways in the upper casting a very little amount -- maybe a few hundredths of an inch.

I guess if I need to drill a deep hole, I'll need to do something like the suggestion in this article, which involves modifying the tailstock so that its vertical axis can be tweaked.  Sadly, it looks like I'll have to do something different than is shown in the article, because my tailstock has a horizontal cross slide (note the adjustment screw).


Sunday, November 23, 2014

Brass wheel arbor

For the clock wheels I made, I need arbors to support both the wheel and the pinion.  I decided to make these out of brass, with pivots to match the bearings I've been making.  Here's the overall design:
The arbor is cut from 1/4" brass rod, starting from one side, and then turning it around for the other.  The steps are made either using the slide rest or by hand with a graver, but the pivots are made by hand.  First, the rod is inserted in the chuck, and then lengths marked.
Then, the steps are cut.
Once the step are cut, the end is parted off, and the pivot is shaped using the graver.  Below shows the completed pivot, and is in progress of being parting off.
After this, the arbor is turned around and rechucked, with the other pivot cut.  Here's the completed arbor.  (The extra groove on the small step is a mistake.)
Here's the arbor fitted with a wheel and pinion.  It takes a bit of fiddling to get the arbor diameter correct.  It seems like a few taps of the hammer are useful to set the arbor into the wheel.
Here are two wheels fitted together in the depthing tool.  The fit is fairly sensitive -- a millimeter one way or another is enough to mess up the meshing.  Once depthed correctly, the gears run very smoothly!


Cutting gear teeth

I cut teeth on the gear blanks in several stages.  First, I made cuts along one side of each tooth.
Then, I cut along the other side of each tooth.  Notice that I do not yet cut the roots.
To cut out each root, I took two cuts.  First, parallel to one face, removing a little triangle from each tooth.
Finally, the remaining fragment was cut from the root.

Here are three sizes of gears with all teeth cut.

The roots of each tooth were a rough from the blade marks.  So to smooth them out, I used a file.  This is a little subtle: the gear on top in the picture below is after filing and the one on the bottom is before filing.
Finally, I sanded the front and back of each gear to smooth (and remove the paper plans that were initially glued to the gear).



Sunday, November 16, 2014

Flying pendulum escapement

I came across the flying pendulum escapement, which is mesmerizing.  So I started with a simple wooden frame cut from scrap wood.
The main arbor is made from a brass rod, and is supported on two brass thrust bearings.  I cut these from 1/4" brass rod on the lathe.  I first beveled the end with a wide drill bit, and then center drilled to a depth of 1/8" with a 5/64" bit.

I pushed these into slightly undersized holes in the frame, so that they are flush with the surface.
Once these were installed, I cut a pivot into one end of the arbor.  The end of the pivot is 1/8" long and 1/16" diameter -- giving a little clearance in the bearing.  I did most of the work using the slide rest, and then finished it using a hand graver.  I checked the polish under 2.5x magnification to make sure it was reasonably smooth and the end rounded.

Once this was made, I cut to rod to length, and cut a matching pivot on the other side.  This fits into the frame and allows the arbor to turn freely.
Again using the lathe, I cut a take-up spool for the cord and center drilled it to fit the arbor.  A 1/4" drill bit seemed to work, giving a snug fit to the arbor.
The escapement has a rotating arm.  I cut this from 1/4" brass rod, and drilled two 1/8" holes at right angles to the axis.  I then turned the arbor to a diameter of 1/8" for an inch or so to receive the arm.  This wasn't a tight fit, so I soldered it in place.

After this was completed, I added the rods to catch the pendulum as it passes.  I didn't really have any systematic way to do this, and it ended up looking OK.
However, it didn't work well.  For one, it seems to work best when driven by a very light weight -- about 0.5 oz.  Additionally, the spool seemed too big.  I also moved the rods around, so that it looked a little different.
Even still, it's extremely temperamental and difficult to get to run smoothly...  But here's the best run.


Saturday, November 15, 2014

Depthing tool

The process of setting the distance between gear centers is called "depthing."  The pitch circles of two meshing gears should be tangent -- deviation from this ideal can cause problems.  Gary Mahony has some nice animations of what various problems can occur.

So how does one set the distance between a pair of actual gears, rather than on the plans?  George Daniels says (in his fabulous book, Watchmaking) that one should never rely on calculations to depth a pair of hand-made gears.  One should instead use a gear depthing tool.  Such things can be purchased, or made.  For instance, the tool made by Jesse Donaldson is pretty close to what I envisioned, though John Moran's tool is perhaps a bit more standard.

I decided to make a gear depthing tool, though I wanted one that can fit a pair of 8" diameter gears.  So it has to be big.  On the other hand, as a first pass, I was not too concerned with overall parallelism of the two axes.  We'll see how well this works, and will modify if needed.


In order to cut the slot between the two jaws, I set up a fence and used a router.  This worked OK, though it took a few passes to get the router aligned correctly.  I made each pass about 1/8" deeper than the previous one, until the bit finally just cut through.



I made both of the jaws on the same piece of wood, so it was easy to cut the second slot once the fence was in the right place.  This ensured that both slots were aligned at the same distance from the outer edges.  Once cutting the jaws apart, the inner edges weren't exactly even, so I planed both jaws so they were the same size, and then screwed them together.  Since the jaws are soft pine, I made sure to drill pilot holes first, and I sighted the opposite edges to ensure that the slots were exactly parallel.

Each of the four arbors is cut from 1/4" brass rod in the lathe.  I started by facing off the end, and then drilling a 45 degree bevel into the end with the tailstock drill.  After this, I drilled the center with a 5/64" bit to receive a pivot.



After that, I turned down the the shank of the arbor to the appropriate diameter to receive 8-32 threads.  This took a few tries to get right, since I cut the first arbor too narrow and the second one wasn't all a uniform diameter.


I tapered the non-bearing end to a point, and then threaded the entire length of the rod at SAE 8-32.  This took a few tries -- I messed up two rods by cutting them too narrow, but finally ended up getting the right diameter for my die.  That's somewhere between 0.148" to 0.156", which is a bit off from the specified outer diameter of the threads.



Threading on a pair of wingnuts and washers attaches the bearing to the frame.  Adding a second bearing allows a gear to be supported between the two bearings.  The picture below shows an escape wheel mounted in the frame. 

After two more bearings, the tool is completed.  Here it is holding an escape wheel and an anchor.