![]() |
CougArd Explorer
2 Attachment(s)
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! :D 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 :turtle: I will post the sketch after I have done some more work on it. Greg |
That is very clever, and just plain beautiful. You are what they call an "Engineer". They grow them real smart over there in Scotland!
By the way, if I had my own controller, yours would look way more fancy and professional. Nice job! |
CougArd Explorer
Greg, what is the outcome of your Arduino interface?
|
Quote:
Seriously though, I am moving away from the Arduino platform for this, at least for the moment. The original reason for choosing the Arduino was because my BMS couldn't support serial comms faster than 9600 baud and the Cougar is at 19200. So the idea was for the CougArd Explorer to sit in between the Controller and my BMS and maybe eventually move the BMS master functions to the CougArd Explorer. But things have changed on the BMS front and the project can now support 19200 baud serial comms. This is because we have moved from the original Picaxe chips to using bare Microchip pics and the Pic Basic Pro development environment. So now I have the possibility of directly connecting the bms to the controller. The first task will be to get the current limit working as I described above when the battery pack starts getting low. Then I want to monitor data from the controller starting with battery amps and amp hour data. The BMS has a built in current measurement, but I want to use the bms current data for battery charging and dc-dc loads from my pack. This will allow a smaller and more accurate sensor for this and use the controllers motor amp sensor for the motor load. With the Arduino I was able to send commands to the controller and also read the serial data. Parsing the data string and storing the values to variables was proving a bit harder, but this looks to be quite simple with PicBasic, although I haven't actually tried it yet. :eek: Another advantage of PicBasic over the Arduino is connection is possible with a couple of resistors, no RS232 level shifter required. My plan is to get the car on the road soon and get back to working on this project early in the new year. Greg |
CougArd Explorer rides again!
Now that my car is nearly on the road, after more than a year of working on it,:( I am looking again at my CougArd Explorer idea. The basic idea is to give some of the functionality of the rtd explorer program in a small embedded platform. Originally I was going to use a Arduino for this, hence the name. The Arduino has been ditched, but I like the name so am going to keep it. That, and I am too lazy to think of a new name! :p
So while I am waiting for my µLCD-32PT(GFX) - 4DGL Display Modules to arrive, I have written some code for it. At this point I want to prove that I can send commands to the controller, receive the data stream and store the values into variables that can be manipulated/displayed. This code should display as text the data from the controller. It compiles o.k., but probably has lots of bugs in it. So here it is, but please note, I am a rubbish programmer. I am however open to lots of suggestions on improving the code.:D Code:
#platform "uLCD-32PT_GFX2" |
Cougard Explorer on Launchpad
I have added this project to the Ubuntu Launchpad site. It is a code hosting site like Sourceforge that manages revisions in software. One of the neat things is anyone can create a branch of the project, and their changes can be merged with the existing project. Be warned that if you have never used it before the learning curve is very steep, don't ask me any questions about it as I am still trying to figure it out myself. :confused:
Anyway here is the link. https://launchpad.net/cougard and you don't need to register to view or download files, only if you want to contribute through the launchpad site. |
Quote:
I added your link to the Open ReVolt Wiki under "Software"; Open ReVolt - EcoModder Mark :D |
Small steps and virtual controllers
1 Attachment(s)
I have had some time to sit down with the 4d display and have got it to read the data stream from the controller. :) Well not exactly the controller, but a virtual controller using the arduino that I was originally going to use for this project. ;) I have attached the arduino sketch, it's just a very simple loop that spits out a data stream.
So the display can read the ascii data stream, just have to get it to store the data in some variables, but this bit has me stumped at the moment. So I have posted a question on the manufactures forum. Can't extract numerical values from ascii string. - 4D SYSTEMS FORUM Greg |
I've got a simple version that is capturing the data stream. Newest files uploaded here. ~greg.fordyce/cougard/trunk : files for revision 2
|
Just purchased the display from 4d systems so will hopefully be able to help out with this project. Have you any pics of the display and information on connecting the hardare?
|
All times are GMT -4. The time now is 02:17 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com