Skip to main content

This is a simple little project I have been working on, intended to flash LED's for road crossing flashing lights. The circuit as shown alternately flashes the LED's at about 2 seconds for a complete cycle, which looks about right to me. The cycle length can be lengthened by increasing the values of either C2/C3 or R3/R4. But I would like to be able to adjust the cycle length on the fly without the bother of changing components. I could put individual trimmer pots in place of R3/R4, but is there a simpler way to do this? I know there is a board available at wehonest which includes variable flash speed, but I kind of want to build my own. Thanks for any help.

Rod

 

Attachments

Original Post

Replies sorted oldest to newest

I don't see a way to modify this circuit easily to change the rates, you have two variables to change to keep the duty-cycle 50/50.

How about a dual-gang 100k pot?  You could add a series resistor of around 47K to adjust from 50K to 150K?  I looked for a smaller trimmer, but dual trimmers apparently don't exist.

Dual-Gang 100K Pot

Attachments

Images (1)
  • mceclip0

If size matters, I'd think that dual-gang trimpot is a tad large and somewhat expensive at 65 cents (that's more than the cost of all the other components).  Presumably this is an infrequent or once-and-done adjustment.  That said, why not use two individual tiny low-cost trimpots for R3 and R4.  Sure, you have to make two adjustments nominally set to the same value.  But this actually can have an advantage in that you can "trim" out any C2 vs. C3 variations to get closer to 50% duty-cycle.

OTOH, if you're only looking for a small trim range, say +/-25%, you could use just one trimpot inserted between the junction of R3-R4 and the positive supply.   If the single trimpot value is similar to or preferably smaller than the value of R3-R4, the circuit should behave.  For example if R3-R4 are 100K, a 50K trimpot should work fine.

Separately, this circuit should exhibit flash-rate dependence based on the voltage.  I notice you have a rather large variation in voltage range.  If you are messing around on the bench and have a variable voltage supply, that might be another way to vary timing without using a trimpot(s) in place of or in conjunction with R3-R4.  For the curious hard-core DIY'ers, at larger voltages this popular design (it seems to keep popping up) has the interesting property of momentarily turning the 2 transistors into Zener diodes across the reverse-biased E-B junction on each alternating flash.  This makes the timing dependent on the DC supply voltage though doing the math would be tedious to say the least!

 

Hey guys, thanks for all the input. I knew some good ideas would pop up.

I first saw this circuit in a Radio Shack publication by Forrest Mimms, a long time ago, lol. I think he called it a "free running multivibrator" or something like that.

Stan I like the single series trim pot idea. I think I will experiment with 50-100K pots and see what seems to work best. I like  the idea of also being able to compensate for variations in supply voltage. I noticed when breadboarding the circuit that the flash rate was very dependant on voltage. I bet a clever guy like you could whip up an Excel SS to figure out what values of R3/R4 would work with various supply voltages!

Rod

Update: I have been experimenting with the trim pot idea suggested by Stan. With R3/R4 values of 100K, a trim pot of 100K seems to work well. I also reduced the C2/C3 values from 22 uF to 10 uF. All seems to work. Flash rate is about 1 Hz; or 2 seconds per complete cycle. That looks about right to my eye.

Interestingly the flash rate seems unaffected by supply voltage difference, at least over a range of 6-12 vdc. The LED brightness is affected somewhat by trim pot adjustment, but not noticeably so. It is more affected by changes in supply voltage of course. Overall it seems like a good little flasher circuit and I have ordered some test pcb's from OSH Park.

As an aside; has anyone got any ideas on how I might be able to use this basic circuit to alternately flash a couple of large 12 volt LED's, say up to 1 amp load? I have this vague idea that I might be able to use the low power alternating S8050 outputs to drive two larger NPN power transistors, say TIP120's or similar. These are rated at up to 5 amps collector current and 65 watts TDH. But I have no idea is this is doable. Appreciate any thoughts.

Thanks, Rod

 

At face value it seems like such a simple and low-cost circuit.  But start adding twists and turns and it reminds me of peeling layers of an onion - it will bring tears to your eyes!  So doing an OGR search, there have been many threads about this circuit...such as this one.

In the linked post, the beefier 2N3055 NPN transistor is proposed in place of the S8050.  Now here's where it gets tedious.  For a quick back-of-envelope calculation, a typical transistor might have a current gain of, say, 100.  So if you're trying to switch 1 Amp in the transistor output, you need at least 0.01 Amps (10 mA) at the transistor input.  In your existing schematic you have a 100K resistor at the transistor input.  In addition to charging the capacitor for the cycling function, this resistor must also supply the current to the transistor B (base) input pin.  If you only have 12V DC to start with, going thru a 100K resistor can supply at most 12V/100K = 0.12 mA which is woefully inadequate if you want that transistor switching 1 Amp.

So the idea of separating the circuit into the cycling/alternating portion from the buffering portion (to drive the 1 Amp bulbs) is a good one.  But to be clear, is the objective to use the OSH Park board you ordered as the cycling circuit...and then the question is how to buffer the board output for a one-off higher power version?

How important is it to use the TIP120?  This is a so-called Darlington NPN transistor which has much higher current gain than a normal transistor so might be applicable.  But is tricky to apply directly in place of the S8050 because of internal resistors that are small (and hence will "overwhelm") compared to your 100K external timing resistor.  This would mess up the capacitor charging.  There are ways around this but more layers of the onion!

tip120

 

Attachments

Images (1)
  • tip120

Thanks again guys for the input.

Stan, my plan was to use the 8050 outputs from the existing circuit to control the switching of two larger power transistors, to do the heavy lifting. The intent was to retain the 8050's as the basic alternating part of the circuit. Sorry if I did not make that clear. I suggested the TIP 120's only because I have several on hand. They may not be the best choice, I don't know enough about them to make that call. The 2N3055 circuit may work directly, but it's not clear whether it would handle 1 amp loads directly, though I see they are rated at up to 15 amps! Also, TO-3 packages are not nearly as handy to implement as TO-220, IMO. What do you think?

Chuck, thanks for this idea. I'll maybe try and modify my schematic as you have suggested using a TIP42C or ECG50 or some similar medium power PNP type. I have a couple of NSDU56's on hand which come up as a 2 amp PNP TO-202 package with a gain of 80, so they may work, don't know.

Rod

 

What he said.  As touched upon earlier, the "multivibrator" circuit as implemented can be tricky to adapt to high current (1 Amp) output using a conventional NPN transistor.  FET switches are now cheap.  The N-channel FET used in the MTH DCS TIU often comes up for DIY repair.  I see they are still about 15 cents each on eBay (free shipping from Asia) and are rated for 49 Amps .

The key is FETs have effectively infinite current gain so become what amounts to an "ideal" buffer.

irfz44n

I see you have a 3-pin connector (?) on your OSH Park board.  Simply confirm the L1 and L2 outputs are toggling between ~0V and ~12V.  At a slow enough alternating speed you only need a voltmeter (rather than an oscilloscope) to confirm the full voltage swing.   If not, then increase the 200 ohm resistors (to, say, 1K, 2K, whatever) until the you get a full swing.  Increasing the 200 ohm resistor will dim the on-board LEDs but that's OK - you need the full voltage swing to use the low-cost N-channel FET buffer as proposed.

Attachments

Images (1)
  • irfz44n
Last edited by stan2004

Thanks again Stan and John for this idea. 49 amps; holy smackers! Those should handle things easily. I think I will go ahead and test those mosfet's and see how it goes. Just ordered some, only a few for testing for now. I will do that 0-12-0 volt swing testing on L1/L2 first Stan, and see where that takes me.

John, no I don't need to flash the LED's also. The original basic board with the 8050's will work for the LED flashing task as is. Just wanted to morph the basic board into something that I can use for flashing much larger LED bulbs for another task, so the LED's can surely be eliminated.

Next project will be to revise my schematic and put that up on here for all to critique.  

Thanks, Rod

Rod Stewart posted:

… Stan, on the modified circuit that you did up (3 posts above), are the supply and drain connections to the mosfets shown correctly?

Yes, S (Source) to ground and D (Drain) to the "-" side of the high-current LED.  The "+" side of the LED goes to DC+ supply.  Glossing over the details, for a N-channel FET like this, when you apply a voltage of about 5V (or more) between G and S the FET turns on and "shorts" together the D and S terminals.  By "shorts" this means a low resistance typically measured in fraction of an Ohm for power FETs like this.

BTW.  I believe when the circuit first turns on there might be a delay of a cycle or two until it settles into a steady alternating pattern.  I'd think there might be situations where both LEDs are simultaneously ON or OFF until the capacitors settle into their ping-pong action.  By using the more common and typically less expensive N-channel FET (vs. a P-channel FET), the high power LEDs are inverted from on-board LEDs.  No big deal for a couple low current LEDs...but I'm thinking of both 1 Amp LEDs on momentarily pulling 2 Amps. 

Ok thanks Stan for that explanation and confirmation, just wanted to make sure that I understood. Playing with mosfets is new turf for me, lol.  Once the mosfets I ordered arrive I will test them out and see how they work. Should be very interesting. I will let you know how they behave, particularly during the power up stage!

Meanwhile yesterday I breadboarded another LED flasher circuit using a 555 timer chip, and it seems to work quite well. Quite stable over a wide range of supply voltages. Very easy to set a flash rate anywhere from about 3 or 4 Hz down to slower than about 1/2 Hz. I presume that mosfets could also be used with this type of circuit?

Thanks, Rod

Last edited by Rod Stewart

555 with inverting fet drives

Wow. The price of the 555 IC keeps going down!  So here we have it for 6 cents a piece (free-shipping from Asia) 

For whatever 555 timer circuit you have, you need to invert the polarity of the output (on pin 3) to drive the 2nd FET.  You could use a complementary P-channel FET but that's another component to manage.  At 6 cents a piece, you can use a 2nd 555 IC chip configured as an inverting buffer or "NOT gate" as shown above.  There are no external components required for this 2nd 555.  The normal way to create the inverted output for driving the 2nd N-channel FET would be an NPN transistor and resistor so I show this for the sake of discussion.

But if you're waiting on the power FETs and like to mess with the 555, I'm curious if any determined DIY'er has come up with a 555-based fade-in fade-out for alternating LEDs to give that nostalgic incandescent effect.  This would likely use some combination of 555 in a PWM (pulse-width-modulation) configuration which works well with the power FETs.  For sure, off-the-shelf crossing-signal LED flashers with fade-in, fade-out use a microcontroller chip so I realize the "simple" answer is to use an Arduino.  But at 6 cents a piece, I'd think someone might have tinkered a 555 solution.

Attachments

Images (1)
  • 555 with inverting fet drives

If using a 555 for fade-in/fade-out, the 555 has a binary output so the FET will be either on or off.  In other words, to implement variable brightness the 555 will have to pulse-modulated the FET 1000's of times per second adjusting the duty-cycle to effect brightness variations.  The FET is either on or off so does not dissipate power in the way an NPN transistor would in typical fade-in/fade-out configurations.  It is true that a FET has some incremental power dissipation each time it turns on and off.  But this so-called switching power loss is small (say, less than 10%) of the so-called conduction power loss due to internal FET resistance.  In any case the transistor dissipation losses will be way less than using the traditional "linear" NPN method for varying brightness.  For a 1 Amp application you should not need a heat-sink.  

Caveat - I am not a very good analog designer, but here is a possible way to control current ramp through LEDs. Uses an Op Amp that works with a single supply, and can source or sink 20ma at its output. In the schematic, V2 is set as a 12VDC supply, and V1 is a one second on/one second off 0VDC to 11VDC pulse train to simulate your desired light blinking. So if this is a viable approach, maybe some much better analog designer than myself can make this a more workable design.

Second point, if you want a bit of a variable frequency, but also want to keep a 50/50 duty cycle, you can do that by using an edge triggered flip flop configured as a divide by two. Each rising edge will cause the flip flop to change state. Since only the rising edge of the clock input is used, the on/off time is not important of the clock is not important.

OpAmpLEDDrive Current

Attachments

Images (2)
  • OpAmpLEDDrive Voltage
  • OpAmpLEDDrive Current
MED posted:

... but here is a possible way to control current ramp through LEDs. 

There is reason to use a microcontroller/Arduino as GRJ suggests for fade-in/fade-out.  The brightness change for a flashing incandescent bulb is not correctly modeled by the ramp-up/ramp-down of a resistor-capacitor.  Agreed, we're talking hobby-grade and most guys would be satisfied with any fade effect.  The microcontroller would permit a more prototypical fade-in/fade-out effect at no extra cost once it's put in place (i.e., "just" a few more lines of code! ).

stan2004 posted:

Rod, looks good to me.  Though I see this version does not have trim adjustment for flashing speed.

Good catch Stan. I just picked up a pair of mosfets at the local electronics jobber, so I will test it out on the breadboard. If it looks like a trimmer pot would be advantageous its easy enough to add. They did not have the IRFZ44 in stock, so we subbed a pair of IRF540's, made by Vishay instead of IR. One thing that worries me a little about the specs on both is that they show the gate-source voltage Vgs as 2 volts min, 4 volts max. Does this mean that the 12 volt gate voltage in my circuit is going to fritz them? Or am I interpreting this wrong?

Rod

irf540

For the application at hand, the 2 relevant datasheet specs are the max allowed Gate-Source voltage which is 20V.  I believe you said you only had 14.4V DC so you're good there.  The other spec is the Threshold Voltage which is when the transistor turns ON.  That spec is saying that if you apply LESS than 2V, the switch is OFF for sure.  Apply MORE than 4V and the switch is ON for sure.  Between 2-4V anything goes (depends on the time of day, phase of the moon, etc.).  So applying +12V between Gate-Source will turn it On for sure.  That's why I had you confirm the Gate voltage was toggling between ~0V and ~12V DC.  There is method to my madness! 

 

Attachments

Images (1)
  • irf540

GREAT NEWS on the mosfet addition to the basic multivibrator circuit! Works like a charm!

I used the basic circuit as posted 6 posts above, but with 150K resistors at R3 & R4. and the Vishay IRF540 mosfets. Used a couple of PAR16 style 12VAC led bulbs for testing, that give a load of about 600 ma each @ 12VDC. The speed is about 1 Hz, just what I wanted. The circuit starts and stabilizes immediately with no simultaneous lighting, no misses, and no speed jitters at all. Better than I had hoped for actually. I wish I could put a short video on here, but it's over 35 megs in size. Ouch.

Now if I wanted to be able interrupt the alternating and just have both leds on steady at times, would the best way to do that be a DPDT switch to jumper R1 and R2 resistors, so that both gates are held at 12 volts?

A few more minor refinements and it will be time to order boards. Yahoo. Big thanks to Stan and John and others for all the help and suggestions while I struggle through this exercise. You guys are great.

Rod

Rod Stewart posted:

...

 

Now if I wanted to be able interrupt the alternating and just have both leds on steady at times, would the best way to do that be a DPDT switch to jumper R1 and R2 resistors, so that both gates are held at 12 volts?

I would NOT use the DPDT to jumper both R1 and R2.   Agreed this would apply DC+ to each FET gate and thereby force them both simultaneously on.  BUT, should either S8050 transistor turn on it would be shorted...trying to pull down its collector terminal to ground which ain't going to happen if the collector is tied to DC+.  Yes, I don't think the transistor would release magic smoke since your base current is limited by the 150K base resistors... but still.

I'd use the DPDT switch to directly ground the two LEDs (rather than getting negative power from the FET Drain pins).

If you only have a measly DPDT switch that cannot carry the 1 Amp (or whatever) then use the DPDT to connect the FET gate terminal to either the S8050 collector (for alternating mode) or to just the 2K resistor (for both solid on mode).  In this case, the DPDT switch carries a negligible amount of current (micro Amps or so).

 

Last edited by stan2004

OK Stan, if I understand correctly it should be like the attached schematic scan, did I get that right?

So essentially the multivibrator part is still running merrily along thinking the leds are blinking, but since we have directly jumpered across Q3/Q4 they are essentially "shorted" and the leds stay on? Seems simple enough, should be able to make that happen no problem.

Thanks again, Rod

Attachments

Files (1)

rod

Right.  The multivibrator is running and attempts to alternate Q3 and Q4 but the FETs are both already "on".  No harm to the FETs in doing so.

Though I'm not clear on J4 being a 3-terminal "jumper".  If this is really a connector with 3 wires going to the 4 terminals of a DP switch then OK.

BTW, if you have the breadboard still set up try simply connecting L1 to L2.  This puts both LED1 and LED2 in parallel.  When Q3 turns on, it drives both LEDs.  When Q4 turns on, it drives both LEDs.  So in effect both LEDs are always on!  Then this only requires an SPST switch to force the solid on behavior.  Q3 and Q4 now drive 2 Amps (instead of 1 Amp) since when turned on they individually must drive both 1 Amp LEDs.  But The IRF540 can handle this.  There might be a slight discontinuity in brightness when the transistors ping-pong due to component mismatch which is why I'm suggesting you give it a literal test-drive. 

Separately, upon reflection, I figure these large LEDs might be mounted some distance from the board.  Wires have inductance so it is good design practice to install a 5-cent diode at the FET outputs.  1N4003 is fine.  This clamps any inductive spikes when the 1 Amp of current is suddenly switched off.

Attachments

Images (1)
  • rod

OK Stan, think I have it now. The 1N4003 diodes sound like a good idea, and easy to add. Never would have thought of that!

You are absolutely correct on the J4 "jumper"; actually it is a connector for a 3 wire harness going to a DPDT switch. I better rename that connector, lol!

May have to try your idea of jumpering L1 to L2 on the breadboard and see how that works. Cool idea.

Many thanks for all your help and for your tireless sharing of knowledge, including your introduction to mosfets 101. They are loads of fun!

(It's a good thing I don't live next door to you; I would be in your face every 5 minutes with my latest issue or idea! Haha)

Thanks big time,

Rod

Stan your suspicion about flickering with L1 jumpered to L2 at J4 is absolutely correct. There is a short but noticeable dropout wired this way. But shorting each L1 & L2 to ground works exactly as expected. And there is no flicker or interruption when the connections are removed; it switches back to alternating without missing a beat. So I have added the two 1N4001 diodes as you suggested and re-jigged the PCB layout accordingly. All good. I think I am all ready to gerberize and order boards!

Thanks again, Rod

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Ste 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×