Quote:
Originally Posted by SloS14
dangit. My MAP sensor won't show up till Thursday and I'm gonna be out of town till Sunday....not that it really makes a difference because I have no way of turning motor RPM into actual pressure 
@ jamesm - I hope it's close-to-that-simple. I mean...it could be. It would just have to know how often to adjust the ESC.
Off topic, but Ruby looks weird as balls.
|
if by 'weird as balls' you mean 'the most beautiful awesome thing ever', i totally agree

.
seriously though it pretty much is that simple. that's code i roughly ripped from another project i've done that basically did the exact same thing (headspeed governer for an rc helicopter, using a hall sensor for feedback instead of map, but same difference). works like a charm. i didn't even re-write it in C, just ran it as straight ruby off of a raspberry pi with a slave arduino feeding events. very, very simple and effective way to control the speed of an electric motor based on some sort of feedback and target. the trick is tuning the gain, but that can be a simple pot to make it easily adjustable (boost could as well).
of course for this purpose i'd re-write it (and the rest of the necessary code) in c and burn it to an atmega so it'll be self-contained and cheap as hell to reproduce.