Will This Work?

What I want to happen: Pressing button 1 will initiate the performance of one series of servo operation, pressing button 2 initiates another, and so on. There are 7 buttons in all and 4 servos. One servo is a Vex continuous rotation 269, the other three are hitec 422 servos. I should be able to program it without a hitch, but I am not good with electrical stuff. Here is the diagram:

The batteries to the arduino will be a battery pack that fits the arduino dc jack. Also, I really dont know how to determine how many batteries to use. Also, does the arduino 5v need to be wired in there somewhere?

Hi fella

What is the servo operating voltage? You will use the same voltage to power the servos and the buttons, Attention! the inputs must not exceed 5V.

One way to help with this is to use the board 5V to pullup the buttons or usi internal pullup.

About main power: board works from 7 to 26V. If your pack is 12V it will run great.

About driving the servos. Here is where I don't know much but didn't you need some kind of servo driver? like a L293D?

Regards

I don't think I need a servo driver. Shouldn't the arduino be able to be programmed to control them directly?

What do you mean by saying the inputs must not exceed 5V? The batteries powering the servos & buttons can't exceed 5V?

Conceptually, that's all feasible.

It's good that you understand the need for the servos to have their own, separate, 6V supply (represented generically by that pack.)

As ever, the devil is in the details.

Start with a switch initiating a servo routine, then two switches and two servo routines and so on.

Also, does the arduino 5v need to be wired in there somewhere?

In there where? For what?

The switch arrangement is sketchy, that fritzing jazz is the bunk.
The switches should be between Input (pin) and Ground.
There should be a pull-up resistor from each Input to +5, in my book, but some people will insist that using the "internal pullup" is the cat's pyjamas ("the ticket"). [As you can tell, I'm not sold on the latter.]

You have diagrammed a battery supply feeding into the USB jack - I suspect that is just a minor blunder. It does however bring up a question of the best way to power the Arduino from batteries. It is also notable that when battery powered, you really do not need the overhead of the USB interface, and a Pro Mini is the preferable version.

If you use 7.5V or 9V (five or six cells), you are wasting a significant part in the regulator. 6V is however, a bit much for the Vcc input, but you could generally get away with 6V in batteries and a series (silicon) diode to drop 0.7 of a volt and feed Vcc directly.

If you must use external pull-ups for the pushbuttons, then these do need to be connected to the Arduino Vcc, not the servo supply. The internal pull-ups will however suffice unless you anticipate long cables to the buttons or electrical leakage. Note that buttons should be connected to ground, not Vcc. All other problems relate not to electrical connections, but to de-bouncing which is best done in software.

tiagorosolen:
About driving the servos. Here is where I don't know much but didn't you need some kind of servo driver? like a L293D?

This guy is very confused! :grinning:

(Hint - an L293D is a stepper driver. Servos contain the driver internally.)

http://forum.arduino.cc/index.php/topic,148850.0.html

  1. Make a meaningful subject line

Try to summarize your problem with a helpful and informative subject line. Helpful subjects draw in people who might know the answer. Unhelpful ones are likely to be skipped.

Examples of unhelpful subject lines:

Noob here, help needed

Help me, quickly!

Got error

Lost, help me

Problem with my circuit

No idea what I am doing

Example of a good subject line:

Problem interfacing 24LC256 EEPROM chip using I2C

Schematics are much easier to follow than pictorial diagrams.

I've added a little bit of wire coloring... yellow are servo signal lines, blue are buttons sensing lines, red is positive line and black ground line.

As said by Runaway Pancake it would be better if you keep the Arduino supply separated from your servos, but for simplicity you can start with this, eventually adding capacitors to stabilize the power line where needed.

Thank you so much for the help, everyone. I broke my hand a few days ago so its taking me a long time to write code and hook stuff up, but I will definitely be working on this all night tonight and over the weekend. Question for rlogiacco, what do u mean by adding capacitors to stabilize the line? I dont know anything about capacitors.

I hope at least some of you will keep a tab open with this thread, because I will definitely be back. Again, thanks a lot.

A capacitor (between 10uF and 100uF) hooked up between the positive and ground rails physically located near to a component is going to smooth variations in voltage caused by the variable current consumption of the rest of the circuit.

In other words you are providing a little local tank of energy for that specific component to be used whenever the general line gets under rated due to usage from other components.

If you see unstable behavior by the Arduino or jittering from the servos it is very possible they are caused by voltage fluctuations on the power lines or on the data lines. Data lines stabilization is generally achieved by reinforcing the pull-up or pull-down strength, power line stability by adding capacitance.