Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DIY Arduino BMS
Potential issues I see:

* If the fuse for cell#1 blows, and the cell#2 "above" is in bypass mode, the ATiny13#1 chip could be exposed to up to 8.4V? A zener diode to limit the max voltage to a safe limit might be in order. Though that will overheat in short order... but voltage#1 will increase and bypass#1 should activate...
At the same time ATiny#2 would crash due to low voltage... Good luck figuring that out :-(

* Doesn't the ATiny13 chip need a VCC-GND capacitor near it? Esp if you need to accurately measure VCC?

* With the ATiny13 IO driving the MOSFET, a pull down resistor is probably no longer needed
elkooo likes this post
Modular PowerShelf using 3D printed packs.  40kWh and growing.
A youtube guy @Adam Welch did his own custom BMS for a 7s lithium battery bank - there are several youtubes and follow up with interesting problems. It also supports full graphical monitoring.

Here's a recent one: A year with the diyBMS
Here's an earlier one: diyBMS - Provisioning and Calibrating - 12v Solar Shed

and there are more going thru the whole process and electrical diagrams.

I'm doing Batrium as this kind of electronics is beyond me, but @Adam Welch seems like a serious, electrical circuit guy and his efforts seem like a pretty sophisticated solution for those wanting to wire up their own.
elkooo likes this post
(10-04-2019, 01:29 AM)OffGridInTheCity Wrote: @Adam Welch seems like a serious, electrical circuit guy and his efforts seem like a pretty sophisticated solution

This is also stuart pittaways BMS. It is for sure interesting BUT I will learn more doing it the hard way from scratch (also it is easier for me to learn if I start from zero rather than reading countless documents of specification of a already grown / built project).

(10-03-2019, 11:33 PM)ajw22 Wrote: Potential issues I see

Really good points. Idea
Concerning fuses: the easiest solution might just be two fuses for each bord or separate leads to the boards to solve the problem.
This way, each BMS-Board would probbably work isolated? If one fuse blows, the next board is still connected correctly and should not see more than the actual cell voltage.

Concerning Condensators: added & understood... 

PullDown: maybe a large value resistor will be better than none? Leave it for now but I'll keep your remark in mind...

Also I had some mistakes with resistors / missing pulldowns which I corrected... see attached updated drawings..

ajw22 likes this post
Those ATtiny13 measuring/balancing modules are going to be 14x separate boards sitting on each cell pack, like with Batrium, right?
I think you can just fuse each positive side, and remove the negative side fuse.

How about adding a 5V fan in parallel with your balancing resistor? Wastes more power, and cools the resistor all at the same time.

Some of the ATtiny13 IO ports have internal pull-ups. You could reduce hardware and wiring by enabling that for the RX.

You may want to add a button and signaling LED to make the boards more admin friendly.
The button could be used to program the position of the device (#1~#14). You could hard program that, but long term a button will be more convenient.
And the LED to help locate the offending pack. It quickly gets confusing with multiple strings of 14 packs. How many hours I've wasted fixing a perfectly healthy pack, while the faulty pack was sitting one shelf below :-(
Modular PowerShelf using 3D printed packs.  40kWh and growing.
(10-03-2019, 10:37 PM)elkooo Wrote: Why I do it myself instead of using one existing solution?

I love doing it the hard way. And I like to know the stuff I build. If I just copy something, I will never have the same understanding and will not be able to optimize and tweak it as well to my needs as if I develop everything from scratch. Already learned a lot & love to learn more every day.

I totally agree. I've been working on my own BMS for exactly the same reason.

(10-03-2019, 10:37 PM)elkooo Wrote: Looking forward to hear your opinion...

I notice you have opted for the ATTiny13A.  I started out using that on my BMS design, but quickly found it to be false economy trying to go too cheap on the microcontroller.  It only has 1K of code space and I used a good chunk of that just implementing some comms since there are no hardware comms interfaces provided. Also there is only one timer that then has to be shared between bit banging the comms and timing other events like when to take the next voltage reading. I'm not saying it can't be done, but it sure makes it hard.

Also I'm pretty sure, on the tiny13, you can't use the trick of measuring your own VCC like some of the AVR's do. So you'll have to add a potential divider and connect that to an ADC pin to get your voltage readings.

In the end I went with the ATMEGA328PB. From Farnell (Element14) they are less that £1 each in lots of 25 in the UK.  This then gave me more options like having multiple thermistor inputs and some status leds, and I can simply use Arduino to write and upload the code.
If going for a more powerful chip, the ADUM1250 for isolated i2c communication might be interesting. About $1 on aliexpress.
I've not used this chip, but i2c is awesome... hardware support on so many chips, and easy to add more modules to the system, eg. small LCD, temperature sensor, etc
Modular PowerShelf using 3D printed packs.  40kWh and growing.
(10-04-2019, 01:00 PM)ajw22 Wrote: If going for a more powerful chip, the ADUM1250 for isolated i2c communication might be interesting.  About $1 on aliexpress.
I've not used this chip, but i2c is awesome... hardware support on so many chips, and easy to add more modules to the system, eg. small LCD, temperature sensor, etc

In my opinion a uart based communication method is a better fit for this application.  I2C relies on signal transitions to clock the bits through. The problem with that is that the switch mode inverters and chargers that we connect to the batteries can generate a lot of noise and transients that can get onto the data lines and create false positives making them unreliable. Uart signals are less susceptible because they are mostly time based, so there is significantly less chance of a stray transient on the line at the exact time the hardware samples the data.
That's looking better :-)
The optocouplers will give you the voltage isolation & let you talk to each chip with some addressing, etc.

You might want to have separate + & - wires to each cell because if one cell is bypassing, the little extra drop across the fuse will (& does) affect the next unit's readings.
Running off solar, DIY & electronics fan :-)
i have done something similar for my 4s test pack using 5 pro mini's each have a nrf24l01 module to send data to master. IRFZ44N mosfets with 5ohm 5W resistors for balance. pro minis are 3.3v and i have removed regulators on board and supplied power to VCC.

Who read this thread?
100 User(s) read this thread:
daromer (10-06-2019, 03:49 PM), Sean (10-06-2019, 01:14 PM), Majorphill (10-04-2019, 02:05 AM), Korishan (10-06-2019, 12:25 PM), PAF (10-07-2019, 07:22 AM), Franky Beuselinck (10-04-2019, 08:53 AM), Batrium (09-13-2019, 07:19 AM), Mike C (08-23-2019, 05:58 AM), jdeadman (10-06-2019, 01:39 PM), wim (09-01-2019, 02:38 PM), Christian (09-14-2019, 10:24 PM), watts-on (10-10-2019, 03:54 PM), jesusangel (08-23-2019, 07:15 AM), Hanssing (10-09-2019, 06:05 AM), Geek (10-08-2019, 01:25 AM), Ivo Staelens (08-23-2019, 04:30 PM), Grumplestiltskin (10-06-2019, 10:38 AM), hOOPSNAKE (10-06-2019, 11:41 AM), Oz18650 (10-12-2019, 08:01 AM), Charly144 (08-21-2019, 07:08 PM), sturgeo (09-06-2019, 10:37 AM), jm1 (09-13-2019, 12:46 AM), gpn (08-19-2019, 02:17 AM), Headrc (08-18-2019, 11:56 PM), jonyjoe505 (09-01-2019, 04:04 PM), Redpacket (10-07-2019, 04:43 AM), farmerjohn (09-08-2019, 07:34 PM), cadric (08-28-2019, 05:23 AM), Bubba (10-06-2019, 12:46 PM), Walde (10-15-2019, 04:19 PM), Riplash (10-06-2019, 01:20 PM), w0067814 (10-06-2019, 09:52 PM), HikingGuy42 (10-06-2019, 04:12 PM), neowolf (09-03-2019, 01:18 PM), chuckp (09-01-2019, 10:52 PM), emuland-metroman (10-04-2019, 07:24 AM), Chass90 (10-02-2019, 04:17 PM), Beholder (10-10-2019, 05:07 AM), Wolf (08-22-2019, 01:52 PM), Generic (10-04-2019, 03:26 AM), ajw22 (10-06-2019, 07:24 PM), RikH (10-09-2019, 08:14 PM), newone972 (10-15-2019, 11:00 AM), wind0r (10-16-2019, 12:40 PM), kevinjaye (09-11-2019, 03:54 AM), OffGridInTheCity (10-06-2019, 02:46 PM), ma3006he (Yesterday, 05:52 PM), fleming (10-15-2019, 01:51 PM), intra (10-04-2019, 12:53 AM), Sonnyz (10-01-2019, 08:41 PM), Kratom NC (10-04-2019, 03:17 AM), BobInHD (09-07-2019, 11:46 AM), Doin it (10-03-2019, 11:12 PM), juanjo57 (08-22-2019, 08:30 AM), gigaz (09-25-2019, 11:30 AM), lange5766 (09-01-2019, 02:37 PM), Wulffi (08-19-2019, 09:22 AM), mackoffgrid (09-11-2019, 07:46 PM), Janusz (09-05-2019, 10:40 PM), xahmedxsa (08-23-2019, 04:41 PM), ahmad mustofa hendrayano (08-20-2019, 04:01 AM), 7h0r (09-01-2019, 05:45 AM), Jonisingt35r (09-01-2019, 02:02 PM), 3xtr3m3 (10-16-2019, 06:42 AM), drnickriviera (09-01-2019, 02:26 PM), LPG (10-04-2019, 11:26 AM), poolizei (08-27-2019, 09:27 PM), elkooo (10-04-2019, 02:52 PM), LeoKK (08-22-2019, 04:26 PM), peterpopper222 (08-22-2019, 02:05 PM), Cobra_Phil (09-02-2019, 04:50 AM), stohner (08-19-2019, 09:45 AM), nettermann90 (08-20-2019, 10:14 AM), MBard (08-26-2019, 08:02 AM), diib (08-28-2019, 04:57 PM), hschlech (08-28-2019, 04:35 AM), James-w (09-21-2019, 10:08 PM), AaronM (09-01-2019, 06:54 PM), Diesel Pilot (09-02-2019, 05:14 PM), MadX (09-02-2019, 09:19 AM), doubee (09-24-2019, 08:30 PM), Alen (09-05-2019, 02:56 PM), skpro (09-20-2019, 06:55 PM), Robert024 (09-12-2019, 02:02 AM), skytek (10-06-2019, 12:52 PM), EnergyOasis (09-10-2019, 03:32 AM), Frenno (09-10-2019, 04:38 PM), Smarthome2582 (09-15-2019, 11:39 AM), habengr1 (09-15-2019, 05:26 PM), Sabrin (10-04-2019, 02:12 PM), BatteryMooch (10-13-2019, 02:52 AM), amerrigan (10-06-2019, 04:04 PM), MiTh420 (10-02-2019, 05:50 AM), Bms manufacturer (10-05-2019, 03:57 AM), neill121 (10-06-2019, 08:38 PM), Lykke (10-15-2019, 04:50 PM), (10-06-2019, 06:56 PM), CHACALPOWERS (10-08-2019, 02:45 AM), redhat (10-08-2019, 07:43 PM), Rontastic (10-15-2019, 05:58 PM)

Forum Jump:

Users browsing this thread: 1 Guest(s)