Electronics > Beginners

Sanity check on N/P channel MOSFET's for battery charge/discharge

<< < (3/3)

joeyjoejoe:
Sceadwian - indeed this was only a snippet. I was trying to break things down into topics. I figured a "battery charger" post in projects would be one of a million. Here is a look at the source of the charge net



I do know now how to find the appropriate resistor values to get the desired output from the LM317/338. These aren't 100% final either, as perhaps I'd want to accept cells as low as 3V. (Or not).

Alex - I like the idea of a fuse, this will probably save me a lot of headaches :) I will put one in, and at the start keep it low around 1A, and just work out all the mCU code/logic keeping things under 1A. Hell, maybe 500mA. Then I can start nudging upwards.

Krish - I had thought about the exact same thing. Having the hardware ensure it's not possible for both to be on. I'll consider it, if not for the final design then at least during the prototype phase. I don't want to add too much in the way of the footprint, and I can have a function in the mCU that guards these outputs to ensure they are never conflicting as well.

Sceadwian:
Yeah, this is not looking like a very good design. You're relying on the micro controller to be the control loop for the current limit. Based on your current sense resistor all it will take is one glitch that causes the PWM to fail logic high and you'll be jamming 5amps down the throat of any cell connected.

Have you even checked your response time by simulating this stuff in LTspice? I don't want to be a wet blanket, but based on the fact you also had the PFET backwards in the original image here I think you might be biting off a bit more than you can chew.


--- Quote from: joeyjoejoe on September 12, 2018, 11:58:22 am ---Sceadwian - indeed this was only a snippet. I was trying to break things down into topics. I figured a "battery charger" post in projects would be one of a million. Here is a look at the source of the charge net



I do know now how to find the appropriate resistor values to get the desired output from the LM317/338. These aren't 100% final either, as perhaps I'd want to accept cells as low as 3V. (Or not).

Alex - I like the idea of a fuse, this will probably save me a lot of headaches :) I will put one in, and at the start keep it low around 1A, and just work out all the mCU code/logic keeping things under 1A. Hell, maybe 500mA. Then I can start nudging upwards.

Krish - I had thought about the exact same thing. Having the hardware ensure it's not possible for both to be on. I'll consider it, if not for the final design then at least during the prototype phase. I don't want to add too much in the way of the footprint, and I can have a function in the mCU that guards these outputs to ensure they are never conflicting as well.

--- End quote ---

Sceadwian:
What's the PWM frequency by the way? I'll simulate it, see what you got on your hands at least. This might not be horrible. But I can think of at least a half dozen different ways I'd do this to be much safer.

joeyjoejoe:
2kHz for the PWM.

I'm not sure I follow where the response time matters for a charger. It's about 400mS to go full swing. I didn't really design it to be responsive, as I figure a use case is battery goes in, the MCU starts off low and slowly adjust upwards based on what is required. As the battery approaches the cutoff voltage, it stops the charge. That was the thinking behind it. Any sudden/emergency anomalies could just abort the charge.

While I am definitely at the edge (or beyond) what I know right now, the PFET backwards was a mistake :) Probably staring at KiCad too long.

Definitely open to your ideas and criticism! The actual charger doesn't matter. The journey is the fun part and the objective is to learn as much as possible which so far, has been quite successful with some of the nice members of this forum!

Last night I watched the video below, which made me think some more about the principal, for both charging and discharging.

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod