Discarded power supply with virtual ground¶
External power supply¶
TL;DR it failed and I created another schema for the power supply. I keep this page anyway.
I will need some power for this circuit. Given that I'll have several operational amplifiers, probably some of them will need some symetrical power. It can be -5/+5, -12/+12 or anything else. I am not sure of what will be the final design, but I think that I'll be fine with -12/+12. Given that the project can embedd the power supply ... or not, I want to have a very low dependency, I don't want to depend on an external -12/+12V power supply. I want to depend to only one single voltage power supply. I chose to implement an optional 24Vdc power supply.
It has to be as clean as possible and as simple as possible. Switching power supplies need filters to avoid send noise back to the main, filter to avoid sending noise to the circuit and a shield to avoid sending noise to the whole environment. I discarded them. I chose to have a linear power supply and to make it as clean as possible.
- This is very simple :
- a transformer
- a fuse
- a diode bridge
- a big capacitor
- a voltage regulator
- a smaller capacitor
So simple that I built it on a protoboard.
Design
¶
The smaller filtering capacitor¶
I already built a first prototype of the whole circuit and I know that it will consume approximately 500mA. Let's start from the need, back to the main. The smaller capacitor is not on the screenshot because it is embedded in the next circuit. It is sized accordingly to a rule : 1/10th of the transformer's filtering capacitor. We will see that this transformer capacitor is 3300µF, thus the invisible smaller capacitor is at least 330µF. I also need to have a very clean output before creating a virtual ground and powering the circuit, thus I wanted to filter 100Hz. The main in France is 50Hz, after the diodes, I'll have a 100Hz frequency and I want it to completely disapear, even if I have a regulator. I needed a 87µF capacitor, but chose to increase my expectation and to filter even more at a lower frequency, so the remaining 100Hz should be really small. I chose a 470µF for the smaller invisible filtering capacitor.
The regulator¶
I chose a very simple and standard LM7824 to have some voltage regulation and I stupidly applied the datasheet schema by adding a 0.1µF and 0.33µF capacitor. I also added a flyback diode (D20) to avoid any capacitor from the following circuit discharging in the regulator when I switch off the power, at the end, it would destroy the regulator's transistors. Thus, when I switch off the main, the capacitors will discharge and use the D20 diode as a shortcut, protecting the regulator. Despite I don't think that this is needed, I was too lazy for the calculations and added a small TO-220 heatsink on the regulator with some thermal grease.
The big filtering capacitor¶
I chose a 3300µF for C25 because I have 32Vac at 100Hz after the rectifier diode bridge and I wanted to have very low ripples. The regulator needs to have at least 27Vdc to provide 24Vdc. Thus, I can loose up to 5V. I made my calculations based on less. C=I.*T/Vdrop, I is the current consummed by the circuit, I know that it will be approximately 0.5A and that the transformer will not be able to provide more than 0.630A. T is the time of the period in second for the source. In France, the main is at 50Hz, but after the rectifier bridge, it is 100Hz, so 0.01s. Finally, I don't want the voltage to be lower than 30V, thus the drop is 2V. C = 0.630A*0.01s/2V = 0.00325F = 3.25mF = 3500µF. With 3300µF, the voltage will be slightly lower than 30V at 100Hz, if and only if the circuit draw 0.630A, which should not be the case.
The diode bridge rectifier¶
I have 34Vac at 50HZ after the transformer. I need to have DC current, thus I don't want the negative voltage. Whatever voltage (positive or negative) you apply to the bridge, you will have to go through 2 diodes. Each diode has a voltage drop of 1V, it means that from 34Vac (24Vac RMS) at 50Hz, I'll have 32Vac (22Vac RMS) at 100Hz after the bridge. That is the price to pay. I chose standard and cheap 1N4001 diodes because I can affort the voltage drop in my circuit and thay can easily handle the needed current. Let's go !
The transformer¶
I chose this one because it was available at Farnell's and the voltage and the current are enough for my need. The datasheet asked to have a protection fuse of 0.630A after the trnsformer, thus I included it. I found that a protection fuse before would be overkill and did not include it. I'll only have a switch.
Build
¶
Nothing special here, I used the prototype board that I had instead of a clean PCB. I only have 10 components to solder on it and it fits. I designed a PCB for this part, too, but not yet built it. I can only show 3D previews.
Internal symetrical power conversion¶
This part is critical. I need to provide a clean regulated symetrical -12V/+12V to some of the operational amplifiers and +5V th the digital part. Thus, I created a virtual ground right in the middle of the 24Vdc input and then a +5V referenced on the -12V. It was possible to generate 5V from the GND/+12V, I would have the same GND for all the rails, but I would draw more on the +12V rail than on the -12V one, it would be unbalanced and would make one of the transistors warmer than the other.
The input stage¶
First, the previous main to 24V board is optional, any one can build his own or use an external standalone one. In my case, I'll probably power the circuit with one of my bench PSU. Thus, I included a connector J17. Pin1 is not connected, it will be blocked on the female side to avoid any mistake when pluging.
I need a shiny power LED ;) I chose to use a red one (D3) and calculated his resistor (R7) to limit the current.
I want t be protected aganinst mistakes, the pin header should protect the circuit against polarity inversions, if I use the special female plug... And nothing protects against a bad setting with higher voltage than 24V. I included a TVS, it will help to protect against reversed polarity, and high voltages. It acts as a Zener diode, with higher absolute maximums and with a prefered failure to short-cut. If I overload it, it will cut the voltage to 24V and if it is really too much, it will fry continue to short + and -. Some altruist suicide.
Finally, as I explained in the previous part, I need a filtering capacitor with approximately 1/10th of the main filtering capacitor. I prefer to embedd this one in the symetrical power schema, it will be here even if someone (including me) choose to not build the main power supply. It is sized to filter the remaining 100Hz even under full load at 630mA.
Failure, bye-bye virtual ground¶
I will not detail everything here because I voided this design. Here is why. Everything is fine for the -12V/VGND/+12V. The issue arose when I wanted to generate 5V.
From GND/+12V¶
In this scenario, the good point is that GND is the same for -12V, +5V and +12V, the whole project will have a single GND. But With this design, the 5V regulator draws current from the +12V rail to the GND rail, consumming more on this rail than on the -12V rail, thus Q4 needs to let this extra current go back to the -12V rail to keep GND in the middle. It will be hot and dissipate a lot. I can use power resistors to artificially consume current between GND and -12V, but this is not a clean solution and I would need to dissipate 1W for nothing.
From -12V/GND¶
I would have the same issue, this regulator would need current from GND and Q3 would have to let current go through it, would get hot... Furthermore, this 5V would be referenced to -12V. I would have 5V between -12V and -7V. Not ideal, I would have half of the project powered by -12V/-7V (5V) and the other half powered by -12V/GND/+12V. A mess, I'd probably mix the grounds somewhere and make some magic smoke.
From -12V/+12V¶
This one is good in terms of heat, It would draw the current from the +12V and would return it to the -12V, Q3 and A4 would be cold. But I would still have 5V referenced to -12V. Too dangerous.
Now that I understood the advantages and drawbacks, I decided to voided this whole design and to restart from a dual-coil transformer design. I learnt a lot during this experimentation and I hope that this last chapter will help you to understand the limits of such a design and choose it or discard it depending on your needs. In my case, it was inappropriate.