centering a servo


Centering all 9G SERVO motors is critical before every ALLBOT build. This procedure ensures that the rotating shaft of the 9G servo is at it’s center so you can use it in your robot and know that anything you mount to it will have a predictable movement.

There are only 3 easy steps needed to center a 9G SERVO

PROGRAMMING AN ARDUINO UNO OR ARDUINO MEGA WITH THE SUPPLIED SKETCH

This manual assumes you already installed the Arduino IDE on your computer. If you have not done so you can download it here:  https://www.arduino.cc/en/Main/Software

First connect your ARDUINO UNO or ARDUINO MEGA to your computer, open the Arduinno IDE and select the correct BOARD and PORT under the TOOLS menu. Now copy the code below to the IDE (double-click the code view to select):

Now compile and upload the code to the connected board. You will know the action completed successfully when the IDE shows “Done uploading.”

PROGRAM/IR RECEIVE SWITCH

Make sure the the PROGRAM/IR RECEIVE switch on the VRSSM SHIELD is set to program if you want to start programming your ARDUINO. When it is set to IR RECEIVE it will not be possible to program your ARDUINO.

If you tried programming you ARDUINO with this switch set to IR RECEIVE you will need to disconnect your ARDUINO, close the ARDUINO IDE, reconnect your ARDUINO, restart the ARDUINO IDE to continue.

PLACING THE VRSSM SHIELD ONTO THE ARDUINO UNO OR ARDUINO MEGA

Now place the VRSSM SHIELD onto the ARDUINO UNO or ARDUINO MEGA (make sure to pay attention to the orientation of the boards so the pins line up correctly). Also make sure the switch on the VRSSM board is set to PROGRAM.

Check if the shunt for servo 1 is placed correctly, The position of this shunt is determined by what board you use (ARDUINO UNO or ARDUINO MEGA). Follow the instructions on the VRSSM SHIELD to make sure.

CONNECTING THE 9G SERVO YOU WANT TO CENTER

Now connect your servo you wish to center to the SV1 connector on the VRSSM SHIELD (make sure your ARDUINO UNO or ARDUINO MEGA is still connected via USB so it is powered).

Now place the VRBS1 SHIELD onto the VRSSM SHIELD (make sure to pay attention to the orientation of the boards so the pins line up correctly) place some fresh batteries (note the orientation of the batteries) and switch it on.

The code you uploaded to the ARDUINO UNO or ARDUINO MEGA will center the 9G SERVO if it wasn’t already. This could be rather uneventful if it was indeed already centered, if it wasn’t you will see the 9G SERVO quickly turn and come to a halt. You can now disconnect your 9G SERVO as it is successfully centered. You can now quickly connect and disconnect all your 9G SERVO motors you wish to center on by one.