Linear Voltage Regulator Irregularities

Thread Starter

justinoberle

Joined Jun 16, 2021
36
I have an LM317LZ connected to a 1000uf, 10V capacitor and a 10uf capacitor. The regulator is working but not very well. I have 5 AA batteries in series at 2400 mAh for my power source. The input voltage when charged is about 6.6V and when discharged completely 5.7V. The regulated voltage is set for 3.15V, which it hits perfectly most of the time. However, it is not perfect. There are some irregularities I will show. The setup is 2 analog inputs on an MCP3008 ADC connected to an ESP8266. One input is for raw voltage(I used resistors to get them in the range of the MCP3008). And the other input is for the regulated voltage. I stream this to a DB online and here are the two plotted.
Capture.PNG
The blue is raw battery voltage and the orange is the regulated one. I think the spikes are sensor issues as the battery should not produce those. But, what is causing this?
Capture2.PNG
What is causing my power supply (blue) to do this and also why is my regulator not "correcting" this? After 2000 samples everything seems to run smoothly. The sample rate is 1 per 10 seconds, so 8000 samples is 80000 seconds.
 

Martin_R

Joined Aug 28, 2019
137
The lm317 needs 3 volt overhead to work properly. Is: with 3.15v output it needs 6.2v input MINIMUM! You're quite close with this. It also needs at least 5mA load on it to regulate property.
 

Thread Starter

justinoberle

Joined Jun 16, 2021
36
The lm317 needs 3 volt overhead to work properly. Is: with 3.15v output it needs 6.2v input MINIMUM! You're quite close with this. It also needs at least 5mA load on it to regulate property.
That doesn't explain this issue as it is in the battery raw data. Plus it regulates fine until 5.86V
 

LowQCab

Joined Nov 6, 2012
4,063
Your Battery Voltage is sagging.
Double-A Batteries can't deal with Current Spikes very well,
and your input Voltage is marginal at best.
.
.
.
 

Thread Starter

justinoberle

Joined Jun 16, 2021
36
Your Battery Voltage is sagging.
Double-A Batteries can't deal with Current Spikes very well,
and your input Voltage is marginal at best.
.
.
.
That is interesting. Do you recommend a different battery type? I ordered some CR123A batteries to try out in a few days. I will do 2 of them in series so I can get enough voltage for the regulator. It is kind of a bummer regulators have large dropout voltages because 1 CR123A is ~3.7V which is just above what I need. But, when you consider a ~2-3V dropout, you need at least 2 of these in series for the regulator.
 

Thread Starter

justinoberle

Joined Jun 16, 2021
36
I see no reason offhand for the bump in voltage.

Why such a large capacitor?

Post the exact circuit you have.
This will take me a bit as I haven't made a schematic for this. I could take a picture of my breadboard setup if you would like? But that's not ideal. As for the capacitors, I did an identical solder as shown in this video with these capacitors and the LM317LZ.
 

LowQCab

Joined Nov 6, 2012
4,063
Li-Ion, or Li-Po Batteries are great,
but need a protection/charging Circuit,
which some have built right into the Battery.

You should also use a LDO (Low-Drop-Out) Regulator,
like this one ......... 846-BA33JC5T-ND
Less than 0.3V Drop-Out-Voltage at 1.5-Amps, less Drop-Out at lower Currents.
Has a TO-220FP Full-Pack-Package so you can screw it down without shorting anything out.

The guy in the Video really doesn't know what he's doing.
Massive Capacitors are not required, and can be problematic, read the Data-Sheet.
.
.
.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,461
I have an LM317LZ connected to a 1000uf, 10V capacitor and a 10uf capacitor. The regulator is working but not very well. I have 5 AA batteries in series at 2400 mAh for my power source. The input voltage when charged is about 6.6V and when discharged completely 5.7V. The regulated voltage is set for 3.15V, which it hits perfectly most of the time. However, it is not perfect. There are some irregularities I will show. The setup is 2 analog inputs on an MCP3008 ADC connected to an ESP8266. One input is for raw voltage(I used resistors to get them in the range of the MCP3008). And the other input is for the regulated voltage. I stream this to a DB online and here are the two plotted.
View attachment 241437
The blue is raw battery voltage and the orange is the regulated one. I think the spikes are sensor issues as the battery should not produce those. But, what is causing this?
View attachment 241438
What is causing my power supply (blue) to do this and also why is my regulator not "correcting" this? After 2000 samples everything seems to run smoothly. The sample rate is 1 per 10 seconds, so 8000 samples is 80000 seconds.
Where is that 1000 uf cap connected, is it on the input or output?
Also, you could try a nice size cap across the battery like at least 100uf but of the low ESR type. 1000uf probably better but the low ESR type. Also a 0.1 uf ceramic cap across the battery.

There are a couple reasons for the spikes...
1. Something in your system seems to be drawing current at an irregular rate.
2. Noise picked up by the test equipment probe or wiring to the test equipment.

The initial sag can only be that the load draws more current to start with then starts to draw less current. The only way to know why that is is to know the load type and hopefully the circuitry. As someone else said a schematic would help here, but if not then a good description of the load and what it does.

Also as someone else said, you have to have enough overhead voltage. This doesnt mean 2v or 2.3v it has to be according to the data sheet. It does not matter if it 'works' with only 2.3v overhead if the data sheet specifies 2.5v because that 2.5v covers many cases that also involve environmental changes. If it says 2.5v, then make sure it has 2.5 volts.
Also watch where you place capacitors and they could cause oscillations. Find a reference schematic and go by that. Best place to find that is on the data sheet or application notes.
Also be aware that if any part of the load can power the circuit in reverse if the battery goes low then you also have to add a couple diodes.

I've used a lot of LM317's in many different package sizes including the small ones with lower output current specs and SMD types. They all work very well when used properly. However, for battery operated stuff sometimes you need a low dropout regulator and/or a low power regulator. A low dropout type will have less overhead, much less, and a low power regulator will not use as much power from the battery just to regulate.
It may even be a good idea to look into a switching regulator depending on your load.
 
Last edited:

atferrari

Joined Jan 6, 2004
4,768
The OP who does not show a schematic after being asked the first time, should be expelled from the forum and kindly shot at dawn in a public square. Obviously, just to promote clarity of concept and save time and words.
 

Thread Starter

justinoberle

Joined Jun 16, 2021
36
Where is that 1000 uf cap connected, is it on the input or output?
Also, you could try a nice size cap across the battery like at least 100uf but of the low ESR type. 1000uf probably better but the low ESR type. Also a 0.1 uf ceramic cap across the battery.

There are a couple reasons for the spikes...
1. Something in your system seems to be drawing current at an irregular rate.
2. Noise picked up by the test equipment probe or wiring to the test equipment.

The initial sag can only be that the load draws more current to start with then starts to draw less current. The only way to know why that is is to know the load type and hopefully the circuitry. As someone else said a schematic would help here, but if not then a good description of the load and what it does.

Also as someone else said, you have to have enough overhead voltage. This doesnt mean 2v or 2.3v it has to be according to the data sheet. It does not matter if it 'works' with only 2.3v overhead if the data sheet specifies 2.5v because that 2.5v covers many cases that also involve environmental changes. If it says 2.5v, then make sure it has 2.5 volts.
Also watch where you place capacitors and they could cause oscillations. Find a reference schematic and go by that. Best place to find that is on the data sheet or application notes.
Also be aware that if any part of the load can power the circuit in reverse if the battery goes low then you also have to add a couple diodes.

I've used a lot of LM317's in many different package sizes including the small ones with lower output current specs and SMD types. They all work very well when used properly. However, for battery operated stuff sometimes you need a low dropout regulator and/or a low power regulator. A low dropout type will have less overhead, much less, and a low power regulator will not use as much power from the battery just to regulate.
It may even be a good idea to look into a switching regulator depending on your load.
Thank you for such a great reply. I will take all of this in and adjust accordingly. I am a hobbyist, not a professional, obviously. I will get a schematic next time before posting. I just don't have time to make one for a few days. That was my fault. A summary of the setup though is 5 AA LiOn batteries in series for power. I then have resistors reducing the voltage so it can be read properly to the mcp3008. This part is in parallel with the regulator setup. I then have the regulated voltage reduced with resistors and sent to the second analog pin on the mcp3008. I also have the regulated voltage sent as the power for the mcp3008, a sensor, and esp8266, in parallel, meaning they all feed from the same + and - which is 3.15V. The sensor analog is connected to the third analog input for the MCP3008. Wow, that was an ugly paragraph. I will get a schematic asap, but it might be a few days. Sorry in advance. Lesson learned. Thanks! Side note, the sensor needs 3.3 to 5V so maybe it needs a separate power supply. I set my regulator to 3.4V and got the same curves as the plot above though.
 

Papabravo

Joined Feb 24, 2006
21,225
The OP who does not show a schematic after being asked the first time, should be expelled from the forum and kindly shot at dawn in a public square. Obviously, just to promote clarity of concept and save time and words.
An autocratic solution if ever there was one.
 
Top