Arduino Mega based 8 Servo Tester

Every time I build an RC vehicle I end up putting together the Arduino knob example sketch to test a servo or two. This works fine except it takes quite a while to set up particularly if you need to control more than one so I decided to make a test rig for servos. I decided to use an Arduino Mega because it is quite a powerful board and easily capable of handling multiple servos. I chose 8 because I could fit 8 encoders on the front of the enclosure I had and I chose encoders because I have a parts bin full of them.

Here is the video:

Each encoder has a push button which is operated when you push in the encoder. I set these up to reset the servo position to 90 degrees.

Each encoder has three output pins, the middle pin is connected to ground. The other two pins are connected to input pins on the Arduino with the internal pull ups enabled so that the pins are normally high. When you rotate the encoder one of the encoder outputs will go low before the second pin. By monitoring which pin goes low first you know which direction the encoder has been turned in.

Here is the code I used for my servo tester, if you have any questions about it just head over to the forum discussion here.

Leave a comment