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

  • MPCNC: Tweaked GRBL Config

    These GRBL configuration constants seem to work well with the DW660 router in the MPCNC gantry:

    $$
    $0=10
    $1=255
    $2=0
    $3=2
    $4=0
    $5=0
    $6=0
    $10=1
    $11=0.010
    $12=0.002
    $13=0
    $20=1
    $21=1
    $22=1
    $23=0
    $24=500.000
    $25=2500.000
    $26=250
    $27=3.000
    $30=30000
    $31=0
    $32=0
    $100=100.000
    $101=100.000
    $102=400.000
    $110=8000.000
    $111=8000.000
    $112=3000.000
    $120=2000.000
    $121=2000.000
    $122=2000.000
    $130=635.000
    $131=465.000
    $132=103.000
    —–
    $n
    $N0=F150
    $N1=G10L2P1X-633Y-463Z-3
    —–
    $#
    [G54:-633.000,-463.000,-3.000]
    [G55:0.000,0.000,0.000]
    [G56:0.000,0.000,0.000]
    [G57:0.000,0.000,0.000]
    [G58:0.000,0.000,0.000]
    [G59:0.000,0.000,0.000]
    [G28:-418.670,-282.016,-3.000]
    [G30:-628.000,-3.000,-3.000]
    [G92:0.000,0.000,0.000]
    [TLO:0.000]
    [PRB:0.000,0.000,0.000:0]
    view raw MPCNC-GRBL.cfg hosted with ❤ by GitHub

    The overall XY travel is slightly smaller than the initial configuration, because the router sticks out further than the penholder I’d been using. Increasing the $27 Homing Pulloff distance to 3 mm leaves a comfortable space beyond the limit switches after homing to the positive end:

    MPCNC - X-axis endstop - home
    MPCNC – X-axis endstop – home

    Adjusting the $13[01] XY travel distances and switch positions on the other end of the rail leaves a similar comfort zone at the negative end:

    MPCNC - X-axis endstop - X min
    MPCNC – X-axis endstop – X min

    Both switches now live on the rear X-axis rail and appear as seen from behind the bench; they just look backwards. The Y-axis switches are on the left rail and look exactly the same.

    The XY travel works out to 630 × 460 mm = 24.8 × 18.1 inch, which is Good Enough.

    Some fiddling with the Z axis limit switch tape mask produces a nice round 100 mm = 3.9 inch vertical travel. The Z-axis rails just barely clear the table at the lower limit and just barely stay in the bottom bearings at the upper limit, so it’s a near thing. In practical terms, the rails or the tool will smash into the workpiece sitting atop the table before the limit switch trips.

    Setting both $20=1 Soft Limits and $21=1 Hard Limits may be excessive, but I vastly prefer having the firmware detect out-of-range moves and the hardware forcibly shut down if the firmware loses track of its position, rather than letting it grind away until I can slap the BRS. The steppers aren’t powerful enough to damage anything, of course, so it’s a matter of principle.

    The $N0=F150 sets the initial speed, as the default F0 seems to (sometimes) confuse bCNC’s auto-level grid probing.

    The $N1=G10L2P1X-633Y-463Z-3 sets the default G54 coordinate origin to the front-left corner, with Z=0 at the home position up top, so as to prevent surprises. I expect to use G55 for most work holder touchoffs, although we’ll see how that plays out.

    The G28 and G30 settings depend on the tool change location and the Z-axis probe location, so they’re still not cast in concrete.

  • Auto-V.I.N Gauge Scam

    Anybody capable of fogging a mirror knows how this scam works:

    TCU 100 - Giveaway teaser
    TCU 100 – Giveaway teaser

    The copious fine print says you can only see the actual fine print by traveling to Arizona:

    TCU 100 - Giveaway fine print
    TCU 100 – Giveaway fine print

    I’m nowhere near hungry enough to like the odds, even for a $100 Walmart gift card.

    An Auto-V.I.N Gauge (their choice of punctuation) must improve the response rate:

    TCU 100 - Auto-VIN Gauge - activated
    TCU 100 – Auto-VIN Gauge – activated

    Is it any surprise the numbers match?

    TCU 100 - scratch-off number
    TCU 100 – scratch-off number

    No. No, it’s not.

    The “Gauge” actually contains parts, although fewer than IMO they want you to believe:

    TCU 100 - Auto-VIN Gauge - components
    TCU 100 – Auto-VIN Gauge – components

    It’ll serve to produce measurable current & voltage for an upcoming Squidwrench Electronics Workshop and, because it need not survive the experience, we will take considerable liberties with it.

  • Zeiss Ikon Ikoflash 4

    A flash gun is hard to beat for straight-up nostalgia:

    Zeiss Ikon Ikoblitz 4 - box
    Zeiss Ikon Ikoblitz 4 – box

    This Zeiss Ikon Ikoblitz 4 is in fine shape:

    Zeiss Ikon Ikoblitz 4 - front
    Zeiss Ikon Ikoblitz 4 – front

    And no more grubby than one might expect after all those decades:

    Zeiss Ikon Ikoblitz 4 - back
    Zeiss Ikon Ikoblitz 4 – back

    I distinctly remember Flash Guide Numbers:

    Zeiss Ikon Ikoblitz 4 - guide-number calculator
    Zeiss Ikon Ikoblitz 4 – guide-number calculator

    The red dial scale has the Guide Numbers (aperture × feet) and the lower black dial scale gives the lens apertures. The manual doesn’t mention the black figures above the red Guide Numbers; they’re metric Guide Number (aperture × meters), which would have been obvious back in the day.

    The tidy shell slides off when you release a latch in the back:

    Zeiss Ikon Ikoblitz 4 - front - stowed
    Zeiss Ikon Ikoblitz 4 – front – stowed

    Then the reflector unfurls:

    Zeiss Ikon Ikoblitz 4 - front unfurled
    Zeiss Ikon Ikoblitz 4 – front unfurled

    Mirabile dictu, the previous owner removed the 15 V “hearing aid” battery (Eveready 504, 60 mA·h in the 504A alkaline version) before storing the flash, leaving the contacts in pristine condition:

    Zeiss Ikon Ikoblitz 4 - CR123A test fit
    Zeiss Ikon Ikoblitz 4 – CR123A test fit

    A 3 V CR123A primary lithium cell snaps perfectly into the battery holder, which I define as a Good Omen: a dab of circuitry could turn this into self-powered and highly attractive Art. This would be one of the very few applications well-suited for the coldest blue-white LEDs.

    One could adapt an A23 12 V alkaline battery (33 mA·h) to the holder, at the cost of half the capacity.

    The silver shield just to the left of the battery conceals a 250 μF (!) nonpolarized capacitor.

    One could build a bayonet-base (GE #5 / Press 25) adapter or poke a doodad with a 9 mm cylindrical base into the M2 bulb adapter (unrelated to my M2 printer):

    Zeiss Ikon Ikoblitz 4 - bulb adapter
    Zeiss Ikon Ikoblitz 4 – bulb adapter

    Herewith, the Zeiss Ikon Ikoblitz 4 – Instruction Manual, should you need more details.

    This hardware may be a progenitor of Gibson’s vat-grown Zeiss Ikon eyes.

  • RF Controlled Area Warning

    Spotted this at the top of a motel stairwell:

    RF Controlled Area - roof access warning
    RF Controlled Area – roof access warning

    More detail:

    RF Controlled Area - detail
    RF Controlled Area – detail

    The antennas face away from the hatch, so it’s not as if the RF would shear you off as you climbed through:

    Hampton Inn - RF Controlled Area - cell sector antennas
    Hampton Inn – RF Controlled Area – cell sector antennas

    I wonder if the hatch atop Vassar Main sports a similar warning …

  • FM DDS: SPI Mock 3

    Running some serial I/O in the background adds jitter to the timer interrupt pacing the ADC samples and as-yet-unwired DDS updates. For reference, an overview of the process showing the procession from the IRQ on the left to the SPI outputs near the middle and another IRQ on the far right:

    DDS Mock - 0 VAC - SPI
    DDS Mock – 0 VAC – SPI

    Now, speed up the sweep and delay the trace by 25 μs to put the triggering pulse off-screen to the left and the second pulse at the center division:

    ADC Sample IRQ jitter
    ADC Sample IRQ jitter

    The orange smear in the middle should be a tidy pulse, but it isn’t.

    The  25 μs timer interrupt now has the highest priority on the front burner:

    IntervalTimer AudioSampler;
    
    ... snippage ...
    
      AudioSampler.priority(0);
      if (!AudioSampler.begin(AudioSamplerIRQ, SamplePeriod)) {
        Serial.printf("Timer start failed\n");
        while (true) {
          FlipPin(BUILTIN_LED);
          delay(75);
        }
      }
    

    Although nothing can interrupt it, other code / handlers may disable interrupts around their own critical sections and delay the tick. If the triggering tick (the off-screen one starting the trace) is delayed, then the on-screen pulse will appear “too soon”, to the left of center. If the triggering tick is on time, but the on-screen pulse is delayed, it’ll appear “too late” on the right.

    The blur is (roughly) symmetric around the center graticule line, so the handwaving seems about right.

    In round numbers, the jitter moves the interrupt ±325 ns on either side of its nominal position, with most of the pulses within ±100 ns. I doubt the jitter distribution is Gaussian, but vigorous handwaving says the RMS jitter might amount to 75 ns.

    At the 4 kHz audio band limit, a 75 ns sampling error a phase error of 0.1°, so the maximum amplitude jitter would be sin(0.1°) = 0.002 = -55 dB, which might suffice for amateur-radio audio.

    I think, anyhow.

  • Streaming Radio Player: Continued Glitchiness

    The SPI OLEDs continue to misbehave, with this early morning glitch jamming the display into a complete lockup:

    RPi OLED display - left-edge garble
    RPi OLED display – left-edge garble

    A normal, albeit blind, shutdown-and-reset brought it back to life.

    Other OLEDs on other RPis have occasionally misbehaved since the most recent (attempted) tweak, so it hasn’t made any difference.

    One obvious lesson: prefer OLEDs with I2C interfaces.

  • Teensy 3.6 USB Serial Startup

    The Arduino Serial doc says the USB hardware on the (now obsolescent) Leonardo requires a test-for-open before using the serial port:

      Serial.begin(9600);
      while (!Serial) {
        ; // wait for serial port to connect. Needed for native USB
      }
    }
    

    As it happens, you must also use that test on the ARM-based Teensy 3.6.

    The gotcha happens when the USB port doesn’t become available, in which case the conditional remains true and the loop continues forever, which is precisely what happened when I powered the Teensy from a USB battery pack on the Squidwrench Operating Table.

    After some flailing around, this startup snippet falls through after ahem awhile:

    #define BUILTIN_LED 13
    
    ... snippage ...
    
    Serial.begin(115200);
    
    int waited = 0;
    while (!Serial && waited < 3000) {
      delay(1);
      waited++;
      if (! (waited % 50))
        FlipPin(BUILTIN_LED);
    }
    
    ... snippage ...
    
    Serial.printf(" serial wait: %d ms\n\n",waited);
    

    The serial startup delay seems to vary unpredictably between 800 and 1800 ms, so 3000 ms may be too short:

    serial wait: 1033 ms
    serial wait: 899 ms
    serial wait: 907 ms

    The ARM Teensy connects the board's built-in LED to the same SPI clock as on the AVR Arduinos, so it's only useful during startup, but having some hint will come in handy the next time it jams for another reason.