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.

Tag: Improvements

Making the world a better place, one piece at a time

  • SANE Scanner vs. Xubuntu 18.04

    I recently bumped the desktop PC with the scanner from an old Mint to Xubuntu 18.04, which killed a day with all the system and UI tweakage.

    The old guides for setting up a networked SANE scanner became inoperative with systemd ruling the configurations, so, after some flailing around, I found a newer guide referencing a guide for USB scanners and pointing to a deeper guide for network sharing in the age of systemd.

    The USB guide points out the existence of Access Control Lists for the various device files, which I didn’t know was a thing. AFAICT, you must still be in the scanner group for remote access to happen.

    I lost track of the changes during all the flailing around, but it definitely didn’t Just Work.

    I’m sure all this will change before I must do it again.

  • Streaming Radio Player: I2C Display

    Although I2C on the Raspberry Pi fails with devices using clock stretching, cheap I2C OLED displays seem to work well enough to not generate any problems search-able with the obvious keywords:

    RPi I2C OLED
    RPi I2C OLED

    Given a picture of the header pinout, the wiring is trivially easy:

    RPi I2C OLED - RPi header detail
    RPi I2C OLED – RPi header detail

    Using yellow for the ground hurts a bit, but that’s what I get for peeling the SPI cable down to four wires. The pin directly adjacent to the green wire is also ground, should that be easier to reach.

    Tweaking the Luma driver to use I2C doesn’t require much:

    #from luma.core.interface.serial import spi
    from luma.core.interface.serial import i2c
    
    ... snippage ...
    
    # reduce SPI bus from default 8 MHz to (maybe) avoid OLED failure-to-start
    #serial = spi(device=0,port=0,bus_speed_hz=1000000)
    
    # use I2C bus to avoid SPI timing spec failure
    serial = i2c(port=1,address=(0x78 >> 1))     # PCB label = 0x78, low bit = R/W
    

    The OLED PCB lists the I2C address with the R/W bit

    And then It Just Works, with one gotcha. Although the Python program shuts itself and the system down, the wall wart continues to supply power and, because the I2C bus doesn’t include a Reset line, the OLED display doesn’t know the RPi has gone away. So you must issue a command to turn it off before shutting down:

    device.cleanup()        # ideally, switches to low-power mode
    rc = subp.call(['sudo','shutdown','-P','now'])
    

    Now, to discover what works … oddly … with these displays.

  • Monthly Science: Monarch Caterpillars!

    After several years of seeing few-to-no Monarch butterflies, last year we managed to save a single Monarch egg, raise the caterpillar, and release it:

    Monarch on Milkweed - left
    Monarch on Milkweed – left

    This year, we’ve seen more, if not many, Monarchs in flight. They’re not abundant, but perhaps there’s hope.

    A Monarch evidently laid eggs in our milkweed patch, with at least two offspring surviving:

    This slideshow requires JavaScript.

    We decided to let them seek their own destiny; may the odds be ever in their favor …

  • Shapely Fire Hydrant

    A Sigelock Spartan hydrant spotted in Franklin PA:

    Sigelock Spartan fire hydrant - Franklin PA
    Sigelock Spartan fire hydrant – Franklin PA

    It’s certainly the shapeliest hydrant I’ve ever seen.

    Of course, you need a special tool to remove the main cap, after which some internal lockwork releases the side caps, after which you can spin the valve stem recessed under the top cover. One hopes all those little bits continue sliding and releasing after a few decades, but … the status quo apparently isn’t all that good, either.

  • Baofeng UV-5: Squelch Tail Elimination

    Baofeng UV-5 radios can (mostly) eliminate the loud hiss heard at the end of a transmission before the squelch kicks in after the received carrier drops: Menu → 34 STE → ON. A detailed description of the option suggests it’s a 55 Hz subaudible tone sent for 250 milliseconds after the sender releases the PTT and before the transmitter stops sending, with the receiver muting its audio during the tone. Obviously, this requires a Baofend radio at each end of the conversation, which applies to our bikes.

    Saying “laaaa” while kerchunking (into a smaller dummy load than the hulk) with STE OFF:

    Baofeng - STE OFF - laaaa
    Baofeng – STE OFF – laaaa

    Compared to the received audio, the squelch tail hiss is really really loud.

    Then with STE ON:

    Baofeng - STE ON - laaaa
    Baofeng – STE ON – laaaa

    You can see the STE tone reception start about 250 ms before the audio cuts off, although it’s not at all clear the audio is muted on either end. In any event, there’s no squelch tail worth mentioning, even if there’s an audible tick when the STE tone starts.

    Saying nothing with STE ON:

    Baofeng - STE ON - silent
    Baofeng – STE ON – silent

    It’s unlikely the audio output would include the subaudible tone, but you might convince yourself something happens in the 250 ms between the STE blip near midscreen and the final pop (now clipped) as the audio drops.

    All in all, a definite improvement!

  • Ed’s Atomic Fireball Avocado Smoothie

    Dump into a stick blender cup:

    • 1 tsp erythritol
    • 5 drops stevia
    • ≈2 ml mint extract
    • 1/2 tsp Vietnamese Cinnamon
    • 3+ tsp cocoa powder
    • 1/2 avocado, chunked
    • 6 fl oz whole milk to make ≈10 fl oz total

    Blend thoroughly. Slurp.

    Atomic Fireball Avocado Smoothie
    Atomic Fireball Avocado Smoothie

    Notes:

    • Another scant ounce of milk makes less of a slurry
    • More cinnamon cannot possibly be a bad thing
    • Commercial mint may be more potent

    AFAICT, this is the only way to make an avocado palatable.

    There is absolutely no connection with yesterday’s post.

  • Baofeng UV-5: Audio Attenuation and Knob Pointer

    Perhaps because we’re using better quality earbuds, the Baofeng UV-5 radios on our bikes produce extremely loud audio, even with the volume knob just above its power-on click. Reducing the volume requires a series resistor downstream of the diodes clipping the pops:

    Baofeng Headset Audio Attenuation
    Baofeng Headset Audio Attenuation

    The color codes come from previous work.

    Because we have different earbuds and different hearing, my radio has a 140 Ω resistor and Mary’s has a 430 Ω resistor. Getting the right value requires a few iterations of on-road testing, but it’s not particularly critical; the volume knob should end up roughly in the middle of its range.

    For now, all the “circuitry” lives among layers of Kapton tape:

    Baofeng headset wire plate - detail
    Baofeng headset wire plate – detail

    Speaking of volume knobs, Baofeng radios have large flat-top cylindrical knobs (unlike Wouxun’s fluted knobs), so I added a pointed snippet of reflective tape to make the position visible:

    Baofeng volume knob - reflective pointer
    Baofeng volume knob – reflective pointer

    The flash lights it up, but there’s enough backlighting behind your (well, my) head to make it easily visible under normal conditions. Once you figure out the proper volume, it’s easy to set the pointer in that direction before every ride.

    To the road!