4
\$\begingroup\$

I have currently purchased a 'Pololu 5V, 2.5A Step-Down Voltage Regulator D24V22F5' to regulate my 12v into 5v. This so far works fine!

The thing I'm wondering about it, and looking at the diagram and schematics of the device:

Photo of the boardPhoto of the board

I need some help figuring out the PG and EN. From their website:

The regulator is enabled by default: a 270 kΩ pull-up resistor on the board connects the EN pin to reverse-protected VIN. The EN pin can be driven low (under 1 V) to put the board into a low-power state. The quiescent current draw in this sleep mode is dominated by the current in the pull-up resistor from EN to VIN and by the reverse-voltage protection circuit, which altogether will draw between 5 µA and 10 µA per volt on VIN when EN is held low. If you do not need this feature, you should leave the EN pin disconnected.

The “power good” indicator, PG, is an open-drain output that goes low when the regulator’s output voltage falls below around 85% of the nominal voltage and becomes high-impedance when the output voltage rises above around 90%. An external pull-up resistor is required to use this pin.

Ideally, and what I believe they are used for, I would like to attach 2 LED's onto the board (a green and a red) to light up if everything is OK or not. From what I can understand, can I just attach a red LED onto the EN and GND and it will light up when the voltage isn't sufficient, and can I attach an LED to PG and GND when so it will light up when the voltage is sufficient?

\$\endgroup\$
0

5 Answers 5

11
\$\begingroup\$

To light a LED when the regulator output is "good", you don't do anything to the EN pin.

When the output is good, the PG pin is high impedance, and when not good, it is pulled low. This needs to be inverted if you want the LED to light when power is good.

The simplest solution, although hard on the PG output, is to connect a resistor between the PG output and 5 V, and the LED between the PG output and ground. For a green LED that drops 2.1 V and 10 mA LED current, the resistor would need to be 300 Ω. When the PG output goes low, it sinks the current instead of the LED, so the LED shuts off. In this example, the PG output would need to be able to sink 17 mA.

Here is a more sophisticated solution:

It still runs the LED at 10 mA when power is good, but puts much less of a load on the PG pin. It's possible that the PG pin can't sink 17 mA, as required by just the resistor and LED circuit described earlier. This circuit puts less than 1 mA load on the PG pin, which it almost certainly can do. It also draws less current from the 5 V supply when the LED is off. The first circuit actually draws more when the LED is off.

\$\endgroup\$
6
\$\begingroup\$

can I just attach a red LED onto the EN

No. Notice that the EN ("enable") pin is an input to the regulator to switch it off when desired. Hence, it cannot be used as an indicator of any kind.

can I attach an LED to PG and GND

No, "PG is an open-drain output". This means that it can only output GND or nothing. Hence, you can only connect an LED with a resistor from Vin to PG, and it will light up when Vin is too low. For anything else (except for Olin's "simplest solution"), you will need an inverting element, like an extra transistor.

\$\endgroup\$
3
\$\begingroup\$

I think you already understand that the EN is an input and the board already pre-wires it with a \$270\:\textrm{k}\Omega\$ pull-up to VIN (via a protection circuit.) I'm going to assume you aren't doing anything to drive the EN input, since you haven't mentioned doing that. This just means that when VIN of \$12\:\textrm{V}\$ is connected up, the EN will automatically enable the output. That probably isn't a problem for you.

Given that fact, you just want to observe the PG output, which is an open-drain/open-collector style of output, and use that to control two different LEDs. One that is green when PG isn't actively trying to sink current and one that is red when PG is actively trying to sink current.


If the power isn't good for some reason and you want the red LED turned on, then the only power you can rely upon is the \$12\:\textrm{V}\$ input source. You have to assume that the output of the regulator "isn't good" and so you should NOT be using it to power the red LED.

But even assuming the PG output could directly handle the required current for a red LED (low current, high efficiency, for example) and then attempting to use the PG output to directly sink current required for it may also lead to another consideration (worry.) It may be possible that the PG output can't tolerate a full \$12\:\textrm{V}\$.

It's hard to be absolutely sure about that, since Pololu doesn't tell us which device they are using and their pictures appear to have had the numbers ground off or erased in some way. This means you may have to make an assumption, which could damage the input if you are wrong. But unless the buck converter IC designers went out of their way, it's likely that the PG output can tolerate \$12\:\textrm{V}\$. I just wanted to point out that this is an assumption I wish I didn't have to make.

Yet another assumption returns us to the amount of current sinking capability for PG. It takes a big internal transistor to sink enough current for a \$20\:\textrm{mA}\$ LED. I'd be worried about using it to sink \$20\:\textrm{mA}\$, especially since the only words the web site uses regarding the PG output is to suggest a pull-up resistor (which might imply that an LED won't work well there.) So if you can select one of the low current, high efficiency \$2\:\textrm{mA}\$ LEDs, then I think I might go that approach and plan on the idea that the PG output can handle the current. (It's not that much of a risk because these LEDs are quite visible, even with just \$1\:\textrm{mA}\$.)

If the power is good, and PG isn't attempting to sink current, then you have two options for the green LED. You could still source current for the green LED from the \$12\:\textrm{V}\$ input source OR you could source that current from the \$5\:\textrm{V}\$ output (which should be close to \$5\:\textrm{V}\$ if PG is indicating "good".)

I may not decide to use the \$5\:\textrm{V}\$, but instead rely entirely on the \$12\:\textrm{V}\$ input source for both purposes. In some ways, this choice is arguable, though. (One might read datasheets and find that the \$5\:\textrm{V}\$ requires a minimum load and argue using the green LED as that load, for example.) But I don't find those persuasive and I'd make the choice to use the \$12\:\textrm{V}\$ input source for both LEDs. If the output needs a minimum load, I'd provide for that in a managed way, separately. I'm not going to make all the arguments here, though. It would distract things way too much.

Those are my thoughts before embarking on making any suggestions. To keep the circuit simple, try and buy low current, high efficiency red and green LEDs. In this case, just adding one NPN BJT and two resistors is enough to handle both LED cases. Otherwise, if you have to use the higher current (normal) LEDs as indicators, then I'd go with a more complex circuit (shown at the end, below.)

(The risks in either case shown below are that PG can't even sink \$1-2\:\textrm{mA}\$ and/or that it cannot tolerate \$12\:\textrm{V}\$ impressed on it when the red LED is OFF. Both risks I consider to be relatively small.)


So, let's assume that you will be using low current, high efficiency LEDs and that we can reasonably assume that the PG output can sink the LED current of \$2\:\textrm{mA}\$. So, with that in mind, here is the schematic I might try which covers both LED drive needs from a single BJT:

schematic

simulate this circuit – Schematic created using CircuitLab

If, on the other hand, you can't use low current, high efficiency LEDs for this purpose, then I'd assume that the PG output cannot directly handle the load. So I'd then try this:

schematic

simulate this circuit

But it's not quite as simple as you wanted. I'm sorry about that.

\$\endgroup\$
2
\$\begingroup\$

While using a transistor as an inverter would work just fine, if you really feel like Madman Muntz, you can get the open-drain PG output to do your bidding using a high-efficiency LED provided PG can withstand +12V on it:

schematic

simulate this circuit – Schematic created using CircuitLab

The way this works is that when the power is good, the PG pin is floating, so you simply get the LED lit up by +12V via the 4.7kΩ resistor. When the power is bad, the PG pin pulls low, which effectively shorts out the LED (even for a 470ohm Rds(on) from the output, you're still only getting 1.2V across the LED), pulling its anode less than the LED's forward voltage and turning it off.

\$\endgroup\$
1
\$\begingroup\$

You are responsible to drive the EN pin yourself. You could drive it low if you want to save power for example. What you could also do is have an LED on the Enable line, if you decide to drive it yourself obviously, to indicate if you are driving the EN pin. This could be the green LED on the EN pin.

For the PG, you would need to use some type of inverter to invert the voltage at the output since it is driven low when the output falls under 85% of the nominal voltage. You could also tie an LED from Vin to PG with a resistor and that should work as well.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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