![]() |
LCD Instrumentation for Cougar Controller
1 Attachment(s)
For those Cougar controller owners (or owners to be) interested in a simple LCD instrumentation interface for the Cougar, I’d like to give you an option.
Originally this was designed for my own EV conversion, but I made it flexible enough to support options I didn’t need but foresaw other might (metric units for instance). My intent is to get all the information on operation, BOM, fab files, source code, etc onto the OpenRevolt Wiki page so others can use as they wish (with Paul & company’s approval of course!) Design Overview: The display is 2 line x 16 character backlit LCD with oversized characters, controlled by a PIC18F2480 microcontroller. It displays both readings taken with local A/D and information transmitted serially from the Cougar. Displayed info includes: - pack voltage (isolated circuitry) 0-204V range - battery amps (Tamura hall sensor input or Cougar’s output) 0-511A range - motor amps (Cougar output) - accessory battery voltage - motor temp in C or F (via thermistor) - controller temp in C or F (Cougar output) - pack temp in C or F (via thermistor) Other features: - calculation & display of SOC based on battery amp usage (peukert is factored in). Battery amp draw is subtracted from battery capacity every second with remaining capacity written to EEPROM every minute. - calculation & display of MTE (Miles to empty) based on %SOC per mile/km - momentary switch to toggle between 2 profiles transmitted to controller - “Mode” LED to indicate when controller runs with alternate profile - “Overtemp” LED based on independent thresholds for the 3 measured temps - Alarm output (NPN sinking) - PWM output of SOC to interface to existing analog fuel gauge - Canbus and RS232 interfaces (E-Can controller is integrated in the PIC) Below are links to demonstration videos (part 1&2) of the system breadboarded running preliminary code. http://www.youtube.com/watch?v=I38IgceDbhA http://www.youtube.com/watch?v=QsPNvt54Ioc The schematic is also attached. As of this writing, I have the final fab’ed PCB populated and mostly tested in my car. I’ll post a few pics of the completed unit later tonight. I may revise the board since I found minor issues (header pin hole size, part clearance) but I don’t plan on turning this into a development thread. 13 hour work days and family commitments make it hard enough just getting to my conversion (after 2 years I really need to wrap it up & get it on the road!) |
OOh! Very cool!
Yet one more project for me to make...... |
I love it, I want to be able to use it real soon.
I like the idea of different "driving profilez" parameters, maybe 3 or 4? Is the display legible and bright at a 3' average driver's distance? Could RTD explorer be used in parallel connection? Count me in.............. |
This is a good project. I will have analog gauges for battery volts and motor current and aux battery volts but there is definitely a need for this. Thanks for the good presentation and I can't wait to hear more.
|
Quote:
|
Very nice, I want one! Looking forward to a circuit board and the s/w asap.
|
sweet! it would be terribly useful for efficiency tracking if you can squeeze in a speed signal from a vehicles existing speed sensor or an add-on. To track distance/speed and display realtime and trip watts/mile or whatever.
All the pins are used up on that cpu, but maybe you can combine mode and overtemp, or use an internal oscillator or something, wow that thing is loaded up :) here is a thread with a couple examples of vehicle speed sensors. http://ecomodder.com/forum/showthrea...vss-10236.html |
Hey Thanks guys!
Mr Bigh- the display is easily readable at 3'. Reason I chose the oversized character version. It could work in parallel with RTD Explorer only if RTD is used to receive data from the Cougar. Both RTD and the LCD can't transmit unless you incorporate some kind of A/B distribution switch. More than 2 profiles gets complicated and now you need an indicator showing which one you're running with. Wakinyantanka- As long as the status message sent from the high amp version is formatted the same it should be compatible. If the configuration parameters are different, it shouldn't matter since the user programs in the serial data he wants transmitted as his "profile". DCB- Yes, every pin is used up. You could drop in a PIC18F2420 which is the same part without the CANbus. The two I/O lines for CAN then become standard I/O. |
Here are some pictures in various stages of assembly
http://farm5.static.flickr.com/4093/...5f29ac604c.jpg http://farm6.static.flickr.com/5060/...b6a79a2867.jpg http://farm6.static.flickr.com/5055/...e74623f80e.jpg http://farm5.static.flickr.com/4102/...189cf160ef.jpg http://farm6.static.flickr.com/5016/...aa4233fa07.jpg Last picture in the car is with electric heat running (12A batt draw) Bezel is just 1/8" thk clear acrylic which I masked off and spraypainted black on the backside. |
Fantastic piece of work. Well done indeed. Interested to see the code and pcb.
|
Thanks Jackbauer! As is the work I've seen you post.:thumbup:
Got the image link thing working with Paul's help, so you can see the pcb in my previous post. As for the code- Well, I'm a guy that does things the hard way, that is... ALL of this is done in PIC assembler. I'm not a glutton for punishment, I just never learned C. I worked in new product development for 14 years and as a hardware designer, I only had to design the schematic & pcb, then write a specifications document for the software engineer. Sure, I'd write little assembly routines to verify functions on all I/O in my designs, but they did all the heavy lifting. This probably represents the most code I've written since school (think Intel8088). That being said, making this have a serial command interface to change parameters would be a significant undertaking for me. A $35 investment in a PIC programmer along with downloading the free MPLAB IDE is the only option. You open up the project, go to the declared variables section and change parameters. I have this well commented in the code and I plan on doing a step by step writeup showing how to change, recompile and reprogram the part. However, anyone with a background in programming PICs in C and who is interested in this project is welcome to add the serial command interface. While they'd need to purchase all the hardware themselves I would donate my spare PCB (I had 2 done by BatchPCB). |
Quote:
|
For the budget minded, there is a $17.50 pickit 2 clone here that I have used successfully:
Build A PIC Programmer Based On PIC18A Prototyping Board |
Macungie, PA? A LOCAL! Well, sort of. I work in Allentown, but live northward. I'm working towards an EV conversion of my own - this will be a great addition!
|
Started out with the 6809 myself back in the day. Did a lot of pic assembler starting on the 16C54. I'm not much good with c but find mikrobasic very easy to use. i am so building me one of these :)
|
Wakinyantanka,
Currently the range for CF and BA are 511.Most likely due to the 2.5~5V range of the LEM which corresponds to 511 steps of the 10-bit(1024) range of the Atmega A/D. This voltage range shouldn't change with Paul's Melexis part for high amp controller. So 1000A will still be conveyed over the same 511 steps. In my firmware there is a "scaler"parameter associated with motor amps. It was added because my custom Cougar firmware's full throttle range is 600A versus standard 500A, so I needed to scale CF's 511 range to 600. I see no problem with this being able to scale to 1000A. |
Quote:
|
Quote:
|
Quote:
|
Didn't know about the EV show - I'll have to put it on my calendar!
|
Quote:
As the firmware exists today, a user adjustable "scaler" for motor amps allows displaying up to 999A. Anything more and code would need modification to display a thousands digit. Simple change really since there is space on the display for it. |
Quote:
|
Man, I want one too. I love the miles to empty. that's way too cool for school.
|
Thought I'd show it in operation in my car. Used the flip video rather than my camcorder so video quality isn't the best. I'm in the process of doing a writeup for operation and another for setting parameters using MPLAB.
Still making minor tweaks to firmware. Hope to have all info up on the Wiki within a week. http://www.youtube.com/watch?v=Sq5bbojhXzQ |
Quote:
Were you guys there last yet? I was. I brought my version of the motor controller and showed it off all day under the huge tree(oak if I remember correctly) I will be there again this year. Looking forward to it. Even with it being a almost a 5 hour ride, its totally worth it. -Adam |
Hi Adam,
I was there last year though I got there a little late. I remember your display-it was the one surrounded by the large crowd:) What goodies are you showing this year? The preliminary 6kW charger perhaps?? |
For those interested, I have support documents, bom, PCB fab files cleaned up and ready to go. I hear the wiki is down, so for now you’ll need to pm me so I can email them to you. I made some final changes to the code, most notably motor amp display up to 9,999, optional temperature compensation of traction battery capacity and leading zero suppression (creates better visual for amp magnitude changes).
Excluding the bare PCB & shipping costs, the material costs for LCD display and all components will be in the $43~50 range. More towards $43 if you want to forgo canbus. I have no code written to support it at this point anyway. Keep in mind that this is designed around the very common Hitachi 44780 LCD controller. With minor code changes, this would support up to a 40char x 2 line LCD. Steal an I/O line (possible if you eliminate CAN) and you can expand this to a 40char x 4 line LCD. -Chris |
Quote:
Thank you |
Not to put words in his mouth, but I can tell you that he just wants to make the information available, and not supply kits, and shipping, and all that stuff. Way too time consuming!
|
Quote:
Very sorry, but Paul's right. My schedule really doesn't leave room to involve myself in something like that. I tried to be as thorough with the support documentation as possible to make this a fairly easy project to tackle. A group buy of PCB's might be economical since you can amortize the setup fee over the qty of boards. BatchPCB also has a marketplace option where others can purchase my design which would be shown on their website. I would add zero markup, but they might (not sure). Let me look into that. -Chris |
Quote:
|
Quote:
|
Me too please. I am about done with my controller (Thanks to Paul for the boards and help finding parts). Just got my motor connected to the transaxle so it may take a while before I get to this, but it looks awesome. Great work!
|
Quote:
Also waiting to hear back from Chris to see if the pcb outfit he used will sell us boards and at what price - I won't place the order until we hear. |
Hey guys,
Even if I apply no markup on the board selling thru BatchPCB marketplace, your looking at no cheaper than what I paid. $10 setup plus $2.50/sq inch. That came to $22 excluding shipping. That was another $15. Order qty is 1 so you can't amortize the $10 setup over multiple boards. You'd need to place multiple orders! Worse is the 5 week leadtime. PCBCART is also overseas, but I don't know their quoted leadtime. Their pricing, however looks like the best I've seen. Harlequin2, thanks for organizing this:thumbup: |
I'm in for 2 or 3 pieces.
|
LCD instrumentation
I would also be in for 3.
We should also look at building a public BOM at Digikey or etc for the parts and then posting that link. I'll look into that if I can put aside a bit of time one evening. Thank You Chris for sharing this project! |
PCBCart leadtime is either 8 days or 12 days (12 is cheaper). And they are never late (except during the chinese new year). Also, their shipping is SUPER fast, around 2-3 days to the U.S.
|
PCB order
I'm in for one. My car is still a bit from completion so 5 or 6 weeks for the board is not an issue. My only concern is cable length. I have an old beetle so the controller will be in the rear and the display on the dash would require an extra log RS232 cable. Would there be any other way for the two to communicate? Any ideas?
John |
John,
RS232 @ 19.2k baud, should be good up to 25ft. Use good shielded cable and you'll be fine. Use a low capacitance shielded cable and you could extend that to several 100ft. -Chris |
All times are GMT -4. The time now is 03:40 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com