Continunous Servo Controller
Hello.
I am using openCV to control my Boe-Bot. To interface openCV with BS2, I developed a protocol between the bot and the pc, data will be sent to the BS2 only when the BS2 acknowledge that it is ready for the data.
My problem is this. If I use PULSOUT to drive my servo motors, the motors will be jerking because the pulse is not given continuously, or refreshed at a rate which is fast enough. One of the solutions that I thought of was to use timer interrupt, but that went awry simply because BS2 does not have any interrupt. Even if interrupt was used, it will be hard on the BS2 and it will heat up the voltage regulator pretty dramatically. I've tested this using a PIC.
Next, I tried controlling the servos with TechnoRobbo's digital pot + 555 controller (http://forums.parallax.com/forums/default.aspx?f=21&m=164870). I first tried to feed the voltage to the 555 timer using BS2's PWM function. But, because the PWM needs to be refreshed periodically, it doesn't solve the problem. So, it's pretty obvious that I needed a pot to give a continuous voltage to the 555 timer.
Lastly, I've successfully controlled the speed and direction of the servos using a potentiometer. However, the maximum speed when the motor turns CCW is much greater than the maximum speed when it goes CW. Is there any way I could resolve this problem?
Or if there are any other suggestions, I'd really appreciate it if you could share them with me.
I am using openCV to control my Boe-Bot. To interface openCV with BS2, I developed a protocol between the bot and the pc, data will be sent to the BS2 only when the BS2 acknowledge that it is ready for the data.
My problem is this. If I use PULSOUT to drive my servo motors, the motors will be jerking because the pulse is not given continuously, or refreshed at a rate which is fast enough. One of the solutions that I thought of was to use timer interrupt, but that went awry simply because BS2 does not have any interrupt. Even if interrupt was used, it will be hard on the BS2 and it will heat up the voltage regulator pretty dramatically. I've tested this using a PIC.
Next, I tried controlling the servos with TechnoRobbo's digital pot + 555 controller (http://forums.parallax.com/forums/default.aspx?f=21&m=164870). I first tried to feed the voltage to the 555 timer using BS2's PWM function. But, because the PWM needs to be refreshed periodically, it doesn't solve the problem. So, it's pretty obvious that I needed a pot to give a continuous voltage to the 555 timer.
Lastly, I've successfully controlled the speed and direction of the servos using a potentiometer. However, the maximum speed when the motor turns CCW is much greater than the maximum speed when it goes CW. Is there any way I could resolve this problem?
Or if there are any other suggestions, I'd really appreciate it if you could share them with me.
Comments
This is treated like a servo by your program (using a PULSOUT statement - see the documentation for details), but it only requires the first control pulse to set the direction and speed. After that, it repeats that pulse about every 20ms. It can control two separate servos, so it's ideal for use with the BoeBot.
Post Edited (Mike Green) : 2/8/2008 3:37:22 PM GMT
Cheers mate!