Update on microcontroller based BMS

tomv

100 W
Joined
Jul 16, 2007
Messages
178
So I've decided to try and build some things based on ideas in this thread:
http://endless-sphere.com/forums/viewtopic.php?f=14&t=3486

It went much better than I expected. I'm using Arduino board:
http://www.arduino.cc

It's unbelievably easy to use. Just download software, plug in usb cable, start with one of their samples, load it to the board. And it all works! It took me 10 minutes to run first tests. Using Atmel tools, building your own board, using C to program it - it would take weeks for beginner like me.
 

Attachments

  • IMG_0307.JPG
    36.6 KB · Views: 1,388
The first thing I built is 3 cell BMS!! :) Nowhere close to ideas discussed here, but it's much better than WattsUp I've used to use. It can:
- Measure 3 cell SLA pack (40+ volts ok), using voltage dividers.
- Measure 2 temperaturs using NTC thermistors (ambient and battery)
- Measure current using 1 mOhm resitor + OpAmp.
- Log charge/discharge to EEPROM (up to 512bytes)

As you can see almost the whole board is taken up by current measurment setup. Components are expensive too. I wish I knew about those Allegro current sensors when I ordered parts. Definetly going to use them in V2.
 

Attachments

  • IMG_0299.JPG
    38.9 KB · Views: 1,379
  • IMG_0300.JPG
    30.7 KB · Views: 1,375
I have no running e-bike setup so that above BMS is for now of only theoretical interest :) So I've built something simplier that I can take on my regular bikes: Portable wind tunnel! :D

I've chopped off sensor from CatEye computer and can measure same things as CatEye, but without display :) The reason I want this is that I can accurately log distance/time, and derive speed and acceleration.

If I'm coasting on level road on windless morning that would give me drag force. Can't wait to try this out. Downside is limited amount of memory, only 512b EEPROM and about 1k RAM. I'm thinking of some smart ways to pack data so that I can store some meaningful results.
 

Attachments

  • IMG_0297.JPG
    36.8 KB · Views: 1,368
Excellent!

We discuss so many ideas here and most of us do not have the time to do everything we think up. It's great to see people taking the ideas (often abstract) and making actual prototypes to test.

Proof that the internet does indeed inspire people... :p
 
Tomv: If you need more memory I'd look into finding a SD card library for the Arduino. SD has a very micro controller friendly interface, and practically infinite storage space. (as far as an Arduino is concerned anyway) I've heard the FAT16 file system is a pain to do on a micro controller, but SD cards can also just be used as a raw EEPROM. Though the SD card won't be computer readable anymore.

Marty

P.S. old floppy disk connectors can be recycled into SD sockets.
 
Yep, I have the same idea about SD. Arduino code is actually posted on the net. I bought SD card connector for $4, but might as well solder to the card itself, because there's no need to remove it. It would only be readable by Arduino itself.

I was surprised at lousy situation with LCD displays. Cheap ones use parallel interface (16 pins!). I'm playing with it, but it takes up all IO pins. There are serial LCDs but for crazy prices. Doing my own serial-parallel glue logic... eh.. some day..

Other things on todo list:

- LED lighting system. I could totally pimp my bike here.

- Have more and better analog inputs. I've got 8:1 muxes. I'm undecided if I should do differential measurement (precise, can create for inputs per mux) or just simple (8 inputs per mux). Max voltage is 36V. Just a tiny bit low..

- Balancing. FETs + gate drivers + shunts = 2 chips per cell. Maybe some fancy balancer later.

Post any ideas / suggestions / cool things to build here. Possibilities with this thing are large
 
tomv said:
I was surprised at lousy situation with LCD displays. Cheap ones use parallel interface (16 pins!). I'm playing with it, but it takes up all IO pins. There are serial LCDs but for crazy prices. Doing my own serial-parallel glue logic... eh.. some day..

I am not an electronics geek, but isn't there dedicated chips that will take a serial stream, buffer a full word then clock it out on a CE pulse ? Or the reverse, buffer a word, and serialise it . No idea on a part number, I can have a hunt if you are interested ?
 
The chip I have is 74HC595. Create 8 pins out of 3. 16-DIP package. Might be some better options. Some guys just use dedicated MCU to drive LCDs...
 
That's cool.

How much does one of those Arduino boards cost?

How many cells could you monitor without using a MUX?
 
fechter said:
How much does one of those Arduino boards cost?

I got mine here for $35.
http://www.sparkfun.com/commerce/product_info.php?products_id=666

The schematics/board layout/software are completly open source. You could roll your own if you felt like. If you want USB it's hard to save much, but for BMS function you could make really minimal setups (MCU and not much else)

fechter said:
That's cool.
How many cells could you monitor without using a MUX?

You have 6 ADC inputs on the pins. My setup is 3 cells + current + 2 thermistors. Also max voltage for ADC is 5V. So it's pretty minimal without mux.

Their website is amazingly useful, lots of code samples, good documentation:
http://www.arduino.cc
 
Back
Top