Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:34 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Electronics : PWM loop gain

Author Message
frackers

Newbie

Joined: 06/11/2009
Location: New Zealand
Posts: 23
Posted: 04:34am 28 Jun 2011
Copy link to clipboard 
Print this post

Greetings all

I'm yet another person doing a DIY dump load controller for his wind turbine. I'll be doing the usual stuff with a big hairy dump load and a handful of MOSFETs. I'll be controlling this from an AVR micro which has a 10 bit resolution A/D converter.

I've scaled the input to the A/D so that I'm pretty close to FSD at maximum system voltage of 30v so I get to use all the bits.

I've found that providing over voltage protection with a shunt load requires a narrow working voltage range. I want the batteries to get up to float voltage (flooded lead acid, nominal 24v) of at least 27.5v and when charging I'd expect this to rise to over 28 but I need to protect my inverter which has a rated maximum of 30v.

Assuming I start to apply load at 29 volts and expect to use a loop gain on the error input that applies maximum load at 29.5 volts I only have 4 bits from the A/D for this range. Is this likely to be enough of a range or am I going to hit stability problems with low frequency hunting and indeterminacy from A/D quantization noise? I'd rather not be applying load too early because that means I'm not charging my batteries as efficiently as I'd like and I need full load on before the inverter pops.

Of all the designs I've seen, none seem to address the issue of loop gain or loop stability criteria or even A/D noise margins!! Its nearly 40 years since I played with Smith charts to plot stability and that was in analog systems :(

Cheers



Robin down under - or are you up over
 
RossW
Guru

Joined: 25/02/2006
Location: Australia
Posts: 495
Posted: 07:53am 28 Jun 2011
Copy link to clipboard 
Print this post

  frackers said   Greetings all
I've scaled the input to the A/D so that I'm pretty close to FSD at maximum system voltage of 30v so I get to use all the bits.
[/quote]
[quote]
Assuming I start to apply load at 29 volts and expect to use a loop gain on the error input that applies maximum load at 29.5 volts I only have 4 bits from the A/D for this range. Is this likely to be enough of a range or am I going to hit stability problems with low frequency hunting and indeterminacy from A/D quantization noise?
[/quote]

Assuming you have a 10-bit ADC, scaled linearly from 0-30V, that gives you (in theory) 29.3mV resolution. Take out ADC jitter etc, and you don't have much breathing space, for sure.

If it were me (but it's not me!) I'd add either another opamp as an offset, or some zeners (chosen for complimentary temperature coefficients) and wash off say 20V, to give you a "suppressed zero" that reads 20-30V (say). With 10.24 volts span, and a 10-bit ADC, you have a neat 10mV resolution. It's not a huge benefit, but it's still 3 times what you would have had, and gives you some "wriggle room" to oversample and/or average.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1212
Posted: 09:01am 28 Jun 2011
Copy link to clipboard 
Print this post

Hi Frackers,
With the pic based charge controller I'm designing is along similar lines to Ross's reply. As my system is 24 volts in my circuit I use 2 off 10 volt zeners then a 10K multi turn pot for the fine tuning. Then on the AD input pin I put a 5v1 zener for pin protection. Now by using 10 bit resolution you have 1024 readings, now just add 2000 to the AD reading and there's the voltage... Too Easy. I'm this in Oshonsoft Basic I use a routine to convert the raw reading to display on the lcd along with a decimal point. Now in order to set the dumpload one simply holds in the main button and the calibration screen comes up where one sets the voltage, when happy hit the main key and the program runs. This could also be done for a low voltage cutout too.

Cheers Bryan
 
frackers

Newbie

Joined: 06/11/2009
Location: New Zealand
Posts: 23
Posted: 10:00am 28 Jun 2011
Copy link to clipboard 
Print this post

  RossW said  
If it were me ... or some zeners (chosen for complimentary temperature coefficients) and wash off say 20V, to give you a "suppressed zero" that reads 20-30V (say). With 10.24 volts span, and a 10-bit ADC, you have a neat 10mV resolution...


Now that *IS* an interesting idea. I'll knock up some code up for the linear arrangement I have already and then all I have to do is add the offset to the voltage measuring function :)

To give a bit more detail of this project, I'm using an AVR Butterfly as the basic CPU and display and a couple of 1-wire devices: a battery monitor chip (DS2438) and a GPIO chip (DS2413). The DS2438 does charge counting as well as current, voltage and temperature measurement. The Butterfly has a realtime clock and 4Mbit of dataflash so I'm logging all the data (once per minute allows me to save 28days) and using the data for display and to control a load for when the batteries are full. The PWM controlled shunt load is just a belt and braces for when the charge rate is getting a bit too high!!

Just tried uploading a chart of the menu structure, which gives an idea of the functionality I'm after, but the file upload seems to be broken :( A pdf can be found here

All very similar to my Linksys router based system I've been flying with for the last 3 years or so here which allows me to track performance

Cheers all
Edited by frackers 2011-06-29
Robin down under - or are you up over
 
frackers

Newbie

Joined: 06/11/2009
Location: New Zealand
Posts: 23
Posted: 09:25am 29 Jun 2011
Copy link to clipboard 
Print this post

Well, I've tried the PWM without any offset to the analog input and it seems fine. More measurements to do but I didn't see any steps in the progression of the duty cycle as I wound the volts up from 28v (fully off) to 29v (fully on) when I did a short test.

I'll do a couple more tests but it looks like I have a non-issue... just the sort I like :)

I'll be putting this new project to use on my mill when I've made a decent shunt load and if it looks OK I'll put the code and schematics up for those that want to play with it.

Cheers

Robin down under - or are you up over
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024