Go to Otherpower.com Home Page Go to Forcefield Shopping Cart Go to Wondermagnet.com Home Page
Front Page - [Homebrewed Electricity-- (wind) (solar) (hydro) (steam) (controls) (storage) (mechanical)] - Classifieds - Site News
Everything - Newbies - [Remote Living-- (housing) (heat) (light) (water)] - Reviews - Diaries - Our Products
Programming the PWM dump load controller


By elt, Section Controls
Posted on Thu Aug 02, 2007 at 12:48:35 AM MST
How fast is a lead-acid battery?

Hi all,

I'm programming the PWM dump load controller discussed in this thread (http://www.fieldlines.com/comments/2007/7/5/172519/4320/19#19)

Here's a picture of the (partially populated) board including my "FET driver chip" on the right ready for insertion -


All the parameters settings are field programmable via the single push button and yellow LED. (It's sort of like programming an X10 device - crude and a bit tedious, but doable.)

My dump load is abut C/5; my PWM runs about 3.8kHz and is programmable in 1% steps so I can load the battery from C/5 to C/500... my question is how long to I have to wait before I see a response in the battery voltage from a (small) change in the load? (How long do I wait between changes in the PWM duty cycle while I'm trying to maintain a particular voltage?)

Somewhere I thought I saw a post saying "a few milliseconds" but I can't find that any more. I Google'd and found lots about the load response in Lithium batteries (a few milliseconds, generally always less than 100ms) but nothing on the load response of lead acid batteries. If had access to an oscilloscope I'd just take a look but I don't...

Thank you,
- Ed.

Programming the PWM dump load controller | 9 comments (9 topical)

Re: Programming the PWM dump load controller (3.00 / 0) (#1)
by Flux on Thu Aug 02, 2007 at 08:01:59 AM MST

I don't follow the question.

There are several time constants associated with a battery but I can't see why it should affect your controller.

Long term ( very long) you have the voltage associated with state of charge.

Short term you have the change of voltage associated with the surface charge ( almost a polarisation effect).

Instantaneously you have a direct change of voltage associated with the internal resistance.

Why does any of this bother a controller as long as it is reasonably fast. I believe some controllers such as the C40 are so slow that instantaneous changes in wind generator current can momentarily raise the volts high enough to trip inverters on over volts. This has no effect on the battery but is a nuisance and I can't imagine a controller needing seconds to act.

Under certain conditions a wind generator could produce a significant change in about a second, if a processor can't cope with that then I will stick to analogue things that I understand.

Flux



Re: Programming the PWM dump load controller (3.00 / 0) (#2)
by elt on Thu Aug 02, 2007 at 11:37:43 AM MST

Hi Flux,

I see that battery voltage changes with load. This article
http://www.wind-sun.com/PDF_Files/battvoltandsoc.pdf
for example, shows approximately an .8 volt difference between a C/10 and C/5 discharge rate in a 12 volt battery... of course that varies a bit with SOC but my question is - if my controller changes the load from C/10 to C/5, or vice versa, about how long of a delay would there be to see a more or less stable voltage corresponding to the new load?

Would the delay time for changing from a C/15 to C/10 load or a C/20 to a C/15 load be longer, shorter or about the same?

Thanks again,
 - Ed.

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#3)
by Flux on Thu Aug 02, 2007 at 12:32:12 PM MST

I can't help feeling that you are confusing yourself.

Yes if it is just on discharge then there will be a volt drop from the internal resistance. If it has been on charge then this drop will also drain the surface charge and as well as the instantaneous drop there will be a drop in a few hundred ms due to removal of surface charge.

You need to get the digital boys to sort your programming problem, but the digital solution has ultimately to be the same as analogue.

The thing you need to monitor is battery voltage, when this changes for whatever reason you need to alter pwm so as to correct the change in voltage. If volts change instantly you need an instant change in pwm. If volts change slowly you need a slow change in pwm.

As long as you can sort the mess out in less than a second then there will be no problem. If you are too slow then the volts may go out of limit long enough to cause other problems. Doing this with analogue methods you have to maintain stability and there are tricks to keep thing stable ( Nyquist, Bode and more often just experience and good luck).

I am sure there are the digital equivalents of filters and time constants and methods of maintaining stability but they are beyond me, but processors surely are so fast that this is not a big issue. You must surely use volts as your basis and not worry about what volts do when you change pwm.

Flux

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#4)
by elt on Thu Aug 02, 2007 at 02:13:46 PM MST

Hi Flux,

I'm sorry that my example wasn't clear; in my mind, my question is! I guess I'm just having trouble asking it. Basically: how quickly does battery voltage respond to a change in load?

It doesn't matter to me if answer isn't as simple as "x" milliseconds; I could program a ten variable parametric equation (but I'd rather not!)

Unfortunately, we don't get much wind in the Summer so just putting the thing on my mill won't give me much info.

Thanks again,

- Ed.

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#5)
by Flux on Thu Aug 02, 2007 at 02:50:25 PM MST

The resistive volt drop component is instantaneous, but the changes of surface charge probably take a few seconds when near full charge to take full effect. When well below full charge you will see mainly the resistive volt change. The magnitude of which depends greatly on the type of battery and the current as a factor of the capacity so I suppose that your Cx does influence that.

As far as I can see, you need to measure the change in voltage as quickly as you can. At least in the analogue case the larger the time constant you introduce in the measuring circuit the greater the problem of obtaining a stable solution. If you can measure the change in 10's of ms then I think you should be ok.

Sorry this digital stuff is better left to the young, I can't really help.

Flux

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#6)
by commanda on Thu Aug 02, 2007 at 09:21:38 PM MST

I did a similar control loop for a guy some years ago who was loading telco battery chargers.

The loop compares the instantaneous battery voltage with your reference, and increases or decreases the pwm one step at a time until the 2 voltages swap relative. So in effect it constantly hunts the other state, sort of like a flip-flop if you understand what I mean.

In your case, the sampling frequency has to be high enough so the load can ramp up and down in synch with changing charging current from your mill, without getting far enough behind that the instantaneous battery voltage rises far enough to hit the over-voltage cutouts on your inverters, as flux mentioned.

If it was me, I'd have a pot connected to an A-D input, and vary the sample time proportionally. Then you could fiddle it to suit your installation.

Amanda



Re: Programming the PWM dump load controller (3.00 / 0) (#7)
by elt on Fri Aug 03, 2007 at 05:39:43 AM MST

Hi Amanda,

That's a great idea!

The control loop timing is on a real time clock tick. I'll just store its period in the eeprom and set the parameter via the button and LED interface.

I don't think I'll have a problem running the control loop every 4 or 5 ms or perhaps every millisecond if I raise the system clock speed. (Am currently running at 2 MIPS, can go to 8 MIPS without needing an external crystal.)

I watch my 10 footer during gusts and it seems fairly responsive to changes in wind speed; it speeds up much faster than I would have guessed. I don't have a feel for how frequently the control loop needs to run but I think you're suggesting "pick a number and if the inverter trips, pick a smaller one." ... I can do that.

BTW - I did follow your suggestion for getting my two PCB layers aligned. While I haven't done a perfect job yet, I'm getting much better results than before.

Thanks again,
- Ed.

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#8)
by commanda on Sat Aug 04, 2007 at 02:54:07 AM MST

Think of it this way. If the pwm is 8 bit, 0-255, and if it steps every 5mS, it would be capable of going from zero to full scale in 255 * 5mS, or 1.275 seconds. I would suggest this is several orders of magnitude greater than you need for a 10ft (?) blade.

Amanda

[ Parent ]



Re: Programming the PWM dump load controller (3.00 / 0) (#9)
by BigBreaker on Mon Aug 06, 2007 at 09:32:53 AM MST

As Amanda suggests, the open circuit voltage of the stator will be quite stable since the RPM will be relatively constant.  There's a lot of inertia to that rotor assembly.

The voltage and current characteristics into the battery - especially when driving a load - may be noisy though.  The stator has inductance that will try to drive a current through an otherwise high resistance - IE your transitioning FET.  Definitely worth a pot to tweak the sampling period.

[ Parent ]



Programming the PWM dump load controller | 9 comments (9 topical)
Display: Sort:
Menu
· create account
· How to use the board
· FAQs
· search the board
· Google search the board

Login
Make a new account
Username:
Password:

Total Views
  120 Scoop users have viewed this posting.

Related Links
· http://www .fieldlines.com/comments/2007/7/5/172519/4320/19#19
· Also by elt

Powered by Scoop
You must be a registered user to post here. It's easy and free, and the link is on the upper right side of your page.
All trademarks and copyrights on this page are owned by their respective companies. Postings are owned by the poster, but may be deleted or moved at the ADMIN's sole discretion. The Rest © 2009 Forcefield.
You can Email the board ADMIN here. PLEASE include the username you signed up with!