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

  • LED Bike Light Doodles

    LED Bike Light Notes
    LED Bike Light Notes

    I need an LED taillight (and maybe headlight) with a metal case and far more LEDs than seems reasonable. This is a doodle to sort out some ideas… not all of which will work out properly.

    The general notion is that one can put today’s crop of ultrasuperbright 5 mm LEDs to good use. While the Luxeon & Cree multi-watt LEDs are good for lighting up the roadway, they’re really too bright and power-hungry for rear-facing lights. Mostly, you want bright lights facing aft, but the beam pattern & optical niceness really aren’t too critical as long as you’re not wasting too many photons by lighting up the bushes.

    I think, anyway. Must build one and see how it works. I know that a narrow beam is not a Good Thing, as cars do not approach from directly behind and it make aiming the light rather too finicky.

    The problem with commercial bike taillights is that they use piddly little LEDs and not enough of them. If you’ve ever actually overtaken a bicyclist at night with a blinky LED taillight, you’ve seen the problem: they’re too damn small. Automobile taillights must have a very large surface area for well and good reason.

    But who wants to lug the taillight off a ’59 Caddy around?

    So the diagram in the pic explores the notion of arranging a bunch of red & amber LEDs in a fairly compact array. The shaded ones are red, the open ones are amber (with two more side-facing ambers to meet legal requirements), and there are eight of each. The OD is about 40 mm. Figure 5 mm LEDs with 2.5 mm of aluminum shell between them. If the center four LEDs were spaced right, an axial (socket-head cap?) screw could hold the entire affair together.

    Turns out both the red & amber LEDs in the bags of 100 I just got from Hong Kong run at 2 V forward drop @ 30-ish mA, so that’s 16 V total for eight in series.

    Four AA NiMH cells fit neatly behind the array, so the supply will be 4 – 5 V, more or less. The outer casing could be plastic pipe.

    What to do for a battery charging port? Must be mostly weatherproof. Ugh.

    Rather than a regulated supply and a current sink / resistor, use an inductor: build up the desired forward current by shorting the inductor to ground, then snap the juice into the LEDs. The voltage ratio is about 4:1, so the discharge will happen 4x faster than the charge for a duty cycle around 20%. At that ratio, you can kick maybe 50 mA into the poor things.

    Governing equation: V = L (ΔI/ΔT)

    If they’re running continuously, 2 V x 50 mA x 0.2 = 20 mW. The full array of red or amber is 160 mW, 320 mW for both. If you’re powering them at 10% duty cycle, then the average power dissipation is pretty low. Not much need for an external heatsink in any event.

    A 1 kHz overall cycle means a 200 µs inductor charging period. With low batteries at 4 V and 50 mA peak current, the inductor is 16 mH. That’s a lot of inductor. I have a Coilcraft SMD design kit that goes up to 1 mH: 12 µs charge and 16 kHz overall. Well, I wouldn’t be able to hear that.

    No need for current sensing if the microcontroller can monitor battery voltage and adjust the charge duration to suit; three or four durations would suffice. Needs an ADC input or an analog window comparator.

    Automotive LED taillights seem to run at about 10% duty cycle just above my flicker fusion frequency; say between 50 – 100 Hz. If that’s true, red & amber could be “on” simultaneously, but actually occupy different time slots within a 100 Hz repeat and keep the overall duty cycle very low.

    I’d like red on continuously (10% of every 10 ms) with amber blinking at 4 Hz with a 50% duty cycle. When they’re both on the total would be 60% duty.

    The legal status of blinking taillights is ambiguous, as is their color; more there. Motorcycles may have headlight modulators. Bikes, not so much.

    Battery life: assume crappy 1500 mAh cells to 1 V/cell. Red = 50 mA x 0.2 x 0.1 = 1 mA. Amber = 50 mA x 0.2 x 0.5 = 5 mA. Thus 1500 / 6 = 250 hours. Figure half of that due to crappy efficiency, it’s still a week or two of riding.

    Rather than a power switch, use a vibration sensor: if the bike’s parked, shut off the light after maybe 5 minutes. It wouldn’t go off when you’re on the bike, even stopped at a light, because you’re always wobbling around a little.

    Memo to Self: put the side LEDs on the case split line?

  • Maxwell 10 F Ultracapacitor: First Charge

    Maxwell PC10 Ultracapacitors
    Maxwell PC10 Ultracapacitors

    My buddy Mark One dropped off a pair of Maxwell PC10 10 farad Ultracapacitors. We both recall our respective professors saying that a farad is an impractical unit, there’d never be such a thing as a 1 F capacitor, and it would be the size of a barn anyway…

    These are 25x30x3 mm.

    The downside, of course, is that they’re rated at 2.5 V DC with an absolute maximum of 2.7 V.

    On the other paw, they have a maximum current of 2.5 A and a whopping 19 A short-circuit current. Serious risk of fire & personal injury there…

    Charged one up from an AA NiMH cell I had lying around on the desk, which took a while, then let it discharge all by itself while taking notes. The results look like this:

    10 uF Ultracap - Self DischargeTime    Voltage – mV
    13:02    1353
    13:08    1350
    13:36    1338
    13:56    1333
    14:09    1329
    14:21    1326
    14:54    1318
    15:13    1314
    15:49    1308
    16:06    1305
    17:42    1291
    18:49    1283
    19:03    1282

    Now, maybe that’s not exactly the extreme top left end of an exponential drop, but it looks close enough:

    V(t) = V0 * exp (-t/τ)

    Pick any two points on the curve to find τ, the time constant:

    V(t1) / V(t2) = exp (-t1/τ) / exp (-t2/τ)

    Take the log of both sides and remember that the log of a ratio is the difference of the logs:

    log V(t1) – log V(t2) = (-t1 + t2) / τ

    Plug in the first and last data points to get:

    0.02341 = 21.6 ks / τ

    Reshuffle and τ = 923 ks. Close enough to a megasecond for my purposes.

    How to find the capacitance? Charge the cap up fram a pair of NiMH cells, discharge it at a constant current using a battery tester, thusly:

    10 uF Ultracap - 100 mA Load
    10 uF Ultracap – 100 mA Load

    That curve isn’t exactly linear, but it’s close enough that we can use the familiar capacitor equation:

    ΔV/ΔT = I/C

    Reshuffle to get capacitance over there on the left side:

    C = I * ΔT / ΔV

    The lower axis is minutes, not seconds, with truly poor grid values. Eyeballometrically, call it 4 min * 60 = 240 seconds.

    Plug in the appropriate numbers and find that

    C = 0.1 A * 240 s / 2.5 V = 9.6 F.

    Close enough.

    Knowing τ and C, find the self-discharge resistance R = τ/C = 96 kΩ. That seems pretty low, but at 2 V it amounts to 25 µA. The cap’s self-discharge current is rated at 40 µA, so that’s well within spec.

    Now, admittedly, the cap doesn’t hold much energy:

    • NiMH 2 x AA = 1 Ah @ 2.4 V = 2.4 Wh = 8600 Ws = 8600 J
    • Ultracap 10 F @ 2.4 V = 1/2 * C * V^2 = 29 J

    But, heck, it’s pretty slick anyway… it’ll make a dandy backup power source for a clock I’m thinking of making.

    Memo to Self: Datasheet says to add balancing resistors that carry 10x the self-discharge current when stacking in series. That’d be 10 kΩ, more or less, which seems scary-low.

  • NiMH Cells: Finding the Weak Link

    I recently bought two dozen Tenergy Ready-to-Use NiMH cells, rated at 2.3 Ah, with the intent of making up three 8-cell packs (identified as A, B, and C, for lack of anything smarter) for the amateur radio HTs we use on our bikes. However, one of the packs measured a consistently short runtime and I suspected one weak cell.

    So I ran pairs of cells from the weak pack and found these results:

    DSC-H5 Battery - Tenergy RTU NiMH AA Cells
    DSC-H5 Battery – Tenergy RTU NiMH AA Cells

    Observations…

    These are all measured just after charging, so they’re all the best you can expect from the cells. I haven’t done any self-discharge tests yet.

    The overall capacity at 1 A load is roughly 65% of the 2.3 Ah rating.

    The red trace falls far short of the others, so that’s the pair with the weak cell. I charged & tested those two cells individually, which are the lower two traces: cell A4 has 58% of nominal capacity. Admittedly, that’s 90% of the capacity of the rest, but, still …

    I’ll use the other three pairs of cells through the Sony DSC-H5 camera, for reasons described there. Cell A4 is destined for the shelf…

    Now, the question becomes: who should I buy the next batch of cells from?

  • Digital Camera Battery Runtime

    My Sony DSC-H5 uses a pair of AA NiMh cells and, it seems, drains them rather rapidly. I’ve been cycling a motley assortment of paired cells through the thing and figured some measurements were in order.

    Click on the graph to get a bigger image with readable labels:

    DSC-H5 Battery - Old NiMh AA Cells
    DSC-H5 Battery – Old NiMh AA Cells

    Some observations…

    All of the cells, except for the Tenergy RTUs, have been cycled through the camera many times over the last few years. I charged the cells before testing, so these are hot-from-the-charger values without the usual self-discharge that afflicts all NiMh cells.

    I picked a 1 A load for convenience. I think the camera presents a much heavier, although intermittent, load to the cells, as the actual runtime is far less than the 1.5 to 2.3 hours you see on the graph. In round numbers, the camera rejects the weaker cells in about 15 minutes, which means its load is much heavier.

    The topmost blue-gray line is from the original pair of Sony Stamina cells that came with the camera, which still deliver decent runtime. Rated at 2.5 Ah and delivering very nearly that much into a 1-A load.

    The green line is the same pair of cells loaded at 2.5 A, just to see what happens. They still work pretty well; the lower voltage is to be expected. A mere 0.14 Ω of lead resistance will account for that entire difference and I’m not sure how much the cells contribute.

    The red and black lines are from the quartet of 2.2 Ah Energizer cells that came with an Energizer 15-minute (!) charger. They’re rated at “Min 2.05 Ah” and are still well within that spec. However, they deliver a relatively short runtime. I just noticed that the graph legend has the wrong capacity values for the red trace (cells C&D): oops.

    The short purple line that dunks down in the middle of the graph is a new pair of the disappointing Tenergy Ready-to-Use cells, with a nominal capacity of 2.3 Ah and delivering barely 1.5 Ah.

    The blue line is a pair of Tenergy 2.6 Ah cells with a similarly low actual capacity at a much lower voltage. They give a very brief runtime.

    As nearly as I can tell, the only thing that matters for camera runtime is the battery voltage. Large currents cause a correspondingly large voltage drop, so even cells with good open-circuit voltage will fail early.

    Internal cell resistance is probably the determining factor, as that increases with age. Even though the Energizers have plenty of capacity, they deliver it with a terminal voltage that’s too low for the camera.

    The Tenergy RTU cells have a pitifully small capacity compared to their ratings, but they last much longer in the camera than I expected. Their output voltage stays above 2.3 V until fairly late in their discharge, so the camera remains happy.

    I’ll continue using the Sony cells, along with a quartet of the Tenergy RTUs. The rest are destined for flashlights and such…

  • Hobo Data Logger Current

    Hobo battery current tap
    Hobo battery current tap

    A comment to my note on hacking AA alkalines on the back of a Hobo data logger (from someone at Onset!) suggested checking the logger’s current.

    After dumping last month’s data, I conjured up a piece of double-sided circuit board and soldered a turret terminal to each side. It’s thin enough to fit between the cell’s positive cap and the holder’s contact without distorting things too much.

    The lowest range on most of my digital meters is 200 mA, which is far too high. I tried an ancient analog meter with a 50 µA range, but the meter’s resistance was too high to keep the Hobo’s PC program happy: it claimed there was no logger out there. Finally I found a digital meter with a 4 mA range and 1 µA resolution, which was just right.

    Turns out that the logger draws 8 or 9 µA between readings, which is pretty much what it should be. At that rate, a CR2032 lithium coin cell with a capacity of 230 mA should have a lifetime of 23 k hours: call it three years. Obviously, it’ll be less than that, what with periodic loggings and dumpings and suchlike.

    The current’s the same with the external temperature probe plugged in and doesn’t change when I poke the capacitors. So the logger seems to be working perfectly.

    Which means I got a bad batch of Renata CR2032s two years ago. I just pulled one from another logger that I installed 5 Feb 09: all of six months ago. If I installed a series of really feeble cells in this logger, well, that would explain what I experienced.

    I’m currently using Energizers in the other loggers, so we’ll see what happens a year from now.

    But I’ll keep the alkalines on the back of this logger, as they should last basically forever at this rate.

  • Phone Headset Pinouts

    I picked up a Plantronics phone headset that’s nominally compatible with Kyocera phones, but of course not with the Virgin Mobile K127 Marbl I have. More on why I have that phone there. There are, as nearly as I can tell, no third-party headsets available for this phone.

    The Plantronics headset has the pinout shown to the upper right in the note below. It’s straightforward:

    • shell — common
    • ring 1 — left audio
    • ring 2 — right audio
    • tip — mic + button

    Plugging the headset in causes the phone to throw a hissy fit.

    Jamming an open-circuit plug into the phone’s jack has no effect; the phone thinks there’s nothing going on and still routes the audio to the internal speaker.

    Evidently, the phone expects a different combination on the plug.

    Some Webbish rummaging produced a list of headset pinouts, which goes to show that there’s nothing like having enough standards that everybody can have one…

    Headset Pinouts
    Headset Pinouts

    More tinkering is in order, but I found this list while I was clearing away the rubble from some completed projects and figured I should put it somewhere obvious.

  • Digital Concepts CH-3988S Charger and 4 each AA + AAA NiMH Cells: Craptastic!

    Got a Digital Concepts CH-3988S charger with quartets of AA & AAA cells from buy.com (which no longer sells it, no surprise, but it’s still available elsewhere) on closeout for about 12 bucks delivered, down from the “regular” price of something like $40; anybody who paid that much got well and truly hosed.

    I fully expected the cells to be crap and they were: they don’t even bear a manufacturer’s name. Tellingly, they weigh 25 grams each, lighter than the 28-30 grams of more cough reputable brands.

    No-name AA NiMH - Charge 1
    No-name AA NiMH – Charge 1

    The upper trace (click the graphs for readable pix) is the four AA NiMH after the charger said it was happy with them. The trace drops off the cliff at about 25 mAh. Call it 1% of nominal capacity.

    The four lower traces are the individual cells after another trip through the charger. The far-right end of those bottom curves is 70 mAh, with the cell voltage barely over 1 V for the entire discharge.

    Fairly obviously, they’re not accepting a charge.

    Charging the cells in a known-good 400 mA charger (roughly C/6) brought the best cell up to 160 mAh, with the rest around 100 mAh; the charger was happy with them after far less than 6 hours, so apparently the cells display a much higher terminal voltage than they should.

    So I plunked them in a dumb 250 mA slow charger and let ’em cook for the full 8 hours. That should, in principle, give them roughly 2 Ah of charge, no matter what the terminal voltage may be; I measured 1.8 V, which is far too high for that rate.

    No-name AA NiMH - Forced Charge 3
    No-name AA NiMH – Forced Charge 3

    So, here’s the result…

    Crap. Pure, utter, unadulterated crap. The cells supplied 500 mAh, much more than before, but that’s so far below their rating it’s not even funny. There’s obviously one cell in there that’s bad, but the others can’t possibly be far behind.

    I didn’t waste any time on the quartet of AAA cells, but I expect they’re pretty much the same.

    It’s faintly possible that exercising these turkeys will bring them up to maybe 50% of capacity, but it’s not like that’d make me ecstatic. The reviews you’ll find here and there support the conclusion that something is wrong with these cells.

    No-name AA NiMH - Charge 4
    No-name AA NiMH – Charge 4

    Here’s the result of the next cycle, after a night in their very own charger. The upper trace is all four of them together, once again failing after 500 mAh.

    The four lower traces labeled “Cell x” are the individual cells, tested without recharging. Three of the four have about 700 mAh left in them, which would bring their total capacity to 1200 mAh, roughly half of their nominal capacity.

    Cell B, the green trace, is obviously the weak link, as it failed almost instantly. Recharging it on a known-good charger got it back up to 530 mAh (the  “Cell B recharge” curve), roughly 25% of its nominal capacity. So much for the idea it’ll get better if you treat it right.

    Now, turning to the charger…

    The Digital Concepts CH-3988S charger is advertised on its package as a “2 Hour Charger”, but its manual / datasheet indicates that claim is, mmmm, not strictly correct:

    CH-3988S Charging Times
    CH-3988S Charging Times

    Remember that the nominal AA cell capacity is 2.3 Ah, so charging the four AA cells included with it requires three or four hours. Well, OK, only 2.5 hours if you do ’em pairwise, but that’s five hours total.

    On the other paw, the charger does (seem to) monitor the cell voltage and cut off automagically, on either negative delta-V or maybe just peak voltage. Unleashing it on a pair of partially discharged Tenergy RTU 2.3 Ah cells indicates that it cooks the piss right out of them, there toward the end.

    The charger is (probably) OK for low-rate charging of known-good cells, which is what I got it for; the cells accompanying it are crap. It’s not worth returning for twelve bucks, seeing as how the shipping would eat half of that.

    So, anyway, if you ever wondered what a bottom-dollar charger-with-cells offer gets you, now you know.