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

  • Byonics TinyTrak3+ GPS Power Control

    GPS power from MOSFET relay
    GPS power from MOSFET relay

    The Byonics TinyTrak3+ GPS encoder has a “Power Control” output that can switch the power to a radio or GPS interface. J6 provides the interface: pin 1 = common, pin 2 = high active.

    With the “Power Switch” option enabled in the config program, you can set the number of seconds to allow the GPS unit to get up to speed before the next scheduled transmission.

    I glued a surface-mount MOSFET relay to the back of the PCB with urethane adhesive; it fits neatly between the DIP microcontroller’s pins with one output lead soldered to the 5V pad of J7. The other lead goes to the center +V pad; because the relay uses back-to-back MOSFETs, the polarity doesn’t matter.

    That replaces the normal solder bridge across J7 that provides power (on pin 4) to the GPS2 plugged into the DB9 connector. When the relay’s on, it connects the GPS to the power supply. When it’s off, the GPS goes dark.

    The relay input is an LED with a forward drop of 1.3 V max and requires 4 mA to turn on: figure 3.7 V / 4 mA = 925 Ω max. I kludged an 890 Ω resistor by paralleling (stacking!) 1.5 k and 2.2 k resistors; you could probably use anything near that and it’d work fine.

    The relay is an OMRON G3VM-21GR1, part number A11171 from Electronics Goldmine, but I suspect any teeny little solid-state relay would work. The max on resistance is about 1 Ω and the receiver draws about 65 mA. I measured about 20 mV of drop, so the actual resistance is a lot lower than the spec.

    I initially set the power-on delay to 10 seconds, which seemed to be OK: the GPS (green) LED would blink a few times, then go solid. Alas, the warm-start spec for the Byonics GPS2 (see the GPS3 for details) receiver is really 38 seconds, average, and it was definitely producing bogus position data. So I set the delay to 60 seconds and we’ll see how that works; early reports indicate the coordinates still have plenty of jitter.

    [Update: 60 seconds is iffy. 90 seconds seems to work pretty well. A bit of rummaging says that the satellites broadcast their ephemeris data every 30 seconds, so 90 seconds allows for two complete update cycles. Maybe 100 seconds would be even better. Some old background info for Garmin hand-held receivers is there.]

    It’s obviously a tradeoff between accuracy and battery life. This is for use on a bicycle and, believe me, I don’t want to tote a huge battery!

    If the control signal was low-active, then you could use a cheap PNP transistor as a high-side power switch.

    The white/orange wire routes regulated 5 V through an otherwise unused pin to the homebrew interface that combines the GPS data with helmet mic audio. The tiny rectangle is a 1 µF cap that helps cut down digital noise. There’s no need for a connector on that end, as it’s wired directly to the interface circuit board inside a small enclosure.

  • Fireproof Door: FAIL

    Warped fireproof door
    Warped fireproof door

    OK, this one is baffling. It’s a fireproof (well, more likely, just fire-retardant) door between a lounge and an equipment / elevator room.

    It looks like they made the door by casting something like concrete inside a standard lauan hollow-core door.

    What’s truly odd is that the concrete (or whatever) filling is also warped, convex side outward. The door edge strip with the latch is straight as an arrow, having separated from both of the facing panels and the concrete core at the bottom.

    Did the outside of the door get wet in some way that didn’t soak the surrounding room?

    We’ll never know…

  • Aligning to a Hole With a Defocused Laser Spot

    Defocused Laser Spot on Hole
    Defocused Laser Spot on Hole

    When you’re aligning to an edge or scribe mark, you want the laser spot as small as it can possibly be, so you tune for best focus.

    To locate the center of a hole, you first find the edge, then move toward the center by one radius… so you must know the diameter, too. It’s tricky to find an edge exactly on the X or Y axis, which means you generally resort to successive approximation. I did something like that there with good results.

    If you defocus your laser aligner to produce a spot slightly larger than the hole, you can simply position the hole under the beam to produce a nice bright ring. Adjust the focus to make the spot barely larger than the hole and you can get pretty close to the center without any messy arithmetic.

    Now, should you happen to own a real laser aligner, you might actually have a nice-looking defocused spot. My homebrew Orc Engineering aligner, as shown there, starts with the beam from a chip laser in a hacked carpenter’s level, so the defocused spot is rather, mmm, ragged, even after passing through the not-very-restrictive aperture behind the lens.

    With the lens in the spindle, though, I can spin it at a few hundred RPM and persistence of vision blurs the beam into a nice, symmetrical disk. Jog to center the disk around the hole, twiddle the Z-axis position to adjust the focus / size / blobbiness, jog more slowly, tune for best picture, and it’s all good.

    This obviously doesn’t produce jig-boring quality alignment, but, then, I’m not doing that sort of work. In the picture, I’m enlarging a 4-40 hole molded in a Pactec case to fit a 6-32 screw. Normally I’d do that by hand on the drill press, but this time I also had to enlarge the counterbore at the top and figured I’d use a quick G2 with an end mill after I had it aligned for the drill.

    Maybe everybody else knows this trick, but I was delighted to find that it actually works pretty well…

  • Electronic Ballast Shoplights: So Much For Efficiency

    Just picked up a batch of electronic-ballast shoplights from Lowe’s, motivated by a 10% off card they sent a while ago. Not a killer deal, but it evidently got plenty of folks into the store on a Sunday morning.

    The new lights don’t claim much about their abilities, other than “Electronic Cold Weather Start (0° F)” and that the reflector sizing requires T8 (1″ dia) fluorescent tubes. One would expect an electronic ballast to have a decent power factor and improved efficiency.

    Because I’m that sort of bear, I opened one up to see what was inside. Here’s the ballast:

    Electronic Ballast Dataplate
    Electronic Ballast Dataplate

    Although the fixture is sized for T8 tubes, the ballast would be perfectly happy with T12s. Similarly, the box insists on F32 tubes, but the ballast is OK with F40s.

    I thought a comparison with one of my old magnetic-ballast fixtures would be of interest, so I hitched up the Kill-A-Watt meter and ran some comparisons.

    The results…

    Amp Watt VoltAmp PF
    Old magnetic ballast
    F40T12 0.64 60 76 0.79
    F32T8 1.11 80 126 0.62
    New electronic ballast
    F40T12 0.75 47 89 0.53
    F32T8 0.77 49 91 0.54

    The electronic ballast has a much lower power factor and thus much higher current. The box & ballast don’t say anything about power factor correction and, wow, there sure isn’t any. The power company hates gadgets like this…

    I cannot compare the brightness because the F40 tubes are several years old, but it’s interesting that the electronic ballast runs both tube sizes at essentially the same power (just as the dataplate indicates, sorta-kinda). The magnetic ballast really cooks the piss out of the smaller tubes, though… or it’s dumping a lot of energy into the ballast. Hard to say.

    The T12 tubes are rated for 3000 lumens & 20 k hours. The new box of T8 tubes I got a while back are 2800 lumens and 24 k hours. Frankly, I don’t believe any of those numbers, particularly given the actual power consumption: it looks like either ballast runs them at just 75% of their rated power.

    Anyhow, these were the cheapest shoplights in stock; I bought eight of ’em, because I’ve been replacing one dead fixture every month or two for the last year. I’d like to think I’d get a better ballast if I spent twice as much, but to a good first approximation the additional cost seems to have gone into black plastic trim and a burnished-chrome exterior finish; not what I need in the Basement Laboratory.

    I wish the boxes were more forthcoming so you didn’t need to perform exploratory surgery.

  • Rattle-free Sherline Handwheels

    Knobless Sherline handwheel
    Knobless Sherline handwheel

    The standard Sherline mill comes with tapered plastic knobs on the handwheels, which is exactly what you want for a manual mill and what you don’t want on a CNC machine: they rattle like crazy during computer-controlled moves.

    Some folks contend the knob unbalances the handwheel, but I’m not convinced that’s a real problem. Their advice is to remove the entire knob assembly, leaving a bare shaft sticking out of the motor. Seems a bit extreme to me.

    In any event, shortly after I got the mill, I unscrewed the little retaining screw from the end of each knob, put all the parts in a ziplock bag, tucked it in my tool box, and have been rattle-free ever since.

    The metal shaft is entirely adequate for those rare occasions when I turn the knob manually, the graduated settings let me detect when if I’ve screwed up the acceleration (on a new installation) to the point where the motor is losing steps, and all is right with the world.

    Oh, that orange-barred white tape in front of the motor? That’s a reminder to keep the usual pile of crap away from the spinning knob. That little shaft can fling small objects a fair distance and makes a nasty tangle out of a misplaced red rag…

  • Radio-Equipped Turtle

    Radio-Equipped Turtle
    Radio-Equipped Turtle

    We met this lass while walking around the high school one evening.

    My first thought was that eliminating the Morse Code requirement has definitely broadened the amateur radio population, but it turns out she’s part of the Hudsonia Blanding’s Turtle study. Perhaps the new construction around the school has opened pathways for her to explore the world.

    She seemed to be looking for a way up-and-over the curb to return home. We figured she was big enough to figure this out on her own and old enough to have done so many times before, so we left her to her own devices. When last seen, she was chugging along the curb at a pretty good clip.

    Listen for tag 123122 (or 817) on 150.888 MHz… she’s running AM QRP with a bad antenna.

    Update: It’s hard to tell with turtles, but it’s a girl! When I reported the tag number to Hudsonia, they said “817 is one of our old-timers; we’ve been tracking her for at least 10 years now.”

    Go, turtle, go!

  • Displaying Variables in Gnuplot

    Sample plot with regression line & variables
    Sample plot with curve-fit line & variables

    Gnuplot can do curve fitting (of all kinds) and parks the coefficients in variables. In general, you’d like to display those values on the final plot for later reference…

    The trick is using the sprintf() function, which behaves largely like the C version, to insert the variable into a formatted string for use in the label command.

    I drive Gnuplot with shell scripts, which simplifies introducing parameters & suchlike. That’s conspicuous by its absence here, but when you need it, you need it bad.

    The script to generate that plot looks like this, with some key points in the highlighted lines:

    #!/bin/sh
    export GDFONTPATH="/usr/share/fonts/truetype/msttcorefonts/"
    gnuplot << EOF
    set term png font "arialbd.ttf" 18 size 950,600
    set output "Calibration Curve - Full.png"
    set title "Calibration Curve - Full"
    set key noautotitles
    unset mouse
    set bmargin 4
    set grid xtics ytics
    set xlabel "10^5/ADC"
    set format x "%3.0f"
    set ylabel "Resistance - Ohm"
    set format y "%3.0f"
    set yrange [0:100]
    set datafile separator "\t"
    f(x) = m*x + c
    fit f(x) "Measurements/Calibration.csv" using 3:1 via m,c
    set label 1 sprintf("m = %3.4f",m) at 510,75 font "arialbd,18"
    set label 2 sprintf("c = %3.4f",c) at 510,70 font "arialbd,18"
    plot    \
     "Measurements/Calibration.csv" \
     using 3:1 with linespoints lt 3 lw 3 pt 3 , \
    f(x) lt 4 lw 2 
    EOF
    

    The dataset for that plot is tucked into the obvious file and looks like this, with tabs between the columns:

    # ESR Calibration Curve
    # Resistance    ADC Decimal    Reciprocal
    0.0    492    203
    0.1    489    204
    1.0    461    217
    1.2    456    219
    1.5    447    224
    1.8    440    227
    2.0    432    231
    2.3    428    234
    2.4    423    236
    2.7    414    242
    3.3    400    250
    3.8    387    258
    4.3    378    265
    4.7    367    272
    5.0    360    278
    5.5    350    286
    6.3    332    301
    6.7    329    304
    8.1    306    327
    9.1    293    341
    9.9    284    352
    21.0    182    549
    33.0    126    794
    47.0    90    1111
    67.0    60    1667
    73.0    54    1852
    83.0    47    2128
    92.0    41    2439

    There is no denying that a straight line is not the best fit to that dataset, but that’s not the point.

    Memo to Self: the set label commands go between the fit and the plot. Remember to add the f(x) to the plot function…