Modifying a simple bi-polar LED circuit

eetech00

Joined Jun 8, 2013
4,056
I have annotated your breadboard photo.
You have U1 inserted upside-down. The notch should be on the left. See below.

I drew a red line on a green wire and, visa versa, to indicate the wire should go +12 or Gnd, respectively.
Also, add a 10k pull-down resistor from Pin 6 to Gnd, and from Pin 2 to Gnd so that each pin is not floating (a bad thing).
And....add a 0.1uf cap (ideally) across pin 14 and pin 7.

1711086335307.png
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,506
I have annotated your breadboard photo.
You have U1 inserted upside-down. The notch should be on the left. See below.

I drew a red line on a green wire and, visa versa, to indicate the wire should go +12 or Gnd, respectively.
Also, add a 10k pull-down resistor from Pin 6 to Gnd, and from Pin 2 to Gnd so that each pin is not floating (a bad thing).
And....add a 0.1uf cap (ideally) across pin 14 and pin 7.

View attachment 318131

The chip is installed just fine, flip the picture upside down and it makes sense.
The OP stated it was flashing, that seems to suggest the chip is powered correctly.
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
Hello, I am pleased to announce I have a winner using Sensacell’s schematic and adding the 10K resistors, so thank you all again.

I understand there are always multiple ways to accomplish a given task. For my education, could you clarify the pros and cons between the version with the BJTs (I had to look that up :) ) and the version without?

Sensacell, I had to substitute a few values based on parts I had on hand. For the flash part of the circuit I substituted the 1 meg resistor for a 560K, and a 4.7u for the 1u capacitor. For the bipolar LED circuit, I substituted the 500 ohm with a 470 ohm. Any concerns with any of these substitutions? If I wanted the LED to not be as bright, what would be another resistor value to try. Should I also add a .1uF Cap between pins 7 and 14 as eetech00 suggested?

I was going to ask about setting the defaults on power up. Ideally, LED is green, no flash. I moved the 10K resistors to ground instead of the VDD and it works. Push button 1, LED is solid red, release and it goes back to green. Push the other button and the LED flashes. Release and it stops.

And now my confession. Why didn’t I just add the 10K resistors to eetech00's version with BJTs that was already built? Well, in my efforts to confirm the wiring, I managed to send up some smoke signals. Fortunately, I had bought extra parts, but due to brain fade, I managed to send smoke signals twice. I know this never happens, and I am sure I am the first one on this forum to have made such a mistake.

I am very happy to have this working. I am going to let it cook on the bench tonight. Thanks all for your guidance.
 

Sensacell

Joined Jun 19, 2012
3,506
Hello, I am pleased to announce I have a winner using Sensacell’s schematic and adding the 10K resistors, so thank you all again.

I understand there are always multiple ways to accomplish a given task. For my education, could you clarify the pros and cons between the version with the BJTs (I had to look that up :) ) and the version without?

Sensacell, I had to substitute a few values based on parts I had on hand. For the flash part of the circuit I substituted the 1 meg resistor for a 560K, and a 4.7u for the 1u capacitor. For the bipolar LED circuit, I substituted the 500 ohm with a 470 ohm. Any concerns with any of these substitutions? If I wanted the LED to not be as bright, what would be another resistor value to try. Should I also add a .1uF Cap between pins 7 and 14 as eetech00 suggested?

I was going to ask about setting the defaults on power up. Ideally, LED is green, no flash. I moved the 10K resistors to ground instead of the VDD and it works. Push button 1, LED is solid red, release and it goes back to green. Push the other button and the LED flashes. Release and it stops.

And now my confession. Why didn’t I just add the 10K resistors to eetech00's version with BJTs that was already built? Well, in my efforts to confirm the wiring, I managed to send up some smoke signals. Fortunately, I had bought extra parts, but due to brain fade, I managed to send smoke signals twice. I know this never happens, and I am sure I am the first one on this forum to have made such a mistake.

I am very happy to have this working. I am going to let it cook on the bench tonight. Thanks all for your guidance.

Great to hear it worked- and you LEARNED so much in the process.
I applaud your persistence, that's the key.

1) a 0.1uF cap across the supply pins of the IC is good practice, it probably won't make a tangible difference in THIS circuit, but it might in the next- so make it a habit.
2) If you don't need high brightness or multiple sets of LED's, you can ditch the transistors, as long as you keep the 4093 output current below about 4 mA (approx. 2.5K ohm limiting R)
3) Most of the time exact resistor values are not that important (unless it's about PRECISION) so you can substitute values, I often use values far from optimal just to reduce the BOM count in a design, for cost savings!
 

AnalogKid

Joined Aug 1, 2013
11,204
Here is a less complex approach. In this application, the ULN2003 can be thought of as a 7-section, open-collector inverter (a heptinverter - ?). I think this makes it easier to track the circuit function.

The upper half of this schematic is an exact reproduction of the OP schematic in post #1.

The lower half adds one R, two C's, and one 555. It is a reduced version of the 555 oscillator proposed by crutschow in post #6. Two unused 2003 sections perform the wire-NOR logic with zero additional components.

Individual ULN2003 sections are rated for 500 mA continuous collector current. Adding several more LEDs in parallel should not be a problem..

ak


Bipolar-LED-Flasher-1-c.gif
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,204
A question I've seen a dozen times around here now applies to me.

In LTSpice, a classic 2-transistor multivibrator will not start. I started with an all-discrete version of a ULN2003 section, then eliminated the base-emitter resistors. Note the unequal timing resistors. Still no joy.

Yes, this is relevant to this thread.

ak


Bipolar-LED-Flasher-1-LTS.gif
 

Attachments

eetech00

Joined Jun 8, 2013
4,056
A question I've seen a dozen times around here now applies to me.

In LTSpice, a classic 2-transistor multivibrator will not start. I started with an all-discrete version of a ULN2003 section, then eliminated the base-emitter resistors. Note the unequal timing resistors. Still no joy.

Yes, this is relevant to this thread.

ak


View attachment 318377
Add "startup" option to .trans directive like this:

.tran 1 startup

This causes the power supply to ramp up for 20usec.
 

AnalogKid

Joined Aug 1, 2013
11,204
It still needs unequal timing resistors, but that fixed it .

Thanks.

The goal here is to eliminate the 555 from the #25 schematic. I've used the 2003 for a lot of non-standard stuff, but not an oscillator. This is an old idea I'm finally getting around to trying.

ak
 

eetech00

Joined Jun 8, 2013
4,056
It still needs unequal timing resistors, but that fixed it .

Thanks.

The goal here is to eliminate the 555 from the #25 schematic. I've used the 2003 for a lot of non-standard stuff, but not an oscillator. This is an old idea I'm finally getting around to trying.

ak
Unless for the challenge, why not use CD4049UB?
Two inverters for the oscillator, the remainder for the rest of the circuit.
 

AnalogKid

Joined Aug 1, 2013
11,204
Consider this an academic exercise. The goal was to eliminate the 555 oscillator circuit, using spare sections of the ULN2003 instead. LT Spice says I have succeeded, but at a cost. It takes so many passive components to make the oscillator that even though a chip is eliminated, the number of soldered connections is the same.

The #25 schematic has two spare inverters (not just one as shown), and those can be used to form the oscillator.

U1F and G form a standard multivibrator. Pulling pin 6 low through D2 forces pin 11 high. No matter what the state of charge in C1 is, it eventually dissipates through R6. This pulls pin 7 high and drives pin 10 low, which disables U1 D and E. With pins 12 and 13 open-collector, both steady states can be displayed.

Note that for steady-state operation, the Flash input cannot simply be disconnected or an open circuit (left floating). If must be pulled to GND. If this is a problem for whatever is supplying this signal, there is a way around this.

ak


Bipolar-LED-Flasher-2-c.gif
 
Last edited:

Thread Starter

HASilver

Joined Mar 7, 2024
13
Great to hear it worked- and you LEARNED so much in the process.
I applaud your persistence, that's the key.

1) a 0.1uF cap across the supply pins of the IC is good practice, it probably won't make a tangible difference in THIS circuit, but it might in the next- so make it a habit.
2) If you don't need high brightness or multiple sets of LED's, you can ditch the transistors, as long as you keep the 4093 output current below about 4 mA (approx. 2.5K ohm limiting R)
3) Most of the time exact resistor values are not that important (unless it's about PRECISION) so you can substitute values, I often use values far from optimal just to reduce the BOM count in a design, for cost savings!
Replying to #25

1711407739199.png

1) Added the .1 cap. Turns out I had one on hand.
2) I added a second LED. Each LED is has 2.7K resistor. Pin 10 feeds both resistors. I assume this is where I would measure mA, between the green wire and the two resistors, yes? With one LED, it is 3.4 mA, with two LEDs 6.3. Per the above, I have exceeded the 4 mA recommended, but it still works. I assume this means the component life will be severely shortened and eventually fail, also yes?

Final goal is 4 LEDs, 3 of them less than 100 feet from the circuit, but one of them about 800 feet away. I am assuming I should now go back to the version the BJTs, again yes?

Thank you all again for continuing my education.

Bonus question, what values for the capacitor that controls the flashing would make it flash faster or slower?
 

AnalogKid

Joined Aug 1, 2013
11,204
Bonus question, what values for the capacitor that controls the flashing would make it flash faster or slower?
The value of C1 is inversely proportional to the frequency; the larger the cap, the slower the flash.

This circuit saves one resistor over the original 555 astable circuit, but you lose the ability to adjust the duty cycle (on/off ratio); it is hard wired to 50/50.

The on time equals the off time. The equation for the approximate on *or* off time is:

t = 0.72 x R x C This comes from the LMC555 datasheet.

A common characteristic of this type of R-C oscillator is that the first on period after being enabled will be a little longer than succeeding on periods.

ak
 
Last edited:

Thread Starter

HASilver

Joined Mar 7, 2024
13
Replying to #25

View attachment 318436

1) Added the .1 cap. Turns out I had one on hand.
2) I added a second LED. Each LED is has 2.7K resistor. Pin 10 feeds both resistors. I assume this is where I would measure mA, between the green wire and the two resistors, yes? With one LED, it is 3.4 mA, with two LEDs 6.3. Per the above, I have exceeded the 4 mA recommended, but it still works. I assume this means the component life will be severely shortened and eventually fail, also yes?

Final goal is 4 LEDs, 3 of them less than 100 feet from the circuit, but one of them about 800 feet away. I am assuming I should now go back to the version the BJTs, again yes?

Thank you all again for continuing my education.

Bonus question, what values for the capacitor that controls the flashing would make it flash faster or slower?

Sorry, one more question, if pin 14 has 12 volts and pin 7 is NOT connected to ground then pin 13 (flash) and pins 5,6, and 8 all connected together (red/green) show 12 volts between them and ground.
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
Replying to #25

View attachment 318436

1) Added the .1 cap. Turns out I had one on hand.
2) I added a second LED. Each LED is has 2.7K resistor. Pin 10 feeds both resistors. I assume this is where I would measure mA, between the green wire and the two resistors, yes? With one LED, it is 3.4 mA, with two LEDs 6.3. Per the above, I have exceeded the 4 mA recommended, but it still works. I assume this means the component life will be severely shortened and eventually fail, also yes?

Final goal is 4 LEDs, 3 of them less than 100 feet from the circuit, but one of them about 800 feet away. I am assuming I should now go back to the version the BJTs, again yes?

Thank you all again for continuing my education.

Bonus question, what values for the capacitor that controls the flashing would make it flash faster or slower?

Second bonus question. The twelve volts that triggers the green to red and also triggers the flash also triggers a separate relay for each. If the ground to pin 7 is disconnected, then there is 12 volts on the pin 13 and there is also 12 volts on the junction of pins 5, 6, and 8. In the event the ground becomes disconnected then pin13 has 12 volts and triggers the associated relay, and the junction of pins 5, 6, and 8 also have 12 volts and the associated relay is triggered.

Can I put diodes on pin 13 and the junction of pins 5, 6, & 8?

Thank you again.
 

AnalogKid

Joined Aug 1, 2013
11,204
Second bonus question. The twelve volts that triggers the green to red and also triggers the flash also triggers a separate relay for each. If the ground to pin 7 is disconnected, then there is 12 volts on the pin 13 and there is also 12 volts on the junction of pins 5, 6, and 8. In the event the ground becomes disconnected then pin13 has 12 volts and triggers the associated relay, and the junction of pins 5, 6, and 8 also have 12 volts and the associated relay is triggered.

Can I put diodes on pin 13 and the junction of pins 5, 6, & 8?
I don't understand any of this. In the post #25 schematic, there is no "ground to pin 7". Pin 7 of the 555 is floating, and pin 7 of the ULN2003 was omitted by mistake. Also, the 2003 GND is pin 8. Also, there is no "junction of pins 5, 6, and 8."

Which schematic are you referring to, and which components?

ak
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
Sorry, I didn’t make that clear. Schematic attachment from Sensacell, post number 4 (Page 1), as implemented as shown in my breadboard, post 31. Referring to CD4093B.
 

Sensacell

Joined Jun 19, 2012
3,506
Sorry, I didn’t make that clear. Schematic attachment from Sensacell, post number 4 (Page 1), as implemented as shown in my breadboard, post 31. Referring to CD4093B.
1) Use the BJT version if you plan on driving 4 sets of LEDs.

2) 800 feet of wire is going to invite ESD and other voltage transients, use 4 diodes to clamp both output leads- see picture.
You can use 1N4148 cheapo diodes, this will make the circuit robust.

3) larger capacitor, slower flashing.

28822d96-39df-4e12-a6a1-6eecd5747310.jpg
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
1) Use the BJT version if you plan on driving 4 sets of LEDs.

2) 800 feet of wire is going to invite ESD and other voltage transients, use 4 diodes to clamp both output leads- see picture.
You can use 1N4148 cheapo diodes, this will make the circuit robust.

3) larger capacitor, slower flashing.

View attachment 318462
. . . and we’re back. Sometimes, life gets in the way.

I have re-built the BJT version, and hooray, no smoke this time .

See my mods in orange. As instructed, I added 10K resistors to R9 and R10 (floating is bad, right), and added the .1u cap across the power source.

I also changed the value of R8 from 470 to 2.7K. With the 470, the circuit was drawing 16.83 ma when green and 17.86 when red. Using the 2.7K, green was at 3.13 and red at 4.39. The brightness of the LED was somewhat reduced, but not significantly. I assume I can add three more LEDs each with a 2.7K resistor and not exceed 20ma and still be okay.

Any concerns with any of the above?

Please confirm, and I may be reading schematic wrong here, but the VCTRLs are connected to the +12V side of the power, correct?

I have not added the diodes yet. Can you confirm I have indicated their proper placement?

Thanks again.
 

Attachments

eetech00

Joined Jun 8, 2013
4,056
I would move the diodes closer to where the long wire connections connect to the PCB.

Please confirm, and I may be reading schematic wrong here, but the VCTRLs are connected to the +12V side of the power, correct?
+12v connects to one side of each push button, the other side of each push button connects to the circuit.
 
Last edited:
Top