DIY Programmable BMS (now using ATtiny/Arduino)

dmwahl said:
hillzofvalp said:
I have made a SMD variant of this approach. I will share results soon. I'm not convinced that it is cheaper than analog methods utilizing comparators, however.

It's not necessarily cheaper, but standby power draw is substantially lower. Versions using the TL431 or similar parts will have 200-300uA of quiescent draw just due to the TL431 itself, plus resistor dividers to set cutoff points, and any other parts they may include. It's not a lot, but can easily add up to 0.5mA of constant draw from the cells which will draw around 1Ah every few months. The ATtiny one I put together was averaging around 8uA average draw, which would draw 1Ah every 15 years. That's lower than the normal self discharge of the cell itself.

I'd love to see more details of your design as well, post a link to the thread here when you have it started. SMD is certainly the way to go if you don't mind dealing with the process, the BMS on my bike right now is 100% SMD.


Check out the TS882 and MCP6542 (300nA/500nA) and tell me what you think about using these for an analog bms.
 
hillzofvalp said:
Check out the TS882 and MCP6542 (300nA/500nA) and tell me what you think about using these for an analog bms.
Those are just comparators, you'll need a known reference voltage to compare to.
 
I've used both of those parts and had good results, personally I would use the LM285. As I recall the quiescent current is substantially lower. You don't need the 0.1% precision of something like the 4140 either, 1-2% is generally fine.
 
hillzofvalp said:
The quiescent current is something like 500nA. How could the attiny bms possibly beat this? Where is the primary power draw in an analog bms?
Unless the only part in your BMS is a comparator, current load will be higher than 500nA.

Regarding power draw in an analog BMS, it depends on the design. Look at the TL431 datasheet and you'll find a lot of it. You need to consider every part when calculating your current draw, even parts with zero theoretical load (ie a capacitor) will have some actual load.

Keep in mind that product datasheets are not only an engineering tool, but a marketing tool as well. The stated 500nA is probably only under ideal conditions and partly to attract the attention of engineers. I wouldn't be at all surprised to see 2-3 times the current draw or more under "real world" conditions.
 
hillzofvalp said:
The quiescent current is something like 500nA. How could the attiny bms possibly beat this? Where is the primary power draw in an analog bms?

Also something to keep in mind, the primary goal of a BMS is not to minimize quiescent current. It's a very good feature, but the difference between 8uA and 500nA in practice is pretty insignificant. If you assume 1% self discharge per month you will find that for a 10Ah pack the self discharge is equivalent to around 130uA of constant load which dwarfs 8uA or 500nA to the point that neither are really significant design factors.
 
I see.

What is the correct code for implementing the optoisolator output for LVC and HVC? I copied the code you used for triggering other events but it doesn't seem to work correctly. I think I got the pins to switch between 1.4V and 3.1V, but the optos never turn on (obviously).

Other than that issue, the brownout protection line does not compile. If I comment it out it works great.
 
hillzofvalp said:
I see.

What is the correct code for implementing the optoisolator output for LVC and HVC? I copied the code you used for triggering other events but it doesn't seem to work correctly. I think I got the pins to switch between 1.4V and 3.1V, but the optos never turn on (obviously).

Other than that issue, the brownout protection line does not compile. If I comment it out it works great.

Next to impossible to help debug your code without your code... Perhaps post the relevant sections here.

Also, I would expect the pins to switch between close to 0V and your supply voltage, which I'm assuming is >3.1V. Only going down to 1.4 seems like something else is going on. I was relying on the internal pull-up resistors to keep the various outputs high when off, and then set them low when I wanted to turn on the pin.
 
hillzofvalp said:
Pretty tight fit. Any tips on this (working) layout? This is about 10mm x 37mm. Utilizes standup bleeders
Hard to critique without a schematic, but you might as well pack it tight... Doesn't really make it any more difficult to assemble assuming you're using a stencil and reflowing everything. Good job.
 
silviasol said:
Too much for me to read. What advantages does using arduino have? I have seen all sorts of stuff hooked up to them like remotes, lcd displays, wireless stuff...
The advantage to using a microcontroller is extremely low standby power and easy reconfiguration of setpoints by changing the firmware. I used the ATtiny84 and measured an average current draw of 8uA. This was a proof of concept type project and intended to be a starting point for others wishing to do the same.

Using an actual Arduino board would be a bad idea, largely due to the inefficient regulators on board. Using an ATmega328 such as on the Arduino Uno would work fine, but it's overkill and you can save on cost with a more basic microcontroller such as the ATtiny series.
 
silviasol said:
Is it possible with the arduino to make some kind of lower power shut off or over amp protection? Like flip a power off switch if it reaches too high of amps or too low of voltage while riding?
It's certainly possible, but for the reasons I mentioned above you would either want a shutoff switch or just use a bare microcontroller, the Arduino boards are for the most part quite inefficient.
 
David,

Im ready for the next interation samples to start helping with design and coding if you are still offering or in need of my assistance.

-Mike
 
mwkeefer said:
David,

Im ready for the next interation samples to start helping with design and coding if you are still offering or in need of my assistance.

-Mike
That would be great. Do you still have the boards I sent you a while ago? They're code compatible, just don't have all the current features like temp sensor, but fine for code work.
 
Back
Top