Forums

PWM from raspberry pi to control charging of a 12 V Battery, possible?

Started by Unknown February 17, 2013
Hi there, 

I just got a raspberry pi and was wondering if it is possible to use its PWM output to control current flow to a 12 V Battery (with an IGBT). My idea is to use a 300 W windmill, a simple AC/DC converter, a IGBT, and the battery at the other side. 

If voltage is above 13.8V, I reduce the current via PWM to fully charge the battery and disconnect the windmill as soon as the battery is fully charged. 

The windmill has a build in over voltage security system, so I think it can be ok to just disconnect the windmill. 

From the raspberry pi part, I think it's not a problem to read analog voltage and use PWM. My question is related to how can I connect the Pi to an IGbT and which circuit I need for that. 

Thanks
On Sun, 17 Feb 2013 08:38:47 -0800, olmo wrote:

> Hi there, > > I just got a raspberry pi and was wondering if it is possible to use its > PWM output to control current flow to a 12 V Battery
Almost certainly, but I don't know what sort of PWM speeds you can attain with a rasberry pi, so I can't comment on how practical it may be.
> (with an IGBT).
In IGBT is a poor choice in a circuit that's working on voltages around 12V. Even 120V is low for an IGBT to be a good choice. MOSFETs are generally better than IGBTs up to around 500-ish volts, IGBTs are generally better above 1000-ish volts, and in between it's a toss up.
> My > idea is to use a 300 W windmill, a simple AC/DC converter, a IGBT, and > the battery at the other side.
What do you propose to use for your AD/DC converter?
> If voltage is above 13.8V, I reduce the current via PWM to fully charge > the battery and disconnect the windmill as soon as the battery is fully > charged. > > The windmill has a build in over voltage security system, so I think it > can be ok to just disconnect the windmill. > > From the raspberry pi part, I think it's not a problem to read analog > voltage and use PWM. My question is related to how can I connect the Pi > to an IGbT and which circuit I need for that.
You need to do a lot of studying. From your quote of 13.8V, I assume that you want to charge a lead acid battery. These batteries have a specific charging profile that you need to hold to if you want to keep them happy. Basically, you hold the current below some maximum that's determined by either the battery or your circuit, then you hold the voltage below some maximum that's determined by the battery, the temperature, and how long you're going to hold the battery on charge. Google "float charging lead-acid batteries". Exactly how you connect the switching element (IGBT or MOSFET) to the battery and how you drive its gate depends a lot on things that you haven't stated. Why not just go buy a charge controller that matches your windmill? -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Sunday, February 17, 2013 10:13:11 PM UTC+1, Tim Wescott wrote:
> On Sun, 17 Feb 2013 08:38:47 -0800, olmo wrote: >=20 >=20 >=20 > > Hi there, >=20 > >=20 >=20 > > I just got a raspberry pi and was wondering if it is possible to use it=
s
>=20 > > PWM output to control current flow to a 12 V Battery >=20 >=20 >=20 > Almost certainly, but I don't know what sort of PWM speeds you can attain=
=20
>=20 > with a rasberry pi, so I can't comment on how practical it may be. >=20 >=20 >=20 > > (with an IGBT). >=20 >=20 >=20 > In IGBT is a poor choice in a circuit that's working on voltages around=
=20
>=20 > 12V. Even 120V is low for an IGBT to be a good choice. MOSFETs are=20 >=20 > generally better than IGBTs up to around 500-ish volts, IGBTs are=20 >=20 > generally better above 1000-ish volts, and in between it's a toss up. >=20 >=20 >=20 > > My >=20 > > idea is to use a 300 W windmill, a simple AC/DC converter, a IGBT, and >=20 > > the battery at the other side. >=20 >=20 >=20 > What do you propose to use for your AD/DC converter? >=20 >=20 >=20 > > If voltage is above 13.8V, I reduce the current via PWM to fully charge >=20 > > the battery and disconnect the windmill as soon as the battery is fully >=20 > > charged. >=20 > >=20 >=20 > > The windmill has a build in over voltage security system, so I think it >=20 > > can be ok to just disconnect the windmill. >=20 > >=20 >=20 > > From the raspberry pi part, I think it's not a problem to read analog >=20 > > voltage and use PWM. My question is related to how can I connect the Pi >=20 > > to an IGbT and which circuit I need for that. >=20 >=20 >=20 > You need to do a lot of studying. >=20 >=20 >=20 > From your quote of 13.8V, I assume that you want to charge a lead acid=20 >=20 > battery. These batteries have a specific charging profile that you need=
=20
>=20 > to hold to if you want to keep them happy. Basically, you hold the=20 >=20 > current below some maximum that's determined by either the battery or=20 >=20 > your circuit, then you hold the voltage below some maximum that's=20 >=20 > determined by the battery, the temperature, and how long you're going to=
=20
>=20 > hold the battery on charge. >=20 >=20 >=20 > Google "float charging lead-acid batteries". >=20 >=20 >=20 > Exactly how you connect the switching element (IGBT or MOSFET) to the=20 >=20 > battery and how you drive its gate depends a lot on things that you=20 >=20 > haven't stated. >=20 >=20 >=20 > Why not just go buy a charge controller that matches your windmill? >=20 >=20 >=20 > --=20 >=20 > Tim Wescott >=20 > Control system and signal processing consulting >=20 > www.wescottdesign.com
Hi Tim,=20 thank you for your reply. I have made a very primitive diagram, see here: h= ttp://i.imgur.com/YegwxzO.jpg The idea is the following: I'm not interested in doing some fancy charging = for the battery, I know that the battery will suffer a bit because of this,= but it does not matter.=20 I think it will be enough to rectify the power and send it into a battery d= irectly, and only switch off if voltage is too high. I guess most of the ti= me the battery will be below 13.8V, so the switch will be closed, and any w= ind that comes flows directly into the battery. I could even put a condensa= tor after the AC/DC converter to minimize the impact of opening and closing= to the generator, but I guess it will handle it well (wind can also change= very abruptly, and the generator has a protection for overvlotage included= ) Yes, of course I could buy a charger for 100 u$ and that's it, but my idea = is to use the pi to monitor the battery, and controll other things as well.= And this is the first part. I also intend to build a better algorithm in t= he future.=20