# Current into DC/DC or LDO doubt

I need a circuit that regulate and invert the input signal 0-24V to 0-3.3V of output signal. Also a pullup that produce a low signal when the input is detached. I thought about a schematic like this. I have a 4.7V zener (with low zener current) that allows to mosfet to switch on completely when the input is higher than about 5/6V. When the input drops below 4/5V the zener is pratically an open circuit and in order to regulate the voltage gate there is only the voltage divider 20k-62k. When the input drops below 3.3V the schottky begins to conduct and pull down the gate. Instead, when the input is detached the 20k resistor pull up the gate. Now my question is, when the input is higher the 5/6V the gate is about at 4.7V, but in this condition current goes into the 3.3V voltage regulator or DC/DC. Is it a problem the reverse current?

Thank you all for the clarifications. The logic works for what i need to do. But the main question is for the reverse current into the DC/DC or LDO, even if we talk about microamperes. It's a problem? And more in general, if i have for instance milliAmperes? In theory for LDO and DC/DC we are talking about voltage generators, which should accept any incoming or outgoing current. But in reality?

• Please post the complete schematic Nov 23, 2023 at 16:30
• the output goes to an mcu Nov 23, 2023 at 16:40
• When you say "0-24V and disconnected, are saying there are three states, 0V, 24V and disconnected, or are you saying any voltage from 0 to 24, and disconnected? What I am trying to understand is (0in = 3.3out, 24in = 0out, what about 12in = 1.65 out?)
– user338146
Nov 23, 2023 at 16:47
• yes, there are about three states: from 0 to about 2.5/3V (the zener is completely open circuit) output signal must be 3.3V; from 3V to 24V (but only from about 5V the zener begin to regulate) the output must be 0V; when input is disconnected the output must be 0V. I choose a mosfet with 2.5V of threshold Nov 23, 2023 at 16:55
• The maximum input voltage for an LD1117 is 15V, you're way over that. Choose a different part, 24V to 3.3V hardly needs an LDO. Bear in mind you'll be wasting over 6 times as much power in heat as your circuit is using. Nov 23, 2023 at 18:40

I think it can be simplified like this:

So there is no problem with current flowing from 24v to 3v3 except reverse leakage of the diode (nA).

• i'm sorry, i was not very clear, there are not only 0V and 24V state. I specificate in the comments Nov 23, 2023 at 16:57
• Per comments, inputs up to 3.0 V should be considered low. Nov 23, 2023 at 17:03
• @ThePhoton Ya, I see it. Mosfet with 2v8 threshold together with schottky ( insted of 4148) should fulfill the 2v5 requirement. Nov 23, 2023 at 17:17

In comments you clarified the requirements:

from 0 to about 2.5/3V ... output signal must be 3.3V; from 3V to 24V ... the output must be 0V;

To meet this requirement, the safe way is to use a comparator circuit of some kind. A simple single transistor circuit won't switch completely for small variations of the input around 3.0 V.

If you loosen the requirement to allow the switching threshold to have some uncertainty, you could probably get it to work with a voltage divider, zener input protection similar to what you already have, and a single-gate digital inverter.

• ok, i got it, thank you Nov 23, 2023 at 17:40