activity bot servos not working
bikeman
Posts: 10
the servos on the activity bot don't seem to run at all. I've checked voltage, the jumper is in VIN. When trying to run calibrate it downloads, the P26 and P27 light comes on but then nothing?
Comments
You will have to supply your source code for others to help resolve your problem
What are you using for a power supply? A lot of servo problems are cause by weak batteries (even if they're new). 9V batteries used in smoke detectors are not a good power source.
-Phil
I'm assuming you are using the ActivityBot tutorial code, so let's look at the hardware for problems first.
There's a Troubleshooting page that might help you figure out what's wrong.
http://learn.parallax.com/activitybot/troubleshooting
If nothing happens except the LEDs coming on, the most common problems are:
1. You moved the 3-position PWR switch to 1 instead of 2. You must put it all the way to 2 to power the header where you plugged in the servos and encoders.
2. Not enough power to run the servos:
3. Connection problems:
Double-check that switch and those batteries and cables, then let us know how it goes!
-Steph
Please read this http://forums.parallax.com/showthread.php/129690-How-to-post-program-code-in-the-forum. and post your code, just in case there is any type of program error, and so others may advise you more on what to look for.
That's correct, and only works if the power switch is in position "2", full on.
Can you provide a photo of your servo/encoder connections?
Not really. Set as an output (as it would be when running a servo), the "white" pin will be 0V most of the time so the voltage difference between the two should be pretty close to Vin and ground (6.75V seems about right).
Bikeman,
The important voltage to measure is between the red and black pins. Also, do not connect the encoders to a set of pins supplied by Vin. They run on +5V, and a higher voltage could damage them.
-Phil
Stephanie, is there such an example program out there that doesn't use the calibration procedure?
If all else fails, you could always download a copy of the Spin IDE and get a simple servo exerciser program. Your ActivityBot won't mind being programmed in Spin just this once...
I'm also curious: You get a different voltage reading between the power plug and the servo headers. I am not yet a proud owner of an Acrtivity Board, but what's in line there to cause the voltage drop? Is that from a diode in place to prevent reverse volting? Either way, 6.5V is adequate for those high speed servos.
#include "simpletools.h" // Include simple tools
#include "servo.h"
int main() // Main function
{
freqout(4, 200, 3000); // Speaker tone: P4, 2 s, 3 kHz
servo_speed (14,-650);
servo_speed (15,650);
pause (1800);
for(int speed = 128; speed >= 0; speed -= 2)
servo_speed (14,0);
servo_speed (15,0);
servo_stop ();
}
It worked for what I needed and may help you test if the servos are working at all.
By the way, look in the text file for some better numbers for the servo speed - I think 100, 200 might be maximum. I still think in BS2 mode too often ;-).