I'm pretty new to electronics, and I want to do some projects more to learn than to use.
One thing I'm interested in is power supplies. I figured I'd start simple, and build a linear power supply. I found the basic diagram and parts, and it's pretty straightforward. At least until I got into the details.
Mains Voltage => Transformer => Rectifier => Smoothing Capacitor => Noise Filter Capacitor => Linear Regulator => Another Noise Filter Capacitor => Output Voltage
I decided to make my own transformer from one I found in a defunkt UPS. That project was written up in another thread.
https://www.eevblog.com/forum/projects/noob-plays-with-transformers/ I already had a rectifier in a parts bin, which I was able to identify as a GBU806. I found out this unit has can do up to 600V, 8A. And has a Voltage drop of 2V. At the start, I had no idea what the 3 capacitors were supposed to do, or that the regulator would need such "high" Voltage (7-28V) in order to give a 5V output. Fortunately, some folks were able to help me read datasheets, and I found a lot of useful info on the internet!
One of the first things I discovered was that after rectification, the Voltage would be higher than it was coming out of the transformer. Eventually, I learned about RMS and some of the math associated with it. Turns out 120VAC is closer to 170V at it's peak, but since it's constantly sine waving from +peak to -peak, something more like an average is used to. That took a while to wrap my brain around, but fortunately, the math to figure it is pretty simple. Just whatever your Voltage is x 1.414.
In my case: 9VAC x 1.414 = 12.7VDC
I picked the Voltage coming from the transformer at 9VAC mostly because it seemed fairly close to the lower end of what the regulator wanted, without going too low.
The reason knowing peak Voltage vs RMS Voltage is that once it's rectified, I have a DC Voltage that bounces from peak to 0V. I learned that the filter capacitor is for reducing that ripple so that the Voltage stays closer to the peak, instead of getting all the way down to 0V. How close depends on the capacitance.
In order to find the value I needed for the filter capacitor, I had to learn some more math. Values that must be known first, are peak Voltage, minimum Voltage, time, and current.
- Peak Voltage (Vmax): this is the 12.7V calculated before, minus the Voltage drop of the rectifier. So 12.7V - 2V =10.7V.
- Minimum Voltage (Vmin): this took me a while to figure out. But it's the minimum Voltage the linear regulator needs to function. In my case, 7V.
- Time (t): this is the time between peaks, measured in ms. In the case of 60Hz mains Voltage, this works out to 8.3ms.
- Current (I): this is simply the maximum current required of the circuit. In my case, 1500mA.
Capacitance = I x t / (Vmax - Vmin) = 1500mA x 8.3ms / (10.7V - 7V) = 3341uF.
I found a 16V 3600uF which is close enough.
For the two small capacitors, I found that I had to pick a linear rectifier first. Apparently, the two small capacitors help remove line noise that a particular regulator might find disruptive. So the capacitors recommended for each regulator is listed in it's data sheet. In my case, I chose a UA7805CKCT regulator which had it's capacitors listed.
After I had the parts picked out, I was able to finish my diagram with values of everything. I had also tried to visualize what the waveforms would be at the various stages in the circuit.
Another thing to consider is heat dissipation. The regulator and rectifier both produce heat, and especially the regulator needs a heat sink to function properly. I found the maximum working temperature of the regulator, and compared it to the temperature the chip would be if I didn't have a heatsink, and it was way above the maximum. I didn't do any estimating for the regulator, since I decided to put it on a heatsink regardless.
About this time I got the transformer finished up, and I hooked my little oscilloscope to it. This is one of the first readings I've taken with an oscilloscope, so the resulting sine wave was pretty neat.
The reading after the rectifier was exactly what I hoped for. A ripple wave at twice the frequency, and about the Voltage I had expected.
The rest of the parts came in the mail, and I hooked those up too.
With the capacitor, the ripple wave smoothed out too. Though this only seemed to work with the circuit under load.
I was able to charge an eReader with it! I did find though, that the linear regulator could only put out a steady 5V with no load. Charging the eReader at only around .4A, the Voltage dropped to around 4.6-4.8V. It also did indeed get quite warm.
I found another heatsink and bolted the two together, putting the regulator, and rectifier on opposite ends. This time I charged up my cell phone telephone, at about the same current, and the chips didn't get quite as hot as they did sharing the single heatsink.
I had originally estimated that the power supply would be around 30% efficient. I took a few measurements, and calculated the actual efficiency.
Efficiency (%) = Watts in / Watts used x 100
I used a few different loads to get as close to maximum current as I could:
Watts in = 23W, Watts used = 4.65V x 1.69A = 7.86W.
Efficiency under full load = 23W / 7.86W *100 = 34.17%
That's pretty nice all things considered. However, here's what I got charging my cell phone telephone:
Efficiency (phone) = 12W / (4.78V * 0.41A) * 100 = 16.33%
Pretty dismal! On the bright side, my house is cold. So the waste heat is only helps to keep the pipes from freezing, LOL.