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.

Category: Electronics Workbench

Electrical & Electronic gadgets

  • WWVB Reception: 60 kHz Tuning Fork Resonator Filter

    Some early morning data from the WWVB preamp with the 60 kHz tuning fork resonator filter in full effect (clicky for more dots):

    WWVB - xtal filter - waterfall 5 fps RBW 109.9 Hz Res 0.02 s - gqrx window - 20171116_103542
    WWVB – xtal filter – waterfall 5 fps RBW 109.9 Hz Res 0.02 s – gqrx window – 20171116_103542

    The dotted line comes from WWVB’s 1 Hz PWM (-ish) modulation: yeah, it works!

    The filter cuts out the extraneous RF around the WWVB signal, as compared with a previous waterfall and some truly ugly hash:

    WWVB - 24 hr reception AGC - 2017-01-16 to 17 - cropped
    WWVB – 24 hr reception AGC – 2017-01-16 to 17 – cropped

    Well, not quite all the hash. Enabling the SDR’s hardware AGC and zooming out a bit reveals some strong birdies:

    WWVB - xtal filter - waterfall - hardware AGC - 2017-11-16 0612 EST
    WWVB – xtal filter – waterfall – hardware AGC – 2017-11-16 0612 EST

    The big spike over on the left at 125.000 MHz comes from the Ham-It-Up local oscillator. A series of harmonics starting suspiciously close to 125.032768 kHz produces the one at 125.066 MHz, just to the right of the WWVB signal, which leads me to suspect a rogue RTC in the attic.

    There is, in fact, a free running “Test Signal Source” on the Ham-It-Up board:

    Ham-It-Up Test Signal source - schematic
    Ham-It-Up Test Signal source – schematic

    Although I have nary a clue about that bad boy’s frequency, measuring it and cutting the inverter’s power trace / grounding the cap may be in order.

    The SDR’s AGC contributes about 30 dB of gain, compresses the hottest signals at -25 dB, and raises those harmonics out of the grass, so it’s not an unalloyed benefit. Manually cranking on 10 dB seems better:

    WWVB - xtal filter - waterfall - 10 dB hardware preamp - 2017-11-16 0630 EST
    WWVB – xtal filter – waterfall – 10 dB hardware preamp – 2017-11-16 0630 EST

    The bump in the middle shows the WWVB preamp’s 2 kHz bandwidth around the 60 kHz filter output, so the receiver isn’t horribly compressed. The carrier rises 30 dB over that lump, in reasonable agreement with the manual measurements over a much narrower bandwidth:

    60 kHz Preamp - Bandwidth - 1 Hz steps
    60 kHz Preamp – Bandwidth – 1 Hz steps

    With all that in mind, a bit of careful tweaking produces a nice picture:

    WWVB - xtal filter - waterfall - 10 dB hardware preamp - 2017-11-16 0713 EST
    WWVB – xtal filter – waterfall – 10 dB hardware preamp – 2017-11-16 0713 EST

    I love it when a plan comes together …

  • Raspberry Pi USB vs. Arduino

    Plugging an Arduino with GRBL into a USB port on a Raspberry Pi 3 with bCNC causes an immediate crash: the Arduino doesn’t power up and the Raspberry Pi stops responding. A hardware reset / power cycle with the Arduino plugged in doesn’t improve the situation, so it seems the Arduino draws more current from the USB port than the default setup will allow.

    Most likely, the Arduino’s 47 μF power supply caps draw too much current while charging, as the steady-state current seems to be around 40 mA:

    RPi vs Arduino - USB current
    RPi vs Arduino – USB current

    The solution / workaround requires a tweak to /boot/config.txt:

    #-- boost USB current for Arduino CNC
    
    max_usb_current=1
    
    # blank line above to reveal underscores
    

    Update: As mentioned in the comments, the max_usb_current option doesn’t apply to the Pi 3 you see in the picture and, thus, shouldn’t have changed anything. Your guess is as good as mine.

    I’d be more comfortable with a separate power supply plugged into the Arduino’s coaxial power jack, but that’s just me.

  • Lightning Talk: Bose Hearphones

    The PDF “slides” for a lightning talk I gave at this month’s MHV LUG meeting: MHVLUG Lightning Talk – Bose Hearphones.

    You don’t get my patter, but perhaps you’ll get the gist from the pix.

    Hearphone - Detail
    Hearphone – Detail

    Summary: I like ’em a lot, despite the awkward form factor and too-low battery capacity. If you’re more sensitive to appearances than I, wait for V 2.0.

    FWIW, I tinkered up a beamforming microphone array with GNU Radio that worked surprisingly well, given a handful of hockey puck mics and a laptop. Bose does it better, of course, but I must revisit that idea.

  • Wouxun KG-UV3D: End of Life

    Radio communication between our bikes failed on the way back from a grocery ride and the problem turned out to be a failed radio:

    Wouxun KG-UV3D - defunct
    Wouxun KG-UV3D – defunct

    The Wouxun KG-UV3D radio seems jammed firmly somewhere in its power-up sequence, doesn’t respond to any buttons, and has no hard-reset switch. On the other paw, it’s been in constant (and rugged!) use for almost exactly five years, so I suppose it doesn’t owe me much of anything.

    The new radio, another KG-UV3D from PowerWerx, has marginally different spacing around the screw attaching the plug cover preventing the previous screw from fitting, so I kludged up a screw from a 2 mm socket-head screw, a 2.5 mm (yes) washer, and a pair of 2 mm nuts:

    Wouxun KG-UV3D - APRS plug plate screw
    Wouxun KG-UV3D – APRS plug plate screw

    Which looks a bit odd, but holds the plug adapter plate firmly in place:

    Wouxun KG-UV3D - APRS Voice Plug Block
    Wouxun KG-UV3D – APRS Voice Plug Block

    I suppose when the radio on my bike fails, I must rebuild both APRS + voice interfaces for Yet Another Radio, because the Wouxuns will be completely unobtainable.

    The weather abruptly became too cold for riding, at least for sissies such as we, but maybe we’ll get out later in the month …

  • Another Failed CFL Bulb

    Unlike the last CFL failure, this time I noticed the faint smell of electrical death near the Electronics Workbench, but I couldn’t track it down until the can light over the the Bench didn’t start:

    Another Hot-Failed CFL Bulb
    Another Hot-Failed CFL Bulb

    The date code suggests it’s been in the fixture for over a decade, so I can’t complain. Having two unrelated bulbs fail within a week, after years of service, is surely coincidence. If another fails within a week or two, however, it will definitely be Enemy Action.

  • Sandisk Extreme Plus: End of Life

    The Fly6 rear camera on my bike started giving off three long beeps and shutting down. Doing the reformatting / rebooting dance provides only temporary relief, so I think the card has failed:

    Sandisk Extreme Plus vs. Samsung EVO MicroSD cards
    Sandisk Extreme Plus vs. Samsung EVO MicroSD cards

    The Fly6 can handle cards up to only 32 GB, which means I should stock up before they go the way of the 8 GB card shipped with the camera a few years ago.

    Some back of the envelope calculations:

    • It’s been in use for the last 19 months
    • The last 22 trips racked up 88 GB of video data = 4 GB/trip
    • They occurred over the last 6 weeks = 3.6 rides/week
    • Call it 250 trips = 1 TB of data written to the card = 32 × capacity

    That’s only slightly more than the failure point of the Sony 64 GB MicroSDXC cards. The Fly6 writes about a third of the data per trip, so the card lasts longer on a calendar basis.

    So now let’s find out how long the Samsung cards last …

  • Mostly Printed CNC: Endstop Mount

    Being a big fan of having a CNC machine know where it is, adding endstops (pronounded “home switches” in CNC parlance) to the Mostly Printed CNC axes seemed like a good idea:

    MPCNC - X min endstop - actuator view
    MPCNC – X min endstop – actuator view

    All the mounts I could find fit bare microswitches of various sizes or seemed overly complex & bulky for what they accomplished. Rather than fiddle with screws and nut traps / inserts, a simple cable tie works just fine and makes the whole affair much smaller. Should you think cable ties aren’t secure enough, a strip of double stick tape will assuage your doubts.

    A snippet of aluminum sheet moves the switch trip point out beyond the roller’s ball bearing:

    MPCNC - X min endstop
    MPCNC – X min endstop

    I’m not convinced homing the Z axis at the bottom of its travel is the right thing to do, but it’s a start:

    MPCNC - Z min endstop
    MPCNC – Z min endstop

    Unlike the stationary X and Y axes, the MPCNC’s Z axis rails move vertically in the middle block assembly; the switch moves downward on the rail until the actuator hits the block.

    Perforce, the tooling mounted on the Z axis must stick out below the bottom of the tool carrier, which means the tool will hit the table before the switch hits the block. There should also be a probe input to support tool height setting.

    The first mount fit perfectly, so I printed four more in one pass:

    MPCNC MB Endstop Mounts - Slic3r preview
    MPCNC MB Endstop Mounts – Slic3r preview

    All three endstops plug into the RAMPS board, leaving the maximum endstop connections vacant:

    MPCNC - RAMPS min endstop positions
    MPCNC – RAMPS min endstop positions

    Obviously, bare PCBs attached to the rails in mid-air aren’t compatible with milling metal, which I won’t be doing for quite a while. The electronic parts long to be inside enclosures with ventilation and maybe dust filtering, but …

    The switches operate in normally open mode, closing when tripped. That’s backwards, of course, and defined to be completely irrelevant in the current context.

    Seen from a high level, these switches set the absolute “machine coordinate system” origin, so the firmware travel limits can take effect. Marlin knows nothing about coordinate systems, but GRBL does: it can touch off to a fixture origin and generally do the right thing.

    The OpenSCAD source code as a GitHub Gist:

    // Tour Easy Fairing Endstop Mount for Makerbot PCB
    // Ed Nisley KE4ZNU – 2017-11-07
    /* [Build Options] */
    Layout = "Build"; // [Build, Show, Block]
    Section = false; // show internal details
    /* [Extrusion] */
    ThreadThick = 0.25; // [0.20, 0.25]
    ThreadWidth = 0.40; // [0.40]
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    /* [Hidden] */
    Protrusion = 0.01; // [0.01, 0.1]
    HoleWindage = 0.2;
    ID = 0;
    OD = 1;
    LENGTH = 2;
    /* [Sizes] */
    RailOD = 23.5;
    Screw = [3.4,6.8,8.0]; // thread dia, head OD, screw length
    HoleOffset = [2.5,19.0/2]; // PCB mounting holes from PCB edge, rail center
    SwitchClear = [6.0,15,3.0]; // clearance around switch pins
    SwitchOffset = [6.0,0]; // center of switch from holes
    Strap = [5.5,50,2.0]; // nylon strap securing block to rail
    Block = [16.4,26.0,RailOD/2 + SwitchClear[2] + Strap[2] + 6*ThreadThick]; // basic block shape
    //- Adjust hole diameter to make the size come out right
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
    }
    //- Shapes
    module PCBBlock() {
    difference() {
    cube(Block,center=true);
    translate([(SwitchOffset[0] + HoleOffset[0] – Block[0]/2),SwitchOffset[1],(Block[2] – SwitchClear[2] + Protrusion)/2])
    cube(SwitchClear + [0,0,Protrusion],center=true);
    for (j=[-1,1])
    translate([HoleOffset[0] – Block[0]/2,j*HoleOffset[1],(Block[2]/2 – Screw[LENGTH])])
    rotate(180/6)
    if (false) // true = loose fit
    PolyCyl(Screw[ID],Screw[LENGTH] + Protrusion,6);
    else
    cylinder(d=Screw[ID],h=Screw[LENGTH] + Protrusion,$fn=6);
    translate([0,0,Block[2]/2 – SwitchClear[2] – Strap[2]/2 – 3*ThreadThick])
    cube(Strap,center=true);
    if (Section)
    translate([Block[0]/2,0,0])
    cube(Block + [0,2*Protrusion,2*Protrusion],center=true);
    }
    }
    module Mount() {
    difference() {
    translate([0,0,Block[2]/2])
    PCBBlock();
    rotate([0,90,0])
    cylinder(d=RailOD,h=3*Block[0],center=true);
    }
    }
    //- Build things
    if (Layout == "Show") {
    Mount();
    color("Yellow",0.5)
    rotate([0,90,0])
    cylinder(d=RailOD,h=3*Block[0],center=true);
    }
    if (Layout == "Block")
    PCBBlock();
    if (Layout == "Build")
    translate([0,0,Block[2]/2])
    rotate([0,-90,0])
    Mount();