Oh, taht raises a few questions.
If my load doesnt require clean supply, do I really need the cap? The voltage can fluctuate from 24V to 0V and the load, being a lamp for example, shouldnt be bothered right? So the only need for stable voltage is the 12V line.
Correct. If you have an incandescent light or a bulb designed for 24v
AC you don't need to use a bridge rectifier to power that thing. However, if it's 24v DC light, then you should not power it directly from the bridge rectifier, because the voltage will vary about 120 times a second between 0v and a peak voltage of around 32-34v ... so your 24v DC bulb could potentially die due to over-voltage.
If you have a 24v DC bulb or led lamp, you would probably want to use a 15v AC or 18v AC transformer, which will give you around 22-25v peak DC voltage after you rectify it using a bridge rectifier, and you may power that lamp without any capacitors and it would work, but you would probably see the flicker of the lamp about 120 times a second.
Capacitors after a bridge rectifier raise the minimum voltage to some value. The minimum voltage will depend on the capacitance and the current used - if more current is used, the capacitors will discharge faster and have less time to charge up so the minimum voltage will be lower. The more capacitance you add, the higher the minimum voltage would be but up to a point..
Linear regulators like 7812 need to have an input voltage slightly higher than the output voltage in order to output always 12v. That amount is called dropout voltage in the datasheet and for the 7812 it's equal to around 1.. 1.5v (depending on current and chip temperature and other things). So basically, it would be a good idea to always have at least 13v at the input of that regulator.
The linear regulator will output a lower than 12v if the input voltage is smaller than the required one (around 13v) .. for example with 10v on the input , it will output 9v and so on.. and if the input voltage is too low, it would probably stop working altogether. For example, with just 2v input, the regulator may not output anything.
So If you don't use any capacitors between the bridge rectifier and the regulator, 100-120 times a second the voltage will slowly go up from 0v to the peak voltage of around 34v and then go down again towards 0v. Between that period where the transformer outputs less than around 2-3v, the regulator will be completely off and then it will gradually output higher and higher voltage until it gets more than around 13v and from that point it keeps the output to 12v and then when the voltage goes below 13v it again starts to output less voltage. So depending on how big the output capacitor after the linear regulator is, you may be able to keep the voltage very close to 12v.
But probably the simplest solution would be to add a diode so that input capacitor won't be discharged into the lamp before it, then add a capacitor big enough to always have 13v or more at 100mA (so about 0.1/ 120* ~ 20v = 0.1/2400 = ~ 416uF .. so a cheap 470uF capacitor would probably be enough ... and then for protection you could probably add a 15v / 24v zener diode so that the regulator won't see more than that voltage at any point.
I didnt know about the current difference between AC and rectified DC, thats good to keep in mind, thanks. So my transformer marked "24VAC = 10A" should be able to output 6.2A max at 24VDC (I guess less in reality). Still it should be capable enough, Ive powered the load with it with no problems, so maybe its taking less than 8-10A as marked omn the label, I didnt meassure that.
No, it should output about 6A at a voltage between 0v and 34v DC maximum ... the bridge rectifier just "flips" the periods where the voltage goes below 0v and makes them periods going to +v .. so instead of having a period where transformer goes from 0v to peak 34v and then back to 0v and then a period where transformer goes from 0v down to -34v and back to 0, you now have two of the first periods, both from 0 to a peak dc and back down to 0. ... well not quite 34v, because you'll lose some voltage equal to the voltage drop on two of the diodes in the rectifier bridge.
Like I said, capacitors raise the minimum voltage, that's all. Linear regulators then make sure you get a fixed output voltage and the excess between the output voltage and peak dc input is dissipated in the form of heat.
Could I say than that the problem seems to be the peek to peek voltage of the rectified AC? 32V is really close to the 35V maximum of the regulator so thats the only thing that could cause problems, right?Can a simple zener (30V or so) across the rectified 24V get rid of the spikes or do I need a better solution?
Yes, you could say that. Remember that the output of your transformer won't always be exactly 24v AC .. your mains input may vary between let's say 210v and 240v while the transformer may be designed for 220v or 230v , so the output will also vary proportionally with the input voltage. The voltage of the secondary side of the transformer will also vary due to other reasons. Expect to have up to 38-40v in some extreme cases, and as little as around 28-30v ...
I need a max of 100mA and the regulator is stuck to a large piece of aluminium so there should be enough surface area to dissapate that heat. Specified max input voltage on this regulator is 35V as said before, I couldnt find anything about max difference in voltage in the datasheet.
Yes, for 100mA it should be easy to do ... just use a capacitor at the input enough for around 110mA (i would say go with 470uF 50v rated cap or a 35v rating if you put the zener diode in front), and some capacitor after the linear regulator, maybe 47uF to 100uF and 16v or 25v rating