In order to be able to provide enough power for our servos, we need to have a separate power supply since the Arduino cannot supply the servos with enough current. The voltage range for these servos is around 5V. Since most batteries are not 5V we need to use a voltage regulator.
The LM317 is an adjustable voltage regulator that you can change to fit your power supply. You can find the datasheet for the LM317 here
. We will be using the same circuit as on page 9.
The important part for the LM317 voltage regulator is to adjust the 5k trimpot so that the output voltage is at 5V. The LED can be used as a visual indicator for the voltage. If the LED is extremely bright or burning up, then you may have too much output voltage and your servos may be at risk.
Depending on how much higher your supply voltage is compared to 5V, there may be a considerable amount of heat generated. In this RoboBrrd, I am using 11.1V, which means the LM317 heats up quickly. I use a medium sized heatsink to help dissipate the heat.
On the proto-screwshield we want to design for maximum fixability. Therefore, we use female headers for the LM317 to plug into in case of the unlikely event that the LM317 stops working and we need to replace it.