I'm a hobbyist and pretty new to many of the components involved, so I hope you guys can help me here. I'm trying to keep the circuit as simple as possible.

I made a small variable power supply with a buck converter and would like an LED to come on when my output reaches 5V. I'm not really concerned about it staying on after 5V is exceeded, but I definitely want it off if the voltage is lower than that. After looking into it a bit, I'm assuming I'll need a MOSFET or a transistor of some sort but I don't know enough about either of them to begin finding the correct one. If it matters, here is the buck converter I'm using:

Buck converter I'm using

The only other things in the circuit are a volt meter wired to the output and powered from Vin and GND and I replaced the potentiometer with a larger one.

  • \$\begingroup\$ I think one of these would do what you ask and more (that is being able to accurately tack the voltage level). If you already have one of these (since you mention a volt meter) then I'm not sure of the purpose of the led. \$\endgroup\$ – alexan_e Mar 20 '14 at 16:49
  • \$\begingroup\$ That's exactly what i have on there right now. I want the led in addition to that. \$\endgroup\$ – Bradart Mar 20 '14 at 16:50
  • \$\begingroup\$ You said you want the LED to be off if the voltage is less than 5 volts but on if the voltage is greater than or equal to 5 volts. That's impossible in practice. What is the range of on/off switching that you can accept? \$\endgroup\$ – Joe Hass Mar 20 '14 at 18:07
  • \$\begingroup\$ I suppose anything 4.8-5.2 volts would be an acceptable range. \$\endgroup\$ – Bradart Mar 20 '14 at 18:09

A TL431 is about the cheapest and easiest way to do this. See below schematic. The reference voltage of the TL431 is 2.495V nominally, so about 5V and greater (it's divided by two with the two 1K resistors) will turn the LED on.

If you are trying to detect a nominal 5V supply rail, you should set it to detect a lower voltage such as 4.5V to allow for tolerances. That would mean making R2 a bit bigger or R3 a bit smaller.

Only about 3V is available for the LED so avoid using high \$V_F\$ types such as blue and white.

The TL431 is a reference and an amplifier, all in a 3-pin package that costs only cents in quantity.

A similar circuit to this is often used to regulate the output voltage of switching power supplies, where an optocoupler LED is placed where your indicator LED is.

enter image description here


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ This looks to be right on my level. If you don't mind, though, I'm trying really hard to understand what's happening in the schematic and I can't seem to grasp the mechanism at work here. Voltage comes in and, with the tl431 not allowing electricity to pass, it goes around and through the pulldown resistors on the right, yes? Then, when the voltage reaches the proper level, it triggers the reference on the 431, allowing the power to go through the LED (which has been resisted down to avoid blowing it up). Is that right? \$\endgroup\$ – Bradart Mar 20 '14 at 17:55
  • 1
    \$\begingroup\$ I'll edit to include the datasheet link and block diagram of the chip, please ask again if something is not clear. The TL431 is a reference + a comparator in a 3-pin package. \$\endgroup\$ – Spehro Pefhany Mar 20 '14 at 17:57
  • \$\begingroup\$ The OP said the LED should be off if the voltage is below 5 volts. Doesn't your circuit fail that criteria, if the LED is still on for voltages above 4.5V? :) \$\endgroup\$ – Joe Hass Mar 20 '14 at 18:05
  • \$\begingroup\$ @JoeHass Hi. Yup, I'm questioning the criteria, after giving him what he asked for, just in case it wasn't what he wanted ;-) \$\endgroup\$ – Spehro Pefhany Mar 20 '14 at 18:20

I recommend using an OpAmp as a comparator.

Have a look at this instructable: Voltage controlled switch. It explains how you can build a simple voltage controlled switch just using an opamp, zener diodes and resistors. Its schematic is below:

Schematics of voltage controlled switch

The comparator compares a reference voltage (generated with the zener diode) to an input voltage and outputs 0V or VCC depending on which input is higher.

The circuit described in the instructable does pretty much what you want.

  • 4
    \$\begingroup\$ Welcome. Please note what is considered a good answer: Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. \$\endgroup\$ – alexan_e Mar 20 '14 at 17:01
  • \$\begingroup\$ You might also consider using an LM393 comparator in place of an op amp. It's less expensive, but performs the function the same way (that is, with the same inputs). The only functional difference is the potential need for a pull-up resistor on the output, which won't be necessary if the goal is merely to light an LED. \$\endgroup\$ – nsayer Mar 20 '14 at 17:31
  • \$\begingroup\$ Won't the zener diodes fail to conduct when the supply voltage is less than 5V? How can this circuit be reliable at low voltages? \$\endgroup\$ – Joe Hass Mar 20 '14 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.