# BMS bluetooth LE arduino wireless 30ma max power drain



## eldis (Sep 3, 2013)

bwjunkie said:


> I'm protyping a wireless BMS.
> 
> Does anyone have suggestions on a relay and resistor pairing that might work well for this?
> 
> Josh


Start with removing the relay and putting small and cheap smd mosfet. You're switching very low voltages and low currents. Check the topology of Chevy Volt or Tesla battery packs. Few tens of mA are enough to balance a healthy pack. You can size your resistors accordingly


----------



## dmwahl (Aug 25, 2014)

Why BLE between cells? Seems a lot more complicated than an isolated comm bus. Bluetooth is not designed to communicate with a lot of devices, I think somewhere around 5-10 is the limit for one master.

The amount of bypass current is very dependent on how well your cells are matched. Tesla gets away with such a small balance capacity because they have something like 80 individual cells paralleled together, and I'd be willing to bet they purposefully mix up lots to ensure a random distribution in each block. This tends to normalize the effective cell capacity and IR. You can also reduce the balance current needed by starting to balance once your SOC starts to be a function of voltage rather than only at the top end of the cell limit. For a 2W balance resistor, P = V^2/R is the equation you want. Target about 50% of the max resistor power, so for a 4.2V final cell voltage you'll want around 18-20ohms, for 3.65V 13-15. The full rated resistor power is probably at around 150C and assumes more space for airflow than most people give it. If you want 2W of actual balance power, then you'll want a ~5W resistor. Hope that helps.


----------



## bwjunkie (Jul 31, 2013)

dmwahl said:


> Why BLE between cells? Seems a lot more complicated than an isolated comm bus. Bluetooth is not designed to communicate with a lot of devices, I think somewhere around 5-10 is the limit for one master.


Yes thanks for the comment, it all helps. I think I will shoot for 1w if I get to the shunt phase. 

True the master can only be attached to 7 devices simultaneously, and so I'll have to try a disconnect/reconnect strategy in the android app to take readings for example once per minute. I want to find out what is possible, and if I can design such that the arduino/BLE count is only a matter of preference.

Another idea was to trasmit digital over the HV cable, but I have stopped researching that for now.


----------



## dmwahl (Aug 25, 2014)

bwjunkie said:


> Yes thanks for the comment, it all helps. I think I will shoot for 1w if I get to the shunt phase.
> 
> True the master can only be attached to 7 devices simultaneously, and so I'll have to try a disconnect/reconnect strategy in the android app to take readings for example once per minute. I want to find out what is possible, and if I can design such that the arduino/BLE count is only a matter of preference.
> 
> Another idea was to trasmit digital over the HV cable, but I have stopped researching that for now.


One reading per minute will not be fast enough to prevent overshooting the LVC or HVC points. The systems I've designed have been from 1-10 samples per second. 1 per second is fine for most applications and what I usually recommend. Faster is nice, but doesn't gain you much other than perhaps better noise rejection. The down side to fast measurements is you need to turn off any shunting and wait a few ms before taking your measurement or you get errors due to resistance in the cell connection wires. Lots of these pauses reduce your effective balance current.

If this is your first time designing a BMS I'd suggest you start simple and do an analog design, then move on to a digital version.


----------



## bwjunkie (Jul 31, 2013)

dmwahl said:


> One reading per minute will not be fast enough to prevent overshooting the LVC or HVC points. The systems I've designed have been from 1-10 samples per second. 1 per second is fine for most applications and what I usually recommend. Faster is nice, but doesn't gain you much other than perhaps better noise rejection. The down side to fast measurements is you need to turn off any shunting and wait a few ms before taking your measurement or you get errors due to resistance in the cell connection wires. Lots of these pauses reduce your effective balance current.
> 
> If this is your first time designing a BMS I'd suggest you start simple and do an analog design, then move on to a digital version.


thank you dmwahl:

I'm stretching the use of the vague term BMS: 

Firstly I just want to monitor every cell voltage wirelessly on a smart device, with no interconnections between cells or wires running across the car. But the second part would be to have a wireless device on the charger safety relay that can respond and shut down the charger in the uncommon event of a single cell over-voltage. The charger (in my case a MM PFC-20) would still run it's own voltage/amp limiting as designed without outside assistance.

My Analog version (which is currently in use! haha) is a bunch of wired tiny digital voltmeters on my dash board and some jumper cables to bleed cells by hand. But I only have enough of those to monitor 12v groups, still I really like having them there.

I now have a single arduino micro and a BLE shield so I'll see how that goes before I purchase 40 more. My first shunt attempt will probably only drain 300ma. Perhaps on the near horizon we'll see an integrated version for under $15.

Josh


----------



## bwjunkie (Jul 31, 2013)

David, I noticed on your thread you are getting 6 significant digits for single cell voltage measurements via the BQ76PL536A chip. Is that necessary or could a system get by with only 4?

josh


----------



## dmwahl (Aug 25, 2014)

bwjunkie said:


> David, I noticed on your thread you are getting 6 significant digits for single cell voltage measurements via the BQ76PL536A chip. Is that necessary or could a system get by with only 4?
> 
> josh


6 is definitely more than necessary. It was just simpler to code that way without dropping the last 2 digits. You could get by with 3 significant digits just as easily, although I prefer at least 4 just to keep an eye on noise in the system. It's actually pretty inefficient (in terms of mcu cycles) to convert from the ADC count to a voltage measurement and then compare to a setpoint (HVC, LVC, etc), in the final firmware I'll have a preprocessor routine that takes the voltage setpoint and generates the equivalent ADC count to compare to.

I'm going to start a thread here regarding the system I designed, just haven't had time to do it lately. Hopefully it will be of interest to people.


----------



## bwjunkie (Jul 31, 2013)

last night I started prototyping with this device I purchased ($20)
http://www.rfduino.com/product/rfd22102-rfduino-dip/

I originally purchased an adafruit BLE shield to use with a Arduino Micro/Trinket but I broke it during assembly/testing. So the RFduino will be the first proto child.

Step 1 initial software setup: I got the RFduino loaded up with a template "sketch" software and broadcasting from a standalone battery. the template looks similar to this: https://github.com/RFduino/RFduino/blob/master/libraries/RFduinoBLE/examples/Template/Template.ino

Step2: communication: Got the free tester Android app installed and was able to send and receive data to my phone. link to Andriod tester: https://github.com/lann/RFDuinoTest/releases

added code to Arduino sketch code template:

void RFduinoBLE_onReceive(char *data, int len)
{
// anytime we receive a char from Andriod we send back the only useful data we have at the moment
//read pins 5 and 6 and report integer from 0 to 1023

int vlt;
vlt = analogRead(6);
RFduinoBLE.send(vlt);
vlt = analogRead(5);
RFduinoBLE.send(vlt);
}

step3: measure something real and report.
I learned the microcontroller (RFduino) cannot measure it's own supply voltage without help. Either use a voltage divider or an external reference. The divider formula is? 
Vout = Vin * (R2 / (R2 + R1)) *edit* due to voltage sag this could be too innacurate except in comparing relative readings across all cells. For any decisions on shunting/balancing (which doesn't happen while driving so no sag but still needs a reliable reading), we would need to multiply and regulate the supply? so measurements can be useful.

step4: see if the measurement can be added to the bluetooth broadcasted device name so there is no connection needed and the andriod device can simply scan all device names, then pick one to connect to when desired. eg. 

RFduinoBLE.advertisementData = "vCell1"; //but real voltage in there somewhere

-josh


----------

