Closed control loop

Hello guys!
I'm beginner with Arduino. I did small controls with Arduino and now I'm trying to control 3 servo-motors with a power board and a mega Arduino. The Arduino sends servo signals to the power board and the power board sends PWM signal to the servo-motors to control the speed. But with this control the speed stay a little unstable, and I'll need to control position too.

So I need a control with a Closed loop control. I already have magnetic encoders (ED19 series - Schaevitz - of 2 signals) attached to motors for read the position and know the position and the speed of each servo-motor, but I don´t know how to program the closed loop control in the Arduino!!!

If anyone can help me I would greatly appreciate it.
Thanks in advance!! :slight_smile:

Opa AntonioC, tudo bem?

Acho que esse tópico pode te ajudar:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1282384853/0

Opa... td bem Italo ... e vc??

Mto obrigado pelo tópico ... vou dar uma olhada melhor esse final de semana pq to lotado de coisa na faculdade essa semana!! =/
Mas pelo q dei uma olhada rápida acho q vai ajudar mto no meu trabalho de conclusão de curso!! hehe
Te falo como q ficou depois!! =]
Abrass