Servo Troubleshooting

Here is a list of some common symptoms and how to fix them.

The first step is to double check your sketch and make sure all the code is correct.

  • Double check your sketch against RightServoTest. 
  • If the code is correct, find your symptom in the list below and follow the checklist instructions

The servo doesn’t turn at all. 

  • Double-check your servo connections using this diagram as a guide. 
  • Make sure the BOE Shield’s power switch is set to position-2.  You can then re-run the program by pressing and releasing the board’s RESET button.
  • Make sure the battery pack has fresh batteries, all oriented properly in the case.
  • If you are using the Boe-Boost, make sure it is seated in the battery holder properly. 
  • Check and make sure you entered the sketch correctly.

The left servo turns when the right one is supposed to. 

This means that the servos are swapped.  The servo that’s connected to pin 12 should be connected to pin 13, and the servo that’s connected to pin 13 should be connected to pin 12. 

  • Disconnect power—both battery pack and programming cable.
  • Unplug both servos.
  • Connect the servo that was connected to pin 12 to pin 13.
  • Connect the other servo (that was connected to pin 13) to pin 12.
  • Reconnect power. 
  • Re-run the RightServoTest sketch.

The wheel does not fully stop; it still turns slowly. 

If the wheel keeps turning slowly after the clockwise, stop, counterclockwise sequence, it means that the servo may not be exactly centered.  There are two ways to fix this:

  • Adjusting in hardware: Go back and re-do Chapter 2, Activity #5: Centering the Servos. If the servos are not mounted to give easy access to the potentiometer ports, consider re-orienting them for re-assembly.
  • Adjusting in software: If the wheel turns slowly counterclockwise, use a value that’s a little smaller than 1500.  If it’s turning clockwise, use a value that’s a little larger than 1500.  This new value will be used in place of 1500 for all writeMicroseconds calls for that wheel as you do the experiments in this book.

The wheel never stops, it just keeps turning rapidly. 

If you are sure the code in your sketch is correct, it probably means your servo is not properly centered.