Modifying a simple bi-polar LED circuit

Thread Starter

HASilver

Joined Mar 7, 2024
13
Hello.

I am looking for some assistance in modifying or redesigning the attached. A friend designed this for me and I put it together and it worked.

A single bi-polar red/green LED powered by 12V DC. When 12VDC control signal is active the bi-polar LED switches from red to green. When the control signal is eliminated, the LED switches back to red.

I would like the ability to add another 12V DC control signal that would make the LED blink on and off. It would blink green when the first control signal is not present, and red when it is.

Any assistance would be appreciated.

Thanks,

HA
 

Attachments

tonyStewart

Joined May 8, 2012
132
This simple request adds a lot of complexity.
A single control input to an inverting Relaxation Oscillator such as a Schmitt NAND stays high when off. Then when enabled only the active LED must be flashed. Since these are shared by Vcc, a PNP pullup can be disabled with a common emitter NPN.

If you hadn't started with 12V and the ULN2xxxx , it would be simpler with 74HCxx 5V logic to do everything simpler including driving the LEDs.
 
Last edited:

Thread Starter

HASilver

Joined Mar 7, 2024
13
This simple request adds a lot of complexity.
A single control input to an inverting Relaxation Oscillator such as a Schmitt NAND stays high when off. The when enabled only the active LED must be flashed. Since these are shared by Vcc, a PNP pullup can be disabled with a common emitter NPN.

If you hadn't started with 12V and the ULN2xxxx , it would be simpler with 74HCxx 5V logic to do everything simpler including driving the LEDs.
I'm locked in to the 12 volts but not the ULN2003. Would you be able to show me a circuit that would step the 12 VDC down to 5 VDC using the 74HCxx that would do what I need?

Thanks.
 

Sensacell

Joined Jun 19, 2012
3,471
This would do it. The CD4093 is good to 20 V, so 12 V is fine.
The two input signals should be 0-12 logic.

Don't try this with a NON-Schmidt trigger NAND, it won't work.

If the FLASH input is LOW, one color or the other is on, if it's HIGH, the chosen color flashes.
 

Attachments

crutschow

Joined Mar 14, 2008
34,679
Alternately, below is the LTspice sim of a circuit using the common 555 timer configured as a gated astable oscillator to add to your present circuit:

The 12V Enable signal (green trace) inhibits the timer output (yellow trace) when low.

The pulse rate is determined mainly by the values of C2 and R4 (here giving about a one second pulse rate).

On your circuit, connect ULN2003 pin 13 to pin 14, and pin 12 to pin 15.
Connect the 555 Out signal to pins 4 and 5.

Then when the 555 Out is high, the outputs of both pins 14 and 15 are pulled to ground, shutting off whichever LED is lit.

1709911417632.png
 
Last edited:

Jerry-Hat-Trick

Joined Aug 31, 2022
574
On your circuit, connect ULN2003 pin 13 to pin 14, and pin 12 to pin 15.
Connect the 555 Out signal to pins 4 and 5.
I was thinkig about the trusty old 555 too - but is there a way to ditch the ULN2003 and use a couple of transistors turned on/off by the control signal? Can't quite get my head around it...
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
Wow! Thank you all for the responses to my question, and so quickly too.

I have been playing with wires, batteries, and electricity since I was a kid. Unfortunately, I was never guided in the direction to learn the math that goes with electronics design. I can solder, and I can take a simple circuit diagram, like the one from my post, and transfer it to a breadboard, but the “how it works” is still just magic to me.

If you all have the patience to guide me to a better understanding of what has been presented here, I have a few questions.

First, was “Jerry-Hat-Trick’s” question about using transistors turned on and off by the control signal answered in the diagram in the previous post by “eetch00” displaying 2 2N3904s and 2 2N3906s?

Second, “eetech00”, to confirm I am reading the circuit you provided correctly, applying 12v dc to CTL 1 will change the polarity of the bipolar LED, and then connecting CTL 2 to CTL 1 will cause the LED to flash at approximately 1 second intervals based on the values of C1 and R1?

Third, a question with two parts. If I wanted to add additional bi-polar LEDs, can I add them in parallel with the original using a 470 ohm resistor for each? Would the number of additional LEDs, change the resistor value?

This circuit is to be used in conjunction with a security alarm at a friend’s farm. It provides 12 volts when the alarm is set. So green when off and red when on. The alarm panel can also provide 12 volts if a security sensor isn’t secure. Hence the need for the flash. My friend is forever turning around at the end of his driveway and going back to confirm the alarm is set and the garage door is closed. Part 2 of question 3 is can I put a bi-polar LED at the end of approximately 500 feet of 22 AWG solid copper wire at the end of his driveway? Would this length of wire necessitate a change in the resistor value? Would the resistor want to be in close proximity to the LED instead of on the circuit board?

Thank you all again for your help with this.
 

eetech00

Joined Jun 8, 2013
4,004
Wow! Thank you all for the responses to my question, and so quickly too.

I have been playing with wires, batteries, and electricity since I was a kid. Unfortunately, I was never guided in the direction to learn the math that goes with electronics design. I can solder, and I can take a simple circuit diagram, like the one from my post, and transfer it to a breadboard, but the “how it works” is still just magic to me.

If you all have the patience to guide me to a better understanding of what has been presented here, I have a few questions.

First, was “Jerry-Hat-Trick’s” question about using transistors turned on and off by the control signal answered in the diagram in the previous post by “eetch00” displaying 2 2N3904s and 2 2N3906s?
Yes

Second, “eetech00”, to confirm I am reading the circuit you provided correctly, applying 12v dc to CTL 1 will change the polarity of the bipolar LED, and then connecting CTL 2 to CTL 1 will cause the LED to flash at approximately 1 second intervals based on the values of C1 and R1?
As configured, when CTRL1 is high, RED will flash, GRN is dark. When CTRL1 is low, GRN will flash, RED is dark.

Did you want them to work differently?

Third, a question with two parts. If I wanted to add additional bi-polar LEDs, can I add them in parallel with the original using a 470 ohm resistor for each?
Yes. As long as you want them to work the same way, AND, you don't exceed the current capacity of the transistors.

Would the number of additional LEDs, change the resistor value?
If the LED pairs are connected in parallel, with each pair using its own dedicated 470 ohm resistor, No.

This circuit is to be used in conjunction with a security alarm at a friend’s farm. It provides 12 volts when the alarm is set. So green when off and red when on. The alarm panel can also provide 12 volts if a security sensor isn’t secure. Hence the need for the flash. My friend is forever turning around at the end of his driveway and going back to confirm the alarm is set and the garage door is closed. Part 2 of question 3 is can I put a bi-polar LED at the end of approximately 500 feet of 22 AWG solid copper wire at the end of his driveway? Would this length of wire necessitate a change in the resistor value? Would the resistor want to be in close proximity to the LED instead of on the circuit board?

Thank you all again for your help with this.
The resistor might change for the LED pair at the far end of the 500 ft of wire. And the resistor should be in close proximity to the LED pair. Probably should use weatherproof shielded twisted pair for the 500 ft run (in conduit), use something like bulk CAT6 wire. Might have to apply simple transient protection component(s) to protect the transistors.
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
As configured, when CTRL1 is high, RED will flash, GRN is dark. When CTRL1 is low, GRN will flash, RED is dark.
Did you want them to work differently?
Yes, slightly different.

CTRL 1 high should cause the LED to be RED, CTRL 1 low should cause the LED to be GREEN.

CTRL 2 high should cause the LED to flash (color dependent upon CTRL 1, CTRL 2 low LED is on continuously.

Thanks again.
 

eetech00

Joined Jun 8, 2013
4,004
Yes, slightly different.

CTRL 1 high should cause the LED to be RED, CTRL 1 low should cause the LED to be GREEN.

CTRL 2 high should cause the LED to flash (color dependent upon CTRL 1, CTRL 2 low LED is on continuously.

Thanks again.
Revision show below.
Review the graph for operation.

Edit: R4, R5, R6, R7 not needed.

1710001990169.png
 
Last edited:

Thread Starter

HASilver

Joined Mar 7, 2024
13
eetech00,

Thanks very much!

I will order parts today and hopefully have this working by the end of the next week.

I will post a reply then.
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
Hello, parts arrived, and I have assembled, but I haven’t been able to get it to work as expected.

I have breadboarded the version from “Senscell” and the version from “eetechoo”.

Upon applying power to “eetechoo’s” version , the bi-polar LED starts blinking immediately. Adding the pushbutton for CTRL 1, caused the polarity to swap and flip the LED to green. It also seemed to slightly decrease the flash rate. It should be noted that I did not push the button, it just flipped to green when I plugged the wires to the button in. When I pushed the CTRL 1 button, it caused the LED to flip to back to red. Further presses of the control 1 button had no effect. It stays latched until the “red/green” is briefly connected to ground.

The CTRL 2 button between VDD and pin 9 (U1A) had no effect.

Similar behavior on the version from “Sensacell”. Upon applying power, the bi-polar LED would begin flashing green albeit after a substantial delay (>30 seconds). Pressing the button to switch from green to red worked, but releasing the button did not return the LED to green. It stays latched until the “red/green” is briefly connected to ground.

Ideally, pushing the CTRL 1 button should cause the polarity to reverse, releasing the button should restore it to the “power-on” polarity.

Pushing the CTRL 2 button should cause the LED to flash, releasing in should make the flashing stop.

Thoughts anyone?
 

eetech00

Joined Jun 8, 2013
4,004
Hello, parts arrived, and I have assembled, but I haven’t been able to get it to work as expected.

I have breadboarded the version from “Senscell” and the version from “eetechoo”.

Upon applying power to “eetechoo’s” version , the bi-polar LED starts blinking immediately. Adding the pushbutton for CTRL 1, caused the polarity to swap and flip the LED to green. It also seemed to slightly decrease the flash rate. It should be noted that I did not push the button, it just flipped to green when I plugged the wires to the button in. When I pushed the CTRL 1 button, it caused the LED to flip to back to red. Further presses of the control 1 button had no effect. It stays latched until the “red/green” is briefly connected to ground.

The CTRL 2 button between VDD and pin 9 (U1A) had no effect.

Similar behavior on the version from “Sensacell”. Upon applying power, the bi-polar LED would begin flashing green albeit after a substantial delay (>30 seconds). Pressing the button to switch from green to red worked, but releasing the button did not return the LED to green. It stays latched until the “red/green” is briefly connected to ground.

Ideally, pushing the CTRL 1 button should cause the polarity to reverse, releasing the button should restore it to the “power-on” polarity.

Pushing the CTRL 2 button should cause the LED to flash, releasing in should make the flashing stop.

Thoughts anyone?
double check all pin connection especially the bjt’s.
 

Thread Starter

HASilver

Joined Mar 7, 2024
13
I have double and triple checked, and I am certain I have this correct . . . but I have been wrong before.

:)
Breadboard.jpg
BJT wiring.JPG

I may have been staring at this for too long.

Can you see what I must have missed?

Thanks.
 

Attachments

Sensacell

Joined Jun 19, 2012
3,471
The problem is that you do not have a pull-up resistor on the switch inputs, when the switch is open, the logic level is unknown. (FLOATING)

Add a 10k ohm resistor to V+ on both switches.

This will enforce a HIGH when the switch is open.
 
Top