3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

The Arduino Mothbot

Step 3Connecting the Servos to the Arduino

Connecting the Servos to the Arduino
«
  • IMG_2750.JPG
  • IMG_2755.JPG
  • IMG_2754.JPG
  • IMG_2753.JPG
  • IMG_2752.JPG
  • IMG_2751.JPG
If you're going to build a robot the first thing you probably want to work out is how to get it moving around. Most likely you want to be able to send it forward, backward, right, left and make it stop. If you can't figure out how to command it to move properly you're not likely to be able to make it do anything when you connect all the sensors. Below are the steps to connect the motor to the Arduino.

1. The first thing to do when setting up the solderless breadboard is to set up the ground (GND) and power (+6V) for the servos. I chose to use the two long strips on the board that would be closest to the Arduino.

2. Once the ground and power lines are identified connect the ground of the Arduino board to the ground strip on the solderless breadboard. Do not connect the power to the solderless breadboard yet.

3. Each servo has three wires that come out of them. Mine have a black, red, and white wire for each. The black is for ground, the red is for power, and the white is the control wire. Cut three jumper wires for each servo of the same size (so 6 in total).

4. Attach the jumper wires to the end of the servo wires and then each servo to the solderless breadboard.

5. Now use jumpers to connect the ground and power from each servo to the ground and power of the solderless breadboard.

6. Now connect the control wires from each servo to the Arduino. Connect the left servo to digital output (PWM) 3 and the right servo to digital output (PWM) 11.

7. Finally, connect the ground and power from the 4AA batteries to the solderless breadboard ground and power. Don't be alarmed if the servos start moving when your Arduino has no power or is not yet programed.

8. Using the code you should now be able to run the motors in the forward, backward, left or right directions using the included functions.
« Previous StepDownload PDFView All StepsNext Step »
2 comments
Jan 16, 2012. 3:08 AMkerryavance says:
would it be possible to use two motors instead of continuous rotation servos?
Oct 11, 2010. 6:47 AMrobodevil says:
you didnt show the connected power wire from battery pack to the solderless board..

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
51
Followers
7
Author:natantus(Chris Gilmer Project)
I'm a software and aerospace engineer. When I've got free time I like to work on robot projects and love to play with my Makerbot Cupcake and Eggbot. I would love to be involved in DIY prosthetics a...
more »