View previous topic :: View next topic |
Author |
Message |
princejude
Joined: 07 Aug 2010 Posts: 72
|
Is it possible to control current with PWM ? |
Posted: Wed Nov 02, 2011 2:51 am |
|
|
Hello Everyone!!!
Please i want to design a 12v 20A Automatic Battery Charger and i would like to regulate the charging current in a way that if the battery voltage is below 70% the charger will charge with full charging current of 20A. If the battery voltage rises to 85% the charger will reduce the charging current to 10A. If the battery voltage increase to 95% the charging current will be reduced to 2A.
I asked someone and he said that i will use PWM. I am not sure if PWM will work because i thought that PWM is used for voltage and not current.
Pls your advice or links will be appreciated.
Thanks in advance. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19361
|
|
Posted: Wed Nov 02, 2011 3:12 am |
|
|
OK.
Generally, PWM, generates voltage _pulses_ but if you feed these pulses through a filter (inductor/capacitor), you get out a relatively stable voltage. Now voltage and current tie together. For a given voltage into a load (battery or whatever), you get a particular current. If you want to increase current, you have to increase voltage. So you regulate current by adjusting voltage. Current regulator circuits turn down the output voltage till the current is what is required. The difference is what you sense. For a voltage regulator, you read the voltage being generated, and regulate till this is what is required, while for a current regulator you adjust the voltage till the current is what is required.
The hard thing historically is sensing current. At 20A, you don't particularly want a sense resistor. Look at devices like the Allegro ACS758 family Hall effect sensor as far superior.
Then your algorithm will need to be more complex than you describe. A battery that has (say) 12.2v terminal voltage 'no load' and is therefore around 50% charge, will have an endpoint voltage charging at Xamps, that could be 14.5v or more (depending also on the lead/connection resistances etc....). If the battery is 'hard wired', and you know the drop is constant, you can measure this voltage and adjust accordingly (this is how alternators in cars etc. generally work). However more modern chargers that can handle a variety of batteries, momentarily disconnect the charging power, wait a fraction of a second, and then measure the cell voltage. Also by measuring the rate at which the voltage falls when the charging source is disconnected, and the endpoint voltage when charging, you can estimate the condition of the battery as well. Using these figures the current that is then applied for the next few seconds can be regulated.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9171 Location: Greensville,Ontario
|
|
Posted: Wed Nov 02, 2011 5:19 am |
|
|
Have a look at the website that makes the 'battery tender' series of chargers.In their FAQ area they show almost everything you need to know about charging batteries(different types, rates,curves,etc.).It's important to get the right recharge conditions ofor the battery type you're using !I'm not endorsing the company or products, just found the site to be a good resource of 'how does it work ?' |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
Current Mode control. |
Posted: Wed Nov 02, 2011 10:21 am |
|
|
The answer to your question depends on how much work you want a PIC to do and your answers to lots of other questions.
e.g.
1. Where is your power coming from?
2. Are you proposing to use a 50Hz transformer?
3. Do you want to have power electronics on the live side of a high frequency transformer?
4. How will you sense current?
5. How are you going to drive your switching devices?
6. Do you intend to temperature compensate the battery float voltage?
7. etc.
In classic analogue devices like the UC3842 family there are two control loops, a current loop and a voltage loop. The voltage loop compares the output voltage against a voltage reference to create a current demand signal. This current demand signal is the reference for the current loop. The switching element is turned on at the start of each cycle, as the current ramps up it's compared against the demand signal, when the current exceeds the demand the switching device is turned off. The whole system is resistant to short circuits on the output and produces a well regulated voltage output.
The advantage of current mode is it's easier to control than PWM voltage. In control loop speak you've got fewer poles to deal with.
Mike |
|
![](templates/subSilver/images/spacer.gif) |
princejude
Joined: 07 Aug 2010 Posts: 72
|
|
Posted: Fri Nov 04, 2011 2:33 am |
|
|
Thanks for all your quick reply.
Hello Mike, let me try to answer some of your questions.
1. Where is your power coming from?
1. My power will come from mains through 220V-12V 25A 50Hz step-down transformer(I will design & construct it)
2. Are you proposing to use a 50Hz transformer?
2. Yes.
3. Do you want to have power electronics on the live side of a high frequency transformer?
3. No because i will like to start with 50Hz transformer(if possible ?) because is a bit difficult to buy high frequency components in my area.
4. How will you sense current?
4. I don't know yet because my target charging current is 20A and is not proper to use resistor sensor as Ttelmah suggested in his first reply.
5. How are you going to drive your switching devices?
5. Which switching devices ? I just start this project recently, I have not decided on the design technique i will use. Am new to this particular project, that is why am asking for ideas because i don't know if i will use pwm or buck converter, etc. Please i will like any sample project if anyone have or know where to get them.
6. Do you intend to temperature compensate the battery float voltage?
6. Yes if it is necessary and simple to do.
7. etc.
7. etc
Thanks for your time. |
|
![](templates/subSilver/images/spacer.gif) |
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Nov 04, 2011 6:09 am |
|
|
A PIC can do all the computation and logic you will need. But you need to spend some time designing your power hardware before you get too involved with programming. Switching devices and current sensing are key, and not really the domain of this forum.
A better forum might be www.edaboard.com, but I suggest you get a book on switcher design, or read app notes from switcher chip manufacturers. Even if you don't use their chip you will learn the theory of how switchers are built. Once you know what the muscles will look like you can work on the brains. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
Power switching |
Posted: Fri Nov 04, 2011 10:25 am |
|
|
I fully endorse SherpaDoug's comments. I will add that driving the parasitic capacitances of power switching devices is not trivial.
Back in August 2011 I had a dialogue on switching circuits in relation to a proposed buck-boost regulator (on this forum). All my comments then are relevant to you.
You have said that high frequency transformer materials are difficult in your area. If that's the case, what are you going to use for your choke core. Which ever topology you go for, (buck, boost, buck-boost etc) you will need some form of high frequency choke.
Again you need to have a play with your power stage. When you get it wrong, you can very rapidly convert expensive silicon to vapour.
Best of luck
Mike |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9171 Location: Greensville,Ontario
|
|
Posted: Fri Nov 04, 2011 11:39 am |
|
|
Since you say getting parts may be hard, I suggest you design and build a 3 step linear supply, based on your comments, it's probably the easiest and safest charger for you.
Design it it stages, 1) a 2 A supply, 2) a 10A supply , 3) the 20 A supply then program a PIC to switch one section on depending on the battery voltage(<70%,<80%,95%.
While not efficient, linear supplies are easy to design,build and cheap too !
And they will take a lot of abuse without costing you $$$$ on blown parts.
Google 'current limited power supplies' or similar to find suitable designs for whatever parts you can find locally. |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
SCR Option |
Posted: Sat Nov 05, 2011 8:18 am |
|
|
If you want a thermally efficient design you could use a Thyristor (SCR). You control the phase angle with your PIC. Monitor current with a low value resistor and a 3140 type OPA. The OPA will bring the low voltage across the resistor into the 0-5V range for your PIC. The problem with SCRs is the current will be rather peaky. You get round that by including some inductance (cheap laminated iron cored) in your current path. The choke acts as a flywheel smoothing out the current flow. To check on what is going on I am assuming that you have access to an oscilloscope.
Put the choke in the AC side of your bridge rectifier and you get automatic short circuit limitation even if everything else fails.
This way you get an efficient charger with all the bells and whistles in a single stage. SCRs are reasonably cheap and robust, they've been around for decades.
Mike |
|
![](templates/subSilver/images/spacer.gif) |
|