Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help and advises for two LED's driving circuit.

Status
Not open for further replies.

milkoni

Member
Hello all Gents!
I need yours help and advises.
In my circuit I have to drive two LED's (green and red) or a single Bi-color Led (green/red). I have an input signal which is variable from 0 to 5 volts. The green have to be on when the voltage is below 0 and 3.2 V, and red must be on above 3.2 V.
I've made my circuit from two different circuits - one is from a circuit which traces the input signal, and second is from a circuit to drive two led's.
My question is - Is this circuit will work properly? I've tested it in NI Multisim only, because I'm still not familiar with LTSpice. I'm still learning it from a few days.
Except that, I would like to make this circuit adjustable. I need to chance this margin of 3.2 V up and down.
Thanks in advance for your help and advises!
Milkoni
 

Attachments

  • map_sensor_indicator_Page_1.png
    map_sensor_indicator_Page_1.png
    24.5 KB · Views: 270
Last edited:
A 2V zener diode is very rare and is a poor voltage regulator. The voltage of the very low voltage zener diode and the base-emitter voltage of transistor Q2 both decrease when the temperature increases which ruins their accuracy.
Q1 needs a resistor from base to emitter to cancel its own leakage current and leakage current from Q2 or it will never turn off.

An accurate comparator or opamp should be used to replace the zener diode and Q2.
 
A 2V zener diode is very rare and is a poor voltage regulator. The voltage of the very low voltage zener diode and the base-emitter voltage of transistor Q2 both decrease when the temperature increases which ruins their accuracy.
Q1 needs a resistor from base to emitter to cancel its own leakage current and leakage current from Q2 or it will never turn off.

An accurate comparator or opamp should be used to replace the zener diode and Q2.
Thank you for advises!
May you help me with circuit to replace with comparator? May be I can use LM 393?
 
Here is how I would do it with many fewer parts, and very good precision:

First plot shows the Red and Green LED currents vs a sweep of the Voltage being monitored with the pot set to 10KΩ (mid-scale). The changeover from Red to Green is quite abrupt. If you want it more gradual, write back.

Second plot shows how the trip point moves as the pot is adjusted from zeroΩ to 20KΩ in steps of 5KΩ.

3V1.gif 3V2.gif
 
You beat me to the punch, I was going to suggest the TL431. Pennies and accurate too!
 
Here is how I would do it with many fewer parts, and very good precision:

First plot shows the Red and Green LED currents vs a sweep of the Voltage being monitored with the pot set to 10KΩ (mid-scale). The changeover from Red to Green is quite abrupt. If you want it more gradual, write back.

Second plot shows how the trip point moves as the pot is adjusted from zeroΩ to 20KΩ in steps of 5KΩ.

View attachment 98424 View attachment 98425
Mike you are the best!!!
Elegant and simple circuit! Thank you so much!
 
I've made some changes on the Mike's circuit. My idea is to expand an adjustment range - about 2.5 V to 3.5V.
 

Attachments

  • map_sensor_led_indicator_tl431.png
    map_sensor_led_indicator_tl431.png
    36 KB · Views: 237
Yep, the natural trip point for the TL431 is 2.495V, so a voltage divider tap connected to its "ref" pin will move the trip where you want it.

btw, I showed you how to simply model a rheostat in LTSpice. Here is how you model a pot:
 

Attachments

  • Draft182.asc
    560 bytes · Views: 233
Down load and run the sim...
 
Do you understand why you can never go below 2.495V?

Did you mean to turn the pot into a rheostat?
 
Do you understand why you can never go below 2.495V?
Yes, I understood why - because of TL431. It's needs approximately 2.5v. It's impossible the voltage divider to produce 2.5v, when the ref. voltage is below 2.5 v.
Did you mean to turn the pot into a rheostat?
Absolutely no Mike. I understood that you mean exactly pot in you circuit.
 
Mike, I have a question to you.
It's necessary to add a 1Meg resistor to prevent some noise or disturbance to input signal from the MAP sensor?
Because this signal goes from MAP sensor to ECU.
 

Attachments

  • map_sensor_led_indicator_TL431_.png
    map_sensor_led_indicator_TL431_.png
    30.3 KB · Views: 261
You should have mentioned that the signal source is a MAP sensor in the very first post.

What is the problem you are trying to solve?

Does connecting the LED circuit to the MAP sensor cause the car to run rough, or change its operation?

Are the LEDs constantly flickering when the car is running?

For reference, here is a good reference to **broken link removed**
 
Last edited:
You should have mentioned that the signal source is a MAP sensor in the very first post.

What is the problem you are trying to solve?

Does connecting the LED circuit to the MAP sensor cause the car to run rough, or change its operation?

Are the LEDs constantly flickering when the car is running?

For reference, here is a good reference to **broken link removed**
No problem to resolve Mike. Just asking is there necessary some prevention of causing the car run rough or changing engine operation.
Yes, this circuit will permanently connected to the out signal of MAP.
 
Since, according to the Delphi reference in post #16, the output impedance of the MAP sensor is <50Ω, and the input impedance to the two-LED TL431 circuit is >73K, then no additional isolation is necessary. If it was, adding resistance in parallel with the input to the two-LED TL431 circuit would only make things worse.

If there is going to be a problem with your installation, it will be caused by the common-mode noise that is intrinsic in the vehicle between where the MAP sensor is connected to "Ground" (the engine), and where your add-on two-LED TL431 circuit is connected to "Ground" (likely the car body in the passenger compartment). It is really bad practice to use a "local" car body ground when interfacing with engine sensors... To do it right, your two-LED TL431 circuit should connect to the car's ground at only one place, the same place as where the MAP sensor is grounded...
 
Thanks Mike. I understood. I'm going to get the ground from the MAP pins. There is 3 pins - +5V; Signal and ground.
 
Here is how I would do it with many fewer parts, and very good precision:

First plot shows the Red and Green LED currents vs a sweep of the Voltage being monitored with the pot set to 10KΩ (mid-scale). The changeover from Red to Green is quite abrupt. If you want it more gradual, write back.

Second plot shows how the trip point moves as the pot is adjusted from zeroΩ to 20KΩ in steps of 5KΩ.

View attachment 98424 View attachment 98425
Hi Mike,
I heed help for your circuit. How to replace two LEDs with a single BiColor LED?
 

Attachments

  • map_sensor_led_indicator_TL431_BiColor_v1.png
    map_sensor_led_indicator_TL431_BiColor_v1.png
    59.5 KB · Views: 247
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top