Constant Current Power Supply

Home Sign Up! Explore Community Submit Electronics Projects: Constant Current Power Supply using Pulse Width Modulation...

0 downloads 97 Views 567KB Size
Home Sign Up! Explore Community Submit

Electronics Projects: Constant Current Power Supply using Pulse Width Modulation by drummer ian on March 16, 2008 Table of Contents intro: Electronics Projects: Constant Current Power Supply using Pulse Width Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

step 1: Intro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

step 2: Stage 1: Astable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

step 3: Stage 2: Monostable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

step 4: Stage3: Mosfet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

step 5: Stage 4: Current Set Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

step 6: Stage 5: Difference Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

step 7: Stage 6: Finishing UP! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

Customized Instructable T-shirts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

intro: 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!

step 1: 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.

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

step 2: Stage 1: Astable Chip(s): NE555 Inputs: none, this is turned on when the circuit is connected to the power rails Outputs: Pin 3 (output) goes to the trigger of the Monostable 'Circuit Diagram (see image) Build and Test Once built test the output pin (pin3) with an oscilloscope and alter the variable resistor to get the pulse width to around 16 micro seconds. If you do not have an oscilloscope, simply set the potentiometer to the middle of its resistance using a multimeter which should work almost as well!

Explanation When the system is on, pin 3 of the astable will oscillate between 0V and +5V. The mark and space of this astable has been set to a small space but a large mark. Having the output low for a short time enables the circuit to trigger the monostable accurately, and, if the monostableâ��s period is set to be very short it wonâ��t get triggered twice in one period of the astable. The output of this circuit goes to the trigger of the Ne555 Monostable. Every time the astable gives a falling edge the monostable will trigger for a set period of time dependant on its pulse width modulation. I have set the frequency of the astable to 60 KHz, this should be a fast enough sampling rate for the current to stay constant at all times, and however, it is not so fast that the monostable is triggered incorrectly, or the Mosfet being unable to switch on quick enough. f=1.44/(R1+2R2)C F = 60 KHz C = 1nF R1 = 50Kâ�¦ Potentiometer R2 = 1Kâ�¦ R1= 1.44/FC-2R2 R1= 1.44/((60xã�–10ã�—3 )(1xã�–10ã�—(-9)))-2000 R1 = 22Kâ�¦, this value is within the reach of the potentiometer I have, this means it will be easy to trim the circuit to get an accurate result. The Space (T2) will be set very short, this will make sure that, if the monostable has a short period, it is not triggered twice in one oscillation of the astable. T2=0.7(R2)C The Mark (T1) will be longer to accommodate the rest of the period. T1=0.7(R1+R2)C This means, to get a short T1 (short low pulse) I will need a small R2. This works out with my equations for the resistors based on the whole period, as, I have set R2 very small. With these values I get: T2=0.7((1xã�–10ã�—3 ) )(1xã�–10ã�—(-9)) = 0.7�µs, this is a very short period compared to the period for the whole oscillation: p= 1/f= 1/60000=16.7�µs. It will be short enough that even the most Pulse Width Modulated Pulses will not be short enough to fit inside the pulse. (-9)) = 16�µs T1=0.7((1xã�–10ã�—3 )+(22xã�–10ã�—3 ) )(1xã�–10ã�—

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

step 3: Stage 2: Monostable Chip(s): NE555 Inputs: Input pulse from astable triggers monostable, and Pin 5 (pulse width modulation) input from the difference amplifier. Outputs: Outputs pulses to mosfet to turn it on and off and allow current to flow for varying amounts of time. 'Circuit Diagram (see image) Build and Test Once built test the output pin (pin3) with an oscilloscope and alter the variable resistor to get the pulse width to around 8 micro seconds. If you do not have an oscilloscope, simply set the potentiometer to approx 1/5th of its resistance using a multimeter which should work almost as well! Your test should look something like image 3, test shows the astable output in blue, the red shows the monostable.

Explanation The monostable will be triggered when pin 2 has a falling edge; this means that every time the astable has a low pulse the monostable will trigger. When the monostable is triggered the output will stay high for a set period of time. The period of the monostable will be set to half the period of the astable. (16µs)/2=8µs This means that the pin 5 will be able to vary the pulse width either way by the same amount. Pin 5 on the Ne555 can be used to vary pulse width. I will be using this pin to achieve pulse width modulation which will keep the output current of my circuit at a steady value. The voltage at Pin 5 is allowed to vary between 0.45 Vsupply and 0.9 Vsupply, the higher the voltage, the longer the pulse width. To get the correct value for the pulse width, without modulation, I will use the following components: p=1.1 x R x C R=p/(1.1 x C) C = 1nF P = 8µs R=(8x〖10〗(-6))/(1.1 x 1x〖10〗(-9) ) = 7272� = 7.2K� Again I will be using a potentiometer as a variable resistor (R) in order to get the correct period.

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

step 4: Stage3: Mosfet Chip(s): 2N7000 Inputs: Monostable Outputs: Current Set circuit Explanation When the monostable output is high the monostable will conduct between V supply and 0V. The longer the period of the monostable the longer the Mosfet will conduct for.

step 5: Stage 4: Current Set Circuit Chip(s): no chips are used in this subsystem Inputs: Mosfet Outputs: Load, Difference Amplifier Build and Test Build but don't test yet, you will blow the LED (or whatever load device your using)

Explanation The current set circuit will take the ââ?¬Ë?pulsesââ?¬â?¢ of voltage from the monostable and smooth them out into a smooth voltage that can be used by the LED. Once the voltage has been smoothed by the inductor and capacitor, the Load (an LED in my circuit) will have a voltage across it, and, therefore a voltage across the small resistor (1âÂ?¦) it is in series with it will also rise. As I have set a low resistance very little power will be lost across it. The resistor has a known resistance so in my circuit I will use this to get the reference voltage for the difference amplifier, if the current through the LED gets higher, the voltage across the resistor will increase. The 1N5817 is a fast switch diode; because of the high frequencies used it will have to deal with very fast speeds otherwise the circuit may not work. LED current Calculation: The resistor in series with the LED is there to give a reference voltage to the comparator. By using a fixed resistance I can calculate the voltage across the resistor when a certain current is flowing through it. In this case I will be using 1mA as the current. I have selected a small value for the resistor 1âÂ?¦, this way very little power is lost across the resistor, and this is what helps to make the circuit an efficient constant current source. When the current through the LED rises to 1mA the voltage across the resistor will be: V=IR (-3) )=1mV

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

V=1 x (1x�10�

step 6: Stage 5: Difference Amplifier Chip(s): NE555 Inputs: Reference Voltage from potential divider, Voltage from current set circuit. Outputs: Output goes to pin 5 (pulse width modulation) input on the Ne555 monostable. Build and Test See next step

Explanation The job of the difference amplifier is to compare the two inputs and output the amplified difference. In my circuit this is used to compare the voltage across the LED with the voltage reference (preset current constant), it then will amplify this difference and output the voltage to the pulse width modulation pin of the monostable. If the current in the LED is too high, the voltage across the resistor will be greater than the reference voltage, this will output will be low, this output will be clamped by the diode so that it cannot go below 0V, this should stop any damage happening to the monostable. If the current in the LED is too low, the voltage across the resistor will be less than the reference voltage; the difference amplifier will output a high voltage to increase the pulse width of the monostable thereby increasing the current through the LED. The input for the reference voltage comes from a potential divider. As my circuit is designed to work at different power supply voltages, the Vin to the potential divider network must be constant and not follow the power supply rail. To achieve this I have used a voltage regulator in my circuit. This will give out a constant +5V as long as the supply rail is above +5V, this means change in supply voltage will not affect the reference voltage, this will mean the current will remain constant. To get an accurate 1mV from my potential divider I have used a potentiometer to be able to trim the voltage to an exact value. By changing this potentiometer the user can also change what the current limit is set to. Calculation for Potential Divider: Vin = 5V Vout ~ 1mV Use a 20K� Potentiometer for R2 to give an accurate voltage output when the tested and trimmed. The middle of the Pot will have the most adjustability either side so I will use 10K� in my calculation Vout=Vin x R2/(R1+R2) Vout/Vin ~ (10x�10�3)/R1 R1= R2/Vout xVin= (10x�10�3)/(1x�10�(-3) ) x5=50M� ~ 4.7M� Calculation for Difference Amplifier: The difference amplifier controls the voltage at pin 5 of the monostable. The Ne555 specification sheet states that this pin will vary between 0.45Vin and 0.9Vin; this means I must calculate to achieve a gain, large enough to give the difference amplifier a value in this range. 0.45x5=2.25 0.9x5=4.5 The middle of this range is what I want the difference amplifiers output voltage to be set to when the current is the correct value: (4.5-2.25)/2+2.25=Vout=3.375 Vout=Rf/Rin x(Va-Vb) Assume Vref ~ 2mV Vin = 1mV Rin = 1K� (-3)))=3.375M� (Vout x Rin)/((Va-Vb))=Rf= (3.375 x (1x�10�3))/((2x�10�(-3) )- 1x�10�

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

step 7: Stage 6: Finishing UP! Ok guys, we're nearly done here. Firstly check that your circuit looks like the circuit diagram below, check all wires go to the same places or your circuit will not work. Then, plug your supply rails in, and turn on, hopefully the LED will turn on and not blow! Adjust the potentiometer mostly the 12nd and 3rd ones) to get the desired current output (this is checked my measuring using an ammeter between the led and ground). Then...Your done! References http://www.edn.com/contents/images/257052f1.pdf

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

Related Instructables

Power LED's simplest light with constantcurrent circuit by dan

Circuits for using High Power LED's by dan

Super simple high power LED driver by Artificial Intelligence

1.5A Constant Current Buck Regulator for LEDs for < $10 by ohararp

high power LED grow lights M.k2 by }{itch

Fix a nonworking electronic fly swatter by Phil B

Tiny LED JackO'-Lantern by ZackScott Blinking Nightlight (by request) by inventorjack

Advertisements Customized Instructable T-shirts

Comments 24 comments Add Comment

victi_vicimus says:

Mar 17, 2008. 12:29 PM 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?

drummer ian says:

Mar 17, 2008. 2:47 PM REPLY

ahh sorry,didn't realise this problem! haha i will fix it as soon as i can

thermoelectric says:

Sep 2, 2008. 11:55 PM REPLY

I still get the gibberish

SynK says:

Apr 23, 2008. 11:06 PM REPLY 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 says:

Aug 6, 2008. 8:46 AM REPLY 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 says:

Aug 6, 2008. 9:45 AM REPLY

Thanks for straightening me out.

carlitoscr says:

Aug 6, 2008. 11:03 AM REPLY

It's been a pleasure!

hdh says: I want to run electroluminescent wire not LED’s will this type of power supply work?

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

Jun 2, 2008. 6:17 PM REPLY

carlitoscr says:

Aug 6, 2008. 8:23 AM REPLY 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.

cobrasniper555 says:

Mar 20, 2008. 11:12 PM REPLY 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 says:

Mar 21, 2008. 3:43 AM REPLY 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)

rayfalcon says:

Mar 18, 2008. 5:48 PM REPLY 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 [email protected]

drummer ian says:

Mar 19, 2008. 1:12 AM REPLY

all the values your looking for are on the full circuit diagram at the end of the instructable

computerwiz_222 says:

Mar 18, 2008. 7:29 AM REPLY 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 says:

Mar 18, 2008. 10:00 AM REPLY 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

computerwiz_222 says:

Mar 18, 2008. 12:25 PM REPLY 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 says:

Mar 18, 2008. 3:22 PM REPLY 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

Ahmedqatar says:

Mar 18, 2008. 5:16 AM REPLY

GREAT !!! Faved !!!

drummer ian says:

Mar 18, 2008. 9:53 AM REPLY

thanks!

the.russkey says: why not use something like a wilson current mirror wikipedia article( instead?

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

Mar 17, 2008. 6:51 PM REPLY

drummer ian says:

Mar 18, 2008. 1:18 AM REPLY

this is also a possibility, however, heat is lost across the transistors (making it altogether less efficient)

LinuxH4x0r says:

Mar 16, 2008. 3:28 PM REPLY

Cool! I needed this. Hopefully my parts come from ti on monday.

drummer ian says:

Mar 16, 2008. 4:08 PM REPLY

wicked! keep me informed on how it goes and feel free to ask for any help!

LinuxH4x0r says: Actually that was worded badly- The parts are mostly audio related.

http://www.instructables.com/id/Electronics-Projects-Constant-Current-Power-Suppl/

Mar 16, 2008. 5:45 PM REPLY