cmucam3-hardware (#1) - Programming a continuous Servo (#204) - Message List
Hi,
My project is similar to the Spoonbot project. I have already made my servos continuous, but during testing the servo can't be stopped.
After reviewing the Spoonbot's code, i noticed that to stop the servo the position was set to a 'MID' position. How does that work?
How do I program the servos to at least stop, move forward and reverse?
Thanks so much!
-
Message #513
Stopping servo motors isn't that easy, because there is a certain pulsing interval when they stop completely, shorter intervals move in the reverse direction, higher forward. The stop interval differs for every servo a bit. The most easiest thing to do is to disable any pulsing completely when you want to stop the servo. I didn't try it, but I suppose you could use _cc3_servo_enable(servo, false) to stop a servo, and true to activate it again (you should use cc3_gpio_set_servo_position(servo, pos) directly after activating the servo).
jvm05/09/08 06:46:41 -
-
Message #514
Hi again!
Thank you so much for the advice. I can stop and activate the servos by enabling by the _cc3_servo_enable(servo, false) method.
But I can't seem to make it reverse. I entered all kinds of values at the position value of cc3_gpio_set_servo_position(servo, pos) but it doesn't reverse.
Am I missing something?
anupaprika05/09/08 09:53:31 -
-
Message #515
In theory, cc3_gpio_set_servo_position(servo, 30) should go reverse and cc3_gpio_set_servo_position(servo, 235) forward. I'm sorry I can't try it today, but I will do during the next week. (The spoonBot approach is a little bit different: They do not stop the pulsing, but they calibrate the exact value which lies between reverse and forward for each servo in seperate. Advantage: You also can make sure that the servo moves in both directions with the same speed.)
jvm05/09/08 10:58:26 -
-
Message #516
Thank you so much for replying so fast ;-)
Can I just check with you the steps of modifying the servo.
I substituted the potentiometer with the two 2.2k ohm resistors, is it really necessary to place the potentiometer back unattached to anything? Because I just left it out.
It seems like I can't control the servo, I just can control the motor to switch on and off.
Do you think if I tried out numbers between 0 and 235, i might find the value that changes the motors direction? or is the problem in the servo's hardware?
anupaprika05/09/08 11:14:11 -
-
Message #517
I have substituted all the values from 0 to 255, no reverse here.
Im stumped...I think its the servo hardware problem.
What do u think?
anupaprika05/09/08 11:26:31 -
-
Message #518
No, you won't find any value that changes the direction. 15 HAS to be another direction than 240. Which potentiometer? What hardware are we talking about? I thought you just connected a servo motor directly to CMUcam3 interface. Could you flash your CMUcam with the cmucam2 emulator and run the java gui interface? You can try out servo values there. If this doesn't work, it will most likely be a hardware problem.
jvm05/09/08 11:48:49 -
-
Message #519
In the spoonbot's description page, it said that the servo needs to be hacked and made continuous. From the Acroname link provided I followed the instructions, which is to remove the potentiometer and replace it with 2 2.2k ohm resistors.
I have a feeling its a hardware problem because there is no change even when I used the cmucam2 emulator.
Anyway, thank you so much for helping me. At least I can get it to stop. Thanks Jvm ;-)
anupaprika05/09/08 12:04:20
-
-
-
-
-
-
