Tuesday 22 January 2013

Power supply for function generator

Over the course of developing and testing the function generator I have needed a dual polarity power supply.  I have been using a bench power supply that I made some time ago.  It has two variable voltage outputs and I am linking the +ve terminal of one supply to the 0V of the other supply to create a dual +/- supply.  This is fine but I also needed a way of powering the arduino uno that I am using to control the AD9835 function generator PCB.  During the course of my testing in a massive 'ooops' moment, I managed to wire up something incorrectly and destroyed my arduino uno!  This is to be avoided obviously and I only have myself to blame!

Note to self....when testing or developing a project ensure that connecting power to the device under test is as simple and stress free as possible. A random mass of different coloured wires is Not acceptable!

Further note to self....ensure that the power supply you are using cannot supply too much voltage or current to the device under test!  This way no magic smoke or expensive and unnecessary catastrophic failures will be observed!

To stop this happening I have designed a power supply which meets all of these requirements and ensures that this shouldn't happen again - I am of course assuming that I won't make a similar mistake again and that is a significant assumption!  I often make mistakes....

The power supply is a linear power supply with the following features:

Take an input of 230V 50Hz AC (British AC line voltage)

and provide the following output:

+12V output with at least 500mA to power the op-amp filter and amplifier section
-12V output with at least 500mA to power the op-amp filter and amplifier section

+9V output with at least 500mA to power the arduino and display and control section - I know I could have used 5V here but I wanted to use slightly greater than 5V so that I am correctly powering the on board linear regulator already present on an arduino.  I'm going to use the 5V output for everything else.

With the power and functional specifications sorted I had a look at which parts I had available.    I didn't have any switching regulator devices handy and I didn't want to introduce more switching noise into my circuit.  I haven't made many switch-mode power supplies and didn't want to use this topology of power supply.   I did have plenty of linear regulators including a LM7809 and a LM7812 for positive voltage regulation and a LM7912 for negative voltage regulation.

Here are the datasheets for those devices:

Fairchild version of 78XX positive linear regulator datasheet

Fairchild version of 79XX negative linear regulator datasheet

I have been through the design and implementation of a linear power supply in previous blog posts so I'm not going to repeat myself again.  If people are interested please look at the posts concerning power supplies for how to design linear power supplies.

Here is the schematic diagram:

Linear Dual Power supply for function generator

Here is the PCB layout top and bottom layers:



The circuit is pretty classical in terms of design.  It uses a linear transformer to step down 230V AC to 15V AC.  The 15V AC is then sent to a bridge rectifier which converts the AC voltage into a postive and negative DC voltage.  These DC voltages are then smoothed with two large 2200uF electrolytic capacitors.  Next the voltages are passed through two different coloured LEDS with current limiting resistors - I added the LEDS to show that power was present, they aren't strictly necessary.  Next the positive and negative DC voltages are passed to the respective linear regulators, 7809 (arduino power), 7812 (+12V op amp power) and 7912 (-12V op amp power).

Once I had simulated the circuit to make sure it worked and I hadn't made any stupid mistakes I transferred the designed to a single sided PCB and chemically etched the circuit layout using ferric chloride.  Here is how it turned out:

Top side of the PCB


And finally the PSU running - no load!  I love blue LEDS!

Well...that is about it folks!  The next job will be to design the interface electronics for the signal generator - LCD display and buttons to control the signal generator.  Take care - Langster!



2 comments :

  1. It was pointed out to me by a good friend and viewer of the blog that I made a mistake when laying out the PCB for the power supply. At the 230V input to the power supply at the transformer I didn't put enough isolation between the copper ground plane and the 230V mains ac. I have fixed this by milling out the copper around the 230V ac input tracks and I've updated the PCB layout to remove the copper ground plane around the 230V input. That should negate any safety issues that might have occurred if there had been a voltage surge of some kind. Always safety first!

    ReplyDelete
  2. This is really interesting and I guess quite complicated for those individuals who were not familiar. But you made the explanation simple and easy to follow. Thanks a lot for sharing this information.
    WindFreakTech.com

    ReplyDelete