linear regulator oscillates - Page 1
Forum section: electronics / beginners

author: kellogs
author_rank: Regular Contributor
timestamp: August 19, 2022, 02:33:19 pm
content: Hey all,I think my L78L05 is doing this because its ceramic output cap audibly vibrates when 12V is applied on 'IN'. Also, the light bulbs do not light up. There is two of them 21W light bulbs, incandescent. Ways to make the circuit work:a) remove one of the bulbsb) keep both bulbs and touch the 6 pins of ISP with ISP programmer (ATMega MCU).Being the rookie that I am there is no scope in my work room. Calculated current draw from the linear regulator is 3.6 mA with one bulb on or 5.6 mA with both bulbs on. Anything obvious going on ? Thank you!

author: Slh
author_rank: Regular Contributor
timestamp: August 19, 2022, 04:21:58 pm
content: I can't really see what's happening from that circuit fragment. You need to show a bit more of it. You refer a lot to the bulbs but it's not clear what they're doing there.From what I can see I'm wondering if the 7805 is fitted backwards?

author: wraper
author_rank: Unknown
timestamp: August 19, 2022, 04:30:00 pm
content: Why there is a 27 ohm resistor connected in series with C1?

author: fourfathom
author_rank: Super Contributor
timestamp: August 19, 2022, 05:52:45 pm
content: The 78L05 is spec'd for a peak output current of 140mA. Your 27 Ohm resistor draws a 185mA transient when powering up. Perhaps the regulator goes into overcurrent shutdown? (what does the 78L** actually do in overcurrent mode? The internal circuit appears to be a basic current-limit.) Anyway, perhaps that current-limit will cause oscillations in come cases.

author: wraper
author_rank: Unknown
timestamp: August 19, 2022, 06:07:06 pm
content: Quote from: fourfathom on August 19, 2022, 05:52:45 pmIt's on the input of vreg. And series resistor defeats input power smoothing this capacitor could do.

author: Vovk_Z
author_rank: Super Contributor
timestamp: August 19, 2022, 07:07:32 pm
content: Replace ceramic C4 with aluminum (10-47 uF) and it will show if ceramic cap at regulator output is a problem or not.

author: wraper
author_rank: Unknown
timestamp: August 19, 2022, 07:28:21 pm
content: For 78L05 ceramic cap at output should not be a problem, it's not an LDO where there may be a problem. Not to say it's a recommended value in the datasheet. On other hand input filtering basically consists of a small ceramic cap, electrolytic cap was made mostly useless and there is no direct connection to power source, only through a diode and whatnot. Also considering light bulbs do not light UP suggests there is no sufficient voltage at input of Vreg either. What puzzles me is this:QuoteQuoteFirstly 21W x2 is not a few mA current but almost 2A @12V per bulb. Secondly according to the circuit, voltage for bulbs is taken before D9, so Vreg has nothing to do with supplying their power. As OP says it does not work when second bulb is added, I guess it becomes too much load for power supply and it goes into protection.And this simply makes no sense:QuoteEDIT: I guess Bulbs are powered through some sort of MOSFET controlled by MCU, and by fiddling the ISP he prevents it from booting and switching them on.

author: wraper
author_rank: Unknown
timestamp: August 19, 2022, 07:33:06 pm
content: Noticed D11 TVS is connected through a resistor too. Making it completely useless as protection device.

author: fourfathom
author_rank: Super Contributor
timestamp: August 19, 2022, 07:42:31 pm
content: Quote from: wraper on August 19, 2022, 06:07:06 pmOops. You are correct.

author: kellogs
author_rank: Regular Contributor
timestamp: August 20, 2022, 10:51:27 am
content: No, it is not fitted backwards. Some other things i have tried with the same result:- shorted out the 27 ohm resistor- changed the regulator together with C2 and C4 on PCB with new partsNew observation:- power on (12V), proceed as either in a) or b) from first post, remove 12V power: there is an immediate interval of 1 - 1.5s during which applying 12V again yields the expected results. 2 seconds after power off, powering back on makes the regulator oscillate again.Quote from: wraper on August 19, 2022, 07:28:21 pmYou surely hit some nails on their heads! Yes, the bulbs are mosfet driven by MCU through some NPNs (they have internal 2.2k ohm resistors on their bases)D9 is there as not to allow C1 discharge into the bulbs - I need those extra hundreds of ms to finish some processing and update EEPROM after the bulbs went off. The extra processing time is provided by C1. The 27 ohm resistor is imply an inrush current limiter.QuoteI would say my fiddling on ISP lines prevents MCU from booting, thus the mosfets are getting stuck in an open channel configuration and lights are turning on. Could very well be, and the power supply can happily light them both on, I don't think it is being affected by my design.

author: kellogs
author_rank: Regular Contributor
timestamp: August 21, 2022, 08:37:10 am
content: Quote from: kellogs on August 20, 2022, 10:51:27 amOr not, I have put a `return` statement first thing inside `main()` function. As a result, the audible noise has disappeared, but lights would stay off, contrary to my previous reasoning.Also fiddled with clock frequency and BOD detection, same deal.Then I have soldered a 4.7 uF electrolytic cap on the output parallel to C4, no more audible noise, lights went on as they were programmed. I wonder what the issue is. Any clues ?

author: taste_tester
author_rank: Regular Contributor
timestamp: August 21, 2022, 10:20:47 am
content: Maybe, it's because according to the LM78L datasheet in figure 11, putting a slightly larger capacitor on the output "Improves ripple rejection and transient response."My gut feeling is it's either ripple or transient related, maybe you can watch EEVblog #162 or #885 on this exact subject, my other gut feeling is that if you are doing strange hacks like adding diodes to gain a delay of some milliseconds and abusing the MCU to try and trick the circuit into working, there's bigger issues you need to identify and resolve.