BMS Charging System Works!

I've been working intensively on my battery modules, BMS and charger to get them working together. So here's the story in sequence.

Fun with SMD microbs

My battery modules are made from small SMD components which I was never working with before. My previous electronics experience was with bigger sized and DIP components. So it was a new learning experience as I had with many other areas on this project - a lot of fun and satisfying moments.
On the first PCB I tried soldering these components with fine tip soldering iron which worked but I wanted to try a different way. Popular way which is also used in industry is placing components on the PCB with SMD soldering paste and treating it with heat at which solder melts. In serial manufacturing the boards are soldered by putting them in special owens.
Alternative for manual soldering is soldering with hot air. I used the hot air way although owen method should work too if had an owen. In the beginning I used some small Portasol gas soldering iron with air blower tip. It worked fine but I was not happy that I cannot control the temperature of the air and I can only have a rough estimate of this temperature. So I bought a hot air soldering station which I know I'll use in future too. Soldering the boards with it was an easy job. The tedious but not difficult part of the process was putting SMD paste and placing the components on the boards before blowing them with hot air. No problem with shaky hands and sight. Surprisingly to myself I found it easiest to do it without any magnifying goggles although I had them. My wife said I could be a surgeon. I guess I could :-)
Anyway I liked the process and I think it would have taken me notably longer with traditional components with all legs bending, sticking, soldering and crimping. It has taken me around 2-3 hours for soldering each board consisting of 10 battery modules. So manufacturing 45 modules was not bad at all.
Here is one batch of 10 manufactured boards

And here is a massive array of 36 as 9 others were already sitting on the cells as I was taking this photo :)

Battery module features

I'd like to list features that my designed battery modules have. It was quite long and iterative design and development process and I am happy I finished it. I like the final result.

Here is the list of battery module version 1 features:
- Balancing type: shunting current controlled by microcontroller
- Microcontroller: ATMEL ATtiny25V
- Operating voltage range: 2...5V
- Shunting resistance: 2.35Ohm 10 Watt
- Shunting current control: Pulse Width Modulation
- Communication protocol: custom serial protocol with LIN style sync frame
- Comm. bit rate: 2400bps (may work up to 9600bps or more)
- Comm. line: 1 wire going from module to module in chain - very easy and tidy installation
- Communication isolation: 1 Optocoupler on first module on the 2-wire input from BMS and 1 on the output to BMS over 2 wires back
- Measured parameters: Cell voltage, Cell temperature and shunting PWM value
- Voltage measurement accuracy: +/- 0.01V
- Temperature measurement accuracy: +/- 5C
- Parameter read commands: Read Voltages from all cells, Read Voltage from specific cell, Read Temperatures from all cells, Read Temperature from specific cell, Read PWM values from all cells, Read PWM value from specific cell
- Parameter write commands: Write balancing voltage to all cells, Write balancing voltage to specific cell, Write temperature calibration to all cells, Write temperature calibration to specific cell, Write max allowed temperature to all cells, Write max allowed temperature to specific cell, Write max allowed PWM to all cells, Write max allowed PWM to specific cell, Write cell IDs to all cells and read back the cell count.
- Automatic cell enumeration and counting via Write cell IDs command from BMS
- Automatic microcontroller sleep on idle (no comm from BMS for some time - like 60 seconds) to save power
- Automatic shunting current control via PWM to keep preset balancing voltage
- In-circuit microcontroller reprogamming capability via 1-wire debugWire interface
- LED indication of communication activity and PWM balancing mode
- Voltage spikes protection of the circuit supply, input and output signals
- Low cost due to carefully selected components and their count on each module

BCMS prototype board upgrade with CAN bus and Real-Time clock

I've added Microchip's MCP2515 CAN controller with Philips PCA82C260 CAN interface to be able to communicate with my new PFC 3kW charger from www.hztiecheng.com. My ATmega640 talks to MCP2515 over SPI interface. After few evenings of programming I made CAN bus work and my BCMS started talking to the charger. I can set charger voltage and current and enable charging. Charger returns me actual voltage and current plus the status with info such as overtemperature or battery fault flags. The charger model I have is named 144V/16A but as I learned it is capable of producing currents up to 20A.
Then I worked on programming the charging algorithm which would be suitable for my battery pack. It was done quite quickly to the point where I needed to have some reliable timekeeping. So I decided to finaly implement the real time clock (RTC) into my BCMS.
The RTC is made on Maxim DS1307 chip which is talking to my main processor over I2C interface. It has a Lithium backup button battery to keep the clock running when all the batteries are disconnected.
Here is the photo of the board with the processor off

And here is with the processor on

BMS charging demo

Finally here is a short movie demonstrating my BMS working with charger to charge and balance the battery pack

At this point I will be starting to put all electronics into control box, test it and then put into the car and connect to the motor. I'll put battery boxes with batteries in the back trunk first to have test drives and tune the system. Later I'll put them under car's belly as intended.


  1. Labas, cia as pats domiuosi elektrinem masinom (EV) ir ypac ju konvertavimais, ziuriu kad radau ir viena lietuvi kuris tai daro, labai nustebau :)
    Neradau kur susisiekti su tavim tai rasau i komentarus.
    Kaip su elektrines masinos registracija bus? Tech apziura? Na apskritai su visu paopierizmu (Lietuvoje)?

  2. Fantastic! I hope everything works right. I'll surely watch your blog an ask you a lot of questions about you BMS and charger :-)
    Greetings from Germany:

  3. SamsNet,

    Gali parasyt man i mindaugas(sabaka)sklandymas(taskas)lt. Trumpai sakant nezinau kaip su popierizmu bus paprasta ar sunku, bet darbus jau pradejau. Su transporto ekspertais ruosiame sitos konversijos dokumentacija, projekta, technines salygas ir pan. Tuomet bus transporto inspekcijos ekspertize ir tuomet registravimas Regitroje. Ar tikrai taip gausis dar nezinau, bet bendrauju su pakankamai geranoriskais zmonemis.

  4. Michael,

    Thanks! Your Beetle project seems moving forward as well. It is good to see more conversions in Europe. It would be interesting to go through paperwork bureaucracy and compare how it goes in Lithuania and in Germany as we have basically the same EU governing directives. I hope EVs will become popular in Europe very soon.

    Viel gluck!

  5. Hi This work is pretty much what I'm planning to do also, but without the CAN part och the Master.

    I'm really interested in buying cellboards from you.

  6. Hi Pm Dawn,

    Sorry for late reply - been really busy to even check the blog. I am not selling cell boards at this moment. It is mostly because the BMS prototype is not finished yet and it is controlling the cellboards. I am working to finalise the prototype on my HR-EV. Then I would be able to offer some BMS/cell boards solution. Until then cell boards would not be any use for you. Sorry for not being able to help.


  7. Hi Mindaugas,

    This is an incredible system that you have put together. I like how it uses the amtel chip for the micro. I also like the serial interface you have created for the main controller. Do you have any plans to release the designs of this?


  8. Blogs are so informative where we get lots of information on any topic. Nice job keep it up!!

    Masters Dissertation

  9. HI Mindaugas,

    thanks for the video explaining your bms system. Just so I understand correctly: The charger does a constant current then constant voltage cycle. After the constant current when the cells are at their desired voltage the charger switches to constant voltage to complete the charging. So it hits the Top-Voltage before it's completely charged. How do you set up the BMS so the charger doesn't stop charging before going into constant voltage mode?


  10. Hi again!

    Do you have any more info on the charger and the CANBus interface of it. What can be done over the CANbus. can you control or change the charateristics of the chargeprofile in any way?
    What kind of info can you get from it?

    Btw there is a thread on the DIY forum about this charger family. If you have any more info about it please upload it there.

    Best Regards

  11. Do you sell your BMS and battery modules for the TS cells? Can charging characteristics be changed in the BMS to suit different cells?

    Can you set charge voltage and current parameters? Can the BMS force the charger to specific amp and voltage cycles?


  12. Hello Everybody,

    Sorry for not coming back with answers to your questions. It was really difficult time for me. If you are still interested please ask and I'll be much quicker this time.


  13. Do you sell your BMS and battery modules for the TS cells? Can charging characteristics be changed in the BMS to suit different cells?

    What is the Price, I am based in India,
    I have 48Cells Packet with each 3.2V.

    Can you set charge voltage and current parameters? Can the BMS force the charger to specific amp and voltage cycles?

  14. You may buy the BMS which is an offspring from this project from our company JSC Elektromotus http://www.elektromotus.lt/