The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Author: Ed

  • Audio Direction Finding

    Given a point source of audio (or RF, for that matter) that’s far enough away to produce more-or-less plane wavefronts, the range difference between two microphones (or ears) is:

    ΔR = (mic separation) x sin Θ

    The angle lies between the perpendicular to the line from the midpoint between the mics counterclockwise to the source source: + for sounds to your left, – for sounds to your right. That’s the trig convention for angular measurement with 0° directly ahead, not the compass convention, but you can argue for either sign if you keep track of what’s going on.

    The time delay between the mics, given c = speed of sound:

    ΔT = ΔR / c

    For microphones 300 mm apart and c = 344 m/s:

    ΔT = 872 µs = 0.3 m / 344 m/s

    If you delay the sound from the mic closest to the source by that amount, then add the mic signals, you get a monaural result that emphasizes, at least a little bit, sounds from that source in relation to all other sounds.

    In principle, you could find the angle by listening for the loudest sound, but that’s a fool’s game.

    There’s an obvious symmetry for a source on the same side, at the same angle, toward the rear.

    A GNU Radio data flow diagram that lets you set the angle and listen to / watch the results:

    Audio Direction Finding.grc
    Audio Direction Finding.grc

    The original doodles show it takes me a while to work around to the answer:

    Audio direction finding doodles
    Audio direction finding doodles
  • Traffic Signal Timing: Burnett Blvd at Rt 55 Detour

    Word from the BPAC meeting says that NYSDOT re-timed the signals on both ends of Burnett Blvd, because of the increased traffic from the closed bridges on Degarmo Rd. Here’s what that looks like from a bicyclist’s perspective; you may want to compare this with other measurements in the recent past.

    T=0.00 – I’m approaching the light and obviously won’t get through on the current cycle. However, the car in the left lane is just clearing the sensor loop, so we know the sensor has been triggered:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0073
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0073

    T=4.133 – Signals turn yellow:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0321
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0321

    T=8.433 – The left signal turns red (the right signal will go on 4/60 s later), with the white car accelerating hard across the stop line:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0579
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0579

    As nearly as I can tell, the green-to-yellow change has decreased from about 7 s to maybe 4 s; that may be influenced by the car position / speed across the loop. NYSDOT definitely hasn’t increased the minimum delay to provide additional time for bicyclists.

    The yellow-to-red transition may have decreased from 5 s to 4 s; it definitely hasn’t increased.

    T=10.433 – The white car deliberately blew through the yellow and red signals:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0699
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0699

    T=12.000 – The white car has almost cleared the intersection, 3.567 s after blowing through the red light, and cross traffic in Rt 55 has started to move:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0793
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0793

    It’s impossible to tell from my position when the Rt 55 traffic saw their green signals, but they started moving 3.5 s from the time the signal in our direction turned red. I’d previously measured that at 1.333 s, so NYSDOT seems to have lengthen the all-red overlap.

    T=14.433 – Cross traffic on Rt 55 fills the intersection:

    Burnett Blvd at Rt 55 2016-04-27 - detour timing - 0939
    Burnett Blvd at Rt 55 2016-04-27 – detour timing – 0939

    That’s 10.3 s from the Burnett signal turning yellow, which usually happens when we’re just barely into the intersection; we need at least 15 s to reach the far side of all six lanes. Obviously, cross traffic on Rt 55 must notice that we haven’t cleared the intersection when their signals turn green and avoid running over us; that’s legally required, but it’s obvious NYSDOT (still) isn’t helping bicyclists get across the intersection.

    The NYSDOT regional office behind my right shoulder has a bike rack. We’ve never seen any bikes in it, so it’s equally obvious NYSDOT doesn’t practice dogfooding. I’ve never been able to invite / persuade / shame anyone from NYSDOT to ride along with us, so they can show me why their design really does “mak[e] our highway systems safe and functional for all users“.

  • SoundTech CM-1000 USB Channel Layout

    Although microphones intended for conference tables aren’t suitable for inconspicuous hearing aids, they go a long way toward working out algorithms (*). This is a SoundTech CM-1000 USB mic:

    SoundTech CM-1000USB microphone
    SoundTech CM-1000USB microphone

    It produces noise-canceled stereo output and a quick test shows impulse sounds produce reasonable left and right responses responses; I can’t vouch for the noise cancelling part.

    A click to the right side:

    CM-1000USB mic - Right pulse
    CM-1000USB mic – Right pulse

    And to the left:

    CM-1000USB mic - Left pulse
    CM-1000USB mic – Left pulse

    The green trace (Channel 2) is obviously the Right channel, which corresponds to in1 on the Scope Sink block and out1 of the Audio Source in the GNU Radio data flow diagram:

    Microphone Time Delay.grc
    Microphone Time Delay.grc

    There’s an irreconciliable clash between 0-index and 1-index numbering in there, but the microphone’s “Left” and “Right” channels appear in the proper places when you look at the mic from the conference room side of the label as shown in the top photo.

    Figuring the speed of sound at 344 m/s, that 100 µs delay means the mic capsules sit 34 mm apart, which looks to be about right, as the flat part of the housing under the label spans 22 mm.

    That’s a tad skimpy for things like beamforming and direction finding, so I actually bought a set with a separate CM-1000 mic that plugs into the USB mic:

    SoundTech CM-1000USB and CM-1000 microphones
    SoundTech CM-1000USB and CM-1000 microphones

    The channel layout diagram explains what’s supposed to happen:

    Soundtouch CM-1000USB microphone channel layout
    Soundtouch CM-1000USB microphone channel layout

    The additional mic changes the response, so that the USB unit becomes the Left channel and the analog mic provides the Right channel. I don’t know what happens to the “noise canceling” part of the story.

    With the mics positioned 200 mm on center, a click to the right side:

    SoundTech CM-1000 mics - 200 mm OC - Right pulse
    SoundTech CM-1000 mics – 200 mm OC – Right pulse

     

    The eyeballometrically precise 600 µs delay corresponds to 206 mm at 344 m/s, which might actually be close: they’re 200 mm on center, but the Right-channel mic is 10 mm smaller and the mic might be half that much further away from the other one. Not that that makes any difference.

    (*) And, frankly, slapping a mic on the table won’t bother me much at all…

  • Ed’s High-Traction Multi-Grain Bread, V 1.1

    A somewhat lighter, more rye-tasting loaf than my classic recipe:

    Combine dry ingredients in a 4.5-quart mixer bowl:

    • ½ Tbsp dry yeast (1 Tbsp for more boost)
    • 2 Tbsp brown sugar
    • ½ cup dried milk

    Stir in:

    • 1-½ cup warm water

    Dump more dry ingredients on top, do not mix:

    • ½ cup flax seed meal
    • 1 cup bread flour
    • 1 cup rye flour
    • 2-½ cup whole wheat flour
    • 1 tsp salt

    Let the dry ingredients sit on top of the liquid for 15 minutes as the yeast revs up, then run the mixer until the dough ball cleans the bowl sides. Oil the bowl, cover, and let the dough rise for maybe an hour (45 minutes in warm weather / oven).

    Form the ball into an ingot, pack it into a non-stick loaf pan, cover loosely with aluminum foil, and let it rise another hour (30 minutes in warm weather / oven) to fill the pan with a nice loaf. I’ve been using a King Authur 8-½ x 4-½ inch non-stick bread pan to good effect.

    Bake loaf with the foil on top in a 350 °F oven for 50 minutes. You can set the oven to start at a convenient time, run for an hour at 350 °F from a cold start, and the bread will come out fine. If it’s too durable, try 325 °F.

    Drop loaf onto a cooling rack, wait five minutes, slice generous QC sample from one end, apply (peanut) butter, give thanks to the yeast, enjoy.

  • Monthly Science: Audiograms

    The audio test CD I used to measure my hearing for a Circuit Cellar project back in 2007 came to light, so I ran some tests:

    Audiograms
    Audiograms

    I don’t have an absolute level calibration for any of those curves, so they can be shifted up or down by probably 10 dB without any loss of accuracy. The overall shape matters here, not the absolute level.

    The brown curve shows my hearing as of nine years ago. I built and (of course) wrote about a rather chunky low-pass shelving filter that matched the 20-ish dB difference between my midrange and treble responses, then boosted the flattened result enough for me to hear what I was missing:

    Board Top
    Board Top

    Surprisingly, it worked fairly well. That, however, was then and this is now.

    The two red curves show my current response, under slightly different conditions: the “buds” curve uses the same earbuds as the 2007 curve and the “phones” curve uses over-the-ear headphones. Perhaps:

    • The previous (lack of) bass sensitivity came from the circuitry of the day
    • My bass has mysteriously improved
    • More likely, my midrange has gotten that much worse

    The blue curve shows the response of a reference set of silver ears; the golden ears I used in 2007 were unavailable on short notice.

    Given my limited bandwidth and the steep slope of that curve out toward the high end, simply fixing my (lack of) treble won’t suffice any longer: 50 dB is a lot of amplification. Compressing the bandwidth between, say, 200 Hz and 4 kHz to fit into 200 Hz to 2 kHz, then equalizing the result, might give me enough treble to get by, but it’d require re-learning how to hear.

    That’s different from the straightforward frequency translation you get from a mixer. I don’t have enough audible bandwidth around 1 kHz to hear a 4 kHz slice of audio spectrum.

    Back in 2007-ish, a real audiologist determined that I wasn’t “aid-able”. Maybe that’s changed.

    The economics seem daunting. Michael Chorost gave a talk at Vassar lamenting the cost and terrible UX of his cochlear implants that reinforced my prejudices in that area. The discussion following my post on my Bose QC20 earphones includes useful links and rants.

    The GNURadio project has enough signal-processing mojo for a nontrivial hearing aid, modulo having enough CPU power at audio frequencies. Battery power density remains the limiting factor, but I’m not nearly as fussy about appearances as most folks and some full-frontal cyborg wearables might be in order.

  • Makerspace Starter Kit: Shipped!

    So I spent the last month (*) extracting the tools, parts, and stock I use on a regular basis, filling 20-ish boxes with stuff I wanted to keep:

    Basement shop - right - before
    Basement shop – right – before

    After I moved all those boxes out of the way, three very industrious guys (and two teens who gradually got into the spirit of the thing) from MakerSmiths devoted all of a Saturday and a bit of Sunday morning converting an entire basement like that into this:

    Basement Shop - right
    Basement Shop – right

    The stuff filled about 3/4 of the floor space in a pair of 26 foot box trucks:

    dsc08699 - Truck 1

    Each truck had a snug 10,000 pound load limit and the stuff didn’t stack well:

    dsc08698 - Truck 2

    The strap under the pile of metal, plus some plywood stiffeners, prevented it from running amok during transit. As long as they didn’t flip the truck, everything seemed well packed and cross-braced.

    Only a few minor injuries; all’s well that ends well.

    Alas, most of the spatial memory that let me find a tool or a part is now wrong; it’ll take a while to re-learn the new locations.

    (*) Samuel Johnson: “… when a man knows he is to be hanged in a fortnight, it concentrates his mind wonderfully.”

  • Road Conditions: 2816 Rt 376 Northbound Sinkhole Patched

    By my count, four NYSDOT repair crews, one sent specifically to repair this sinkhole, managed to not patch it during the last nine months:

    Rt 376 2016-04-20 - Northbound milepost 1110 - sinkhole
    Rt 376 2016-04-20 – Northbound milepost 1110 – sinkhole

    Good news comes to those who wait:

    Rt 376 2016-04-21 - Northbound milepost 1110 - sinkhole
    Rt 376 2016-04-21 – Northbound milepost 1110 – sinkhole

    It didn’t involve waiting: by random chance, a fifth NYSDOT road repair crew happened to be in that area when Mary rode by. She stopped directly atop the sinkhole and screamed at the flagger until he came over. She explained the problem and, wonder of wonders, this time they put asphalt in the right spot.

    The patch looks hand-tamped and will pop out after a while, but it’ll be great while it lasts.