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)] - Rants & Opinion - Diaries - Our Products
PWM Switch # 3


By bigkahoonaa, Section Diaries
Posted on Tue Feb 26th, 2008 at 07:26:14 AM MST
PWM Switch + Buck/Boost Controller

I've been looking at buck controllers to charge batteries.  It finally downed on me on the weekend that batteries can self regulate when needing a charge, and I don't need to regulate voltage when batteries need charging.  I need to regulate current going into batteries.

My first attempt at building a PWM switch could generate nasty volts/amps dips and spikes, so I'm trying to merge a micro controlled PWM signal with a SMPS buck/boost controller topology.  It's not an optimized circuit, but this is what I have now:



The LTSpice Model.  

Microcontroller signals are on the left.  The micro is optically isolated from the power circuit.  VPWM is the signal from a micro PWM pin.  M1 to M4 are 4 parallel MOSFETs.  Vcc on the right is MOSFET power. VGen is wind will voltage and Vbat is battery voltage.

A regular Buck/Boost topology would need a diode.  Anywhere I put a diode to regulate back EMF from the coil has little effect.

PWM Switch # 3 | 9 comments (9 topical, 0 editorial)

Re: PWM Switch # 3 (3.00 / 0) (#1)
by Flux on Tue Feb 26th, 2008 at 01:07:49 AM MST
(User Info)

You are slowly getting there this was the first dawning of reality.

Flux



Re: PWM Switch # 3 (3.00 / 0) (#3)
by bigkahoonaa on Tue Feb 26th, 2008 at 09:20:24 AM MST
(User Info)

Yes, I'm a bit slow at this stuff.  I's only taken me about a year.

[ Parent ]


Re: PWM Switch # 3 (3.00 / 0) (#2)
by BigBreaker on Tue Feb 26th, 2008 at 08:33:02 AM MST
(User Info)

Yes, looking quite good.

Just a thought... what if you put a pick up coil* around your power inductor to sense current for the micro? or used a Hall effect current sensor?  Both solutions provide isolation and may be a better analog solution.

I'm a bit concerned about using an optoisolator to convey an analog signal to the micro's A/D.  I guess I'm used to seeing them used for digital signals.  Perhaps Flux or Amanda has experience here.  My two cents would be to avoid trusting the opto's transfer function in the analog domain.

In later revisions I'd also expect to see a volt input from the high side of the battery bank and an RPM sensor from the rotor going into the micro.  It would be nice to have some beefy relays in place to short the turbine out if the MOSFETs cascade fail or some other shutdown event occurs.

*You could connect two coils to your micro if you have the extra analog input.  The coils would have different turn counts so that low current and high current conditions are well covered within the voltage range of the micro's A/D.  Diodes can protect against over voltages/currents.



Re: PWM Switch # 3 (3.00 / 0) (#4)
by bigkahoonaa on Tue Feb 26th, 2008 at 09:43:34 AM MST
(User Info)

Trying to get an opto like the 4N25/35 to operate linearly to sense an analogue signal can be a bit tricky.  The resistors on either side need to be adjusted.  I like the ideal of a Hall Effect sensor, but I've never used one.

I don't have it in this diagram, but the micro also has control over a bank of relays that can be used to divert current to dump loads or short wind mill coils.  I also have two RPM sensors.  One uses an LED and LDR to sense each revolution, but this one can only go down to about 90 RPM because of limitations on the micro operating at 4MHz.  The other senses frequency coming from the wind mill and converts it to RPM.

 

[ Parent ]



Re: PWM Switch # 3 (3.00 / 0) (#5)
by Flux on Tue Feb 26th, 2008 at 10:06:43 AM MST
(User Info)

Opto isolators can manage volts well enough but they are little use operating from shunts unless you use tricks to fool the voltage threshold.

Hall current sensors are excellent but a bit costly and greedy on power. They are probably justified to save all the hassle of using opto isolators with op amps and opto feedback.

Flux

[ Parent ]



Re: PWM Switch # 3 (3.00 / 0) (#9)
by BigBreaker on Wed Feb 27th, 2008 at 08:15:58 AM MST
(User Info)

Flux is right - the opto won't work as shown in the schematic.  The shunt will not provide the voltage drop for the opto's LED.

The pick up coil solution is complicated by the fact that it misses the constant current portion of the signal, like a transformer would.  If the current reliably dropped to zero at some point in the buck cycle, you could use that to rezero the sensor, but that isn't generally the case for bucks.

A Hall sensor or "going naked" might be your best bet.

[ Parent ]



Re: PWM Switch # 3 (3.00 / 0) (#6)
by mtbandy on Tue Feb 26th, 2008 at 11:24:46 AM MST
(User Info)

The usual way to measure current like this is to convert the small voltage across a known shunt resistance into a fixed frequency / variable duty ratio signal (so duty ratio becomes proportional to current) and pass this through an opto to the logic side of the circuit, so it swings from 0v to your ADC reference voltage (usually 5v). A simple low-pass filter on this signal results once again in an analogue level that you feed into your ADC. Have a look at the IR2175, it's a very nice current sense IC that does just this.



Re: PWM Switch # 3 (3.00 / 0) (#7)
by commanda (alwynne at unwired dot com dot au) on Tue Feb 26th, 2008 at 01:29:16 PM MST
(User Info)

I need to regulate current going into batteries.

Wish I had a dollar for everytime I've stated this.

The IL300 is a linear optocoupler.

Personally, I make the circuit ground be the end of the shunt, and use an op-amp to amplify the shunt voltage, and forget the opto.

http://www.fieldlines.com/story/2004/9/4/193922/2839

Amanda



Re: PWM Switch # 3 (3.00 / 0) (#8)
by domwild (domwild at hotmail dot com) on Tue Feb 26th, 2008 at 08:04:49 PM MST
(User Info)

Big,

Thanks for that. Interesting circuit. Like the idea of software rather than hardware changing the duty cycle of the PWM. Even I understand how a Picaxe can be made to change the PWM parameters.
dom There is one thing money cannot buy: POVERTY!



PWM Switch # 3 | 9 comments (9 topical, 0 editorial)
Display: Sort:
Menu
· create account
· How to use the board
· FAQs
· search the board
· Google search the board
· Old Otherpower Board

Login
Make a new account
Username:
Password:

Total Views
  132 Scoop users have viewed this posting.

Related Links
· LTSpice Model
· bigkahoonaa's Diary

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 © 2003 Forcefield.
You can Email the board ADMIN here. PLEASE include the username you signed up with!