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.

Author: Ed

  • Logitech Trackball: Tilting Thereof

    Trackball platform
    Trackball platform

    The right-hand trackball by my keyboard is a Logitech Cordless Optical Trackman, which I fixed a while ago with a laying-on-of-hands repair. If you do a lot of typing and want to save your wrists, a trackball might be just what you need.

    This trackball’s shape is strongly right-handed and I found that my wrist was happier when I tilted the trackball about 30 degrees to the right, making the ball almost vertical and the thumb buttons to the upper left. Evidently my wrist wants to work at a more clockwise angle, not at whatever Logitech found suitable.

    I made the platform from thin oak-veneer plywood left over from a bookshelf project, with oak wedges holding it up. Polyurethane glue, my favorite wood adhesive, holds everything together. I presented the bottom to the belt sander to get a nice flat surface and bevel the down-side edge of the platform, then applied non-skid rubber stair tread tape to the wedges.

    Conveniently, Logitech held the trackball’s case together with four plastic-tapping screws. I removed a screws at each end, drilled two matching holes in the platform, and used similar-size machine screws. The threads don’t quite match, but it’s close enough.

    Rotated trackball in use
    Rotated trackball in use

    Here’s what it looks like in use…

    The platform makes battery replacement a bit more tedious. Much to my surprise, the two AA cells run for half a year at a time, so that’s not a big issue.

    However, the trackball occasionally (every few weeks) loses sync with its base receiver, requiring a poke of buttons on both units. I think that’s partly due to the Logitech wireless mouse on my esteemed wife’s desk ten feet away.

    On the whole, I like it a lot. If Logitech made one for southpaws, too, I’d get a bookend set, but they don’t.

    Oh, yeah, if only evdev allowed button reconfiguration, without using a bunch of batshit kludges, I’d be ecstatic. As of the last time I fiddled with it, the standard mouse xorg driver couldn’t handle the number of buttons and evdev didn’t allow button mapping. Mostly, it works, but I’d like to reassign a few of the buttons.

  • Unsolderable Header Pins

    Unsolderable pin headers
    Unsolderable pin headers

    Speaking of things that don’t work, these header pins from my stash have developed some sort of rot. They’re genuine Brand Name pins, albeit a few decades old, and have been stored in the original bag in various basements along the way.

    What’s supposed to happen: you touch a pin with a soldering iron and some solder, the solder melts and wets the pin. If the pin is in a circuit board at the time, the solder bonds it to the pad surrounding the hole. Nothing exciting here, except that when I tried to use these pin headers, that didn’t happen.

    The symptom is that the headers are unsolderable: the solder doesn’t wet the pins.

    Non-solderable header pin detail
    Unsolderable header pin detail

    The detail view shows what does go on. When I touch a the pin, the original solder plating scoots out of the way, exposing the underlying metal (or whatever it is). Neither tin-lead nor tin-silver solder wets the surface, so the pin can’t be soldered.

    The flux forms a layer over the new surface and doesn’t do its usual job of cleaning the metal. Scraping the pin clean doesn’t seem to help, either. In fact, nothing helps: that whole bag of headers is a dead loss.

    I’m sure these things worked when they were fresh, but that was a long time ago. I’m not sure what sort of change could occur underneath the original solder plating.

    So I picked up some new headers with what passes for gold plating these days and they work fine.

    The pix come from my pocket camera on the binocular microscope, using my homebrew adapter.

  • NOAA N-Prime is Up at Last!

    Not that anybody pays attention to these things, but NOAA’s N-Prime earth observatory had a successful launch today.

    There’s a bit of backstory to this bird: Lockheed-Martin manged to drop the satellite during the final phase of its assembly, causing all manner of damage. Basically, they forgot to bolt the booster adapter down before trying to tilt the satellite over.

    It seems L-M ate the rebuild costs, which was a nice gesture on their part.

    I wrote about the event in my Dr Dobb’s Journal column some years back, in the context of how we do error checking in our projects. Bottom line: no matter how good you think your development process might be, alas, you’ll always miss something. The trick is to miss only small problems, not project-killers.

    Now, if only the bird works correctly…

  • Defective PCB-mount Switches

    Defective PCB Option Switches
    Defective PCB Option Switches

    This type of switch is a nice alternative to the ordinary pin-header option jumpers: pull the white plunger up to open the switch, push it down to close. Nothing to lose or (worse) drop into the machinery.

    Being that sort of bear, I test most components, particularly surface-mount parts, before soldering them onto the board. Switches, however… well, what could go wrong?

    Unfortunately, both of these switches were defective.

    The gutted switch at the top of the pictures stuck open after I soldered it in place: pushing the plunger down didn’t do anything at all. Leaning rather hard on it didn’t get its attention, so I unsoldered and tore it apart. The parts looked OK: no obvious corrosion or deformity.

    I tested the second switch, found it worked perfectly, and soldered it in place, whereupon it failed just like the first: stuck open.

    Perhaps the soldering iron’s heat (immeasurably) reshaped the plastic or (invisibly) oxidized the contact point? Maybe the design is close enough to not working that installing it pushes the tolerances over the edge? I’ll never know.

    These were surplus parts, so there’s no recourse, but I’m pretty sure they’d misbehave the same way if I’d paid full retail for them. If you see any inside your widgets, this may be why you can’t select an option… or why the widget suddenly enters a mysterious new mode.

    I tossed the rest of my supply in the trash.

  • Spam Proposition

    This flotsam recently washed over the railing. I added the bold highlight:

    Ladies and Gentleman.

    In order to have your company inserted into the registry of World Businesses for 2009/2010, please print, complete and return the enclosed form (PDF file) to the following address:

    WORLD BUSINESS GUIDE
    P.O. Box 2021
    3500 GA Utrecht
    The Netherlands

    register@ — .biz
    FAX: ++31 — — 8107

    Updating is free of charge

    Treating the attached PDF with the same casual nonchalance I use with any lump of high-level radioactive waste, I opened it in The GIMP (to strip any interesting PDF malware) and found an ordinary printable PDF form.

    Surprisingly, it didn’t have any slots for charge card or bank account info, but, down at the bottom, there’s a dense block of fine print.

    I ran it through pdftotext to get the raw text and here’s the kick in the head, boldified for your reading convenience.

    THE SIGNING OF THIS DOCUMENT REPRESENTS THE ACCEPTANCE OF THE FOLLOWING CONDITIONS AND THE CONDITIONS STATED IN “THE TERMS AND CONDITIONS FOR INSERTION” ON WEBPAGE: WWW.WORLD-BUSINESSGUIDE.COM. THE SIGNING IS LEGALLY BINDING AND GIVES YOU THE RIGHT OF AN INSERTION IN THE ONLINE DATA BASE OF THE WORLD BUSINESS GUIDE, WHICH CAN BE ACCESSED VIA THE INTERNET. A CD ROM WITH WORLDWIDE BUSINESSES IS GRANTED, ALL IN ACCORDANCE WITH THE CONTRACT CONDITIONS STATED IN “THE TERMS AND CONDITIONS FOR INSERTION” ON WEBPAGE: WWW.WORLDBUSINESSGUIDE.COM. THE VALIDATION TIME OF THE CONTRACT IS THREE YEARS AND STARTS ON THE EIGHTH DAY AFTER SIGNING THE CONTRACT. THE INSERTION IS GRANTED AFTER SIGNING AND RECEIVING THIS DOCUMENT BY THE SERVICE PROVIDER. I HEREBY ORDER A SUBSCRIPTION WITH SERVICE PROVIDER INTERNATIONAL DIRECTORIES LTD “WORLD BUSINESS GUIDE”. I WILL HAVE AN INSERTION INTO ITS DATA BASE FOR THREE YEARS. THE PRICE PER YEAR IS EURO 995. THE SUBSCRIPTION WILL BE AUTOMATICALLY EXTENDED EVERY YEAR FOR ANOTHER YEAR, UNLESS SPECIFIC WRITTEN NOTICE IS RECEIVED BY THE SERVICE PROVIDER OR THE SUBSCRIBER TWO MONTHS BEFORE THE EXPIRATION OF THE SUBSCRIPTION. YOUR DATA WILL BE RECORDED. THE PLACE OF JURISDICTION IN ANY DISPUTE ARISING IS THE SERVICE PROVIDER’S ADDRESS. THE AGREEMENT BETWEEN THE SERVICE PROVIDER AND THE SUBSCRIBER IS GOVERNED BY THE CONDITIONS STATED IN “THE TERMS AND CONDITIONS FOR INSERTION” ON WEBPAGE: WWW.WORLD-BUSINESSGUIDE.COM

    I haven’t checked out the full T&C, as I doubt I’ll benefit from such a listing.

    This probably works best in large organizations, where one sucker responds to the spam and then the billing department responds automatically to incoming invoices. The two-month advance notice is a really nice touch, isn’t it?

    Why do people continue to fall for this crap? If it didn’t pay off, the spammers would dry up and blow away, so there must be a fresh crop of suckers every day.

    People, stop doing that!

    Update: More on spam and what (not) to do: http://www.spamprimer.com/

  • Diode Parameter Extraction & Plotting

    After blowing up a MAX4372 high-side current amp, I thought a Schottky diode would do the trick as a voltage limiter for the delicate current-sensing inputs. The comments to that posting showed I might be close, but that I hadn’t figured it right.

    The first step is finding out how the diode behaves.

    Clip a multimeter (set to the 2 V range) across the diode, clip another multimeter (set to maybe 200 mA in series with the diode, then connect a bench power supply through a 100 kΩ (more or less) resistor to limit the diode current across everything.

    Twiddle the power supply knob, record voltage and current pairs, type them into a spreadsheet (say, OpenOffice, but Excel is probably similar). That gives you a table & plot that looks like this:

    1N5819 Schottky diode current vs. forward bias
    1N5819 Schottky diode – current vs. forward bias
    mV uA
    20.1 0.4
    40.1 1.4
    60.0 3.5
    80.6 8.2
    100.2 18.0
    125.4 48.9
    150.5 131.3
    175.0 343.0
    183.8 481.0

    Nothing surprising there: the current has an exponential relation to the forward voltage.

    An exponential relation cries out for a semilog plot, so add a third column figuring the natural log (a.ka. ln or log-to-the-base-e) of the current values in the second column. The equation is just

    =LN(B3)

    copied down the column as needed.

    1N5819 Schottky diode - ln(current) vs fwd bias
    1N5819 Schottky diode – ln(current) vs forward bias

    That gives you another table & plot, thusly:

    mV uA ln(current)
    20.1 0.4 -0.92
    40.1 1.4 0.34
    60.0 3.5 1.25
    80.6 8.2 2.10
    100.2 18.0 2.89
    125.4 48.9 3.89
    150.5 131.3 4.88
    175.0 343.0 5.84
    183.8 481.0 6.18

    The trick is to add a regression line to the data, which you do by selecting the data series, other-clicking, selecting “Add Regression Line”, selecting the regression line, other-clicking, selecting “Show Equation”, then futzing around until the equation shows enough decimal places. Also extend the X & Y axes so you can see the Y-axis intercept on the left and the current at the MAX4273’s Absolute Max rating of 300 mV on the right.

    I threw out the first measurement point, as it didn’t quite fit the rest of the data. My measurement accuracy isn’t all that great below a microamp, sooo that seemed justified. Check the raw data and see for yourself.

    The regression equation is, comfortingly, ln(current) = 0.040 * voltage – 1.187.

    The slope of 0.040 = kT/q, which says the temperature of my basement laboratory is 464 K, a tad warmer than the actual 286 K. Feeding the actual temperature in, the slope should be 0.046.

    What that really means is that the ideality factor n = 1.62. We usually forget about that little Fudge Factor, but here it is in action: 0.040 = nkT/q.

    The Y-axis intercept is -1.187, which means:

    saturation current = exp(-1.187) = 0.3 uA = 300 nA.

    Not a number you’ll get from the datasheet, of course.

    For more on all that, consult the Wikipedia diode entry.

    It’s worth mentioning that the slope depends linearly on the temperature. The exponent causes the far end of that nice line to whip the current around something nasty.

    Anyhow, with numbers in hand, it’s back to the schematic… and a bit of SPICE simulation that uses a canned diode model.

  • MAX4372 Sense Input Protection

    My initial thought was to stick a Schottky diode across the sense terminal inputs, but John Kasunich suggested that requires a much heftier diode and might not work anyway. He suggested sampling the current-sense voltage through high-value resistors, which will certainly affect the linearity & calibration of the sense voltage.

    My sissy circuit has a peak fault current of maybe a few amps, which the diode should shrug off if I’m not stupid about it. But I like the resistor notion, as it dramatically reduces the diode current.

    MAX4372 Sense Input Protection
    MAX4372 Sense Input Protection

    Maxim has a useful Application Note (AN-3888) describing the effect of common-mode filters on the amp’s calibration. A key suggestion: the two resistors should differ by a factor of two to match the input bias currents.

    So here’s one approach that might work.

    The schematic is a screen snapshot from Linear Technology’s LTSpice IV. The two current sources on the left model the MAX4372 sense amp inputs, with their max bias current values. R1 is the current-sense resistor: a whopping 0.5 ohm for my low-current application.

    R2 and R3 isolate the diode from the sense resistor. High values introduce more error due to diode current, while also helping to protect the sense inputs from excessive voltage. Low values reduce those errors, while bypassing more load current through the diode. Ya can’t win.

    Running the simulated load current up to 5 A shows that the diode clamps the input voltage to about 330 mV, which is likely good enough. Higher values for R2 and R3 reduce that; 10 and 5 ohms might suffice. The factor-of-two difference is really only important at very low currents for these very low resistors; at higher currents, the diode is all that matters.

    MAX4372 Simulation Results
    MAX4372 Simulation Results

    What’s of more interest is the error induced by those resistors in normal operation. Here’s a screen snapshot of simulation up to a load current of 500 mA, well above my expected max of 300 mA. Pay attention to the middle trace in each group of three, which shows the results at 30 °C (the others are 20 and 40 °C).

    The red traces angling down from the upper left represent the ratio of the diode voltage to the sense resistor voltage It starts a bit over 0.99 and gets down to 0.92 by 300 mA. So, basically this protection network introduces less than 10% error if you ignore temperature effects.

    The board I’m building has a calibrated current sink, so (if I were doing this for a real project), I’d be sorely tempted to just build a lookup table on the fly. Then I could work backwards from the desired current setpoints to the PWM voltage outputs required to generate those values. But that’s a simple matter of software, right?

    If you care a lot about accuracy, you’ll obviously want to measure the board temperature and tweak the table accordingly.

    If you want to see how an actual diode behaves, you can measure it.