Introduction: Sweep Servo Motor With Arduino Nano

Picture of Sweep Servo Motor With Arduino Nano

Hello friends.

In this instructable, i have shown how to sweep a servo motor with Arduino Nano.

Generally servo motor is used where is low speed but with a high torque is needed. this work can be done by a geared motor too.

But servo motors are different from geared motors, servo motors can read it position & can rotate to given degrees.

Tools we will need.

  • Arduino Nano
  • A servo motor.

First of all attach servo motor to Nano like in the image above.

  • The yellow wire is signal wire which will be attached to Nano's digital pin 9.
  • The red wire is positive wire which will be attached to 5V.
  • The black wire is negative wire & it will be connected to GND.

all the hardware work is done, now move to software part.

Step 1: Uploading Code

Picture of Uploading Code

Attach the USB cable to Nano And PC.

Open the Arduino IDE software.

Go to File > Examples > Servo > Sweep.

Upload it to Nano.

When uploading is done.

The servo motor will follow commands given by Nano.

  • It will rotate to 0 degree at first.
  • Then one by one degree it will rotate to 180.
  • When it will reach to 180 degree.
  • It will do same process reversely & process goes on until you remove the power or upload the new sketch.

If you have any question or suggestion, you can write me in the comment section below. ^_^

Comments

manasm21 (author)2017-09-23

The computer is not detecting Nano. What to do?

aetoscy (author)2016-03-13

I want to use it to release a parachute in a bottle rocket project. How can I a countdown timer? Lets say 6 seconds after the battery connection to the arduino? Is there any ready timer for arduino?

TobiasF16 (author)aetoscy2017-01-07

Hey, I dont know, if you need it any more... You can do a delay of the time you want to wait before the servo code. This should be work.

Best wishes

Tobi

DRAGUA1979 (author)2016-02-20

I thought it was yellow.

Gautam1807 (author)DRAGUA19792016-02-20

thanks buddy, just realize after your comment.

About This Instructable

8,309views

14favorites

License:

Bio: Curious by nature. Like to know how things works & love to learn about them. Especially electrical, electronics, mechanical, micro-processors.
More by Gautam1807:How to Build a JIG for LEDcube (Full Tutorial)Hide & See Partition in Windows 7/8/8.1Controlling blinking speed of an LED with Arduino & Pot (With video)
Add instructable to: