View Single Post
Old 07-02-2009, 12:05 PM   #129 (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,362
Thanked 1,202 Times in 765 Posts
I used this part for the ebike controller:
Digi-Key - 620-1110-ND (Allegro Microsystems Inc - ACS755LCB-050-PFF)

Zero current corresponds to an output of 0.6v, and each amp increase corresponds to an increase of 60mV on the output. It's powered by a 5v supply, and can safely be used to measure current in the range of 0 to 50 amps. The most amps it can handle is 200. It worked very well and seemed very well suited to the A/D input of a uController.

What was the amplitude of the 400 Hz sine wave? (aka, how bad was the overshoot for the current?)

When I needed greater resolution of pwmDuty because current was changing too fast, I just incremented and decremented a virtual PWM duty variable that has a very large resolution, like 0-16383. Then when I was ready to find the actual pwmDuty value, I would map it onto 0-511, taking rounding into account. It worked really well. At low RPM, when the current can change the fastest, the current changed incredibly slow. It basically had the same effect as the dithering you were talking about. I think you could use a HUGE virtual pwmDuty (a long int), and just increment or decrement it by 1, since it doesn't have to respond as fast as a throttle.
__________________
kits and boards

Last edited by MPaulHolmes; 07-03-2009 at 12:01 AM.. Reason: 0-511, not 0-512! hehe.
  Reply With Quote