Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
Tag: Improvements
Making the world a better place, one piece at a time
As expected, the plywood seat I put on the Step2 Garden Seat for Mary’s Vassar Farms plot lasted about a year before the wood rotted away around the screws. In the meantime, we’d acquired a stack of SiLite cafeteria trays, so we applied one to the cause of better seating:
Step2 Seat – tray variant
Various eBay listings value that slab of BakeliteMelamine up to $20, which is far more than Mary paid for the entire stack at a local tag sale. They also call that color “rich brown”, which is certainly better than what immediately came to mind when I saw them.
The stylin’ asymmetric design happened when I realized the squared-off handle end of the cart didn’t demand a rounded-off end of the seat. I cut off the raised tray rim before sketching the rounded outline using the rotted seat as a template; some of the sketch remains over on the right-front corner. A session with Mr Belt Sander put the remaining rim edges flush with the surface, no matter what the picture suggests.
The tray being 2 mm thinner than the plywood, I tried printing the hinges in a different orientation with different built-in support:
Rolling Cart Hinges – solid model – build
The perimeter threads pulled up far too much and, although fiddling with cooling would likely help, I think the original orientation was better:
Rolling Cart Hinges – solid model – bottom
Given that the post-apocalypse breakfast will be served on similar trays, the seat should survive for quite a while in the garden. We think the sun will convert the brown surface into a bun warmer; a coat of white paint may be in its future.
The original OpenSCAD code is still out there as a GitHub Gist.
The LM3909 IC boosted a single 1.5 V cell enough to fire a red(-ish) LED, even with the cell well under 1 V. I want to blink a blue(-ish) LED from a pair of AA alkaline cells (with the right size & heft to serve as a base for the hairball circuitry), so the voltage ranges from just over 3 V down to maybe 1.5 V. Although the original circuit works, the LED pulse is long enough to put a reverse bias on the timing capacitor; a 470 µF electrolytic cap (positive terminal on the right at node P2-OUT) produces a pulse every few seconds.
A slightly tweaked version of the circuitry puts -400 mV across C1 (green trace) by the end of the pulse:
Discrete LM3909 – basic circuit – 3.0 V simulation
The App Note describes the negative feedback loop from the collector of “power transistor” Q3 through Q4 and Q1, closing through the Q2 current mirror. The base-emitter drops of Q4 and Q1 set the trip point where Q1 starts to conduct and the LED turns on.
Q3 is on when the LED is on, with C1 reverse-charging through R1 and the LED. The voltage at the top of R2 rises from the negative voltage at the start of the pulse, carrying the emitter of Q1 along with it. The LED pulse will end when the rising emitter voltage shuts off Q1 and, thus, the Q2 current mirror driving Q3. Because Q3 holds the bottom of R5 close to 0 V, the base of Q4 is at about half the supply voltage, so Q1 remains on until its emitter rises to about 2 forward drops (handwavingly ignoring the R6 + R7 voltage divider) below the supply.
If the LED pulse is longer than required to completely discharge C1, the poor cap gets reverse-biased and suffers indigestion. Aluminum electrolytics can withstand a little reverse bias, but it’s Bad Practice.
When Q3 and the LED are off, C1 forward-charges through (R4 + R5) + R2, with most of the initial voltage across R2, because C1 should start with a little more than 0 V across it. This holds the current mirror off until C1 charges enough to raise the base of Q4 about two forward drops above Q1’s emitter, shove current through Q4 and Q1, turn on the Q2 current mirror, Q3, and light the LED.
Around and around it goes!
The worst case for reverse charge happens at higher supply (a.k.a. battery) voltages and higher LED currents. Reducing the reverse charge time requires more forward drop through Q4 + Q1 to soak up the higher voltage and lower the trip voltage at Q1’s emitter, which suggests putting another forward-biased junction in series.
Putting a diode in Q1’s base lead doesn’t produce much improvement:
Discrete LM3909 – Q1 B diode – 3.0 V
Perhaps because the 27 µA current at the trip point is so low the diode doesn’t actually have much forward drop; the simulation says 400 mV.
Putting the diode in the emitter runs the current mirror’s 5 mA through it:
Discrete LM3909 – Q1 E diode – 3.0 V
The overall period remains about 2 s, but the LED pulse = reverse charge time drops by a factor of two and the cap voltage bottoms out at 0 V, so that’s good.
A Darlington transistor provides far more gain to compensate for the reduced base drive:
Discrete LM3909 – Darl Q1 – 3.0 V
The LED pulse is slightly shorter and its current goes up a smidge, but the cap voltage remains above zero.
A line in the LM3909 App Note mentions that the Q2 current mirror amplifies Q1’s emitter current by a factor of three: “This current will be amplified by about 3 by Q2 and passed to the base of Q3”. An IC current mirror’s designer can scale its output by varying the collector area, but out here in the discrete world we must splice multiple transistors in parallel:
Discrete LM3909 – Darl Q1 3xQ2- 3.0 V
More base drive in Q3 doesn’t buy much, because it’s already pretty well saturated during the pulse, but the current goes up enough to push C1 slightly into reverse charge territory again. As far as I can tell, the factor-of-three gain was required to make up for the relatively poor performance of IC technology around 1970; things have definitely improved since then.
It’s worth mentioning that the actual circuitry (in particular, the LEDs!) will differ from the simulations, so the pretty plots are more along the lines of serving suggestions than actual predictions. Verily, a simulation can’t prove that a circuit will work, but can sometimes help show why it won’t.
All the LTSpice simulation files tucked into a GitHub Gist:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The periods are much too short and the NPN astable currents much too high, but the thing runs for about ten days before the over-discharge circuit shuts it down.
So a single NPN astable driving a single-color LED with a more reasonable period should get a month or so from an end-of-life 18650 cell and a MOSFET astable might run for two months.
I’ve been using not-dead-yet lithium batteries to power astable multivibrators blinking LEDs on the red-to-yellow end of the spectrum, because the over-discharge protection circuitry in the batteries shuts down at 2.5 V, while not eking much light from LEDs toward the blue end of the spectrum.
Back in the late 60s, when integrated circuits were new, National Semiconductor designed and, in the early 70s, introduced the LM3909: “a monolithic oscillator specifically designed to flash Light Emitting Diodes”. The IC used an electrolytic capacitor as both timing element and voltage booster by charging the cap, then switching it in reverse series with the LED, to produce a voltage drop larger than the 1.5 V battery supply. The original National Semiconductor LM3909 datasheet will get you started and Application Note 154 gives more details and insight.
Rob Paisley’s work from 2008 suggested a discrete-transistor version might look just as attractive, in a techie sort of way, as the astables, and perhaps boost the 2 V from a pair of not-dead-yet alkaline cells high enough to light a blue LED.
Some LTSpice twiddling produces a suitable circuit:
Discrete LM3909 – basic circuit
The labeled nodes correspond to pin numbers on the IC package, with a suffix indicating what they did for a living. R2 combines the two timing resistors in the IC into a single unit, so “P18-RC” combines the pins. The Q2 pair over on the right forms a current mirror driving Q3, which the doc calls the “power transistor”, to yank the positive end of the capacitor to ground to light the LED.
The LED is faked by a PT-121-B diode with a 2.34 V forward drop at 20 mA. It’s rated for 20 A average current, so it’s not a particularly good model for a piddly 5 mm LED, but I’ll define it to be Good Enough for now.
Running the simulation at 1.5 V is encouraging:
Discrete LM3909 – basic circuit – 1.5 V simulation
The green trace gives the voltage across the capacitor. Under these conditions, the voltage stays positive, although not by much.
Running it from a 3 V supply changes the results:
Discrete LM3909 – basic circuit – 3.0 V simulation
The cap charges to about the same voltage, but the pulse now lasts long enough to charge it nearly half a volt in the wrong direction. This is Bad Practice, even though my similarly offending astables have been doing it for years.
The data sheet points out that the forward drops of Q1 and Q2 determine the trigger level for the start of the LED pulse, so adding another forward-biased junction in series should let the cap charge to a higher voltage and, for the same pulse duration, pull the low end up above zero to increase overall happiness.
Lithium battery packs have overcurrent protection cutouts, but alkaline cells depend on their internal resistance and may overheat in response to a serious short circuit. So adding a PTC fuse to the circuitry over an alkaline battery case seemed appropriate:
Discrete LM3909 – Darl Q1 – 1X Q2 – blue LED test
That’s a test setup for a discrete-transistor version of an LM3909 LED blinker, about which more later. The PTC fuse looks a lot like a ceramic capacitor with one leg caught in an alligator clip.
Two bags of PTC fuses recently arrived from halfway around the planet, rated at 100 mA and 170 mA. One allegedly came from JinKe and the other probably didn’t pass through a Littelfuse factory despite its part number, but the only datasheet I can find is for the Littelfuse RXEF PTC PolySwitch series, which is surely close enough.
I set up a torture test involving a bench power supply and an ammeter, both offscreen and left to your imagination:
PTC Polyfuse test setup
At 75 °F:
100 mA PTC – 4.75 Ω
170 mA PTC – 2.80 Ω
With a dead short simulated by 3 V from the supply, the current stabilized at:
The datasheet says they’re good up to 60 V, but that’s just crazy talk.
The abuse put a shiny gloss on the epoxy coating, sort of like when you overcooked one of those wax-insulated capacitors back in the day.
Despite that, a PTC fuse is better than a dead short, if only because the plastic battery case won’t get all melty with the batteries supplying less than half a watt.
LTSpice includes a bunch of LEDs I’ll never own, so finding a tabulation of their forward voltages helped match them against various LEDs on hand. The table was sorted by the forward voltage at the diode’s rated average current, which wasn’t helpful for my simple needs, so I re-sorted it on the Vf @ If = 20 mA column over on the right:
The currents come from plugging the various constants into the Schockley Diode Equation and turning the crank.
One could, of course, measure the constants for the diodes on hand to generate a proper Spice model, but that seems like a lot of work for what’s basically a blinking LED.