How Can I Troubleshoot My Servo


#1

I got a GoPiGo version 2 for Christmas. I am running a downloaded version of the Raspian for Robots on a SD card I bought for this purpose.

I thought the Power Management IC Development Tools Assemb Mini Pan-Tilt Kit w/Micro Servos would be a flexible option for moving the camera around. So I ordered it through Chicago Electronic Distributors. (At first I was planning to use only the pan axis to move the camera right and left.) The servos on the Pan-Tilt are Tower Pro Micro Servos SG90 and the cable has the same color code as the GoPiGo servo.

I connected the servos (one at a time) to as shown in the GoPiGo 2 connection instructions (Yellow towards the Right LED and Brown towards the Left LED). I ran the basic_test_all.py code. One of the servos made some noise and moved a little the first time I tried the program, but everything is still and silent regardless of the command. How can I tell if the issue is with the servo or is it with the GoPiGo 2 board hardware or programming?

I tried to upload logs run while connected to each of the the two servos, but I get a message: “Sorry, new users cannot upload attachments.” Here are a couple of pictures of the Pan-Tilt with the tilt servo hooked up.

<img


#2

Hi @welterlenr,

Thanks for choosing our GoPiGo. Can you take the servo out of the black plastic stand that you are using, since it might restricting its movement. After having the servo free, can you try this example code and tell us its behavior. Also please do post a test log with your reply, I will make sure you get the rights to upload them.

-Shoban


#3

I took the servos out of the pan-tilt brackets and ran the basic_servo.py. See the image. Regardless of the command entered while the program was running, the servos are still silent and still. Thank you for getting me set-up for uploads.

The test logs (one for each servo) are uploaded with this reply. I am interested to learn what information in the logs provides the status for the servos. The first test log was generated when the servo on the top of the arm that would tilt the camera around a horizontal axis was connected. The second test log was generated when the servo on the bottom of the arm that would pan the camera around a vertical axis was connected

logTopTiltServo.txt (6.6 KB)
logPanBottomServo.txt (6.6 KB)


#4

Hi @welterlenr,

The test log provides information about the GoPiGo chip, firmware version, status of the avrdude and the encoders.The purpose of the log was to check if there was any potential problem with GoPiGO hardware and the log looks fine and there should not be any issues with the GoPiGo.

Can you try using a different servo with the GoPiGo or use the same Servo in a different setup, to confirm whether the problem is with the Servo or the GoPiGo.

-Shoban


#5

I am new to all this, so I want to confirm that these SG90 9g Micro Servos are compatible with the GoPiGo. This is a a link to the datasheet I found for the SG90 servos that came in the Power Management IC Development Tools Assembled Mini Pan-Tilt Kit: http://www.micropik.com/PDF/SG90Servo.pdf.

The SG90 datasheet states that the Position “0” (1.5 ms pulse) is middle, “90” (~2ms pulse) is all the way to the left. Is this the signal format that is provided by the GoPiGo servo pins? It also looked like the color code on the PWM (Orange), Vcc (Red) and Ground (Brown) is the same as the GoPiGo servo pins described in the GoPiGo instructions. Have I interpreted this correctly?

Are input signals for most servos configured in this way? I have access to some old radio controlled model airplane servos. Would the signal required for most of these servos be compatible with the GoPiGo? Is there difference between input signal required for a “Digital” versus an “Analog” servo? Obviously, I would have to look up the datasheets on the specific servos from these RC-airplanes for confirmation.

One final question - if I were to connect the servo to the GoPiGo incorrectly (either installing the connector backwards or with only two of the three pins in the connector), would that damage either the GoPiGo or the servo when it is powered up? Is it okay to plug the servo into the GoPiGo with the GoPiGo powered-up? (It takes a lot of time to halt, power-down, power-up and re-establish a VNC session with the Rasberry Pi.)

Thank you for your patient guidance.


#6

@welterlenr,
The SG90 9g Micro Servos are compatible with the GoPiGo, though the GoPiGo can only control one of them at a time. The pulse length is same for most of the servo’s out there, however if you want to use a servo which is much more different that the SG90 ones then it would be better to check the datasheet just to make sure that they use the same pulse length.

If you have some other servo’s and they look similar, you can try using them but we cannot guarantee that they would work.

Usually it is a bit hard to destroy the servo by connecting them incorrectly. Most of the servo problems are caused when you try to push past the end stop for 0 and 180 degree which could damage the internal mechanism. All the servos are bit different internally and usually it is suggested to manually find out where the end-stops are. For example, the servo that you use might have endpoints at 170 degree instead of 180 and it would be better to find out that the servo stops at 170 and keep that as a limit that you use.

And yes, you should be able to hot swap the Servos however we would recommend that you stop the program when you are changing the connections .