Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free > Open ReVolt: open source DC motor controller
Register Now
 Register Now

Reply  Post New Thread
Submit Tools LinkBack Thread Tools
Old 02-19-2011, 02:03 PM   #1 (permalink)
EcoModding Lurker
Join Date: Aug 2010
Location: UT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
converting cougar output string

Just curious, does someone know how to convert the data out to numbers that I understand? If HS=315, and that is 76 degrees, is there a formula that will get me the entire range? Things that I’d have an interest in are


PW – I’d expect that 0 – 511= 0 – 100 %


FB – any bit definition


  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

Old 02-26-2011, 12:59 PM   #2 (permalink)
EV Builder
Freyguy's Avatar
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 63 Times in 39 Posts

TR is a calculated throttle value equal to throttle_input * t-pos-gain / 8 - PWM * t-pwm-gain / 8

BA (battery amps) is a calculated value from 0~511 based on motor amps x PWM duty cycle (i.e. PWM value/511)

PW is as you described

FB as follows:
Bit 7= High Pedal Lockout fault
Bit6= Motor Overspeed fault
Bit 5= Precharge Wait
Bit 4,3,2= unused
Bit 1=Vref fault
Bit 0= Throttle fault

HS is a raw 10-bit A/D count derived from the voltage divider formed by R7, R3 and thermistor RT1. The A/D count is calculated as Vin/.00488. The thermistor’s change in resistance over temperature will be non-linear as will the resulting A/D count. Determining the thermistor’s resistance at a particular temperature would require it’s b-constant and a third order equation.
Thermistor - Wikipedia, the free encyclopedia

A much easier and widely used method is to use the A/D count as an offset to a lookup table where the correct temperature is stored. Attached is a spreadsheet for the thermistor used in the Cougar. RT resistance values were obtained from the manufacturer’s data sheet. These were only provided for every 5deg C increment, so I interpolated the values in between for each degree F. Rather than use the 10-bit A/D count for the offset, I used the upper 8 (effectively dividing by 4). What is interesting is that this 8 bit value is a direct readout of degrees Fahrenheit in the area of 70~80F. However, the error increases in either direction as shown in the column H.

Hope this was of some help.
Attached Files
File Type: xls cougar temp chart_Epcos.xls (71.5 KB, 37 views)
  Reply With Quote
Old 02-27-2011, 10:16 AM   #3 (permalink)
EcoModding Lurker
Join Date: Aug 2010
Location: UT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you for the definitions

This is a big help. The conversions aren't things where the numbers can be looked at, and view numbers that I understand.

I'm using a data logger to monitor the data that has the ability the convert the raw values for me, including the fault bits. And I'm going to try to use it for the battery pack monitor, and charging also. It isn't cheap, but it's somethig that I understand and can add and change where I want to.


  Reply With Quote
Reply  Post New Thread

Thread Tools

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com