Motor PID control


i want use pid control motor speed.  the motor have has opto-interrupter gives 6 pulses per revolution.  the problem i've been running how sample pulses.  i've tried interrupts , pulsein function didn't great results.  i want use tachometer calibrator, rpm needs stable , repeatable.  

the interrupt method used counted pulses duration took run code.  my issue seems if pid function took longer or shorter calculate, pulse count off because accumulating longer.  

i wasn't able pulsein work.  i'm novice , new sort of thing.

what guys recommend measuring frequency of motor? want run 2000 rpm, should able measure 200 pulses per second.  in past i've seen code measured time interval between pulses, feasible application?  

sorry can't post code using interrupt method, straight out of magazine , don't want cause copyright infringements.  the code trying pulsein function straight pid playground page.
http://www.arduino.cc/playground/code/pidlibrary

thanks help,

here's similar thread...

http://www.arduino.cc/cgi-bin/yabb2/yabb.pl?num=1258765801/9#9

read , post here , can discuss.  these arduino-mechanical projects interesting me i'll more happy offer help.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Motor PID control


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums