Instructables

Electronics Projects: Constant Current Power Supply using Pulse Width Modulation

Featured
Picture of Electronics Projects: Constant Current Power Supply using Pulse Width Modulation
Light an LED, Power a motor, this simple - ish circuit will accommodate all you constant current needs using NE555 chips! This is a great way to learn about electronics and although not as efficient as using a pre made buckpuck, this is more fun, cheaper and hopefully you'll learn something too!
 
Remove these adsRemove these ads by Signing Up

Step 1: Intro

Picture of Intro
Aim
To build on breadboard a circuit which will control the current across a load by using pulse width modulation for maximum power efficiency.
To operate the circuit the user will plug the circuit into a power supply; this will keep the load at a constant predetermined current.

Spec (don't worry about these bits yet, i will explain what these numbers mean later)
Power supply voltage: 15V,0V,-15V
Astable Frequency: 60KHz
Astable Space Period: 16µs
Astable Mark Period: 0.7µs
Monostable Period: 8µs (half the period of the astable)
Reference Voltage: 2mV
Output current: 2mA

Explanation
1. Astable oscillates when circuit is connected to power supply.
2. Falling edge of the astable will trigger the monostable.
3. Monostable will stay high for a variable period; this period is modulated by the difference amplifier.
4. Mosfet switches and allows current to flow.
5. Current Set circuit uses LC to smooth out the voltage into a DC flow.
6. Output is high, LED comes on.
7. Current in load gets too high.
8. Difference amplifier attempts to make this the same as the reference by changing its output.
9. Output of difference amplifier drops.
10. Period of monostable decreases.
11. Monostable on for less time per astable oscillation.
12. Mosfet switches on for less time.
13. After smoothing the voltage is less.
14. Less current across the load.
15. Difference amplifier output rises.
16. Monostable period increases.

Block Diagram:
Here is a diagram where i have split the project down into 'manageable' chunks, i will explain each chunk individually to help with the build.
russ_hensel8 months ago

One of the nicest breadboard layouts on instructables., Congrads.

omer05711 months ago
@drummer ian
i am working on my final project of constant current switch mode power supply.. i am wee bit worried as i didn't find any information related it's circuit diagram and working. i read your article but need more help. i am using a buck-boost converter & MOSFET for high frequency switching & PWM in feed back circuitry . do you have any circuit diagram and it's working please do share it with me i need your help badly.
my email is itsannonymous@rocketmail.com.
waiting for your reply
This is interesting, but I get a lot of gibberish where more unusual characters are not rendered by Foxfire, Internet Explorer or Apple Safari. Can you help?
use chrome :D
drummer ian (author)  victi_vicimus6 years ago
ahh sorry,didn't realise this problem! haha i will fix it as soon as i can
I still get the gibberish
jmcol5 years ago
I am sorry but 8 months after your answer to victi_vicimus, I still get a lot of gibberish like this on step 2:
"T1=0.7((1xã�–10ã�—3 )+(22xã�–10ã�—3 ) )(1xã�–10ã�—(-9)) = 16�µs"

It's a pitty because your article seems quite interesting and serious.
Its instructables fault...
Me too. Could you solve this problem, please?
drummer ian (author)  jmcol5 years ago
sorry about that, i will fix it soon i hope, i haven't been on in a while (uni seems to bog me down abit) thanks!
mbk.2k35 years ago
can you please re-upload this without all these random characters in between? makes for a very confusion read in some sections :)
marcia095 years ago
Hello, I´m new to this and am trying (hard) to make a display sign with leds; I have bought lots of leds I have soldered in parallel with 330 ohm resistors to make the sign. I also bought a breadboard, and a 555 IC and a 4017 IC, because I would like the first word (four letters) to flash as a whole, and the second word (8 letters) to flash sequentially. I succeeded in making my circuit on the breadboard, with one led representing the first word, and 8 leds representing the 8 letters of the second word, but now I have the problem to find a suitable transistor to amplify the power. The first led, coming out the 555 represents about eighty 20 mAmp leds (thus about 1.6Amp, right?) and the other 8 leds represents about 20 leds letters (so 500 mAmp should do). I have tried connecting a 2n2222 transistor on the breadboard with a flash lamp rated 500 mAmps instead of one of the 8 led (I do not want to make the tests with my mounted leds so as not to risk losing hours of soldering work) but it does not light up, not even a little. Then, I connected an led (5 mm) after the transistor and it blinks normally !! You seem like the expert on this, Can you help me ? Thank you in advance
SynK6 years ago
Umm, unless I am wrong, there is no way to get a constant current with PWM. It works by timing pulses of electricity with certain durations giving the illusion of varying voltage and amperage, while actually putting through the same current in "short spurts." If I am wrong about this, please e-mail me with a better explanation.
carlitoscr SynK6 years ago
You are right, that is how PWM works BUT you can still get constant current and/or voltage after you add the propper filtering network. These networks are normally RC circuits for linear power supplies or LC networks for switching supplies like this one. Non filtered PWM output swings from 0% to 100% of the output voltage. Propperly filtered outputs can have a ripple voltage less than 0.1% which renders the outupt constant in 99.9%
SynK carlitoscr6 years ago
Thanks for straightening me out.
carlitoscr SynK6 years ago
It's been a pleasure!
hdh6 years ago
I want to run electroluminescent wire not LED’s will this type of power supply work?
carlitoscr hdh6 years ago
For an EL wire you need relatively high voltage and frequency. As an example: 90Vac running at 2kHZ. You can check worldaglow.com or http://en.wikipedia.org/wiki/El_wire for more information.
Maybe a suggestion, but can you make a similiar device that outputs much more current and less voltage? Would this be possible on a similiar scale and funding? Also (it seems like this is a good place to ask), is there a way to up output of say an alarm clock? Like when the charge is send to the buzzer, can it be modified to a higher current by use of capacitors or what not? Thanks!
drummer ian (author)  cobrasniper5556 years ago
to answer your first question this circuit seems good up to about 20mA, which was the extent of my testing, it may handle more i don't know, i do know that the mosfet i used will be good up to around 350mA. Secondly, yes i believe it would be possible, i think what you would need is a transistor, a transistor amplifies current (perhaps some one with knowledge on this will chime in to confirm)
rayfalcon6 years ago
ok first off what type of capacitors and resistors and what uF and V and how many mF how much sensitivity and by u saying power source you mean a 120 vac wall plug? i need it fairly simply i had a seizure and lost all of my logical memory. also what size if any pot switches and is there any dip switches? if no dip switches can a person add dipp switches at the gateway and transverse or revers the flow into a diff direction or higher current and or a lower current? email me any detailed pics and or instructions please truckinforjesus@windstream.net
drummer ian (author)  rayfalcon6 years ago
all the values your looking for are on the full circuit diagram at the end of the instructable
I have one quesion. How do you get the wires so tight on your bread board. I love to proto my projects out on my bread board, but it almost always turns out to be a big mess of wires.
drummer ian (author)  computerwiz_2226 years ago
well, firstly thanks for the compliment :p, secondly, it's fairly simply to make them neat and takes very little time. Heres my method for making wires: 1. Check the length of wire you'll need 2. cut your wire from the reel a bit longer than this length 3. Strip one end of this wire (take about 0.8cm off) 4. fold this stripped bit over 90 degrees with pliars (this is i think the key step) 5. insert this into one of the holes on the board 6. check where wire needs to go to, mark the wire with your thumb nail to get the correct length 7. now take the wire off the board again 8. strip the wire up to the marked place 9. cut the stripped bit to 0.8cm 10. bend with pliars 11. insert into the board
thanks so much! Its funny, i learned to solder, make boards, read schematics etc. but i never learned how to properly bread board a circuit.
drummer ian (author)  computerwiz_2226 years ago
no problems m8, ask for any other advice, im far from an expert but i find laying out the breadboard neatly (although initially takes more time) dramatically reduces the time you sped fault finding
Ahmedqatar6 years ago
GREAT !!! Faved !!!
drummer ian (author)  Ahmedqatar6 years ago
thanks!
the.russkey6 years ago
why not use something like a wilson current mirror (wikipedia article instead?
drummer ian (author)  the.russkey6 years ago
this is also a possibility, however, heat is lost across the transistors (making it altogether less efficient)
LinuxH4x0r6 years ago
Cool! I needed this. Hopefully my parts come from ti on monday.
drummer ian (author)  LinuxH4x0r6 years ago
wicked! keep me informed on how it goes and feel free to ask for any help!
Actually that was worded badly- The parts are mostly audio related.