Introduction: Two-Mode Servo Tester
When I buy a new servo motor, I want to quickly check if it is working. The Two-Mode Servo Tester lets me do that in a minute. Servos, at least the cheaper ones I know, sometimes do not work as expected when they arrive: The gears jump, the electronic in the servo does not work or it is a 120 degree and not a 180 degree servo. It is a good thing to test a servo before using it! Until now, I used to grab a breadboard, an Arduino, a 5V power supply, a USB cable, my PC and some jumper cables and built a servo tester every time from scratch. With the Two-Mode Servo Tester this is now history.
There are commercial servo tester available for about $10, more or less the costs for this project. The products I found on Amazon test up to three servos in parallel and have three test modes: Manual, Auto and Neutral.
The Two-Mode Servo Tester lets you test up to four servo motors in parallel and has two modes: Follow and Sweep. In Follow, the connected servos follow the position of the potentiometer, in Sweep, the potentiometer is used to set the speed. Inside is an Arduino Nano and a Step-Up DC-DC converter to power the Arduino from the 5V power input. The device has a toggle switch to select the mode and a potentiometer to adjust the control signal.
To build this device, you will need to do some soldering. It is always surprising how these fragile electronic components survive my "soldering". To program the Arduino Nano you need a USB Mini cable. The case is 3D printed with the two STL files that are attached.
It is cheaper to buy a servo tester. But on the images and videos I found, always Micro and never Standard Servos are used. The Auto mode seems not to have an adjustable speed. The Two-Mode Servo Tester has enough power to control four Standard Servos. It can be reprogrammed and you can give the switch and potentiometer another meaning if you like.
1 Arduino Nano
1 Step-up DC-DC converter, adjusted to 5V to 12V (aka. DC-DC Booster)
1 3-pin On-Off toggle switch
1 100-1M potentiometer (aka. adjustable resistor)
1 100n capacitor
1 10k resistor
1 2-pin plug-in terminal block
2 Prototyping board 45x35 mm
1 13-pin single row male header
1 15-pin single row male header
1 2-pin single row male header with 15mm long pins
3 3-pin single row male header
1 3-pin single row male header with two 15mm long pins
2 2-pin single row female header
Step 1: 3D Printed Parts
I used the material "PETG" to print the case for the Two-Mode Servo Tester (TMST). If you do not have a 3D printer, I recommend looking for a 3D printing service nearby.
Step 2: Control Board
Solder the pins to the Arduino board as laid out on (one of) the pictures in the step above. VIN and GND need a long pin to later attach the control board to the power board. I do not know if this is how it is done, but I glued the components onto the board so they stayed in place when I turned the board.
One of the three pins of the toggle switch is cut off so it does not come in the way. It is a bit cramped in that area because the pull-up resistor has to be connected to the center pin of the switch. The potentiometer is placed so that +/- are towards the switch and the third pin is towards the capacitor.
I named some of the Arduino pins on the picture. A0 is the 4th from left, 5V the 4th from right. GND is the 4th from right and D9 the 4th from left; is that coincidence? Anyway, the two grounds of the power supply and the Arduino are connected. The 5V of the power supply and the 5V of the Arduino are not connected; that would not work. The Arduino is powered over the VIN pin.
Step 3: Power Board
Place the two female header so that they match with the positions of
1) VIN and GND of the Arduino
2) 5V and Ground of the power supply.
Connect VIN +/- and VOUT +/- with the pins of the female headers.
Step 4: Assembly
Insert the power board in the case. I used some pins to fixate the board. Plugin the control board and mount the case top.
That is the Two-Mode Servo Tester. The picture shows how to connect the 5V power supply and a servo motor; the colors matter!
Step 5: Programming
Attached is an Arduino Sketch (TmstApp.ino) that you can open with the Arduino IDE and upload to the device. The Arduino IDE can be downloaded from: https://www.arduino.cc/.
Once you have opened the Arduino IDE and connected the Two-Mode Servo Tester, select the port (e.g. COM5) and the board (Arduino Nano) in the menu Tools. Also check/set the processor under Tools. For the Arduino clone I use, the processor is ‘ATmega328P (Old Bootloader)’.
When you press the Upload toolbar button, the program compiles and is uploaded to the device; your Two-Mode Servo Tester is ready!