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

  • Discrete LM3909 LED Flasher: Circuit Variations

    Discrete LM3909 LED Flasher: Circuit Variations

    The basic discrete LM3909 LED Flasher circuit looks like this:

    Discrete LM3909 - basic circuit
    Discrete LM3909 – basic circuit

    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
    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
    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
    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
    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
    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:

    Version 4
    SHEET 1 1816 760
    WIRE 64 -16 0 -16
    WIRE 112 -16 64 -16
    WIRE 272 -16 112 -16
    WIRE 544 -16 272 -16
    WIRE 1024 -16 544 -16
    WIRE 1200 -16 1024 -16
    WIRE 112 0 112 -16
    WIRE 272 0 272 -16
    WIRE 1024 32 1024 -16
    WIRE 1200 32 1200 -16
    WIRE 0 48 0 -16
    WIRE 544 48 544 -16
    WIRE 944 80 864 80
    WIRE 960 80 944 80
    WIRE 1136 80 1104 80
    WIRE 272 96 272 80
    WIRE 400 96 272 96
    WIRE 480 96 400 96
    WIRE 400 112 400 96
    WIRE 112 128 112 80
    WIRE 272 128 272 96
    WIRE 688 128 640 128
    WIRE 800 128 752 128
    WIRE 944 144 944 80
    WIRE 1024 144 1024 128
    WIRE 1024 144 944 144
    WIRE 1104 144 1104 80
    WIRE 1104 144 1024 144
    WIRE 112 160 112 128
    WIRE 864 192 864 176
    WIRE 912 192 864 192
    WIRE 0 208 0 128
    WIRE 400 208 400 192
    WIRE 640 208 640 128
    WIRE 640 208 400 208
    WIRE 400 224 400 208
    WIRE 112 272 112 224
    WIRE 128 272 112 272
    WIRE 224 272 192 272
    WIRE 272 272 272 208
    WIRE 272 272 224 272
    WIRE 912 272 912 192
    WIRE 400 336 400 304
    WIRE 544 336 544 144
    WIRE 544 336 400 336
    WIRE 112 368 112 272
    WIRE 912 368 912 352
    WIRE 912 368 112 368
    WIRE 272 400 272 272
    WIRE 112 416 112 368
    WIRE 1200 448 1200 128
    WIRE 1200 448 336 448
    WIRE 112 464 112 416
    WIRE 400 480 400 336
    WIRE 0 496 0 288
    WIRE 0 496 -32 496
    WIRE -32 528 -32 496
    WIRE 0 576 0 496
    WIRE 64 576 0 576
    WIRE 112 576 112 544
    WIRE 112 576 64 576
    WIRE 272 576 272 496
    WIRE 272 576 112 576
    WIRE 400 576 400 560
    WIRE 400 576 272 576
    FLAG -32 528 0
    FLAG 112 128 P6-RLIM
    FLAG 112 416 P18-RC
    FLAG 224 272 P2-OUT
    FLAG 64 -16 P5-V+
    FLAG 64 576 P4-V-
    SYMBOL res 96 -16 R0
    SYMATTR InstName R1
    SYMATTR Value 39
    SYMBOL LED 96 160 R0
    SYMATTR InstName D1
    SYMATTR Value LXHL-BW02
    SYMBOL res 96 448 R0
    SYMATTR InstName R2
    SYMATTR Value 9.1k
    SYMBOL cap 192 256 R90
    WINDOW 0 0 32 VBottom 2
    WINDOW 3 32 32 VTop 2
    WINDOW 40 52 32 VTop 2
    SYMATTR InstName C1
    SYMATTR Value 1m
    SYMATTR SpiceLine2 ic=0.5
    SYMBOL res 256 112 R0
    SYMATTR InstName R5
    SYMATTR Value 390
    SYMBOL res 256 -16 R0
    SYMATTR InstName R4
    SYMATTR Value 390
    SYMBOL npn 336 400 M0
    SYMATTR InstName Q3
    SYMATTR Value 2N3904
    SYMBOL res 384 96 R0
    SYMATTR InstName R6
    SYMATTR Value 20k
    SYMBOL res 384 208 R0
    SYMATTR InstName R7
    SYMATTR Value 10k
    SYMBOL res 384 464 R0
    SYMATTR InstName R8
    SYMATTR Value 20k
    SYMBOL npn 480 48 R0
    SYMATTR InstName Q4
    SYMATTR Value 2N3904
    SYMBOL npn 800 80 R0
    SYMATTR InstName Q1
    SYMATTR Value 2N3904
    SYMBOL pnp 960 128 M180
    SYMATTR InstName Q2a
    SYMATTR Value 2N3906
    SYMBOL voltage 0 192 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 116 Left 2
    SYMATTR InstName V1
    SYMATTR Value 1.5
    SYMBOL res 896 256 R0
    SYMATTR InstName R9
    SYMATTR Value 100
    SYMBOL pnp 1136 128 M180
    SYMATTR InstName Q2b
    SYMATTR Value 2N3906
    SYMBOL res -16 32 R0
    SYMATTR InstName PTC
    SYMATTR Value 5
    SYMBOL diode 688 144 R270
    WINDOW 0 32 32 VTop 2
    WINDOW 3 0 32 VBottom 2
    SYMATTR InstName D2
    SYMATTR Value 1N4148
    TEXT -56 192 VRight 2 ;AA Alkaline
    TEXT 512 528 Left 2 !.tran 30
    TEXT 504 496 Left 2 ;Pins 3 and 7 = no connect
    TEXT 760 488 Left 2 ;Sorted by Vd at If=20 mA \n \nPart # Mfg Is (A) N Iave (A) Vf@Iave (V) Vd@If (V)\nQTLP690C Fairchild 1.00E-22 1.500 0.16 1.90 1.82\nPT-121-B Luminous 4.35E-07 8.370 20.00 3.84 2.34\nLUW-W5AP OSRAM 6.57E-08 7.267 2.00 3.26 2.39\nLXHL-BW02 Lumileds 4.50E-20 2.600 0.40 2.95 2.75\nW5AP-LZMZ-5K Lumileds 3.50E-17 3.120 2.00 3.13 2.76\nLXK2-PW14 Lumileds 3.50E-17 3.120 1.60 3.11 2.76\nAOT-2015 AOT 5.96E-10 6.222 0.18 3.16 2.80\nNSSW008CT-P Nichia 2.30E-16 3.430 0.04 2.92 2.86\nNSSWS108T Nichia 1.13E-18 3.020 0.04 2.99 2.94\nNSPW500BS Nichia 2.70E-10 6.790 0.03 3.27 3.20\nNSCW100 Nichia 1.69E-08 9.626 0.03 3.60 3.50
    TEXT 168 256 Left 4 ;+
    TEXT 656 56 Left 2 ;3 V battery needs more VBE
    Version 4
    SHEET 1 1816 760
    WIRE 64 -16 0 -16
    WIRE 112 -16 64 -16
    WIRE 272 -16 112 -16
    WIRE 544 -16 272 -16
    WIRE 1024 -16 544 -16
    WIRE 1200 -16 1024 -16
    WIRE 112 0 112 -16
    WIRE 272 0 272 -16
    WIRE 1024 32 1024 -16
    WIRE 1200 32 1200 -16
    WIRE 0 48 0 -16
    WIRE 544 48 544 -16
    WIRE 848 80 736 80
    WIRE 944 80 848 80
    WIRE 960 80 944 80
    WIRE 1136 80 1104 80
    WIRE 272 96 272 80
    WIRE 400 96 272 96
    WIRE 480 96 400 96
    WIRE 400 112 400 96
    WIRE 112 128 112 80
    WIRE 272 128 272 96
    WIRE 672 128 640 128
    WIRE 848 144 848 80
    WIRE 944 144 944 80
    WIRE 1024 144 1024 128
    WIRE 1024 144 944 144
    WIRE 1104 144 1104 80
    WIRE 1104 144 1024 144
    WIRE 112 160 112 128
    WIRE 736 192 736 176
    WIRE 784 192 736 192
    WIRE 0 208 0 128
    WIRE 400 208 400 192
    WIRE 640 208 640 128
    WIRE 640 208 400 208
    WIRE 400 224 400 208
    WIRE 912 240 848 240
    WIRE 112 272 112 224
    WIRE 128 272 112 272
    WIRE 224 272 192 272
    WIRE 272 272 272 208
    WIRE 272 272 224 272
    WIRE 912 272 912 240
    WIRE 400 336 400 304
    WIRE 544 336 544 144
    WIRE 544 336 400 336
    WIRE 112 368 112 272
    WIRE 912 368 912 352
    WIRE 912 368 112 368
    WIRE 272 400 272 272
    WIRE 112 416 112 368
    WIRE 1200 448 1200 128
    WIRE 1200 448 336 448
    WIRE 112 464 112 416
    WIRE 400 480 400 336
    WIRE 0 496 0 288
    WIRE 0 496 -32 496
    WIRE -32 528 -32 496
    WIRE 0 576 0 496
    WIRE 64 576 0 576
    WIRE 112 576 112 544
    WIRE 112 576 64 576
    WIRE 272 576 272 496
    WIRE 272 576 112 576
    WIRE 400 576 400 560
    WIRE 400 576 272 576
    FLAG -32 528 0
    FLAG 112 128 P6-RLIM
    FLAG 112 416 P18-RC
    FLAG 224 272 P2-OUT
    FLAG 64 -16 P5-V+
    FLAG 64 576 P4-V-
    SYMBOL res 96 -16 R0
    SYMATTR InstName R1
    SYMATTR Value 39
    SYMBOL LED 96 160 R0
    SYMATTR InstName D1
    SYMATTR Value NSSW008CT-P1
    SYMBOL res 96 448 R0
    SYMATTR InstName R2
    SYMATTR Value 9.1k
    SYMBOL cap 192 256 R90
    WINDOW 0 0 32 VBottom 2
    WINDOW 3 32 32 VTop 2
    WINDOW 40 52 32 VTop 2
    SYMATTR InstName C1
    SYMATTR Value 470�
    SYMATTR SpiceLine2 ic=0.5
    SYMBOL res 256 112 R0
    SYMATTR InstName R5
    SYMATTR Value 390
    SYMBOL res 256 -16 R0
    SYMATTR InstName R4
    SYMATTR Value 390
    SYMBOL npn 336 400 M0
    SYMATTR InstName Q3
    SYMATTR Value 2N3904
    SYMBOL res 384 96 R0
    SYMATTR InstName R6
    SYMATTR Value 20k
    SYMBOL res 384 208 R0
    SYMATTR InstName R7
    SYMATTR Value 10k
    SYMBOL res 384 464 R0
    SYMATTR InstName R8
    SYMATTR Value 20k
    SYMBOL npn 480 48 R0
    SYMATTR InstName Q4
    SYMATTR Value 2N3904
    SYMBOL npn 672 80 R0
    SYMATTR InstName Q1a
    SYMATTR Value 2N3904
    SYMBOL pnp 960 128 M180
    SYMATTR InstName Q2a
    SYMATTR Value 2N3906
    SYMBOL voltage 0 192 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 116 Left 2
    SYMATTR InstName V1
    SYMATTR Value 1.5
    SYMBOL res 896 256 R0
    SYMATTR InstName R9
    SYMATTR Value 100
    SYMBOL pnp 1136 128 M180
    SYMATTR InstName Q2b
    SYMATTR Value 2N3906
    SYMBOL npn 784 144 R0
    SYMATTR InstName Q1b
    SYMATTR Value 2N3904
    SYMBOL res -16 32 R0
    SYMATTR InstName PTC
    SYMATTR Value 5
    TEXT -56 192 VRight 2 ;AA Alkaline
    TEXT 512 528 Left 2 !.tran 30
    TEXT 504 496 Left 2 ;Pins 3 and 7 = no connect
    TEXT 760 488 Left 2 ;Sorted by Vd at If=20 mA \n \nPart # Mfg Is (A) N Iave (A) Vf@Iave (V) Vd@If (V)\nQTLP690C Fairchild 1.00E-22 1.500 0.16 1.90 1.82\nPT-121-B Luminous 4.35E-07 8.370 20.00 3.84 2.34\nLUW-W5AP OSRAM 6.57E-08 7.267 2.00 3.26 2.39\nLXHL-BW02 Lumileds 4.50E-20 2.600 0.40 2.95 2.75\nW5AP-LZMZ-5K Lumileds 3.50E-17 3.120 2.00 3.13 2.76\nLXK2-PW14 Lumileds 3.50E-17 3.120 1.60 3.11 2.76\nAOT-2015 AOT 5.96E-10 6.222 0.18 3.16 2.80\nNSSW008CT-P Nichia 2.30E-16 3.430 0.04 2.92 2.86\nNSSWS108T Nichia 1.13E-18 3.020 0.04 2.99 2.94\nNSPW500BS Nichia 2.70E-10 6.790 0.03 3.27 3.20\nNSCW100 Nichia 1.69E-08 9.626 0.03 3.60 3.50
    TEXT 168 256 Left 4 ;+
    TEXT 664 256 Left 2 ;Use MPSA14 Darlington
    TEXT 656 56 Left 2 ;3 V battery needs more VBE
    Version 4
    SHEET 1 1816 760
    WIRE 64 -16 0 -16
    WIRE 112 -16 64 -16
    WIRE 272 -16 112 -16
    WIRE 544 -16 272 -16
    WIRE 1024 -16 544 -16
    WIRE 1200 -16 1024 -16
    WIRE 1360 -16 1200 -16
    WIRE 1520 -16 1360 -16
    WIRE 112 0 112 -16
    WIRE 272 0 272 -16
    WIRE 1024 32 1024 -16
    WIRE 1200 32 1200 -16
    WIRE 1360 32 1360 -16
    WIRE 1520 32 1520 -16
    WIRE 0 48 0 -16
    WIRE 544 48 544 -16
    WIRE 848 80 736 80
    WIRE 944 80 848 80
    WIRE 960 80 944 80
    WIRE 1136 80 1104 80
    WIRE 1296 80 1280 80
    WIRE 1456 80 1440 80
    WIRE 272 96 272 80
    WIRE 400 96 272 96
    WIRE 480 96 400 96
    WIRE 400 112 400 96
    WIRE 112 128 112 80
    WIRE 272 128 272 96
    WIRE 672 128 640 128
    WIRE 848 144 848 80
    WIRE 944 144 944 80
    WIRE 1024 144 1024 128
    WIRE 1024 144 944 144
    WIRE 1104 144 1104 80
    WIRE 1104 144 1024 144
    WIRE 1280 144 1280 80
    WIRE 1280 144 1104 144
    WIRE 1440 144 1440 80
    WIRE 1440 144 1280 144
    WIRE 112 160 112 128
    WIRE 736 192 736 176
    WIRE 784 192 736 192
    WIRE 1200 192 1200 128
    WIRE 1360 192 1360 128
    WIRE 1360 192 1200 192
    WIRE 1520 192 1520 128
    WIRE 1520 192 1360 192
    WIRE 0 208 0 128
    WIRE 400 208 400 192
    WIRE 640 208 640 128
    WIRE 640 208 400 208
    WIRE 400 224 400 208
    WIRE 912 240 848 240
    WIRE 112 272 112 224
    WIRE 128 272 112 272
    WIRE 224 272 192 272
    WIRE 272 272 272 208
    WIRE 272 272 224 272
    WIRE 912 272 912 240
    WIRE 400 336 400 304
    WIRE 544 336 544 144
    WIRE 544 336 400 336
    WIRE 112 368 112 272
    WIRE 912 368 912 352
    WIRE 912 368 112 368
    WIRE 272 400 272 272
    WIRE 112 416 112 368
    WIRE 1200 448 1200 192
    WIRE 1200 448 336 448
    WIRE 112 464 112 416
    WIRE 400 480 400 336
    WIRE 0 496 0 288
    WIRE 0 496 -32 496
    WIRE -32 528 -32 496
    WIRE 0 576 0 496
    WIRE 64 576 0 576
    WIRE 112 576 112 544
    WIRE 112 576 64 576
    WIRE 272 576 272 496
    WIRE 272 576 112 576
    WIRE 400 576 400 560
    WIRE 400 576 272 576
    FLAG -32 528 0
    FLAG 112 128 P6-RLIM
    FLAG 112 416 P18-RC
    FLAG 224 272 P2-OUT
    FLAG 64 -16 P5-V+
    FLAG 64 576 P4-V-
    SYMBOL res 96 -16 R0
    SYMATTR InstName R1
    SYMATTR Value 39
    SYMBOL LED 96 160 R0
    SYMATTR InstName D1
    SYMATTR Value NSSW008CT-P1
    SYMBOL res 96 448 R0
    SYMATTR InstName R2
    SYMATTR Value 9.1k
    SYMBOL cap 192 256 R90
    WINDOW 0 0 32 VBottom 2
    WINDOW 3 32 32 VTop 2
    WINDOW 40 52 32 VTop 2
    SYMATTR InstName C1
    SYMATTR Value 470�
    SYMATTR SpiceLine2 ic=0.5
    SYMBOL res 256 112 R0
    SYMATTR InstName R5
    SYMATTR Value 390
    SYMBOL res 256 -16 R0
    SYMATTR InstName R4
    SYMATTR Value 390
    SYMBOL npn 336 400 M0
    SYMATTR InstName Q3
    SYMATTR Value 2N3904
    SYMBOL res 384 96 R0
    SYMATTR InstName R6
    SYMATTR Value 20k
    SYMBOL res 384 208 R0
    SYMATTR InstName R7
    SYMATTR Value 10k
    SYMBOL res 384 464 R0
    SYMATTR InstName R8
    SYMATTR Value 20k
    SYMBOL npn 480 48 R0
    SYMATTR InstName Q4
    SYMATTR Value 2N3904
    SYMBOL npn 672 80 R0
    SYMATTR InstName Q1a
    SYMATTR Value 2N3904
    SYMBOL pnp 960 128 M180
    SYMATTR InstName Q2a
    SYMATTR Value 2N3906
    SYMBOL voltage 0 192 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 116 Left 2
    SYMATTR InstName V1
    SYMATTR Value 1.5
    SYMBOL res 896 256 R0
    SYMATTR InstName R9
    SYMATTR Value 100
    SYMBOL pnp 1136 128 M180
    SYMATTR InstName Q2b
    SYMATTR Value 2N3906
    SYMBOL pnp 1296 128 M180
    SYMATTR InstName Q2c
    SYMATTR Value 2N3906
    SYMBOL pnp 1456 128 M180
    SYMATTR InstName Q2d
    SYMATTR Value 2N3906
    SYMBOL npn 784 144 R0
    SYMATTR InstName Q1b
    SYMATTR Value 2N3904
    SYMBOL res -16 32 R0
    SYMATTR InstName PTC
    SYMATTR Value 5
    TEXT -56 192 VRight 2 ;AA Alkaline
    TEXT 512 528 Left 2 !.tran 15
    TEXT 504 496 Left 2 ;Pins 3 and 7 = no connect
    TEXT 760 488 Left 2 ;Sorted by Vd at If=20 mA \n \nPart # Mfg Is (A) N Iave (A) Vf@Iave (V) Vd@If (V)\nQTLP690C Fairchild 1.00E-22 1.500 0.16 1.90 1.82\nPT-121-B Luminous 4.35E-07 8.370 20.00 3.84 2.34\nLUW-W5AP OSRAM 6.57E-08 7.267 2.00 3.26 2.39\nLXHL-BW02 Lumileds 4.50E-20 2.600 0.40 2.95 2.75\nW5AP-LZMZ-5K Lumileds 3.50E-17 3.120 2.00 3.13 2.76\nLXK2-PW14 Lumileds 3.50E-17 3.120 1.60 3.11 2.76\nAOT-2015 AOT 5.96E-10 6.222 0.18 3.16 2.80\nNSSW008CT-P Nichia 2.30E-16 3.430 0.04 2.92 2.86\nNSSWS108T Nichia 1.13E-18 3.020 0.04 2.99 2.94\nNSPW500BS Nichia 2.70E-10 6.790 0.03 3.27 3.20\nNSCW100 Nichia 1.69E-08 9.626 0.03 3.60 3.50
    TEXT 168 256 Left 4 ;+
    TEXT 1224 224 Left 2 ;Current mirror with 3X current gain
    TEXT 664 256 Left 2 ;Use MPSA14 Darlington
    TEXT 656 56 Left 2 ;3 V battery needs more VBE
    Version 4
    SHEET 1 1816 760
    WIRE 64 -16 0 -16
    WIRE 112 -16 64 -16
    WIRE 272 -16 112 -16
    WIRE 544 -16 272 -16
    WIRE 1024 -16 544 -16
    WIRE 1200 -16 1024 -16
    WIRE 112 0 112 -16
    WIRE 272 0 272 -16
    WIRE 1024 32 1024 -16
    WIRE 1200 32 1200 -16
    WIRE 0 48 0 -16
    WIRE 544 48 544 -16
    WIRE 944 80 768 80
    WIRE 960 80 944 80
    WIRE 1136 80 1104 80
    WIRE 272 96 272 80
    WIRE 400 96 272 96
    WIRE 480 96 400 96
    WIRE 400 112 400 96
    WIRE 112 128 112 80
    WIRE 272 128 272 96
    WIRE 704 128 640 128
    WIRE 944 144 944 80
    WIRE 1024 144 1024 128
    WIRE 1024 144 944 144
    WIRE 1104 144 1104 80
    WIRE 1104 144 1024 144
    WIRE 112 160 112 128
    WIRE 768 192 768 176
    WIRE 800 192 768 192
    WIRE 912 192 864 192
    WIRE 0 208 0 128
    WIRE 400 208 400 192
    WIRE 640 208 640 128
    WIRE 640 208 400 208
    WIRE 400 224 400 208
    WIRE 112 272 112 224
    WIRE 128 272 112 272
    WIRE 224 272 192 272
    WIRE 272 272 272 208
    WIRE 272 272 224 272
    WIRE 912 272 912 192
    WIRE 400 336 400 304
    WIRE 544 336 544 144
    WIRE 544 336 400 336
    WIRE 112 368 112 272
    WIRE 912 368 912 352
    WIRE 912 368 112 368
    WIRE 272 400 272 272
    WIRE 112 416 112 368
    WIRE 1200 448 1200 128
    WIRE 1200 448 336 448
    WIRE 112 464 112 416
    WIRE 400 480 400 336
    WIRE 0 496 0 288
    WIRE 0 496 -32 496
    WIRE -32 528 -32 496
    WIRE 0 576 0 496
    WIRE 64 576 0 576
    WIRE 112 576 112 544
    WIRE 112 576 64 576
    WIRE 272 576 272 496
    WIRE 272 576 112 576
    WIRE 400 576 400 560
    WIRE 400 576 272 576
    FLAG -32 528 0
    FLAG 112 128 P6-RLIM
    FLAG 112 416 P18-RC
    FLAG 224 272 P2-OUT
    FLAG 64 -16 P5-V+
    FLAG 64 576 P4-V-
    SYMBOL res 96 -16 R0
    SYMATTR InstName R1
    SYMATTR Value 39
    SYMBOL LED 96 160 R0
    SYMATTR InstName D1
    SYMATTR Value LXHL-BW02
    SYMBOL res 96 448 R0
    SYMATTR InstName R2
    SYMATTR Value 9.1k
    SYMBOL cap 192 256 R90
    WINDOW 0 0 32 VBottom 2
    WINDOW 3 32 32 VTop 2
    WINDOW 40 52 32 VTop 2
    SYMATTR InstName C1
    SYMATTR Value 1m
    SYMATTR SpiceLine2 ic=0.5
    SYMBOL res 256 112 R0
    SYMATTR InstName R5
    SYMATTR Value 390
    SYMBOL res 256 -16 R0
    SYMATTR InstName R4
    SYMATTR Value 390
    SYMBOL npn 336 400 M0
    SYMATTR InstName Q3
    SYMATTR Value 2N3904
    SYMBOL res 384 96 R0
    SYMATTR InstName R6
    SYMATTR Value 20k
    SYMBOL res 384 208 R0
    SYMATTR InstName R7
    SYMATTR Value 10k
    SYMBOL res 384 464 R0
    SYMATTR InstName R8
    SYMATTR Value 20k
    SYMBOL npn 480 48 R0
    SYMATTR InstName Q4
    SYMATTR Value 2N3904
    SYMBOL npn 704 80 R0
    SYMATTR InstName Q1
    SYMATTR Value 2N3904
    SYMBOL pnp 960 128 M180
    SYMATTR InstName Q2a
    SYMATTR Value 2N3906
    SYMBOL voltage 0 192 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 116 Left 2
    SYMATTR InstName V1
    SYMATTR Value 1.5
    SYMBOL res 896 256 R0
    SYMATTR InstName R9
    SYMATTR Value 100
    SYMBOL pnp 1136 128 M180
    SYMATTR InstName Q2b
    SYMATTR Value 2N3906
    SYMBOL res -16 32 R0
    SYMATTR InstName PTC
    SYMATTR Value 5
    SYMBOL diode 800 208 R270
    WINDOW 0 32 32 VTop 2
    WINDOW 3 0 32 VBottom 2
    SYMATTR InstName D2
    SYMATTR Value 1N4148
    TEXT -56 192 VRight 2 ;AA Alkaline
    TEXT 512 528 Left 2 !.tran 30
    TEXT 504 496 Left 2 ;Pins 3 and 7 = no connect
    TEXT 760 488 Left 2 ;Sorted by Vd at If=20 mA \n \nPart # Mfg Is (A) N Iave (A) Vf@Iave (V) Vd@If (V)\nQTLP690C Fairchild 1.00E-22 1.500 0.16 1.90 1.82\nPT-121-B Luminous 4.35E-07 8.370 20.00 3.84 2.34\nLUW-W5AP OSRAM 6.57E-08 7.267 2.00 3.26 2.39\nLXHL-BW02 Lumileds 4.50E-20 2.600 0.40 2.95 2.75\nW5AP-LZMZ-5K Lumileds 3.50E-17 3.120 2.00 3.13 2.76\nLXK2-PW14 Lumileds 3.50E-17 3.120 1.60 3.11 2.76\nAOT-2015 AOT 5.96E-10 6.222 0.18 3.16 2.80\nNSSW008CT-P Nichia 2.30E-16 3.430 0.04 2.92 2.86\nNSSWS108T Nichia 1.13E-18 3.020 0.04 2.99 2.94\nNSPW500BS Nichia 2.70E-10 6.790 0.03 3.27 3.20\nNSCW100 Nichia 1.69E-08 9.626 0.03 3.60 3.50
    TEXT 168 256 Left 4 ;+
    TEXT 656 56 Left 2 ;3 V battery needs more VBE
    Version 4
    SHEET 1 1812 680
    WIRE 96 -16 32 -16
    WIRE 144 -16 96 -16
    WIRE 304 -16 144 -16
    WIRE 544 -16 304 -16
    WIRE 752 -16 544 -16
    WIRE 144 0 144 -16
    WIRE 304 0 304 -16
    WIRE 752 0 752 -16
    WIRE 928 0 752 0
    WIRE 752 32 752 0
    WIRE 928 32 928 0
    WIRE 544 48 544 -16
    WIRE 832 80 816 80
    WIRE 864 80 832 80
    WIRE 304 96 304 80
    WIRE 400 96 304 96
    WIRE 480 96 400 96
    WIRE 400 112 400 96
    WIRE 144 128 144 80
    WIRE 304 128 304 96
    WIRE 752 144 752 128
    WIRE 752 144 704 144
    WIRE 832 144 832 80
    WIRE 832 144 752 144
    WIRE 144 160 144 128
    WIRE 704 160 704 144
    WIRE 32 208 32 -16
    WIRE 400 208 400 192
    WIRE 640 208 400 208
    WIRE 400 224 400 208
    WIRE 704 272 704 256
    WIRE 144 288 144 224
    WIRE 160 288 144 288
    WIRE 256 288 224 288
    WIRE 304 288 304 208
    WIRE 304 288 256 288
    WIRE 400 320 400 304
    WIRE 544 320 544 144
    WIRE 544 320 400 320
    WIRE 144 368 144 288
    WIRE 704 368 704 352
    WIRE 704 368 144 368
    WIRE 304 400 304 288
    WIRE 144 416 144 368
    WIRE 928 448 928 128
    WIRE 928 448 368 448
    WIRE 144 464 144 416
    WIRE 400 480 400 320
    WIRE 32 496 32 288
    WIRE 32 496 0 496
    WIRE 0 528 0 496
    WIRE 32 576 32 496
    WIRE 96 576 32 576
    WIRE 144 576 144 544
    WIRE 144 576 96 576
    WIRE 304 576 304 496
    WIRE 304 576 144 576
    WIRE 400 576 400 560
    WIRE 400 576 304 576
    FLAG 0 528 0
    FLAG 144 128 P6-RLIM
    FLAG 144 416 P18-RC
    FLAG 256 288 P2-OUT
    FLAG 96 -16 P5-V+
    FLAG 96 576 P4-V-
    SYMBOL res 128 -16 R0
    SYMATTR InstName R1
    SYMATTR Value 12
    SYMBOL LED 128 160 R0
    SYMATTR InstName D1
    SYMATTR Value PT-121-B
    SYMBOL res 128 448 R0
    SYMATTR InstName R2
    SYMATTR Value 9.1k
    SYMBOL cap 224 272 R90
    WINDOW 0 0 32 VBottom 2
    WINDOW 3 32 32 VTop 2
    WINDOW 40 52 32 VTop 2
    SYMATTR InstName C1
    SYMATTR Value 470�
    SYMATTR SpiceLine2 ic=0.5
    SYMBOL res 288 112 R0
    SYMATTR InstName R5
    SYMATTR Value 390
    SYMBOL res 288 -16 R0
    SYMATTR InstName R4
    SYMATTR Value 390
    SYMBOL npn 368 400 M0
    SYMATTR InstName Q3
    SYMATTR Value 2N3904
    SYMBOL res 384 96 R0
    SYMATTR InstName R6
    SYMATTR Value 20k
    SYMBOL res 384 208 R0
    SYMATTR InstName R7
    SYMATTR Value 10k
    SYMBOL res 384 464 R0
    SYMATTR InstName R8
    SYMATTR Value 20k
    SYMBOL npn 480 48 R0
    SYMATTR InstName Q4
    SYMATTR Value 2N3904
    SYMBOL npn 640 160 R0
    SYMATTR InstName Q1
    SYMATTR Value 2N3904
    SYMBOL pnp 816 128 R180
    SYMATTR InstName Q2a
    SYMATTR Value 2N3906
    SYMBOL voltage 32 192 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 24 116 Left 2
    SYMATTR InstName V1
    SYMATTR Value 3
    SYMBOL res 688 256 R0
    SYMATTR InstName R9
    SYMATTR Value 100
    SYMBOL pnp 864 128 M180
    SYMATTR InstName Q2b
    SYMATTR Value 2N3906
    TEXT -24 192 VRight 2 ;AA Alkaline
    TEXT 512 528 Left 2 !.tran 10
    TEXT 504 496 Left 2 ;Pins 3 and 7 = no connect
    TEXT 1064 112 Left 2 ;Sorted by Vd at If=20 mA \n \nPart # Mfg Is (A) N Iave (A) Vf@Iave (V) Vd@If (V)\nQTLP690C Fairchild 1.00E-22 1.500 0.16 1.90 1.82\nPT-121-B Luminous 4.35E-07 8.370 20.00 3.84 2.34\nLUW-W5AP OSRAM 6.57E-08 7.267 2.00 3.26 2.39\nLXHL-BW02 Lumileds 4.50E-20 2.600 0.40 2.95 2.75\nW5AP-LZMZ-5K Lumileds 3.50E-17 3.120 2.00 3.13 2.76\nLXK2-PW14 Lumileds 3.50E-17 3.120 1.60 3.11 2.76\nAOT-2015 AOT 5.96E-10 6.222 0.18 3.16 2.80\nNSSW008CT-P Nichia 2.30E-16 3.430 0.04 2.92 2.86\nNSSWS108T Nichia 1.13E-18 3.020 0.04 2.99 2.94\nNSPW500BS Nichia 2.70E-10 6.790 0.03 3.27 3.20\nNSCW100 Nichia 1.69E-08 9.626 0.03 3.60 3.50

  • Praying Mantis On Duty

    Praying Mantis On Duty

    A Praying Mantis has once again taken up watching over the Butterfly Bush:

    Praying Mantis - waiting
    Praying Mantis – waiting

    I made a slight noise that prompted an immediate weapons lock:

    Praying Mantis - attentive
    Praying Mantis – attentive

    We’ve watched her stalk and capture a bumblebee, as well as chow down on one of the myriad moths feeding on the bush at night.

    As always, if I were smaller, I’d be worried …

  • Toad Time

    Toad Time

    The toad population has apparently been spending more time near the Mighty Wappinger Creek, rather than around the house, during this very dry summer, so this small toad at the garage door came as a surprise:

    Toad at garage door
    Toad at garage door

    A few days later, Mary spotted a larger toad tucked into the spice garden:

    Toad in spice garden
    Toad in spice garden

    Small tree frogs sound off in the darkness around the house, but we’ve never seen any of them.

    We wish them great success in their future bug hunts!

  • NPN RGB Astable Multivibrator: End-of-Life Battery Runtime

    NPN RGB Astable Multivibrator: End-of-Life Battery Runtime

    After un-wedging the astable’s synchronized periods and recharging the harvested 18650 lithium cell, I put a sock (not shown) over the radome and let it blink on a corner of the desk:

    Astable - 10 11 12 uF tweak - 027
    Astable – 10 11 12 uF tweak – 027

    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.

  • Discrete-transistor LM3909 LED Flasher

    Discrete-transistor LM3909 LED Flasher

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

  • Lathe-straightened Copper Wire

    Lathe-straightened Copper Wire

    I formerly straightened the copper wire into “bus bars” for the astable multivibrators by whacking it with a slide hammer, but someone whose name is lost in the mists of time told me the right way to do it:

    Lathe-straightening Wire - setup
    Lathe-straightening Wire – setup

    Yup, grab a piece of wire at both ends in Tiny Lathe and give it a few low-speed turns while pulling firmly on the tailstock.

    No muss, no fuss, no drama, just bar-straight and slightly work-hardened copper wires:

    Lathe-straightening Wire - results
    Lathe-straightening Wire – results

    I slide-hammered the top wire before remembering the clue. The bottom two wires have peppermint-stick swirls.

    Thank you, whoever you were!

  • Monthly Science: Inchworms

    Monthly Science: Inchworms

    A Rudbeckia Black-eyed-susan coneflower from the garden carried a passenger to our patio table:

    Inchworm - linear
    Inchworm – linear

    Even linearized, the inchworm was barely 20 mm long; it’s the thought that counts.

    The stamens mature in concentric rings, each stamen topped by a pollen grain. Apparently, those grains are just about the most wonderful food ever, as the inchworm made its way around the ring eating each grain in succession:

    Inchworm - feeding
    Inchworm – feeding

    Of course, what goes in must come out:

    Inchworm - excreting
    Inchworm – excreting

    I had to brush off the table before washing it; the pellets are dry, but smear when you get them wet.

    Another flower in the vase held a 10 mm inchworm with plenty of upside potential:

    Inchworm - junior edition
    Inchworm – junior edition

    After nearly a week, the flowers were done and the inchworms had moved on. We wish them well, although we likely won’t recognize them in the future.