Arduino BMS Shield using TI BQ76PL536A (Update 9/16)

matterrr

10 mW
Joined
Feb 11, 2012
Messages
25
Hi everyone,

Just wanted to share a project I'm working on to see if anyone has attempted anything similar or is just interested. I am building a performance / battery monitor for a small electric vehicle and I'm using the Arduino Mega ADK R3 to interface between the vehicle and the sensors / battery, as well as to connect to a Google Nexus 7 tablet. I figured a clean solution for measuring cell voltages would be a custom Arduino shield.

This design uses two TI BQ76PL536A battery monitors / protection ICs (http://www.ti.com/lit/ds/slusam3/slusam3.pdf).

Here are the current implemented features for the Mega Shield (as of August 2013):
  • Supports 6S-12S packs (22.2V - 44.4V nominal), each BQ chip can take 3-6 cells
  • Communication between BQ chips and Arduino via SPI
  • Two battery temperature inputs
  • Battery connection to enclosure via JST-ZH connectors

As of August 2013, the Mega shield has been put on hold to develop a shield for the Arduino Uno, because I think it is much more popular. Once the Uno shield is finished, it can be blown up to the Mega dimensions and slightly rerouted.

Here are the features that are being added to the Uno board:
  • Smaller board compatible with Arduino Uno!
  • PTC fused cell inputs
  • ICSP header accessible on top shield
  • All four temperature inputs are utilized (two external via JST-XH, two on PCB)
  • Connection from BMS to battery pack via more common JST-XH connectors
  • Two surface mount LEDs on PCB, to be used for debugging/alerts
  • Arduino reset button on shield!
  • Ability to program OTP EPROM to set default under-voltage, over-voltage, cell imbalance, and temperature settings using reprogrammer dongle (available in the future)

The thread will be updated with newer entries first.

UPDATE: 9/16/2013

Hey everyone,

Just got the PCBs back from OSH Park and they look great. Here are some pictures:

nNCDjPuh.jpg


6KqZs40h.jpg


http://imgur.com/a/TdqGv#6KqZs40

Tonight I will be ordering the parts I need and trying to make a solder stencil. Wish me luck!

UPDATE: 9/3/2013

Just submitted the finished PCB to OshPark. I should get the boards within two weeks or so. In the meantime, I will work on programming firmware on the old Mega board. Check it out below!

XkkJqYn.png

BHyFR0V.png


http://imgur.com/a/GaafQ#BHyFR0V

UPDATE: 8/30/2013

I'm still active and making good progress. The board should be finished and ordered by the end of the weekend. Here is a teaser, with some details left to route:

iCv8NA7.png


Again, it would be very helpful if you would let me know if you're interested in this board when it becomes available.

I thought it would be fun to do a comparison, so here is the price of the BMS shield, compared to the equivalent price to get the same features from TI (Note that TI supports 18 cells, but the board is gigantic):

Equivalent features from TI
  • BQ76PL536EVM-3 Evaluation Board - $203 on Digikey
  • BQ76PL536PGM-1 Programming Board - $203 on Digikey
  • Aardvark I2C/SPI Host Adapter - $275 on TotalPhase

    Total - $681

Arduino Uno BMS Shield
  • Uno BMS Shield - $100-120 (price TBD)
  • Arduino Uno - $22 on Amazon

    Total - $122-142

UPDATE: 8/9/2013

Just wanted to let everyone know that this project is still active and I have my sights set on a small run available to ES users.

Right now I am working on a Rev B shield for the Arduino Uno instead of the Mega. The board size will just be increased for the Mega. So far I have implemented:

- LED indicators for each chip (programmable through SPI)
- XH connectors instead of ZH (balance taps on most batteries)
- Utilization of both temperature ports on both chips (one measuring chip temperature and external temp per chip)
- Resettable PTC fuses on inputs for cell shorting protection
- Resistor arrays instead of individuals (for my benefit)

I'm still working on:

- Optional ability to reprogram EPROM on chips to set under and over voltage limits

I'm looking at a final price of $100-$120 per board (shipped), which might seem steep, but it will include functions only available on the $200 chip reprogrammer. At a larger scale, the cost will come down.

Stay tuned and let me know if you have suggestions!

UPDATE 3/27/2013

So I had some problems talking to the upper IC. It was putting out 10V on one of its 5V outputs, so I investigated with an employee from TI and a friend of mine, and we determined that the REG50 pin requires a 2.2 uF capacitor for the IC to function. We air-wired this cap between the pin and ground and the board now successfully measures battery voltage from both chips. I'm very excited, as the competition is next weekend and I wasn't sure if this was going to work.

Next I am converting my code into a library so the main Arduino sketch can be cleaned up. If anyone has any questions or is pursuing a similar project, feel free to ask.

UPDATE 3/6/2013

I guess some of the diodes were exposed to a voltage surge, either static or me connecting the batteries incorrectly. Anyway, two more of them were blown and had to be replaced. I am now able to connect through the Arduino and read/write to the different registers. I am getting accurate simulated voltages for each cell. I guess that means the board is a success so far. I attached some pictures of the setup:

Click for complete album



Next I might write the code as an Arduino library. I want to add an algorithm for chip addressing and make the code more expandable. Stay tuned!

UPDATE 3/4/2013

So I investigated the short, turns out it was a faulty diode between the input of cell 1 and ground. I replaced the diode and the short is gone. Here is a picture of the Arduino shield on the BMS:



UPDATE 3/2/2013

So I placed all the parts, and I've been testing the board with a Sparkfun SPI shortcut and connecting it directly to the Arduino board. For a while I was getting the same hex message over and over, but I realized I made an error connecting my batteries (for now I'm using 9 volts in series, divided over several cells). The fault and alert pins are active, which means the chip is working but something is wrong. Im getting unique messages now, but there are programming challenges so I will be collaborating with a friend to try to fix them. I eventually discovered that somehow the bottom cell input is shorted to ground, which is likely causing some problems. I will try to fix it tomorrow, but if I don't have luck, I will have to place parts on another board. Luckily I think the PCB itself is ok (no shorts on either of the bare PCBs in that area).

UPDATE 2/25/2013



I ordered the boards from OSH Park about two weeks ago and I received them within a week. They look great! It was $50 for three boards.



I ordered parts and I hope to have the boards completed by the end of the week.
 

Attachments

  • BMSshieldPCB.png
    BMSshieldPCB.png
    57.8 KB · Views: 4,669
I dont have a large amount of electronics experience but this looks like a very neat project!

please keep us updated.
 
I was thinking about doing something very similar except using the LTC6802 or 6803 part (44 pin). It can monitor up to 12 cells and is also stackable. The tricky part is the i2c communication. My only recommendation is that you maybe go up to 24s max. It looks like you might have room to squeeze two more of the BQ chips on the board (lots of pins (64) on that part for only 6 cells). Nice work.
 
mauimart said:
My only recommendation is that you maybe go up to 24s max. It looks like you might have room to squeeze two more of the BQ chips on the board (lots of pins (64) on that part for only 6 cells). Nice work.

I'm definitely considering adding one more BQ in the future. For my vehicle, the maximum allowed pack voltage would be 48 V (it's being used for a competition). The other option is to shrink down to Uno or Due size for a more ubiquitous shield.
 
the 536A is an awesome part. Do use the balance function though! Otherwise it defeats the purpose!
 
grindz145 said:
the 536A is an awesome part. Do use the balance function though! Otherwise it defeats the purpose!

Haha yeah, I left the balance function out because this BMS will only be used when the cells are discharging. I already have a Hyperion charger, and they did a far better job than I ever could.
 
Since I'm only using this chip for cell monitoring, right now I don't think I will be soldering the tab... I will in future versions if I get a solder paste stencil. I have a friend who is a bit more experienced with surface mount, so he will be doing the QFN chips. I will be attempting the rest. I'm not too worried, as I have access to some decent equipment.
 
watching :)
 
those ics are nice but when i see the price ... almost more expensive than the lipos
 
dmwahl said:
I'm curious, why are you designing the shield for the Mega? The communication with the Arduino is over SPI anyway, so it's not like you need all the pins. For the larger amounts of memory perhaps?

This is for a university project. We are using the mega ADK to communicate with a Google Nexus 7. It is a three wheeled vehicle, not a bike, so we have room to mount a tablet as a dashboard.

As for the high cost, this is a money is little object project, but honestly I think one should spend more money on the safety system than the batteries themselves. Few people have more than one layer of protection (a fuse) when they are riding with a bomb inches away. Just my two cents.
 
I have been kinda looking into something like this also.. would be very interested in a smaller form factor one.
 
Sounds like a fun project, unfortunately stuff like the Arduino barely existed when I was in college.

Would you be willing to share the code once you're done? Or at least the SPI interface stuff? That's the biggest obstacle I've faced in attempting something like this myself. The analog stuff is relatively easy.
 
My plan right now is to write an Arduino library to interface with the device. That way, you can use it and adapt to your own board.
 
Quick question for you on this project. You are using it just to monitor the cells, correct?
I ask cause I started designing mine using the ltc6803, which is the same type IC. I want to make mine a full BMS that can also cut the pack off if a cell gets too low, like current bms's do.
You dont have that functionality in there do you?
And is that also why there isnt a large GND and + inputs?

I know just enough about electronics to shock myself ;)
 
ShreddinPB said:
Quick question for you on this project. You are using it just to monitor the cells, correct?
I ask cause I started designing mine using the ltc6803, which is the same type IC. I want to make mine a full BMS that can also cut the pack off if a cell gets too low, like current bms's do.
You dont have that functionality in there do you?
And is that also why there isnt a large GND and + inputs?

I know just enough about electronics to shock myself ;)

I am just using this shield to monitor the cell voltages. The Arduino board is able to take this information and perform other actions. For example, I have a 40 amp, 100 volt solid state relay (http://www.digikey.com/product-detail/en/DC100D40/CC1853-ND/2780513) that can take a 5 volt, 11 milliamp input and switch the entire battery on or off. The Arduino can provide this signal to switch off the entire vehicle if any cell reaches 3 volts. The added benefit of using this relay is that I don't need huge wires to connect to an Arduino shield; I only need to switch a 5 volt signal from the microcontroller.

I also posted an update above.
 
matterrr said:
ShreddinPB said:
Quick question for you on this project. You are using it just to monitor the cells, correct?
I ask cause I started designing mine using the ltc6803, which is the same type IC. I want to make mine a full BMS that can also cut the pack off if a cell gets too low, like current bms's do.
You dont have that functionality in there do you?
And is that also why there isnt a large GND and + inputs?

I know just enough about electronics to shock myself ;)

I am just using this shield to monitor the cell voltages. The Arduino board is able to take this information and perform other actions. For example, I have a 40 amp, 100 volt solid state relay (http://www.digikey.com/product-detail/en/DC100D40/CC1853-ND/2780513) that can take a 5 volt, 11 milliamp input and switch the entire battery on or off. The Arduino can provide this signal to switch off the entire vehicle if any cell reaches 3 volts. The added benefit of using this relay is that I don't need huge wires to connect to an Arduino shield; I only need to switch a 5 volt signal from the microcontroller.

I also posted an update above.

Thanks for the update.
Thats what I figured was going on. I did some research and ended up adding this N-Channel mosfet to mine.
http://www.digikey.com/scripts/DkSe...go&lang=en&keywords=FQP50N06L&x=0&y=0&cur=USD
Is there an advantage to using a solid state relay over a mosfet like this?

edit: price? that relay is $94.30?
the mosfet would work fine wouldnt it?
 
If you dig around in the blog these guys have you will find some awesome information on ultra low power arduino options - many of which you could even hack into an existing Mega (etc) board.

http://www.rocketscream.com/shop/mini-ultra-8-mhz-arduino-compatible

I have used their library and it works great. The library basically just shields you from 20 hours of crap work.

Good luck in your project. I like anything Arduino :wink:

-methods
 
You are doing fine :)
As a general rule of thumb just use IR fets whereever possible. They are very high quality because they market to the Military Industrial Complex... this means that they build a great deal of margin into every specification that they make. They will never over-state anything - what you see is *less* that what you will get.

When I was working for the man every part in a design had to be "qualified" - even resistors - and this could cost tens of thousands of dollars. Whenever we selected Maxim parts the quality guys would just groan. Whenever we selected IR mosfets it was a given - they would pass.

There are a few companies who have mosfets that are better for extreme applications - but generally speaking IR is my company of choice.

Once you find your IR fet you want to use the tool Octopart to find the best price. For popular fets Future usually has the best price, or maybe Allied - in this case Allied has them for $2.01 in any quantity - but they are out of stock. Dont hesitate to call and try to get a better price - they will usually do it.

http://octopart.com/detail/all_breaks?sid=1024652750069

Mouser or Digikey always have just about everything. Sometimes the price is double or triple - but who cares for 3 or 4pcs.

You are doing a good job. Keep at it.

-methods
 
methods said:
If you dig around in the blog these guys have you will find some awesome information on ultra low power arduino options - many of which you could even hack into an existing Mega (etc) board.

http://www.rocketscream.com/shop/mini-ultra-8-mhz-arduino-compatible

I have used their library and it works great. The library basically just shields you from 20 hours of crap work.

Good luck in your project. I like anything Arduino :wink:

-methods

Me too. It was your posts that got me interested in Arduino and caused me to finally buy one and learn how to use it ! :)

I am a programmer too mostly 6809 and 8085 assembly language so it had been awhile but I picked it right up.

Thanks ! :)

Watching this thread with much interest. :)
 
methods said:
You are doing fine :)
As a general rule of thumb just use IR fets whereever possible. They are very high quality because they market to the Military Industrial Complex... this means that they build a great deal of margin into every specification that they make. They will never over-state anything - what you see is *less* that what you will get.

When I was working for the man every part in a design had to be "qualified" - even resistors - and this could cost tens of thousands of dollars. Whenever we selected Maxim parts the quality guys would just groan. Whenever we selected IR mosfets it was a given - they would pass.

There are a few companies who have mosfets that are better for extreme applications - but generally speaking IR is my company of choice.

Once you find your IR fet you want to use the tool Octopart to find the best price. For popular fets Future usually has the best price, or maybe Allied - in this case Allied has them for $2.01 in any quantity - but they are out of stock. Dont hesitate to call and try to get a better price - they will usually do it.

http://octopart.com/detail/all_breaks?sid=1024652750069

Mouser or Digikey always have just about everything. Sometimes the price is double or triple - but who cares for 3 or 4pcs.

You are doing a good job. Keep at it.

-methods

Thanks again for the great info!
I have only ever shopped at digikey or mouser, I am a simple hobbiest. Never heard of octopart, thats a great resource!

I did a design for a ltc6803 <> arduino board.. and I read now that they are about to come out with a ltc6804 which is much improved, specially in the daisy chain department.
The press release said jan 2013 but I dont think they are available yet, and the datasheet isnt up yet on their site. They just have a link to ask for it, so I did that, no reply yet.
 
I know a guy who knows a guy at Linear who swears that the new design kicks ass. I saw an implementation and it looked pretty damn simple. If it is as good as it looks I will spin an LTC BMS V5.

-methods
 
Back
Top