Circuit Test in Lab: Apply 12.2V to votlage divider and when I connect LM1117 5V fixed to that divider voltage drops

Thread Starter

jim0000

Joined Oct 28, 2020
130
Input during test:
Voltage 12.2V
Current 1A
Test picture as well as LTspice simulation with waveform results is below.
This portion of my circuit is giving me trouble. When I have only this connected on my breadboard the Vinput (input to fixed 5V regulator) drops to 1.7V. In the LTspice simulation when going from 12.2V input to 13.8V back to 12.2V this Vinput after voltage division is a minimum of 6.6V as expected. Interestingly enough when I disconnect the voltage divider from the regulator Vinput becomes 6.6V as expected. Why does this happen when the LM1117 is connected?

When I go straight from the power supply to the LM1117 (skipping the voltage divider) I get the expected 5V output so the LM1117 seems to be functioning.
View attachment 282495

View attachment 282494


View attachment 282493
 

MrChips

Joined Oct 2, 2009
30,706
Voltage dividers only work in theory when there is no load attached, i.e. no current is flowing out of the divider.

Once you draw current from the divider you have to redo the math in order to include the resistance of the load.

Ask the question, how much current is the LM1117 drawing from the source?
Take this current and multiply it with 8.2kΩ resistance. This is how much the voltage will drop before it gets to the LM1117.

The take away here: a voltage divider is not the solution you want in this application.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Voltage dividers only work in theory when there is no load attached, i.e. no current is flowing out of the divider.

Once you draw current from the divider you have to redo the math in order to include the resistance of the load.

Ask the question, how much current is the LM1117 drawing from the source?
Take this current and multiply it with 8.2kΩ resistance. This is how much the voltage will drop before it gets to the LM1117.

The take away here: a voltage divider is not the solution you want in this application.
Ahh that makes sense. I didn't know that. What would the best approach to redo the math? I am not sure how to approach this if I can't use the voltage divider equation.

I see you said that I shouldnt use a voltage divider. Is there anything else I can or should do to remap the voltage to a lower one for my LM1117 input?
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Why do you want to lower the input voltage of the LM1117?
My thought process was that it will be used above ambient (max of 120 deg F) so I was worried about max power dissipation. I was reading that power dissipation is related to junction temp, so I didn't want a large voltage difference between input and output of the LM1117. As long as input is 2V over the output I should be fine there.

I was also worried about current. The input current from what I've read doesn't have a spec listed, but there is a limit on output current, which I read to be 800mA min to 1300mA max. From what I've read output current = input current minus the quiescent current so I didn't want to exceed that. This circuit is on the output of a buck boost controller that is limited to 25A which made me worry about the input current that the lm1117 would see.

I changed the resistors:
R1=60ohm
R2=1kOhm

Strangely enough the input voltage coming from the voltage divider didn't drop nearly as much this time. I got a measurement of 11.1V at the input of the LM1117 using these resistances (thankfully it does work with this input). The expected was below:
View attachment 282496
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
The LM1117 accepts up to 15V as Vin, per its datasheet.
Thank you, yeah I am worried about power dissipation with regard to junction temp. So I was wanting to make Vin-Vout as small as I could. I was likewise worried about input current since this circuit, is at the output of a buck boost which that is limited to 25A. So I was worried about the LM1117 seeing any high amperage. Maybe theres a better solution?
 

MrChips

Joined Oct 2, 2009
30,706
Remove the voltage divider resistors.
Mount the LM1117 on a suitable heat sink.
Or use a buck converter instead of the LM1117.
 

djsfantasi

Joined Apr 11, 2010
9,156
Thank you, yeah I am worried about power dissipation with regard to junction temp. So I was wanting to make Vin-Vout as small as I could. I was likewise worried about input current since this circuit, is at the output of a buck boost which that is limited to 25A. So I was worried about the LM1117 seeing any high amperage. Maybe theres a better solution?
Read the datasheet. The LM1117 has overcurrent and thermal protection. While the buck-boost could provide 25A, the LM1117 only outputs 800mA and will not draw 25A. Of course it’s load must draw less than 800mA. Add a heat sink, confirm its load current draw and give it a go.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Read the datasheet. The LM1117 has overcurrent and thermal protection. While the buck-boost could provide 25A, the LM1117 only outputs 800mA and will not draw 25A. Of course it’s load must draw less than 800mA. Add a heat sink, confirm its load current draw and give it a go.
Ok thank you!
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Remove the voltage divider resistors.
Mount the LM1117 on a suitable heat sink.
Or use a buck converter instead of the LM1117.
Ok thank you! I will take your advice. I think I was thinking wrong about the 25A, it would be also connected to the battery, so it would seem like the majority of that 25A will go to the battery not this circuit that is on the positive battery rail. I read that lead acid batteries have an internal resistance of 0.02A so I am thinking the current will flow in the path of least resistance as it should.
 

MrChips

Joined Oct 2, 2009
30,706
Ok thank you! I will take your advice. I think I was thinking wrong about the 25A, it would be also connected to the battery, so it would seem like the majority of that 25A will go to the battery not this circuit that is on the positive battery rail. I read that lead acid batteries have an internal resistance of 0.02A so I am thinking the current will flow in the path of least resistance as it should.
A power supply may be rated for 25A. That does not mean that it has to output 25A. It will output whatever is demanded of it, within design limits.

The LM1117 will take what it needs. The 25A spec of the supply is irrelevant.
 

WBahn

Joined Mar 31, 2012
29,976
Ahh that makes sense. I didn't know that. What would the best approach to redo the math? I am not sure how to approach this if I can't use the voltage divider equation.
Don't just look for an equation to throw at something. Analyze the circuit based on the fundamentals.

Why are you trying to put a voltage divider to the input of the regulator in the first place? The whole idea of a regulator is to take an unregulated input voltage and produce a regulated output voltage.

What is the minimum input voltage that is needed to the regulator in order for it to produce 5 V at the output?

Hint: Look at the data sheet.

1670472744306.png

You can see that the maximum dropout voltage (Vin - Vout) is 1.3 V over the spec'ed operating temperature range at the max rated output current of 800 mA.

So you need at least 6.3 V at the input.

How much current can flow in your 8.2 kΩ resistor before your 12.2 V supply voltage is down to 6.3 V?

Imax = (12.2 V - 6.3 V) / (8.2 kΩ) = 720 µA

How much current does the device draw for its own needs (known as the quiescent current)?

Hint: Look at the data sheet.

1670473097190.png

You can see that the typical quiescent current for the 5 V regulator, at room temperature, is 5 mA (and it could be at much as 10 mA somewhere over the entire operating temperature range).

So you are completely starving the regulator. It needs at least seven times the current flowing in the 8.2 kΩ resistor and possibly twice even that. And this is if none of the current in that resistor is flowing through the 10 kΩ resistor instead of the regulator.

Note that this is before there is a load on the output of the regulator at all.

Does the regulator have a minimum load?

Hint: Look at the data sheet.

1670473352863.png

Even at room temperature, you typically need nearly 2 mA in order to maintain regulation and, over the full temperature range, you could need at much as 5 mA.

Now consider how much current you want to be able to deliver to the load. If you want to deliver 800 mA and if all of that is flowing through the 8.2 kΩ resistor, it would need to drop 6560 V!

I see you said that I shouldnt use a voltage divider. Is there anything else I can or should do to remap the voltage to a lower one for my LM1117 input?
If you are concerned about heat in the regulator, then you can do one of three things (well, four) or some combination of them:
1) Drop some of the voltage with a series resistor between the supply and the regulator input.
2) Shunt some of the current around the regulator.
3) Provide adequate heat sinking for the regulator.
and
4) Move to a switch-mode regulator instead of a linear one.

Before you can decide which route to take and how to go about it, you must first decide what the maximum current is that you need to deliver to your load. I don't recall seeing that information anywhere, so what is it?
 

WBahn

Joined Mar 31, 2012
29,976
Thank you, yeah I am worried about power dissipation with regard to junction temp. So I was wanting to make Vin-Vout as small as I could. I was likewise worried about input current since this circuit, is at the output of a buck boost which that is limited to 25A. So I was worried about the LM1117 seeing any high amperage. Maybe theres a better solution?
You are making a common mistake and thinking that if you power the regulator from a supply that is capable of delivering 25 A that the regulator is somehow going to have 25 A flowing through it.

Depending on where you live, the outlets in your house are able to deliver 15 A before a circuit breaker trips. Does this mean that when you plug a 5 W nightlight into an output that it is drawing 15 A of current? Of course not.
 

WBahn

Joined Mar 31, 2012
29,976
Ok thank you! I will take your advice. I think I was thinking wrong about the 25A, it would be also connected to the battery, so it would seem like the majority of that 25A will go to the battery not this circuit that is on the positive battery rail. I read that lead acid batteries have an internal resistance of 0.02A so I am thinking the current will flow in the path of least resistance as it should.
Again, you are thinking that because the supply is capable of delivering 25 A that it MUST be delivering 25 A. That would only be true if it were a current source, but it is not -- it is a voltage source. Voltage sources deliver whatever current (within limits) is needed, be it tiny or huge, to maintain the proper output voltage.

Think of a car battery that is rated for 1000 A and is sitting on a shelf. Where is the 1000 A going? It isn't going anywhere because the battery isn't producing ANY current, let along 1000 A.

Also, there's no such thing as a resistance of 0.02 A.
 

MrChips

Joined Oct 2, 2009
30,706
Here is a quick answer.
What if the LM1117 had to deliver 1A @ 5V?
R1 by itself would have to be no greater than 5Ω if you wanted to maintain 2V of headroom.

Hence your choice of 8.2kΩ or 60Ω is way out in left field.
 

WBahn

Joined Mar 31, 2012
29,976
My thought process was that it will be used above ambient (max of 120 deg F) so I was worried about max power dissipation. I was reading that power dissipation is related to junction temp, so I didn't want a large voltage difference between input and output of the LM1117. As long as input is 2V over the output I should be fine there.

I was also worried about current. The input current from what I've read doesn't have a spec listed, but there is a limit on output current, which I read to be 800mA min to 1300mA max. From what I've read output current = input current minus the quiescent current so I didn't want to exceed that. This circuit is on the output of a buck boost controller that is limited to 25A which made me worry about the input current that the lm1117 would see.

I changed the resistors:
R1=60ohm
R2=1kOhm

Strangely enough the input voltage coming from the voltage divider didn't drop nearly as much this time. I got a measurement of 11.1V at the input of the LM1117 using these resistances (thankfully it does work with this input). The expected was below:
View attachment 282496
You are still missing the elephant in the room.

Whatever you are going to use this regulator for, ALL of the current that is going out its "out" pin has to come in through its "in" pin, which means that it must go through your R1 resistor.

So let's see how much that happens to be in your circuit here.

You have a voltage at the input of 11.1 V. That voltage appears across the 1 kΩ resistor, so there is 11.1 mA flowing through it.

If your supply voltage as 12.2 V and it is dropping to 11.1 V, that puts 0.9 V across the 60 Ω resistor, so there is 15 mA flowing through it.

That means that 3.9 mA of the current flowing in R1 did NOT then go through R2. So where did it go? Into the regulator. Notice that 3.9 mA is pretty close to the typical 5 mA quiescent current given in the data sheet.

Now, how much current can go into the regulator before the input voltage drops too low?

It needs to stay above 6.3 V, so you can tolerate a 5.9 V drop, which amounts to 98 mA. Of that, 6.3 mA will flow through R2, leaving about 92 mA for the regulator. Since about 5 mA of that will be used by the regulator's internals, that leaves about 87 mA that is available for your load, or just over 10% of what the regulator is spec'ed for.

IF you don't have any need for more than about 80 mA, then this is fine. But note that you don't need R2, which serves no purpose at all. Getting rid of it would make that 6 mA available for the load.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Don't just look for an equation to throw at something. Analyze the circuit based on the fundamentals.

Why are you trying to put a voltage divider to the input of the regulator in the first place? The whole idea of a regulator is to take an unregulated input voltage and produce a regulated output voltage.

What is the minimum input voltage that is needed to the regulator in order for it to produce 5 V at the output?

Hint: Look at the data sheet.

View attachment 282497

You can see that the maximum dropout voltage (Vin - Vout) is 1.3 V over the spec'ed operating temperature range at the max rated output current of 800 mA.

So you need at least 6.3 V at the input.

How much current can flow in your 8.2 kΩ resistor before your 12.2 V supply voltage is down to 6.3 V?

Imax = (12.2 V - 6.3 V) / (8.2 kΩ) = 720 µA

How much current does the device draw for its own needs (known as the quiescent current)?

Hint: Look at the data sheet.

View attachment 282498

You can see that the typical quiescent current for the 5 V regulator, at room temperature, is 5 mA (and it could be at much as 10 mA somewhere over the entire operating temperature range).

So you are completely starving the regulator. It needs at least seven times the current flowing in the 8.2 kΩ resistor and possibly twice even that. And this is if none of the current in that resistor is flowing through the 10 kΩ resistor instead of the regulator.

Note that this is before there is a load on the output of the regulator at all.

Does the regulator have a minimum load?

Hint: Look at the data sheet.

View attachment 282499

Even at room temperature, you typically need nearly 2 mA in order to maintain regulation and, over the full temperature range, you could need at much as 5 mA.

Now consider how much current you want to be able to deliver to the load. If you want to deliver 800 mA and if all of that is flowing through the 8.2 kΩ resistor, it would need to drop 6560 V!



If you are concerned about heat in the regulator, then you can do one of three things (well, four) or some combination of them:
1) Drop some of the voltage with a series resistor between the supply and the regulator input.
2) Shunt some of the current around the regulator.
3) Provide adequate heat sinking for the regulator.
and
4) Move to a switch-mode regulator instead of a linear one.

Before you can decide which route to take and how to go about it, you must first decide what the maximum current is that you need to deliver to your load. I don't recall seeing that information anywhere, so what is it?
Thank you so much! Really helpful insight here. The comparator is the output of the regulator, so I was thinking the needed load current would need to be within the input specs of the comparator.
 

Thread Starter

jim0000

Joined Oct 28, 2020
130
Again, you are thinking that because the supply is capable of delivering 25 A that it MUST be delivering 25 A. That would only be true if it were a current source, but it is not -- it is a voltage source. Voltage sources deliver whatever current (within limits) is needed, be it tiny or huge, to maintain the proper output voltage.

Think of a car battery that is rated for 1000 A and is sitting on a shelf. Where is the 1000 A going? It isn't going anywhere because the battery isn't producing ANY current, let along 1000 A.

Also, there's no such thing as a resistance of 0.02 A.
Oh okay thank you, I was just looking up typcial internal resistance of the battery to get .02ohm, but perhaps that isn't accurate or perhaps it doesn't come in to play here. I wonder if I should add a way to boost current then(going to the battery not to this regulator/conoarator circuit)? Recommended charging amperage for the 100Ah battery I wanted to use is 20A.
 
Last edited:

WBahn

Joined Mar 31, 2012
29,976
Thank you so much! Really helpful insight here. The comparator is the output of the regulator, so I was thinking the needed load current would need to be within the input specs of the comparator.
The comparator has extremely high input impedance so virtually no current will flow into it. If you use the regulator and it needs a minimum load current, then you need to provide a separate load to consume that current. In this case, the regulator wants a minimum load current of as much as 5 mA. You want to use a bit of margin, so something like 7.5 mA or 10 mA is reasonable. With a 5 V output, just use a 510 Ω resistor from the output to ground (i.e., circuit common) and call it a day.

Though it's still better to use a reference IC.
 
Top