View Single Post
Old 05-20-2009, 05:24 PM   #1332 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
I changed the pwm so it's effectively 14 bit, although it really is only 10 bit. I use an auxiliary variable to store the "fine" PWM duty, and each time it is updated, I shift that value down 4 bits, putting it in the range 0-1023. It makes for very smooth driving at near 0 rpm. I would definitely describe the throttle as a bit squishy as JayC was saying. I might try a PI loop again. It was an abysmal failure last time. The greater PWM resolution I bet will fix that problem. Or I'll just do something like "squishy if change in throttle is small", "fast and snappy if change in throttle is large". That would still allow for smooth takeoffs, and I don't think would require a PI loop. Right now, it feels perfectly smooth, and stopping is pretty quick (4 times faster to slow down than to speed up), but not instantaneous, because it made for jerky driving each time I would take my foot off the gas, I mean throttle haha.


I'm going to get that PI loop working. It will be nice to have when RPM feedback is implemented. I have a little hall effect rpm thing that that was $6 that I haven't tried out yet.
__________________
kits and boards

Last edited by MPaulHolmes; 05-20-2009 at 05:36 PM..
  Reply With Quote