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

  • Kenwood / Wouxun Headset Jack Spacing

    Wouxun plug mounting plate - overview
    Wouxun plug mounting plate – overview

    Try as I might, I cannot uncover a definitive answer to this simple question: What’s the center-to-center spacing of the mic and earphone jacks on the side of Kenwood and Wouxun HTs?

    The usual searches produce answers like 11 and 12 mm, both of which are obviously wrong, as can be determined eyeballometrically just by holding a scale against the plugs.

    Based on measurements I made on a Wouxun headset, the yellow plug mounting plate put the plugs on 11.2 mm centers and they fit into the KG-UV3D radio; it’s been working fine ever since.

    However, having just measured a speaker/mic and a headset, both from Kenwood, I come up with 11.5 mm. Frankly, I trust the Kenwood hardware a bit more: the plugs seem more rugged and the overall production values are higher.

    The calculation is simple: measure the pin diameters, then subtract half their sum from the outside distance across the pins. Cross-check by adding half the sum to the inside distance between the pins, which should give the same answer. It helps if the pins are actually round.

    The jacks in the Kenwood and Wouxun radios have enough compliance to accept either a Wouxun or a Kenwood headset plug without complaint. Maybe it doesn’t matter?

    Despite that, I made another gluing fixture with 11.5 mm spacing:

    Plug alignment plate - 11.5 mm spacing
    Plug alignment plate – 11.5 mm spacing

    Those are 0.1 inch grids; it’s a little bitty block of smoke-gray polycarbonate from the scrap heap. The plugs are nominally 3.5 mm (which is not 1/8 inch in this universe) and 2.5 mm, with clearance drills #28 and #39.

    Then I tried poking those 11.2 mm spaced plugs, now firmly epoxied in place in the yellow plate, and guess what: they don’t fit, no how no way. That’s not surprising, because there’s no compliance on either side of the joint and the plugs aren’t on the right centers for the fixture. Makes for a good No-Go gauge, I suppose.

    However, I think I’ll tweak the solid model spacing to 11.5 mm and run off another plug mounting plate for the next radio.

    FWIW, our ICOM IC-Z1A HTs use a sensible 10.0 mm spacing and that old fixture worked fine.

  • HT GPS+Voice: Battery Contacts

    For this version of the contacts (the old version is there) that make the GPS interface look like a standard Wouxun lithium battery, I left a bit more of the slot on the brass screw heads and increased the recess depth to compensate:

    HT-GPS Case - Battery contacts
    HT-GPS Case – Battery contacts

    The nuts all have fancy nickel plating, with washers & ring lugs silver-soldered in place:

    HT-GPS PCB - battery contact parts
    HT-GPS PCB – battery contact parts

    The trial fit looks OK:

    HT-GPS Case - PCB and battery contacts - end view
    HT-GPS Case – PCB and battery contacts – end view

    I even found the cutest little flat 1/4 inch wrench that fits 4-40 nuts, so I can do a better job of crunching the PCB between the nuts. That excess screw length has got to go, too…

  • HT GPS+Voice Circuitry: Bare PCB

    Drilling the PCB went fine, as did the etching & silver plating:

    PCB with edge wrap - front
    PCB with edge wrap – front

    The rear side has a fine ground plane:

    PCB with edge wrap - rear
    PCB with edge wrap – rear

    The small spots scattered over the rear mark vias that stitch the front and back planes together; lacking plated-through holes, I solder nippets of 24 AWG wires to both sides. The wrinkly edge comes from solder on the copper foil binding the entire perimeter.

    While I have no hard evidence that all of the fuss & bother matters, the most recent version of this circuit is the quietest yet: the machine noise from the TinyTrak3+ that plagued the first iteration has pretty much vanished.

    I’ll grant you that the silver plating doesn’t look very silvery in these pix, but it’s quite different from the bare copper in person. Here’s the front just after rubbing it in with a vigorous circular motion:

    HT-GPS PCB - raw plated - top
    HT-GPS PCB – raw plated – top
  • Panasonic CR123A Lithium Cell Capacity

    Picked up 25 Panasonic CR123A (more properly, CR17345) cells from the usual eBay supplier and put one to the test:

    Panasonic CR123A _ CR17345
    Panasonic CR123A _ CR17345

    Somewhat to my surprise, it delivers pretty nearly its full rated capacity at 400 mA discharge. It’d do even better at its 20 mA (!) rated current, of course, but I wasn’t up for a lengthy test…

    Yes, the nominal capacity spec is at 20 mA (C/77) discharge: one LED worth of current. Even the pulsed spec is only 900 mA at 10% over 30 seconds, which says a flashlight really puts the screws to the poor things…

  • USB Wire Color Code: Nobody Will Ever Notice

    A USB cable carries the analog mic and earbud audio for our bike helmets; the connectors are cheap, durable, and separate easily. I cut a 2 m “USB extender” cable (which, according to the USB guidelines, isn’t supposed to exist) near the A male connector, then wire that part to the helmet and the A female part to the GPS+voice board.

    The latest USB extender cable included a surprise:

    USB cable with yellow wire
    USB cable with yellow wire

    According to Wikipedia, there’s a standard color code for the wiring inside USB cables and yellow isn’t in the list. For this manufacturer, it seems that yellow is the new red.

    In previous USB extenders the red / black wires were a slightly larger gauge than the green / white data pair, but in this cable they’re not. That might matter if one expected the cable to carry, oh, let’s say an amp of battery charging current.

  • ThinkPad 560Z BIOS Battery Replacement

    Quite some time ago I picked up a trio of IBM Thinkpad 560Z laptops from the usual eBay suppliers as part of a DDJ column project. One turned into a digital picture frame, our Larval Engineer has another (because it was maxed out with 128 MB of RAM), and I just fired up the third (96 MB!) to discover whether it could serve as a text-only terminal without too much trouble.

    Alas, the BIOS battery was dead. I’d replaced the dead OEM cell some years back with a (surplus) lithium cell that’s a bit too small, so it only lasted a few years rather than a decade, but the cells were on the shelf. Soooo, I put in another one, just like the other one:

    Thinkpad 560Z BIOS battery
    Thinkpad 560Z BIOS battery

    After nudging the date & time into the current millennium, it then failed to boot Ubuntu 8.04: evidently the mighty 4 GB CompactFlash drive (jammed into a CF-to-IDE adapter) has bit rot.

    It’s a prime candidate for the text-only version of Tiny Core Linux, except that a 560Z can’t boot from either USB or CD-ROM, which means getting the files on the “hard drive” requires extraordinary fiddling. Drat!

    FWIW, when this battery fails, I think the (empty) main battery compartment has room for a CR123A cell that should outlast the rest of the hardware. I could blow two bucks on a replacement from eBay, but what fun is that?

  • LED Curve Tracer: Repeatability

    Measuring the same LED many times should produce the same data every time. Here’s an LED measured ten times in quick succession, with each data point consisting of the average of three ADC conversions:

    Repeatability - 3 samples
    Repeatability – 3 samples

    Ten more measurements of the same LED, but with each data point being the average of ten ADC conversions:

    Repeatability - 10 samples
    Repeatability – 10 samples

    Not much to choose between the two, although averaging more readings does reduce the scatter just a bit. The ADC resolution is 5 mV, which is painfully obvious along the X axis. The Y axis has a smaller spread because it’s the independent variable: the firmware sets the MOSFET gate voltage to produce a given current and the ADC steps are relatively larger (the input voltage is only 75 mA × 10.5 Ω = 800 mV, tops).

    I think it’s close enough for my simple needs.

    The ADC code looks like this:

    //-- Read AI channel
    // averages several readings to improve noise performance
    // returns value in mV assuming VCC ref voltage
    
    #define NUM_T_SAMPLES 10
    
    float ReadAI(byte PinNum) {
      word RawAverage;
    
      digitalWrite(PIN_SYNC,HIGH); // scope sync
    
      RawAverage = analogRead(PinNum); // prime the averaging pump
    
      for (int i=2; i <= NUM_T_SAMPLES; i++) {
        RawAverage += (word)analogRead(PinNum);
      }
    
      digitalWrite(PIN_SYNC,LOW);
    
      RawAverage /= NUM_T_SAMPLES;
      return Vcc * (float)RawAverage / 1024.0;
    }
    

    And the Gnuplot routine that produces the graphs, including a bit of cruft that reminds me how to make two Y axis scales:

    #!/bin/sh
    #-- overhead
    export GDFONTPATH="/usr/share/fonts/truetype/"
    base="${1%.*}"
    echo Base name: ${base}
    ofile=${base}.png
    echo Output file: ${ofile}
    #-- do it
    gnuplot << EOF
    #set term x11
    set term png font "arialbd.ttf" 18 size 950,600
    set output "${ofile}"
    set title "${base}"
    set key noautotitles
    unset mouse
    set bmargin 4
    set grid xtics ytics
    set xlabel "Forward Voltage - mV"
    set format x "%6.3f"
    set xrange [1.8:2.1]
    #set xtics 0,5
    set mxtics 2
    #set logscale y
    #set ytics nomirror autofreq
    set ylabel "Current - mA"
    set format y "%4.0f"
    #set yrange [0:${rds_max}]
    #set mytics 2
    #set y2label "right side variable"
    #set y2tics nomirror autofreq 2
    #set format y2 "%3.0f"
    #set y2range [0:200]
    #set y2tics 32
    #set rmargin 9
    set datafile separator "\t"
    #set label 1 "Comment" at 0.90,0.35 font "arialbd,18"
    plot	\
        "$1" using (\$5/1000):((\$1>0)?\$2/1000:NaN) with linespoints lt 3 lw 2 lc 1
    EOF