with an arduino UNO and a separate power supply such as Power Supply
I am fairly new to Arduino and have only have projects while using the 5v onboard power supply
Will I attach the third wire on the servo to a ~pwm pin to control the angle as in the following picture?
Will there be any need for a transistor such as in the following picture?
3.Will I need capacitors and a diode at any point?
I apologize for the basic questions, and I did try to use the search function to find more answers but could not find anything I could under stand. Thank you
EDIT.. adding more information for the servo
Specifications:
Weight: 60g(2.1OZ)
Dimension: 40*20*40.5mm(1.57*0.78*1.59inch)
Speed: 0.16sec/60°(7.4V)
Accuracy: 0.3°
Torque:15 kg·cm (208 oz·in) @6.6V;17 kg·cm (236 oz·in) @7.4V
Working Voltage: 6-7.4V
MIn Working Current: 1A
No-Load Current: 100mA
# Spline: 25T(6mm diameter)
The default wire: 30cm(11.8inch) in length
270 degree rotation. Controllable angle range from 0 to 180 degrees, Excellent linearity, precision control. Can be rotated within 360 degrees when power off
Control Specifications:
Control Method: PWM
Pulse Width: 500~2500
Duty Ratio: 0.5ms~2.5ms
Pulse Period: 20ms
Please make sure that the duty cycle of the controller you are using conform to our specifications, otherwise the servo can't turn up to claimed degree
Unlike an ordinary DC motor, the servo has a built-in transistor, diode and regulator. So picture 1 applies to a servo, picture 2 to a DC motor when diode added.
In the first picture the Arduino and the servo are both being powered from the same battery.
It is probably easier to power them from separate power supplies because they need different voltages. Just make sure the GNDs of the two power supplies are connected.
To power the Arduino through its power jack it needs between 7 and 12v and 7v power supplies are not very common. However a 9v power supply is too much for the servo. You can power the servo with 6v or even 5v) if you don't need the extra performance that 7.4v would give.
Another option is to power both the Arduino and the servo from a pack of 3 xAA cells (4.5v) or a regulated 5v power supply. In both of these cases the power supply should be connected to the Arduino 5v pin. However, be warned, connecting more than 5v to the Arduino 5v pin will damage the Arduino.
...R
PS ... the PP3 style 9v battery in the pictures is quite unsuitable. It cannot provide enough current. If you want a 9v battery use a pack of 6 x AA cells.
Thank you Robin and UKheliBob for the advice.... also found a power adapter that is 7.5 volts could I just add a proper sized resistor inline to reduce it to 7.4? I am trying to use the servo to open a dog door so I’d like to get as much power from the unit as possible. Thanks mate
7.5V is fine. When a servo is specified for the odd-looking value of 7.4V what they mean is 2 x 3.7V nominal Lipo batteries in series (as commonly used in RC models). A 7.4V Lipo will be up to 8.4V when it is fully charged, so 7.5V is no problem.
Just make sure you have enough current because that's a powerful servo. I'd guess something like 3A would be about the practical minimum.