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

  • 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.

  • Sena PS410 Serial Server: Configuration

    Although I cannot explain why those ferrite beads lit up, it seems connecting the DE-9 shell to the serial device ground is an Extremely Bad Idea. I removed that wire from the HP 8591 spectrum analyzer cable and everything seems to work, so I’ll declare victory:

    Sena PS410 Serial Server - in action
    Sena PS410 Serial Server – in action

    Not shown: the tangle of cables tucked behind that tidy box. You can plug a serial terminal into the DE-9 connector, but it’s much easier to use the PS410’s web interface.

    It needs a static IP address to make it findable, although I also told the router to force the same address should it start up in DHCP mode:

    IP Configuration
    IP Configuration

    Yeah, Google DNS, if all else fails.

    The serial port overview:

    Serial port overview
    Serial port overview

    I’ll go into more detail in a while about individual device setups and the scripts slurping screen shots out of them, but giving each one a useful name is a Good Idea, even though it doesn’t appear anywhere else. I changed the default Inactivity Timeout for each port from the default 100 seconds to zero, thereby preventing the PS410 from closing the connection due to inactivity:

    Serial Port 2 - host params
    Serial Port 2 – host params

    The DTR and DSR defaults work out well; the other choices solve problems I don’t have. Indeed, the PS410 has a myriad configuration options best left in their Disabled state.

    The serial parameters for each port need tweaking to suit the hardware gadget on the other end of the cable:

    Serial Port 2 - serial params
    Serial Port 2 – serial params

    Flow Control applies between the PS410 and the gadget. You can choose:

    • Disabled
    • XON/XOFF – in-band characters
    • RTS/CTS – RS-232 hardware signals

    Somewhat to my surprise, It Just Worked despite my blundering.

  • Sena PS410 Serial Server: Burnin’ In

    The USB serial adapters I use to capture HP54602 scope and HP8591 spectrum analyzer screenshots, as well as monitor the HP Z8501 GPS time standard, lack unique identifiers and appear as unpredictable device nodes.

    After putting up with this for far too long, I dropped $15 on a Sena Technologies PS410 serial server:

    Sena PS410 Serial Server - interior
    Sena PS410 Serial Server – interior

    It needed a new lithium coin cell, of course:

    Sena PS410 Serial Server - as-received CR2032
    Sena PS410 Serial Server – as-received CR2032

    The PCB and chip date codes suggest a 2009 build, so “98” might mean August 2009. Whether that’s the manufacturing date or the best used by date, ya never know.

    The eBay deal didn’t include the power supply, so I hacked a coaxial jack on the back:

    Sena PS410 Serial Server - hacked power jack
    Sena PS410 Serial Server – hacked power jack

    A 14 VDC IBM laptop brick from the pile suits the “9 to 36 V” range printed on the case.

    Poking the “factory reset” switch did what you’d expect and the “console” serial port on the front worked fine. I plugged in the scope, the spectrum analyzer, and the GPS receiver, whereupon the bench took on the unmistakable aroma of electronic death:

    Sena PS410 Serial Server - charred ferrite chip
    Sena PS410 Serial Server – charred ferrite chip

    Some probing suggests FB9 used to be a ferrite bead between serial port 2’s ground pin and the frame ground.

    To compress an afternoon of tinkering into one sentence, there seems to be an occasional 35 VAC difference between the spectrum analyzer and the scope, but only when one or the other is plugged into the PS410. Everything is (now!) plugged into the same branch circuit and, in fact, the same outlet via many power strips, but the difference remains. A different power supply makes no difference, either.

    I managed to burn out the ferrite bead on Port 1 with only the scope and the power supply plugged in, by connecting the scope’s ground lead to the shell of Port 2. That makes no sense: there is no voltage difference between the scope’s serial ground and its probe ground.

    Something Is Not Right, but I’m baffled.

    I have established that the server works fine, even with the charred beads, which is a Good Thing.

  • BLDC Fan RPM vs. PWM Duty Cycle

    A simpleminded MOSFET circuit provides PWM drive for the BLDC blower:

    BLDC Fan PWM Test Fixture - schematic
    BLDC Fan PWM Test Fixture – schematic

    The Tek P6302 current probe looms much larger in real life than in the schematic:

    BLDC fan PWM Test Fixture
    BLDC fan PWM Test Fixture

    A quick dataset shows the RPM variation against PWM duty cycle:

    BLDC Blower - RPM vs PWM - doodles
    BLDC Blower – RPM vs PWM – doodles

    Unsurprisingly, the RPM curve resembles the earlier results against a variable DC supply voltage:

    BLDC Blower - RPM I P vs V
    BLDC Blower – RPM I P vs V

    Capturing the current waveform is stalled behind another project, but it has exactly the voltage spikes you’d expect from forcibly switching an inductive load.

  • 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.