View Single Post
Old 06-03-2010, 07:09 PM   #1 (permalink)
Greg Fordyce
EcoModding Lurker
 
Join Date: Nov 2009
Location: Scottish Borders, Scotland
Posts: 92
Thanks: 7
Thanked 33 Times in 16 Posts
CougArd Explorer

I have assymbled one of the Cougar controllers and need a way to protect my lithium battery pack if the SOC is getting low. The controller can limit battery amps if you send a command over the serial port, for example "bat-amps-lim 200" will prevent the controller from drawing more than 200 amps. So the idea is this, when my bms sends a low battery signal I tell the controller to lower battery amps. Just keep doing this, reducing battery amps more and more until you get to 1 amp ( setting the value to zero disables the battery amp limit). This will allow you time to get the car off the road without suddenly cutting all power.

So how to send this command to the controller? I have set myself a few rules, first and most important is the controller will not be modified from the kit/design that is available. This will help prevent forking of the controller project. I will make up the rest of the rules as I come up with them! My controller is sealed now so I can't go in and start changing things.

I am using a Arduino Mega to comunicate over the serial port with the Cougar controller. VERY IMPORTANT, DON'T CONNECT A ARDUINO DIRECTLY TO THE SERIAL PORT ON THE CONTROLLER. The voltages on the controller serial port are +/-10 volts and will likely fry something. You need to use a serial to ttl adapter that converts the serial voltages to the 5v ttl voltage on the arduino. I am using a Sparkfun RS232 Shifter SMD
It took me a while to figure out how to connect it. You need a "null modem" or crossover cable, basically it switches pin 2 and 3 on the rs232 ports. Then to connect to the arduino you connect RX on the Shifter to TX on the Arduino and TX to RX, plus a 5v and ground wire. The reason I am using the Mega is it has 4 hardware UARTS for serial comunication. I have a Tellymate Shield connected to the main serial port, the cougar connected to the second and my BMS will be connected to the third, sending battery amp and amp hour data.

So far I can send commands to the controller, save and display the data stream on a lcd monitor. By connecting the low voltage warning from the BMS, to the Arduino, it will then send the appropiate commands to the controller. I will probably start with a simple look up table such as;

warning 1 - 200 amps
warning 2 - 150 amps
warning 3 - 100 amps
warning 4 - 50 amps
warning 5 - 20 amps
warning 6 - 1 amp


I will post the sketch after I have done some more work on it.

Greg

Attached Thumbnails
Click image for larger version

Name:	00001.jpg
Views:	167
Size:	120.3 KB
ID:	6116   Click image for larger version

Name:	00002.jpg
Views:	147
Size:	104.8 KB
ID:	6117  
  Reply With Quote