View Single Post
Old 03-31-2011, 05:47 PM   #152 (permalink)
Freyguy
EV Builder
 
Freyguy's Avatar
 
Join Date: Nov 2010
Location: Macungie, PA
Posts: 157
Thanks: 15
Thanked 64 Times in 40 Posts
Jackbauer,
Did you try setting the SOC to 20% with SW2? Then you could turn VR2 and instantly see the correlation between PWM duty cycle and the fuel gage's range. At 20% SOC VR2 will change PWM over a 0-99% range. Attached is a spreadsheet I used to play around with values during development. Enter VR2 8-bit value in the yellow cell and you can see what PMW duty will be for each SOC value. You could also change PWM_Max if 100% duty is too high for the gage's range.
Attached Files
File Type: xls Fuel Gage PWM calculations.xls (31.5 KB, 34 views)
  Reply With Quote