Monday, November 30, 2015

Fix for adding Servos on the Arduino Analog Port/Pins of Servo/Sensor Shield

Over the weekend I found and fixed the design bug that prevents servos from working properly when they are connected to the analog port connectors of the standard servo/sensor shield.  The problem is that the logic five volts is always used to power those servos.  If there is any load on the servos they will overload and shut down the logic five volt voltage regulator.  The fix involves cutting two runs and adding two jumpers.  This change is needed to route the five volts around the servo connectors.
The problem showed up with my spider robot project.  Some servos tried to come to life without the six volt power supply being turned on.  It took a while to figure out where they were getting their power from.  The logic five volts was being pulled down to about two volts!

Also do not forget to remove the green jumper near the six volt power input screws.  It will also short the five volt logic power into powering the servos.  That could seriously damage the Arduino!

Another thing you might need to do to use more than 12 servos is to change a line in servo.h.  This limit gets mistaken as to why servos do not work on the analog pins.  There are usually 12 servos already on the digital pins and when you try to use the analog pins you have exceeded the 12 servo limit.  The line says something like "Maximum servos per timer = 12" and you will need to change it to 18 or even 20 if you want.  I have made the change months ago and it does not hurt anything to increase the maximum servos per timer.  Servo.h can be found in your Arduino/libraries/servo folder.

While working on my "Spider" smoke rolled off the Servo/Sensor shield.  This time a run had burned off the board!  I never had these problems with my home made servo shield!  Here is a picture of the burned run in the top left corner:
Here is the cure for the burnt run as well as a cure for the power distribution issues.  basically you take power from the screw terminal and distribute it to the top and middle of the 16 digital pin servo connectors as well as to the top of the 6 analog pin servo connectors.  With this change the spider worked perfectly.

While I am showing fried stuff, here is what happens when you buy a cheap servo on eBay:

Get real servos that say "Tower Pro" not "TowardPro".  Do not buy them if the seller intentionally hides the manufacturer name.  There are a lot of junk servos on eBay!

Another issue I just confirmed is that all HiTec servos work in the opposite direction of all other servos.  I now have five HiTec servos!  There are two options: Sell them or figure out how to reverse them internally.  I might do that and then post on how to reverse them.


Post a Comment