Author Topic: How to Make a Power Supply  (Read 45243 times)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
How to Make a Power Supply
« on: May 08, 2009, 02:18:56 PM »
As promised I am putting together a post on how to make a variable power supply suitable for many Madmodder projects.

In particular this one is being built as half a unit for my Valve amplifier which requires 10V at 10A. But along this journey I shall be showing how to make a supply for many projects including machine power using low voltage motors.

Such motors include 12V car windscreen units, stepper motors, 24v Garage door openers which is the type shown in this tutorial.

One of the hardest specifications to find in off the shelf power supplies is higher current outputs as most commercial supplies are very limited in this regard. That is what we shall be dealing with here. Commercially you would need to have very deep pockets for a 10A supply in the order of 100's.

The 24V garage motor chosen for the powering of the mill bed is quite efficient at less than one amp current draw, my car windscreen motor is at least double this if not more.

But, if you are going to the trouble to build from scratch then you might as well build a good-un. This supply will eventually be able to handle 25A but for now we'll concentrate on around 4A output (the limit of this transformer) with a voltage range of 1.5-30V.

So lets get on with it and see the basic components required

In this first picture we have the transformer at the top, this is a 12/24V type at 50VA. ( that's volts x amps =50, so at 12V it has roughly 4amps and at 24V it has 2 amps)
Middle row from the left:
a 5KOhm pot or potentiometer (same as a volume control on your stereo) This one is a fancy 10 turn type (ten turns from zero to full instead of the normal one turn)
Just use a cheap one turn type. less than a quid.
Next is the voltage regulator chip No' LM338T, this is a 1.2V-37V variable type
3rd is a standard resistor, in this case 100 Ohm, 120 would be better but I don't have one. The value is not that critical for a variable voltage supply, something close will suffice. If you were making a fixed voltage output then this would need to be exact.
Next we have the rectifier, this one is four diodes in one package, we could use four individual diodes to do the same job. I find this tidier and easier. less to think about...

Finally at the bottom is something to build it all on. You could use almost anything but beware of strip boards, their thin conduction strips will not be able to carry the currents in this application.



Believe it or not this is all you need to build this supply as I am about to demonstrate....

More coming, the supply is built and tested  :thumbup:

Some links

LM388T Voltage regulator, I bought mine for about a quid each off ebay
http://www.national.com/mpf/LM/LM338.html

Rectifier, you can find these on Ebay easily enough, mine is 25A but 6A would suffice for the mill drive.
http://www.datasheetarchive.com/D25XB60-datasheet.html


« Last Edit: May 08, 2009, 03:57:20 PM by Darren »
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #1 on: May 08, 2009, 02:50:02 PM »
Lets start putting this together,

Place the voltage regulator and rectifier as shown



Then with a pair of long nose pliers bend the leads of the resistor similar to this. Beware, do not bend the leads close to the body as they usually fall off if you do !!



It goes here between the left adjust and middle output leg of the regulator. The resistor itself has no orientation.



Then add a link from the positive leg of the rectifier to the input of the regulator. I used a wire from some household twin and earth cable.
Note: the middle two legs of the rectifier are for the AC input from the transformer. The outer two legs are + and -, but yours may be swapped around in relation to mine. Just be aware and connect accordingly.



Things will be getting a bit wobbly by now, so time to solder some parts in place. Although the regulator is a fairly tough device, try not to heat it up too much with the soldering iron. In other words get in, melt the solder and get out.



Prepare a pair of wires to connect to the transformer. I find with multi-strand wires it's often easier to tin them first. (pre-solder)



Solder these wires to the board to the AC connections on the rectifier. Again there is no orientation.



Add a wire link on the left as shown. This is the DC negative rail.



The grey wires shown here are connected to the pot and the black and red go to the motor.



I'mm missing a picture, I'll be back....hold on..... :doh:

You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Brass_Machine

  • Administrator
  • Hero Member
  • *****
  • Posts: 5202
  • Country: us
Re: How to Make a Power Supply
« Reply #2 on: May 08, 2009, 02:51:15 PM »
Awesome Darren! I was going to PM you this week because I have to build a power supply. I have to build one for THIS. Can you assist with the design? Or will this work (your thread).

Eric


 :nrocks:
Science is fun.

We're all mad here. I'm mad. You're mad.

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #3 on: May 08, 2009, 03:10:34 PM »
Eric, This supply is perfect for your needs. As I said this is a very handy supply to have around as it has so many uses :thumbup:
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #4 on: May 08, 2009, 03:44:45 PM »
The grey wires connected to the pot, only two wires used. On a normal pot (unlike this one shown as it's the only 5K I had to hand) use the center and one outer connection. If the pot works the wrong way around use the other outer connection.



One grey wire goes here, the other to the negative rail.
The red wire goes to the motor, the other motor wire also goes to the negative rail





All you need to add now is a heat sink, I used some alluminuim strip, black as it's anodized but there is no requirement for this. You could use steel, brass etc, just don't make it too small. A propper finned heat sink would be better. Computer heat sinks or one from a salvage hifi amp would work well.

Be aware that the casing of the regulator is at full positive output voltage. Do not short this to earth. I have used an insulation kit to isolate the regulator it from the heatsink. The rectifier is already insulated so no need to worry about that. Some heat transfer paste would also be a good idea, it's the white stuff between the components that you can see oozing out.

I have attached a voltmeter and a temperature probe to keep an eye on things whilst testing.
The highest heat generated is at the lowest voltage output as the regulator gets rid of the unwanted voltage in the form of heat. As you turn the voltage up to increase the motor speed for example, more voltage/energy goes to the motor and everything runs cooler.
If you find you use the lower voltages all the time and have no need for the upper end then use a 12V transformer. Gives the regulator less work to do.

However, I found that even a stalling speed of the motor for over an hour the regulators temperature never rose above 90 deg C. it's rated at 125C.
The reg has a safety feature in that it will shut down to protect itself if it's pushed too hard or gets too hot (same thing as far as the reg is concerned) It will operate again when cooled a little.

So there we are, that is all that is required to make a variable voltage power supply of 1.2-30V, or up to 37V if the transformer had a higher output.
If you want just 12 or 18V then just use a lower voltage transformer, no circuit changes are required.


Here it is at 1.3V during the punishment test


At 4.3V



30V





You can by all means use this circuit as is, but we can make it better. In the next installment I'll be showing how to make the output smoother and how to protect the chip from short circuit accidents. You might not think you need this cos you are going to be careful right  :thumbup:

Why do you think I had to order some new regulators to make this post  :doh: Yep I popped a chip.

So if you bear with me I'll be showing you how to add two small and cheap components to prevent this  :thumbup:

« Last Edit: May 08, 2009, 08:12:17 PM by Darren »
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline sbwhart

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3497
  • Country: gb
  • Smile, Be Happy, Have Fun and Rock Until you Drop
Re: How to Make a Power Supply
« Reply #5 on: May 08, 2009, 04:23:54 PM »
Wow Darren that's great work.

 :clap: :clap: :clap: :clap: :clap: :clap: :clap:

Even I could follow that

 :thumbup:

 :ddb:  :nrocks:  :ddb:  :nrocks:


Stew

A little bit of clearance never got in the road
 :wave:

Location:- Crewe Cheshire

Offline Divided he ad

  • WARNING: LIKES SHINEY THINGS
  • The Collective
  • Hero Member
  • *****
  • Posts: 1957
  • Country: gb
  • Between Chester, Wrexham, ruthin & Holywell :-)
Re: How to Make a Power Supply
« Reply #6 on: May 08, 2009, 04:29:23 PM »
Now what more can I add.... Stew's just told you all you need to know!!


An "electrophobe" who is happy to make a circuit  :zap: cause of the well detailed post  :thumbup:





Awesome  :nrocks:  Indeed  :thumbup:




Ralph.

I know what I know and need to know more!!!

Offline SPiN Racing

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 505
Re: How to Make a Power Supply
« Reply #7 on: May 08, 2009, 07:08:49 PM »
Very Nice :)

Im taking notes for another project I did in the past....
SPiN Racing

Baldrocker

  • Guest
Re: How to Make a Power Supply
« Reply #8 on: May 08, 2009, 09:18:06 PM »
Nice.
Down to DSE to get a couple of parts tomorrow.
BR   :zap:

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #9 on: May 10, 2009, 02:40:34 PM »
I have not forgotten about this, I wanted to make a video to explain a couple of points before continuing, but my phone has died.

Please bear with me till I can get this sorted and don't make a power supply just yet as there will be some changes to the circuit.
There is only a little more to do but I need to explain why before continuing.... :ddb:
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline CrewCab

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 852
Re: How to Make a Power Supply
« Reply #10 on: May 10, 2009, 05:18:25 PM »
Brilliant stuff Darren, thanks  :thumbup: ................ looking forward to more  :coffee:

CC

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #11 on: May 10, 2009, 07:01:47 PM »
I've been asked by PM what exactly is an insulating kit used for the regulator chip.

It consists of a silicon sheet as the insulator and a "top hat" nylon washer all held together with a 3mm nut and bolt.

Often heat sinks are fixed to the units chassis for stability and further heat sinking. This chassis is of course grounded, or at least should be, so we don't want the chip shorting out if this is done.

You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Bernd

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3684
  • Country: us
  • 1915 C Cab
    • Kingstone Model Works
Re: How to Make a Power Supply
« Reply #12 on: May 10, 2009, 08:17:01 PM »
Darren,

Don't forget to add the silicone grease under the chip so it can transfer the heat better to the aluminum plate.  :)

Bernd
You can't fix "STUPID".

Offline SPiN Racing

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 505
Re: How to Make a Power Supply
« Reply #13 on: May 12, 2009, 10:00:59 PM »
I have a simple (I think) question for you about the power supply...

I have a power supply similar to what you are doing. It runs a headlight motor from a Mazda. I also wanted to be able to control the speed of it, and have it go faster, and slower.

In order to do this simply I got a transformer and a bridge rectivier (square block with two diodes to make AC into DC) and then ran the output to the motor.
To vary the voltage I used a Light dimmer switch, which allowed me to vary the incoming voltage to the transformer, and dropping the voltage out the other side.

The issue is.. I dont think its very smooth as it does generate a decent amount of heat. The regulated Video Game power supply I had previously, worked very very well, but wouldnt go over about 15 volts. (Was a Peter Chou regulated style)

I gather putting a big capacitor in the circuit will smooth things out.. but honestly I dont know where.. or if you put it across the circuit.. or inline... or use two etc..

Suggestions?

Line-O-Cad
SPiN Racing

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #14 on: May 13, 2009, 03:43:40 AM »
Hi Spin,

I'm about to cover this issue, hopefully later today. But yes capacitors are used. What you have there is not true DC and that is why things are running hot.
That power supply as it is will stress the motor.

You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #15 on: May 13, 2009, 09:29:12 AM »
At last I've managed to put a vid together,

My mobile died, I've tried four others that failed for one reason or another, mostly poor sound or simply won't talk to the computer.... :bang:

So I ended up using a web cam connected to my laptop, mostly held by hand so the vid is a bit jumpy. Then there were software issues  :bang: :bang: :bang:

But it's done now  :D, I'm no movie maker or commentator so please excuse the amateurishness of this vid.

Hopefully it will answer a lot of questions and throw some light on the matter.
I doubt I've covered everything so any questions please speak up.  :ddb:

Enjoy....




Agg...the vid is too long for Photobucket.....oh the joy of computing !!!

Hang on......
« Last Edit: May 13, 2009, 09:35:41 AM by Darren »
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #16 on: May 13, 2009, 10:41:16 AM »
OK, vid now split into two, hope they don't bore you...... :ddb:





You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #17 on: May 13, 2009, 05:16:20 PM »
A little more playing with this tonight, but first let me show you a better picture of where the two diodes go and their orientation.



We use these to protect the discharging energy from the smoothing caps when the circuit is switched off. Caps are in some ways like little batteries, except they can store quite a lot of energy. Even worse they can discharge all of it in an instant which is what they want to do when the power is switched off. The energy released from the caps will try to find the path of least resistance to dump to. This unfortunately is through the regulator chip. The diodes offer a new path of no resistance thereby diverting any possible catastrophe away from the regulator.

Most manufacturers will declare that this type of regulator has built in protection within, in the form of a diode. Maybe it has, but don't believe it with do as it says on the tin for a moment.
Maybe with lower voltages and currents it would be fine. But not here.


Now that the protection has been added it's time to think about some smoothing capacitors. But first I have added an extension to the neutral/earth rail to assist connection and mounting.
Bottom right of the board.



Now the caps, both negatives connected to the new earth rail.



And from one cap positive to the live bar/regulators input pin (3rd pin)



Positive from the other cap to the regulators output, (middle pin)



Now we have compleated the power supply smoothing and protection circuits.... :ddb:





You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #18 on: May 13, 2009, 05:37:04 PM »
Some of you may have noticed that I have changed the resistor and indeed added another....

The original was 100 Ohms, and the two new ones are both 220 Ohms 1/4watt. When the circuit was first put together I used the manufactures recommended values.

However, as is usual, some testing and fiddling showed that the above sizes give us a closer result to our needs.... :smart:
There are online calculators to work this out for you, but I find a bit of fiddling works best.



Regarding the second resistor on the far left is inline with the adjusting pot, (in series) basically this adjust the lowest voltage output from 1.2V to a more usable 2.5V.
If we leave the lowest voltage at 1.2V what happens when we turn the pot down to slow the motor is that it will stop. This is highly undesirable if you are in the middle of machining and merely wish to slow the transverse speed. Adjusting the values in this way will always insure that when you turn the pot fully down you are at a nice comfortable slow speed setting.
(it also puts far less stress on the circuitry if you turn it down low enough to stop the motor and forget to switch the power off. Left in this state the circuit will become very hot and may possibly damage itself. This way you have to turn the power off to stop the motor)

Finally in this picture you can see that I have added a push to break switch inline with the adjusting pot. It's the one with the red button.

When the adjusting pot is turned to a higher resistance setting this will increase the speed of the motor. Lower resistance lowers the motor speed.
The "push" switch breaks the circuit offering an infinity resistance, ie very high. When the button is pushed the motor will spin at full speed. Useful for rapid transverse.
Let go of the button and the motor will resume to the pot setting speed as set previously.
This is useful not only for momentary rapid transverse of the mill bed, but it also allows you to leave the pot alone when you have found a comfortable cutting speed.




Well that's it, the power supply is done. This will provide 2.5V-34V at 5 Amps. 7-8A if you add a bigger heat sink, but I wouldn't recommend it as there are better ways to achieve this which I shall go into if anyone requests.

All you need now is a reversing switch and a box to put it in........ :nrocks: :nrocks: :nrocks:
« Last Edit: May 13, 2009, 05:39:50 PM by Darren »
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Divided he ad

  • WARNING: LIKES SHINEY THINGS
  • The Collective
  • Hero Member
  • *****
  • Posts: 1957
  • Country: gb
  • Between Chester, Wrexham, ruthin & Holywell :-)
Re: How to Make a Power Supply
« Reply #19 on: May 13, 2009, 07:20:26 PM »
Fair do's chief   :bugeye:  You've been working hard on this one today  :thumbup:


Very good videos, I think you sound like the guys on the videos they used to play for us to watch in science and engineering in school.... That's not a bad thing, you sound like the guys who used to narate.... Made me want to make paper airplanes and throw them at someone :lol:

 I like the use of the oh so silly scope, it allows you to not only show/prove the workings but just looks too damn cool  :headbang: 


I'm going to need a parts list if you would be so kind, I've got my motor all mounted and ready, Been fitting my new verticle DRO on my Z axis tonight... Slight dramas!! But this isn't the place for that disclosure!  :offtopic: 

I'm getting my mill up to a good working order DRO's getting there and then just waiting for this circuit to be made and I'll be machining hopefully much more accurate parts?!  :)



It is true that  :mmr: and that  :nrocks:    Top job, thank you  :thumbup:






Ralph.
I know what I know and need to know more!!!

Offline SPiN Racing

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 505
Re: How to Make a Power Supply
« Reply #20 on: May 13, 2009, 11:54:29 PM »
VERY NICE!!!!

Thanks A Ton!

I will put that in the brain box and let it rattle around and see what comes out  :D







 :proj:
SPiN Racing

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #21 on: May 14, 2009, 07:05:41 AM »


I think you sound like the guys on the videos they used to play for us to watch in science and engineering in school....

Does that mean you fell asleep  :ddb:

I realise it must be droll viewing, but necessary to explain why certain components are used and indeed required.

I'll sort out a parts list later  :thumbup:
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #22 on: May 14, 2009, 07:23:03 AM »
VERY NICE!!!!

Thanks A Ton!


Thanks for the feedback, I just hope it was clear enough and not an overload of info to put anyone off.

I realise it looks complicated, but in reality it's a very simple and well respected circuit.

Years ago you would have had many more components to put together to do the same job. Nowdays they pack much more of the circuit into chips, thankfully...!!

This is what is inside the regulator, imagine having to get your head around this, let alone build it...

First image

image 17 is basically what has been built here

http://www.datasheetcatalog.org/datasheet2/8/0ujhh2scud4dfop1xfyut2u2qopy.pdf
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Darren

  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 3800
  • N/Wales
Re: How to Make a Power Supply
« Reply #23 on: May 14, 2009, 07:25:37 AM »
You will find it a distinct help… if you know and look as if you know what you are doing. (IRS training manual)

Offline Divided he ad

  • WARNING: LIKES SHINEY THINGS
  • The Collective
  • Hero Member
  • *****
  • Posts: 1957
  • Country: gb
  • Between Chester, Wrexham, ruthin & Holywell :-)
Re: How to Make a Power Supply
« Reply #24 on: May 14, 2009, 01:27:56 PM »
Quote
Does that mean you fell asleep   :ddb:


I plead the fifth!   :D  ( my usual daily routine involves falling asleep in front of my computer, usually just after I get in from work and helped along by my literature induced narcolepsy!   ::) )



The first image can take a running jump.... I ain't soldering that lot up!!


Without the key that circuit you posted is a little like Welsh to me... I can read it and basically pronounce it.... But I sure can't understand it and use it!   :lol:

Well, I can identify the resistors (variable with the arrow) the chip (cause it's labled) and the capacitors 1 and 2..... Now what I don't know of, is that there reason why C2 is sad!?

The symbols used there are the old ones right?  I never used the zigzag resistors I had to draw little rectangles!.... Schools, full of jobsworths who do just as the curriculum states.... Something to do with losing their job? (I have 4 mates who are teachers.... I do like to tease them about their lack of teaching freedom! )


Anywho... Still much appreciate all your works on this  :thumbup:




Ralph.

I know what I know and need to know more!!!