Can't make an L4940V5 LDO adjust like a 7805 - Page 1
Forum section: electronics / beginners

author: CaptDon
author_rank: Super Contributor
timestamp: October 26, 2024, 01:20:17 am
content: I am sure most are familiar with the 'add an adjustable resistor to the ground pin of a 7805' to make it regulate at a higher output. I tried the same technique with the LDO part to make a +6.8 adjustable and what I got was a peculiar snap action sort of thing. The output was connected to a 6 volt 10AH gelcell. I carefully set the unloaded output to 6.80 volts and then connected to the battery. It would charge up to 7.15v then the input current would drop back to about 4ma. The battery would then discharge under a light load of about 80ma. to around 6.70 volts where the current would spike up and the cycle repeat. Probably a 15 minute cycle time. I really wanted to use the LDO but got problematic behaviour so I just used a 7805 instead and all worked as expected. The input current to the 7805 would taper off to about 4ma. and the battery voltage remained rock steady. I am guessing the LDO was not designed for or rated for having resistance in the ground lead? Perhaps instead of resistance I could have used a zener or a series of silicon diodes and forced maybe 10ma. of current through the diodes with a resistor from the input side supply. What is your experience in this area? It seems the 7805 uses a fixed current into the ground pin where the LDO apparently varies causing the weird hysteresis snap action when resistance is introduced to the ground pin.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 26, 2024, 06:58:14 am
content: To make a 7805 adjustable, not one, but two resistors are needed, like this:https://electronics.stackexchange.com/questions/452122/how-do-i-change-the-output-voltage-of-the-lm7805

author: PGPG
author_rank: Frequent Contributor
timestamp: October 26, 2024, 10:23:44 am
content: 7805 main stage is the npn Darlington voltage follower giving at start 1v4 voltage drop. Then you need also some voltage between input and Darlington base. So big voltage drop but Darlington base current is extremely low so has little influence at ground pin current.Now imagine how BJT LDO can be done. You have to use pnp. You can't use Darlington as it will give you voltage drop you don't want. So the base current will be much higher than for Darlington in 7805. Now where from this current have to be taken. The only place you can take current for this pnp is from ground pin so ground pin current will be proportional to output current.The next problem is that voltage follower in 7805 has gain of 1 (little less than 1) but in LDO you have high voltage gain of your main regulating element (you drive base while output is at collector). This generates stability problems (replacing pnp with PMOS don't help in this subject).So you have variable GND pin current and problems with stability. What you observed is nothing more than oscillation but with high time constant made probably by high amount of charge needed to be moved into and from battery.

author: CaptDon
author_rank: Super Contributor
timestamp: October 26, 2024, 01:14:19 pm
content: RoGeorge, Actually I had also tried a 2K pot, one end tied to the output pin and one end tied to ground with the wiper tied to the ground pin of the regulator. The pot with the wiper as the tap was taking the place of R1/R2. With both the LDO and the 7805 the action of the pot was predictable. When the wiper was near ground the regulation was +5vdc. As the wiper moved up toward the output end of the device the voltage went up also. The 7805 produced a nice result, the LDO showed instability. I believe PGPG's post nailed it. The LDO's ground pin current varies far more than the 7805. In the end I used the 7805 with a one resistor solution and it works well although it also shows a very small hysteresis shift.

author: MarkF
author_rank: Super Contributor
timestamp: October 26, 2024, 01:26:01 pm
content: CaptDon, have you ever seen this GEL cell battery charger. Where you set the voltage and current via two resistors?I don't know how well it works as I have never built it.

author: CaptDon
author_rank: Super Contributor
timestamp: October 26, 2024, 01:42:57 pm
content: I looked at the LM317 as a possible candidate. My real problem is barely having enough main supply voltage to overcome the dropout of an LM317 or the 7805 I went with. It appears that under certain low line conditions I can see the available charge current drop off. In the end it works out o.k. since the unit is always plugged in and operating. Even under adverse conditions there is just enough input supply voltage to hold the battery at the suggested 6.8v 'long term non-cycle use' voltage. When the mains fail the battery supplies 80ma to an actual +5v LDO system regulator and the unit easily runs at least 24 hours until the battery voltage approaches the point where the system LDO is in danger of dropping out. The system can survive reliably down to 4.5 volts so there is some margin of error even as the system LDO becomes starved. I think the real system cutoff point is more like 36 hours of no mains input power.

author: RoGeorge
author_rank: Super Contributor
timestamp: October 26, 2024, 01:58:44 pm
content: Quote from: CaptDon on October 26, 2024, 01:14:19 pmIn this case, try adding a 0.1uF between the cursor and ground. After that, if the LDO is still not stable, add yet another 10uF in paralel with the 0.1uF you just added before (between the cursor and ground). But this might slow it down (I didn't try that in practice).If still not stable, then you have to tell what LDO are you using.Some LDO models are unstable if the output capacitor is ceramic (between stabilized V+ and GND is too small). Usually this is mention in the LDO datasheet, or if not explicitly mentioned, then they recommend a tantalum capacitor at the stabilized output (because tantalum caps have higher ESR than ceramics). The instability usually occurs when at output it's a ceramic MLCC, these ceramic caps can have a too low ESR for the given model of LDO.Such an LDO, for example, is the AMS1117 or alike. They can become unstable with a ceramic cap at output.The fix is to use an aluminium electrolytic, or a tantalum capacitor instead of a ceramic MLCC.Add the schematic you are using + the LDO type + the components values, otherwise instability issues can become a never ending discussion.

author: CaptDon
author_rank: Super Contributor
timestamp: October 26, 2024, 06:32:38 pm
content: The output of the LDO (and now the 7805) is tied directly to a 6V 10AH gelcell and the battery ESR would probably be a problem. I finally just went with the 7805 and put the unit back together and back into the rack. The original charge system was a simple series resistor which set the maximum charge current and a zener with a very small value series resistor to limit the charge voltage which was around 7.15v. After two years the battery still had 7.15 volts showing but simply had almost no capacity as near as I can guess because the gel had become dry due to excessive charge and outgassing. New battery and new charge circuit, 150ma. maximum charge current and 6.8v voltage limit. When the battery reaches 6.8v and settles there for an hour or so the charge current seems to level off at around 20ma. 'average'. I see the current spike up to around 50ma. then settle back to around 4ma. with a time average of about 20ma. Let's see how long this battery lasts. This is part of a private harbor A.I.S. beacon system that also chirps out unencoded company messages like local wind information and pending operations data. It is low power at around .25 watts VHF RF and is for use near the harbor only. It is not a U.S.C.G. datum unit. It is 'listen before talk' and sends morse station I.D. at the top of the hour along with the MMSI.