View Single Post
Old 03-04-2011, 05:12 PM   #4434 (permalink)
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
Is this the most recent code with the "rpm too high for at least 100ms" requirement? If it is, then I have a different idea. The rpm is probably going from around 100 to over 3000 probably instantly. It may even be the higher bits that are just plain impossible. Like it might go from 0b0000000011111111 (255 rpm) to 0b1000000011111111. Some noise in the high bits. Those high bits are irrelevant, since the rpm will never be something ridiculous like 50000. So, I can make sure the high bits are always set to zero before checking that the rpm is too high. Or if any one of those bits is 1, then you can know the poor thing is out to lunch again, and have it disabled.

Also, the rpm is being checked at around 1kHz, so you shouldn't see an increase in rpm from one read to the next of more than say 100. I could just ignore the fault if the change in rpm is too big?
kits and boards

Last edited by MPaulHolmes; 03-04-2011 at 08:08 PM..
  Reply With Quote