Conect 5 Rc servomotors to arduino

Thread Starter

jarohern

Joined Jul 28, 2013
1
i'm a rookie student of electronics,and i'm starting to program in arduino, so i want to control 5 servos for a robotic arm.

I will only use the arduino for send the pwm signals to the servomotors and for start the sequence with a push button.

For power the the servomotors, i will use a external power supply.

But my doubt is how to connect te push button?,in my case that i want to get a logic "1", i know that i have to connect one pin of the push button to ground with a pull down resistor and this is connected to the digital pin of the arduino. The other pin of the push button is connected to Vcc, but, this is where a i have my doubt, the pin of the push button that is connected to vcc, it must be to vcc on the breadboard or to +5V pin of the arduino ??

This is an image of how i plan to do, so i don't know if this is correct. The vcc of the breadboard(Red) is where is connected the positive terminal of the power supplly and the positive terminals of the servos and the ground of the breadboard is where is connected the all the ground of the circuit( negative terminal of power supply, negative terminal of the servos) and these grounds are connected to ground terminal of the arduino.

In the image only is 1 servo, put i plan to do the same for the others.

Excuse me for my inexperience in electronics, i hope to improve my skills in this fascinating area . I will really apreciate your help
 

Attachments

Shagas

Joined May 13, 2013
804
I have no experience with the arduino but if The board supplies 5 volts then the schematic should be correct.
You can do it an even simpler way .
The avr i/0 have pull up resistors .
If you put a pin as an INPUT in the Data direction registry and in the PORT you give it a logic High then you enable the pullup resistor :
for example :

DDRB = 0x00;
PORB = 1 << PINB0;

Now if you just pull this pin to the ground then you can activate it. You don't need any external resistor . Just pull this pin to ground with a button switch.

You can use code:

if(bit_is_clear(PINB ,0 ) { // code here } to sense if the button has been pressed
 
Top