EcoModder.com (https://ecomodder.com/forum/)
-   Open ReVolt: open source DC motor controller (https://ecomodder.com/forum/open-revolt-open-source-dc-motor-controller.html)
-   -   BMS for open revolt (https://ecomodder.com/forum/showthread.php/bms-open-revolt-12175.html)

 MPaulHolmes 02-05-2010 11:20 AM

BMS for open revolt

I figured it's own thread would be better than occasional comments inside other threads. Let's define terms. The BMS can have any number of "nodes", where each node monitors anywhere from 1 to 10 batteries, and is controlled by 1 dsPIC30F4011. I plan on only using a node to monitor 8 batteries, since the sample pack to be monitored is 48 100amp*hr thundersky batteries.

Let's say a node consists of 8 "subnodes". haha. Each subnode has an ATTINY25 that communicates via morse code with it's master, the dsPIC30F4011.

I breadboarded 1 node of the bms, where that node only had 1 subnode, just for testing:
http://i419.photobucket.com/albums/p...S/DSCF4716.jpg

It measures the battery voltage indirectly by sampling a 1.25v reference voltage. The attiny25 was powered by a variable voltage supply. I varied the voltage from 2.0v up to 4.5v, and watched how the morse code on the oscilloscope changed. To figure out what the power supply voltage was, you do this...
You get the ADC_VALUE by converting the morse code to it. Then, the battery voltage is:

I wrote down the da's and dits.... Not knowing if it was working or not, I went to finding x above... It said 2.07v, while the voltage reference said 2.0v. I was pretty sad. Then I figured I would measure the voltage of the power supply with my new fluke 117 volt meter. It said 2.072v! hahaha. oh heck ya... Now to test the receiving half.

 MPaulHolmes 02-07-2010 02:12 AM

I worked on the software for the dsPIC30F4011 much of today. I've re-written it like 3-4 times, and it's getting better. I still haven't tested it though. The circuit is just sitting there in the garage, ready to go. Maybe in a couple days. I'm allowing so much slop in the transmission of the morse code from the attinys to the dspics that the transmissions should survive an EM pulse from a nuclear warhead. Speaking of nuclear war, one of my favorite movies is "The Day After". It's the bomb! hahaha.

Also, the CAN code is close to being ready. The 1000amp Sync. Rect. controller is going to use a dspic with CAN, so it will be easy to interface with the bms.

 jyanof 02-07-2010 05:20 PM

i was curious...

seems that a major concern with bms modules is that they fail and drain the cell that they're monitoring. One failure mode is the mosfet failing on - then, the module can't turn it off and the thing drains the cell to destruction.

IIRC, you're planning on using PWM to control the shunt current. Could the shunt resistor and fuse be sized such that a low PWM duty is required? Then, if the fet fails on, it's like a PWM duty of 1, and the increase in current causes the fuse to blow. When the fuse blows, the module is not longer powered, the main system is not receiving a signal from it anymore, and shuts everything down.

Maybe you've already considered such a case and have come up with a better solution. BMS modules seem like a good thing, but (from what I've read) they have also caused cell failures. The function of a BMS is very simple, but I think benign failure modes will be the key to a successful unit.

I plan on upgrading to Li when my pack dies - maybe in a year or so, so I'll be following closely!

 MPaulHolmes 02-07-2010 07:08 PM

Hey Joe! Excellent idea! I'm going to reorder a power resistor with smaller resistance, so that a shorted mosfet would draw an obscene amount of amps (well maybe only like 10 or something), and a fuse that would go off around 5, and the pwm would be such that the max shunt current would be 2 amps. That's a nice easy fix! I might need to add a small inductor to smooth it out, but maybe not.

 jyanof 02-08-2010 10:15 AM

Quote:
 Originally Posted by MPaulHolmes (Post 159805) Hey Joe! Excellent idea! I'm going to reorder a power resistor with smaller resistance, so that a shorted mosfet would draw an obscene amount of amps (well maybe only like 10 or something), and a fuse that would go off around 5, and the pwm would be such that the max shunt current would be 2 amps. That's a nice easy fix! I might need to add a small inductor to smooth it out, but maybe not.

Cool, that's what I was thinking. Not sure about the inductor though. With no inductor, you'll be drawing pulses of 10A at whatever duty cycle. That might be ok, though. Maybe you just need a slow-blow fuse or something? May take some testing to see if the pulses trip the fuse, but less parts the better.

 MPaulHolmes 02-08-2010 11:19 AM

Hey Joe! I was talking to Fran, and if I just keep the resistance to like 1 Ohm, then the max current draw would be 4 amps at 100% duty, so I could just keep the duty to 50%. I just didn't know that there were such precision fuses out there. I'm going to use some that last "forever" at 2amp, and last for like 10 seconds at 4 amps. Isn't that amazing that they can do that?

http://www.belfuse.com/Data/Datasheets/C1S.pdf

That way, a micro that fails full on, or a mosfet that fails shorted would be harmless.

Actually there are 2 mosfets. But I just thought of a way to check if the 2nd failed shorted too. The 2nd failure wouldn't run the battery down, it would just turn on the power to the attiny voltage monitoring circuit, which uses like 2mA. That would mean that the attiny was sending voltages. So, when the power is first applied, I could expect a particular startup sequence to be sent to the big micro from the attiny, and if it doesn't happen (if it only sends actual voltages of the battery), then you know there's a problem, like it has been running since the last time it was turned off. 2mA can be drawn from a 100amp*hr battery for a really really long time before it's a problem. If the correct sequence isn't obtained, the main charger and controller would know which naughty cell monitor was the culprit. ya!

 MPaulHolmes 02-10-2010 01:29 PM

The CAN bus code is basically done! Holy cow what a pickle! It took forever for me to understand it, but now it makes a lot of sense. It's very nice. It's mostly the same code for the charger and the controller and the bms as far as CAN goes. I checked over Fran's motor controller code, and not much needs to be modified to work on a dsPIC. It's nice not to have to start from scratch with that.

 apowers 02-10-2010 07:17 PM

" It's mostly the same code for the charger and the controller and the bms as far as CAN goes."

Hi Paul
What charger are you talking about?
Alvin

 MPaulHolmes 02-10-2010 07:58 PM

Hey Alvin! It's the charger I'm making. The charger, controller, and bms will all talk to each other. The nice thing is, CAN doesn't care if one of the nodes suddenly disappears, so if it switches from charging to controller, there won't be really any disruption to the network. Actually, the charger is going to be active while driving. I'm making all three of them for a company in Oregon that's making a smaller version of the Chevy Volt. 3 wheeled.

 MPaulHolmes 02-26-2010 03:14 AM

Bill of Materials:
(If a letter looks like a 1, but is really straight, it's an I)
http://i419.photobucket.com/albums/p...fMaterials.jpg

All times are GMT -4. The time now is 09:26 PM.