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

Batteries, Chargers, and Battery Management Systems.
matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

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

Post by matterrr » Jan 21, 2013 12:37 pm

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:

Image

Image

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!

Image
Image

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:

Image

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

Image

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:

Image

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

Image

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.

Image

I ordered parts and I hope to have the boards completed by the end of the week.
Attachments
BMSshieldPCB.png
PCB Layout
BMSshieldPCB.png (138.33 KiB) Viewed 284 times
Last edited by matterrr on Sep 17, 2013 1:09 am, edited 20 times in total.

User avatar
farmkid4
10 W
10 W
Posts: 99
Joined: Apr 13, 2011 7:07 am
Location: NY not C

Re: Arduino Mega Cell Monitor Shield using TI BQ76PL536A!

Post by farmkid4 » Jan 21, 2013 2:14 pm

I dont have a large amount of electronics experience but this looks like a very neat project!

please keep us updated.

User avatar
mauimart
100 W
100 W
Posts: 226
Joined: Nov 10, 2009 2:08 pm
Location: maui

Re: Arduino Mega Cell Monitor Shield using TI BQ76PL536A!

Post by mauimart » Jan 21, 2013 2:44 pm

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.

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega Cell Monitor Shield using TI BQ76PL536A!

Post by matterrr » Jan 22, 2013 9:40 am

mauimart wrote: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.

User avatar
grindz145
1 GW
1 GW
Posts: 3317
Joined: Apr 07, 2009 12:10 pm
Location: Rochester NY
Contact:

Re: Arduino Mega Cell Monitor Shield using TI BQ76PL536A!

Post by grindz145 » Jan 22, 2013 1:33 pm

the 536A is an awesome part. Do use the balance function though! Otherwise it defeats the purpose!

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega Cell Monitor Shield using TI BQ76PL536A!

Post by matterrr » Feb 25, 2013 9:23 pm

grindz145 wrote: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.

dmwahl
10 kW
10 kW
Posts: 631
Joined: May 06, 2009 9:41 am
Location: Madison, WI

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by dmwahl » Feb 26, 2013 2:06 pm

Nice looking PCB, are you planning on placing the parts yourself? I'd be worried about getting those big QFPs soldered properly myself. Definitely watching this one.

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by matterrr » Feb 26, 2013 4:24 pm

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.

Kin
100 kW
100 kW
Posts: 1336
Joined: Mar 05, 2011 6:16 pm
Location: NC or MA, U.S

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by Kin » Mar 01, 2013 10:55 am

watching :)
New to endless-sphere? Notice a lot of signatures recommending Ebikes.ca? That's because it's the best place for a quality and manageable, (but still 'real'), first build. Justin is a solid supporter of electric bike development, and a good source of equipment.

dmwahl
10 kW
10 kW
Posts: 631
Joined: May 06, 2009 9:41 am
Location: Madison, WI

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by dmwahl » Mar 01, 2013 11:08 am

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?

dr_lulz
1 mW
1 mW
Posts: 15
Joined: Jan 28, 2013 5:05 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by dr_lulz » Mar 02, 2013 4:56 pm

those ics are nice but when i see the price ... almost more expensive than the lipos

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A! (Updated)

Post by matterrr » Mar 04, 2013 1:39 am

dmwahl wrote: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.

ShreddinPB
10 W
10 W
Posts: 66
Joined: Feb 04, 2012 2:09 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by ShreddinPB » Mar 06, 2013 12:55 pm

I have been kinda looking into something like this also.. would be very interested in a smaller form factor one.

dmwahl
10 kW
10 kW
Posts: 631
Joined: May 06, 2009 9:41 am
Location: Madison, WI

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by dmwahl » Mar 06, 2013 2:29 pm

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.

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by matterrr » Mar 06, 2013 2:44 pm

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.

ShreddinPB
10 W
10 W
Posts: 66
Joined: Feb 04, 2012 2:09 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by ShreddinPB » Mar 27, 2013 12:23 pm

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 ;)

matterrr
10 mW
10 mW
Posts: 25
Joined: Feb 11, 2012 3:11 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by matterrr » Mar 27, 2013 12:54 pm

ShreddinPB wrote: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/e ... 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.

ShreddinPB
10 W
10 W
Posts: 66
Joined: Feb 04, 2012 2:09 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by ShreddinPB » Mar 29, 2013 1:13 pm

matterrr wrote:
ShreddinPB wrote: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/e ... 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/DkSearch ... =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?

User avatar
methods
10 GW
10 GW
Posts: 4976
Joined: Aug 08, 2008 12:08 pm
Location: Santa Cruz CA
Contact:

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/27

Post by methods » Apr 01, 2013 12:50 pm

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-u ... 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
"One test is worth a thousand opinions"

texaspyro
1 MW
1 MW
Posts: 1519
Joined: May 12, 2010 6:53 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by texaspyro » Apr 01, 2013 10:59 pm

ShreddinPB wrote:I did some research and ended up adding this N-Channel mosfet to mine.
http://www.digikey.com/scripts/DkSearch ... =0&cur=USD
Thats a REALLY crappy FET. Try an IRLB3036. It has 1/10th the on resistance and will dissipate 1/10th the power.

ShreddinPB
10 W
10 W
Posts: 66
Joined: Feb 04, 2012 2:09 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/4)

Post by ShreddinPB » Apr 02, 2013 4:09 pm

texaspyro wrote:
ShreddinPB wrote:I did some research and ended up adding this N-Channel mosfet to mine.
http://www.digikey.com/scripts/DkSearch ... =0&cur=USD
Thats a REALLY crappy FET. Try an IRLB3036. It has 1/10th the on resistance and will dissipate 1/10th the power.
Thank you VERY much.. I know nothing about fets at this point.. this is my first attempt at using one :)

User avatar
methods
10 GW
10 GW
Posts: 4976
Joined: Aug 08, 2008 12:08 pm
Location: Santa Cruz CA
Contact:

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/27

Post by methods » Apr 03, 2013 12:17 am

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
"One test is worth a thousand opinions"

etriker
100 kW
100 kW
Posts: 1190
Joined: May 27, 2012 8:21 am
Location: Florida USA

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/27

Post by etriker » Apr 03, 2013 9:57 am

methods wrote: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-u ... 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. :)

ShreddinPB
10 W
10 W
Posts: 66
Joined: Feb 04, 2012 2:09 pm

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/27

Post by ShreddinPB » Apr 03, 2013 2:26 pm

methods wrote: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.

User avatar
methods
10 GW
10 GW
Posts: 4976
Joined: Aug 08, 2008 12:08 pm
Location: Santa Cruz CA
Contact:

Re: Arduino Mega BMS Shield using TI BQ76PL536A (Update 3/27

Post by methods » Apr 03, 2013 11:42 pm

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
"One test is worth a thousand opinions"

Post Reply