servo and sensor

I currently have two hi-tec 311 servo motors and a parallax ping sensor.

servo:
https://www.servocity.com/html/hs-311_standard.html

sensor:
http://www.parallax.com/Portals/0/Downloads/docs/prod/acc/28015-PING-v1.6.pdf

am having trouble powering the system.

I am unable to run both the sensor and the two motors off the arduino power supply. When I do this is drastically slows down my sensor and the output becomes too jumpy.

I am currently running the two motors off a 9v batter and the sensor off the arduino power supply. This seems to have fixed the problem but I think I have too much power going to the motors because they are seizing up and not taking instructions.

I am not sure what to do about this. Any advice would be greatly appreciated. I am new to electronics.

running the two motors off a 9v batter

From the specifications on the web page...

Operating Voltage: 4.8-6.0 Volts

I think I have too much power going to the motors

Looks to me like the voltage is too high.

I am not sure what to do about this

You need to have a 4.8-6.0 volt (at least 360 milliamp) power supply for the motors. There is a long list of options available: reduce the 9V using a regulator or voltage divider, buy a wallwart that provides 5.0 volts @ 500ma, get a 4 cell battery cage and batteries.

I have reduced the voltage to around 5v and it is still not working.

If you're confident you're providing enough power in the correct voltage range then I can think of two possibilities...

  • The motors were damaged by the 9v
  • There's a bug in the application

I suggest carefully going through a "servomotor tutorial" to ensure each motor has not been damaged. If each motor works correctly then the problem is very likely a software bug.

I don't think it's a software bug. It works fine with one motor and both motors are sharing the same output pin.

I now have exactly 4.88v going to the motors. I am having the same problem. although when i unplug the motors I am getting a reading of 6v at the voltage regulator.

I am using a 5V regulator to reduce the voltage from the 9v battery. Shouldn't it be reading 5v? Could this be causing the problem but when I plug in the motors I get 4.8..... I apologize but I am new to all this so I would greatly appreciate your explanation.

I tested both motors using the sample sweep application both work so i know the servos are ok.

However, the servos only work when connected directly to the arduino power supply. If I use an external power supply they seize up. I know this is possible because I have done the same configuration in the past with the same code.

both motors are sharing the same output pin

Have you tried connecting each motor to its own output pin?

Yes, I have the same issue.

I think it must be the amount of power...

but it seems to have enough.

Why would my 5v regulator return over 5v?

Perhaps its not wired correctly or its faulty.

why not try running the servos from 4 double or triple A batteries

I have checked and it is wired correctly.

I also tried multiple voltage regulators so unless my entire order is defective it's not reducing down to 5v.

Can some one explain to me how I can calculate the required voltage for x number of servo motors?

Can some one explain to me how I can calculate the required voltage for x number of servo motors?

If you have x servos, each requiring 5V, then the supply is 5V, since the servos will be connected in parallel.

I have checked and it is wired correctly.
I also tried multiple voltage regulators so unless my entire order is defective it's not reducing down to 5v.

Then what you think you are checking is wrong or your regulator is broken.

Have you got capacitors on the input and output? If not it might be oscillating, you do need these as well as the regulator.
Are you measuring it on a meter or a scope?
Have you connected the ground to the arduino ground?