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: Amateur Radio

Using and building radio gadgetry

  • Sena PS410 Serial Server: socat and minicom

    Per the socat man page:  “Socat … establishes two bidirectional byte streams and transfers data between them”. Using it to connect minicom to the HP Z3801 (PDF user manual) GPS receiver’s serial port on the PS410 serial server goes like this:

    socat pty,link=/tmp/z3801 tcp:192.168.1.40:7003 &
    

    The 7003 designates the network port corresponding to serial port 3 on the PS410. The PS410 lets you give its ports any numbers you like, but that way lies madness.

    You may want to run socat in a separate terminal window for easy monitoring (use -d -d for more details) and restarting. The PS410 closes all its network connections when updating any configuration values, pushing any ongoing conversations off the rails. Of course, one doesn’t update the configuration very often after getting it right.

    It produces a device with permissions just for you:

    lrwxrwxrwx 1 ed ed 10 Mar 17 18:45 z3801 -> /dev/pts/2
    

    Whereupon you aim minicom (or whatever you like) at the device:

    minicom -D /tmp/z3801
    

    And It Just Works.

    The PS410 serial port configuration:

    Port 3 - Z3801 serial config
    Port 3 – Z3801 serial config

    The default Z3801 serial port setup seems to be 19200, 7 data, odd parity. I vaguely recall some serial port hackage a long time ago, with the details buried in my paper (!) notes.

    Leaving the Inter Character Timeout at the default 0 creates a blizzard of network activity. Setting it to 10 ms produces slight delays during the full-screen (on an 80 character x 24 line green screen monitor, anyway) status display:

    Z3801 system status
    Z3801 system status

    I inadvertently turned off the UPS powering the thing and the double-oven clock oscillator takes days to restabilize; the Holdover Uncertainty has been dropping slowly ever since.

    Verily, it is written that a man with two clocks never knows what time it is. When one of them is a Z3801, the man has no doubt which clock is correct.

  • Baofeng BL-5 Pack Rebuild

    The 18650 cell protection PCBs with 8205 ICs arrived and seemed small enough to simply tuck into the gap between the rounded cells in the second Baofeng BL-5 pack:

    Baofeng BL-5 - new protection PCB - wiring 1
    Baofeng BL-5 – new protection PCB – wiring 1

    For whatever it might be worth, you’re looking at the only Baofeng battery pack containing an actual 10 kΩ thermistor, harvested from the benchtop Tray of Doom:

    Baofeng BL-5 pack - thermistor
    Baofeng BL-5 pack – thermistor

    Unfortunately, the components on the PCB stuck up a bit too far from the cell surface and held the lid just slightly proud of the case. Applying pressure to lithium cells being a Bad Idea, I rearranged the layout by flipping the cells over, tucking the PCB components between the cells, and connecting everything with nickel tape instead of insulated wires:

    Baofeng BL-5 - new protection PCB - wiring 2
    Baofeng BL-5 – new protection PCB – wiring 2

    The snippets of manila paper and Kapton tape hold things apart and together, as needed. Looks ugly, fits better.

    Pop it in the charger to reset the protection PCB lockout and it’s all good again.

  • Baofeng BL-5 Battery Pack Base Dimensions

    My original idea for the APRS + voice gadget was a snap-in battery pack replacement holding the circuit boards and connected to an external battery pack. A trio of dead Wouxun radios, plus the ready availability of 18650 lithium cells, suggested putting two cells in the backpack, along with the circuitry, and skipping the external pack.

    Here’s the base of a Baofeng BL-5 pack overlaid with a 1 mm grid:

    Baofeng BL-5 - Base with mm grid overlay
    Baofeng BL-5 – Base with mm grid overlay

    The grid is parallel to the case body and centered left-to-right, with a Y grid line set at the front face of the pack, where it’s also flush with the lid surface. You can read off the coordinates of all the points, feed them into your CAD model, and maybe, with a bit of care, get something 3D-print-able.

    Haven’t used it yet, but it’s bound to come in handy at some point.

  • Baofeng BL-5 Battery Pack: Recharge and Reassembly

    Separately charging all four cells from the Baofeng BL-5 packs covered the Electronics Bench with wires:

    Baofeng BL-5 cell charging
    Baofeng BL-5 cell charging

    The cell sits on a ceramic tile as a nod to fire safety, although I doubt it makes any difference.

    The discharge tests showed two nearly identical pairs:

    Baofeng BL-5 Cells - Separate Charge - 2018-02-24
    Baofeng BL-5 Cells – Separate Charge – 2018-02-24

    Surprisingly, cells A and B (upper traces) were deaders in the original packs. Cells C and D (lower traces) were more-or-less fully charged, but now have a lower terminal voltage and slightly lower capacity. I have no explanation for that, nor for the voltage undulations.

    The rebuilt packs pair up A+B and C+D.

    Reassembling pairs into the pack shell and resoldering all the leads produces a good pack:

    Baofeng BL-5 battery rebuild
    Baofeng BL-5 battery rebuild

    I later added a snippet of heavy manila paper under the nickel tape bent around the edge of the pack as a third level of insulation, in the interest of having the nickel tape not produce a dead short between the isolated – terminal and the + cell case.

    Memo to Self: tape the long wiggly leads from the protection PCB to the radio contacts (at the left side) before soldering the PCB to the cell terminals, because an inadvertent short will convert the 8205A battery protection IC into a Light-Emitting IC, at least for a moment, and subsequently release the Acrid Smell of Electrical Death. A handful of charge PCBs are en route halfway around the planet, from which I intend to liberate one IC for this board; with luck, I didn’t incinerate anything else.

    The pack works fine in the radio, as does the APRS interface:

    APRS Coverage in Poughkeepsie - 2018-03-01
    APRS Coverage in Poughkeepsie – 2018-03-01

    Unfortunately, two APRS iGates vanished in the last year, leaving poor coverage south of Poughkeepsie.

  • APRS/Voice HT Interface: Cap Failure

    The TinyTrak3 on the Wouxun adapter wasn’t working, showing a dim red Power LED to indicate it wasn’t getting enough juice. A bit of tracing showed my adapter board provided just over 5 V to the poor thing, not the nearly 9 V it should be getting, which led me to believe the transistor switching the supply had failed. A bit more tracing, however, revealed the true problem:

    Failed electrolytic cap
    Failed electrolytic cap

    The schmutz on the black cap matches up with a crater in the rear of the (originally not so) brown cap.

    The Little Box o’ SMD Caps revealed two nearly identical sets of 33 μF caps, one with a 6 V rating, the other with 16 V rating. Yup, when I added that cap in the hopes of reducing RFI troubles, I soldered the wrong one onto the PCB: it’s my fault!

    The poor thing lasted for over six years with just under 9 V applied to it, so I can’t complain.

    I removed the corpse and reassembled the box without the additional cap (and without the terminals contacting the back of the Wouxun, because reasons). If RFI turns out to be a problem, I’ll take another look at the situation.

  • APRS/Voice HT Interface: Baofeng Mods

    My carefully contrived plug plates for Wouxun radios:

    Wouxun plug plate - epoxy cap
    Wouxun plug plate – epoxy cap

    … of course don’t fit the Baofeng radio. This being in the nature of a final fix, I chopped off enough protrusions to make the remainder fit snugly into the recess.

    APRS-voice HT interface - Baofeng mods
    APRS-voice HT interface – Baofeng mods

    The case containing the TinyTrak3 GPS board and the APRS-voice adapter PCB of course doesn’t fit in place of the Baofeng battery pack, so I replaced the battery contact studs with simple 4-40 screws to prevent heartache & confusion.

    Based on one ride, both Baofeng batteries have very little capacity left after several years on the shelf, which comes as absolutely no surprise whatsoever.

  • Raspberry Pi Swap File Size

    As part of some protracted flailing around while trying to get GNU Radio running on a Raspberry Pi 3, I discovered Raspbian defaults to a 100 MB swap file, rather than a swap partition, and everything I thought I knew about swap management seems inoperative. The key hint came from some notes on gr-gsm installation.

    Tweak the /etc/dphys-swapfile config file to set CONF_SWAPFACTOR=2 for a 2 GB swap file = twice the size of the Pi’s 1 GB memory.

    Start it up:

    sudo dphys-swapfile swapoff
    sudo dphys-swapfile setup
    sudo dphys-swapfile swapon
    

    And verify it worked:

    cat /proc/meminfo 
    MemTotal:         949580 kB
    MemFree:          194560 kB
    MemAvailable:     594460 kB
    Buffers:           85684 kB
    Cached:           377276 kB
    SwapCached:            0 kB
    Active:           600332 kB
    Inactive:         104668 kB
    Active(anon):     250408 kB
    Inactive(anon):    20688 kB
    Active(file):     349924 kB
    Inactive(file):    83980 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:       1918972 kB
    SwapFree:        1918972 kB
    Dirty:                40 kB
    Writeback:             0 kB
    AnonPages:        242072 kB
    Mapped:           136072 kB
    Shmem:             29060 kB
    Slab:              33992 kB
    SReclaimable:      22104 kB
    SUnreclaim:        11888 kB
    KernelStack:        1728 kB
    PageTables:         3488 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     2393760 kB
    Committed_AS:     947048 kB
    VmallocTotal:    1114112 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    CmaTotal:           8192 kB
    CmaFree:            6796 kB
    

    Then it became possible to continue flailing …