Attach 2 motors to arduino uno board

1 how can we attach 2 servo motors to Arduino uno board?

2 how can we attach 2 servo motors as well as an ultro sonic sensor

Hi,

For servomotors, you will most likely want to connect the GND pin (on each of them) to one of the Arduino’s GND connector.

You will also want to connect each of their SIG (signal) pin to some digital output of your Arduino board. On most modern Arduino boards, you can use most/any digital pin. On older boards, you may only be able to use PWM-enabled pins (indicated with a ~ symbol).

Finally, the VCC pin of each servomotors should be connected to the Arduino’s Vin pin or to a separate power source (usually from 4.8 - 6.0 V DC). Make sure not to connect it to the 5V pin as this could cause issues (draw too much correct and damage the on-board 5 V DC regulator).

You can then use the Arduino Servo library to send a proper R/C servomotor control signal to your motors.

For the ultra sonic sensor, it depends on which product you are using. Some use a digital signal (such as the “ping” sensors) with a pulse length proportional to the distance. Other sensors use an analog voltage from GND to VCC (also proportional to the voltage). Finally, some other sensors actually use a serial communication protocol and require you to send commands to receive information about the measured distances.

Sincerely,

Thanks scharette . but by mistake I mentioned it as servo motors.it is normal dc motors.i have tried many sites but I don’t know the reason the motors don’t work.

To help you better, we recommend that you post one or more pictures of your setup, making sure to show clearly all components (microcontroller board, motors, power sources, wires, jumpers, etc.).

You can attach images to your reply by going into Full Editor mode. See the attached image for details.

Sincerely,