DIY Servo Tester for +180deg Servos!!!

by agtheo09 in Circuits > Electronics

953 Views, 16 Favorites, 0 Comments

DIY Servo Tester for +180deg Servos!!!

physical_full.jpg
cad_full.png
5.png

This Project was created to expand the use of servo tester along with challenging my creation skills! This Tester not only checks the life of a servo but also expands the variety of servo types to servos with a larger range of motion. This tester includes features such as 3 turning modes(position control, neutral, speed control swipe) for everyone's needs! The main reason I designed it, is because I had trouble finding a servo tester that met my expectations; 300deg servos and turn percentage preview. I hope this helps you too!


Full Github Repo here!

Printables design here!

Main code here!

Electrical Schematic here!


BOM List:

  • 1x Arduino Nano Type-C
  • 1x I2C LCD Screen 16X2
  • 2x Standard 16mm Pushbuttons
  • 1x Switch
  • 1x B10k Potentiometer
  • 2x 220 Ohm Resistors
  • 1x Jack Plug Input Connector
  • 1x Jack Plug Power Supply 5V (I used 5V 3A)
  • 6x Male Header Pins (3 in use, keep backup)
  • 6x M3 6mm Screws
  • 4x M3 8mm Screws
  • 6x M3 Regular Nuts
  • 5x Small Servo Screws
  • 20-22 AWG Wire Gauge is preferred for the servo powering
  • 26-30 AWG Wire Gauge is preferred for Arduino Signals (buttons potentiometers etc)

Of course you will need a 3D Printer and some Nice Filament to print this beauty!

Printing All the Parts!

image00034.jpeg
case_only.png
knob_only.png
seamer_only.png
separator_only.png

I used my Original Prusa MK4 with ESun PLA+ for this example.

Here is my preference in Printing Settings:

  • Nozzle: 0.4mm
  • Layer Height: 0.2mm
  • Infill: 60%
  • Perimeters: 3
  • No brim or Raft
  • Use Supports (Case.stl, Lid.stl, Knob.stl)
  • Don't Use Supports (Separator.stl, Seamer.stl)

Cleaning the Support Material

image00032.jpeg
image00033.jpeg

Make sure that you remove carefully all of the support material from each part.

Add User Interactive Parts

image00030.jpeg
image00031.jpeg
image00028.jpeg
image00029.jpeg
image00026.jpeg
image00027.jpeg
image00025.jpeg

Jack Plug

Slide the Jack Plug in the slot shown in the pictures below. Use a ruler to align it with the outer surface. Use Super glue on around the plug to secure it in place.


Buttons

Then Slide the standard 16mm push buttons through the 2 middle holes of the Case.stl from top. Then fasten Them in place using the nuts that come in the package.

Tip: Use a pair of pliers to tighten the nuts!


Potentiometer

Place the B10k Potentiometer from the inside of the Case.stl and fasten it with the nut & washer that come in the package.

Tip: Use a pair of pliers to tighten the nut!

Add Solder to Pins

1.jpg

Add solder to all the pins of:

  • Jack Plug
  • Buttons
  • Potentiometer


Prepare the LCD Screen

image00024.jpeg
image00022.jpeg
image00023.jpeg
image00021.jpeg
  1. Remove the headers fom the lcd module
  2. Strip and Solder Cables
  3. Bend the wire like shownin the picture

LCD Placement

image00019.jpeg
image00020.jpeg

Prepare cut servo screw to 7mm in length. Finally we can place the LCD! Place the LCD like so and fasten it with the servo screws.

Attention!!! Be careful of the screen's orientation. We don't want the preview to be upside down!

Clean Separator.stl

image00018.jpeg

Use a 3mm drill and redrill the 4 holes of the Separator.stl

Separator Placement

image00017.jpeg

Use 4 M3 8mm screws to secure the Separator.stl as shown below.

Attention!!! Don't forget to pass the cable through the slot!

Header Pins (Servo Output)

image00015.jpeg
image00016.jpeg

Get some male header pins and snap a triplet of. The sort side of the pins have to be from the inner side of the Case.stl. It's supposed to be press fit, but i suggest you use super glue for best security!

Tip: Before glueing the pins in place connect a servo from the outer side of the Case.stl. In this way the pins are going to be perfectly aligned!

Solder to the Header Pins (Servo Output)

image00016.jpeg

Add some solder to each of the 3 pins to prepare them for later.

Attention!!! Don't overheat the pins with your iron because they might dislocate!

Nano Placement

image00014.jpeg

Cut a servo screw to 5mm in length Slide the nano in the slot of the Case.stl. Slide it all the way and secure it with the servo screw along with the Seamer.stl. Use the picture for guidance!

Push Button GND

image00012.jpeg
image00013.jpeg

Now we connect the GND to the push button. Use 12cm cable (around 26-28AWG) to connect it to one of the terminals of the pushbutton.

The push buttons are configured as INPUT_PULLUP. Chech more for INPUT_PULLUP here!

nfo: If you have illuminated push-buttons instead of just connecting one of the terminals with a GND wire, you should bridge the LED (-) and one of the terminals with the GND wire, just like in my example!

I prefer the LED of the button to be always on (this tutorial follows that concept). But feel free to use any of the 2 scenarios in the schematic in the last picture/attachment! (credits to reddit's "r/electrical" for the post)

Switch Connection

image00011.jpeg

Connect the (+) terminal of the Jack Plug Connector to one of the terminals of the switch. Use 20-22 AWG Wire for this purpose.

Header Pins Connection

image00010.jpeg
image00009.jpeg
image00008.jpeg

Grab an old servo cable or make your own. Split the wires a bit and add solder to the ends. Connect the triplet to the headers and use some heatshrink if you like. Now split the triplet, power wires and signal wire, like shown. Run the power wires through the back and the signal towards the nano. Trim and solder the signal to A2 port on the nano.

Attention!!! Don't solder the power wires just yet!

Nano Power Supply Connection

image00007.jpeg
image00006.jpeg

Grab an old servo triplet cable or make your own. Completely split the wires into the power cables (-, +) and the signal one (keep the signal for later). Connect the power cables in parallel with the ones from the header pins (heatshrink here!). Then connect the (+) to the NO terminal of the switch and the (-) to the (-) terminal of the jack plug. Then connect the nano power supply cable by connecting the source's (+) to Vin port and (-) to Any GND Port.

Attention!!! Use Heatshrink for this purpose to avoid any short-circuits

Pushbutton LED Positive Connection

Use a piece of wire around 10cm to connect the (+) terminals of the LEDs in the buttons.

(This step is for those who have illuminated buttons)

Potentiometer Connections

image00003.jpeg
image00004.jpeg

Use the signal wire that you kept from step 15 to connect the middle terminal of the potentiometer. Use Heatshrink preferably. Trim the other side and connect it to A7 port on the nano.

Then connect to the other terminals to pieces of 10cm wire for (-) and (+).

Powering Components

Merge all the (-) into one cable and all the (+) into another of the following components:

  • Buttons (GND for sure, LED (+) if you have illuminated push-buttons)
  • Potentiometer
  • LCD Screen

Use headshrink!

Info: I usually get all the wires facing one direction, twist them together, then I control the wires like one and merge them with a single cable!

Powering Cables to Nano

The 2 wires from step 15 (-, +) trim them and connect them to GND and 5V on the nano respectively.

LCD Communication Wires

Connect the LCD's SDA cable to A4 port on the nano and the SCK to A5.

Push Button Wires

Connect the buttons output terminals to the nano:

  • Mode Button → D3 Port
  • Type Button → D4 Port

Double Check Connections!

electrical_schematic.png

Now because I usually don't trust myself on these things i would use a multimeter and check connections again, verifying them with the schematic!

Note that in the schematic i am using regular buttons (w/o light). Step 16 explains the (+) connection of the LEDs. And step 12 about (-) (bridging).

Congrats! You Finished All the Connections!

image00001.jpeg

Now we are happy because all the difficult part is over!

Always clean your mess after electronics!!!

Add Nuts to the Lid.stl

image00002.jpeg

Grab 6 M3 regular nuts and press fit them into place on the Lid.stl. If they are loose use a drop of super glue to better secure them!

Fasten the Lid.stl to Case.stl

1.jpg

Put the Lid to cover the electronic mess that you have done in the case. Use M3 6mm in length screws to fasten it in place!

Add the Knob.stl

1.jpg

Take the Knob.stl and press fit it on the Potentiometer.

And that's it for the hardware!

Install LCD's Library

For the program to run you need to install the LiquidCrystal_I2C.h library. Source files for the library here.

Credits to: fdebrabander and João Pedro São Gregorio Silva for the library

Upload Program on the Nano

Get the code from here or the attachments and upload it to the Nano using the IDE of your choice! There are plenty of tutorial on how to do it. Ensure you select the correct board type (Arduino Nano) and COM port!

Downloads

Admiring the Beauty!

physical_full.jpg

Look at this......

User Guide

1. Connect 5V Power Supply (5V 3A works great for me!)

2. Flick the switch and wait

3. Press the T Button to start

4. Select the servo type by pressing the T button to switch the ranges from narrow to wide and the opposite

5. Select on of the Turning Modes by pressing the M Button (position control, neutral/middle, speed controlled swipe)

6. That is the most Easy in usage right?

Troubleshooting

  • If the Screen is illuminated but doesn't show the chars check the SDA and SCK cables and connections. check the of the LCD and change it in the code if necessary on line 10. (Default is 0x27)  
  • If the buttons don't work check the ports of the connected Wires



I have a series of tests in this folder. Use them to identify the problem! And feel free to reach me out on printables!


  • button_test → Prints if the button on the port specified on line 1 is pressed or not in the serial monitor
  • lcd_test → Prints on Screen on the first line "Hello!" and of the Second "Servo Tester" (check the lcd address and change it if necessary on line 4)
  • potentiometer_test → Prints the value of the potentiometer in serial. [0, 1024)