Sei sulla pagina 1di 9

(/) Let's Make ...

Featured (/explore/) Write an Instructable Login (/account/login/) | Sign Up (/account/gopro)


(/about/create.jsp)

Classes (/classes/) Contests (/contest/) Forums (/community/?categoryGroup=all&category=all) Answers (/tag/type-question/?sort=RECENT)


(http://www.autodesk.com)

Teachers (/teachers/)

About This Instructable

License:
8 24,387 views
49 favorites

ICStation
(/member/ICStation/)
ICStation.com
(http://www.ICStation.com)

(/member/ICStation/)
Follow 221

Bio: www.ICStation.com is a top store of


electronic, which specializes in all kinds of
IC products, such IC accessories, Module,
Robots, Development Board, Transistor ...
More (/member/ICStation/)

More by ICStation:
28BYJ-48 Stepper Motor Control System Based on Arduino With
(/file/F1FU0ELHVO9S0V0/)
ULN2003 Chip by ICStation (/member/ICStation/) in arduino (/explore/category/technology/keyword/arduino/)
ICStation
Download(http://www.icstation.com)Team introduce you this stepper motor
h (/id/28BYJ-48-Stepper-Motor-Control-System-Based-On-Ard/) 8 Steps .
(/id/ESP8266-
(http://www.icstation.com/product_info.php?products_id=2204) control system
Collection I Made it! Favorite
ESP-03- Share
based on ICStation UNO compatible with Arduino. (/id/Hourglass-Remote- (/id/Did-You-
(http://www.icstation.com/product_info.php?products_id=3516) It uses ULN2003 Shape- Wireless- Ever-Want-
chip to drive. The working voltage is DC5V. It is widely used on ATM machine, Flashing- Module- to-Have-a-
inkjet printer,cutting plotter, fax machine,spraying equipment, medical LED-DIY- WIFI-to- Video-
Kits/) UART/) Doorphone/)
instruments and equipments, PC peripheral, and USB Mass Storage ,precise
instrument,industrial control system,office automation,robot areas,etc.

Functions Related
1.When start up, the stepper motor (http://www.icstation.com/product_info.php?
Arduino Library for 28BYJ-48
products_id=2204)will rotate in the clockwise direction, at the same time Stepper Motor and ULN2003
the1602 LCD (http://www.icstation.com/product_info.php?products_id=1419) will Driver (/id/Arduino-Library-
display the stepping rate and rotating direction. for-28BYJ-48-Stepper-Motor-
(/id/Arduino- and-ULN/)
2.When you press the key1, the stepper motor Arduino/Android- 28BYJ 48
Stepper Motor control Using
(http://www.icstation.com/product_info.php?products_id=2204)will rotate in the the HC-06
counter-clockwise direction. (/id/ArduinoAndroid-28BYJ-
48-Stepper-Motor-Control-
(/id/ArduinoAndroid-
3.When you turn the potentiometer (http://www.icstation.com/product_info.php? Arduino/Android
products_id=1850)to the left or to the right, you can adjust the stepping rate of BLUETOOTH - 28BYJ 48
Stepper Motor curtain control
the stepper motor. At the same tine the 1602 LCD APP (/id/ArduinoAndroid-
BLUETOOTH-28BYJ-48-
(/id/ArduinoAndroid-
(http://www.icstation.com/product_info.php?products_id=1419)will display the Arduino Stepper Drivers
Tutorial-1/2 (/id/Stepper-
current speed. Motor-Drivers-Tutorial-12-
ULN2003-L298N-L9/)
Code for your reference: The "all in one box"
aquarium feeder (/id/The-all-
http://www.icstation.com/newsletter/eMarketing/Stepper_Motor_Code.txt
in-one-box-aquarium-feeder/)
(http://www.icstation.com/newsletter/eMarketing/Stepper_Motor_Code.txt) by Brian from Belgium
(/id/The-all- (/member/Brian+from+Belgium/)

Step 1: Components List

(/file/F9HD4RMHVO9S0KS/)

1.ICStation ATMEGA328 UNO V3.0 R3 Board Compatible Arduino


(http://www.icstation.com/product_info.php?products_id=3516)

2.1602A HD44780 Character LCD Display Module


(http://www.icstation.com/product_info.php?products_id=1419)

3.5V 4 Phase 5 Line 28BYJ-48 5VDC Stepper Motor


(http://www.icstation.com/product_info.php?products_id=2204)

4.50K Ohm B50K Knurled Shaft Linear Rotary Taper Potentiometer


(http://www.icstation.com/product_info.php?products_id=686)

5.ULN2003AN DIP-16 TI Darlington Transistor Array


(http://www.icstation.com/product_info.php?products_id=21)

6.Trim Pot Resistor Potentiometer (http://www.icstation.com/product_info.php?


products_id=1850)

7.830 Point Solderless PCB Bread Board MB-102 Test DIY


(http://www.icstation.com/product_info.php?products_id=1450)

8.12X12X5mm Tact Switches 4 Legs


(http://www.icstation.com/product_info.php?products_id=949)

9.Bread Board Jump Line Jumper Wire


(http://www.icstation.com/product_info.php?products_id=2025)

10. Dupont 20cm Color Cable Line (http://www.icstation.com/product_info.php?


products_id=3269)

11.+5V DC power supply

Step 2: Schematic Diagram


(/file/F28D9OJHVO9S0LC/)

Working Principle:

To change the rotating speed of the stepper motor


(http://www.icstation.com/product_info.php?products_id=2204)by changing the
input frequency of pulse signal. And to realize the motor rotating in the clockeise
direction and counter-clockwise direction by controlling the transform sequence
of the pulse signal.

Step 3: Overall Hardware Connected Diagram

(/file/FV5UQFLHVO9S32N/)

Step 4: Plug Into the Power Supply Wires and Place the
Components
(/file/FPGGYDEHVO9S0LD/)

Step 5: Connect the LCD1602

(/file/FUY0RI9HVO9S0LY/)

Step 6: Connect the Stepper Motor


(/file/FCVQW6BHVO9S0N0/)

Step 7: Connect the Signal End and Power Supply End

(/file/FGMP6EUHVO9S0NM/)

Connect the signal end of the components and the cathode and anode of the
power supply to the ICStation UNO board compatible with Arduino
(http://www.icstation.com/product_info.php?products_id=3516) and common
port of power supply.

Step 8: The Experimental Effect After Starting Up the Power


Supply
(/file/FPOX44GHVO9S411/)

advertisement

Comments

We have a be nice comment policy.


Please be positive and constructive. w I Made it! Add Images Post Comment

GianL (/member/GianL/) 2016-09-23 Reply

Hi, good job man ;-) I wish to ask you if iou can tell me how, adding a
third button, to tell the motor to stop, assuming that the motor
rotates continuously when the left or right button is pressed.
Thank you for any help ;-)

dancopy (/member/dancopy/) 2016-03-02 Reply

1) Can be used stepper motor 12 volts? (Printer)


2) key1 and key2 is the engine rotation direction?
Thank you

Skyfinder (/member/Skyfinder/) 2016-01-28 Reply

Doesn't Work, the attachInterrupt not work... The stepper rotate ok, but the
button are Useless... Wiring is correct. Something wrong in code. I use ad
Arduino Uno Adeept, until now every projects works...this no. I tried to change
some way to code, like digitalWrite (pin, HIGH); for the pullup but same result
Prince N (/member/Prince+N/) 2016-01-27 Reply

I am working on a project that uses 4 ldr's, two potentiometers and 2 step motor
28byj-48 to track the movement of the sun. I really need help with the
programming

Prince N (/member/Prince+N/) 2016-01-27 Reply

I am working on a project that uses 4 ldr's, two potentiometers and 2 step motor
28byj-48 to track the movement of the sun. I really need help with the
programming

Alex Hagios (/member/Alex+Hagios/) 2014-10-20 Reply

How many K is the Trim pot resistor? Thanks

mike_menci (/member/mike_menci/) . Alex Hagios (/member/Alex+Hagios/)


2015-11-21 Reply
10K

mike_menci (/member/mike_menci/) 2015-11-21 Reply

#include <Stepper.h>
#include <LiquidCrystal.h>

int Iint1=0;
int Iint2=1;

int anjian1=2;

int anjian2=3;
int motorSpeed;

LiquidCrystal lcd(9,8,7,6,5,4);

const int stepsPerRevolution =200;


// Here set the stepper motor rotation step how much is a circle

int dim=stepsPerRevolution;

// Set the step motor number and pin


Stepper myStepper(stepsPerRevolution, 10,11,12,13);

void setup()

{
lcd.begin(16, 2);

lcd.print("speed:");
lcd.setCursor(10,0);

lcd.print("n/min");

lcd.setCursor(0, 1);
lcd.print("Direction:");

// Set the motor speed of 60 steps per minute

myStepper.setSpeed(60);
pinMode(anjian1,INPUT_PULLUP);
pinMode(anjian2,INPUT_PULLUP);
attachInterrupt(Iint1,counterclockwise,FALLING);

attachInterrupt(Iint2,clockwise,FALLING);

Serial.begin(9600);
}

void loop()

{
myStepper.step(dim);

void Direction();

// Read the sensor values:


int sensorReading = analogRead(A0);

// Map it to a range of 0-150:

int motorSpeed = map(sensorReading, 0, 1023, 0, 150);


// Set the motor speed:

if (motorSpeed > 0)

{
myStepper.setSpeed(motorSpeed);

lcd.setCursor(6,0);
lcd.print(float(float(motorSpeed)/float(200)));

}
void clockwise()

// clockwise rotation
dim=stepsPerRevolution;

lcd.setCursor(10, 1);

lcd.print(">>>>>>");
}

void counterclockwise()

{
// anti-clockwise

dim=-stepsPerRevolution;
lcd.setCursor(10, 1);

lcd.print("<<<<<<");

JamesJack (/member/JamesJack/) 2015-02-16 Reply

Hi, www.icstation.com (http://www.icstation.com) is down !!!

Could you post the (arduino code) .ino file for this please ?

This link not work


http://www.icstation.com/newsletter/eMarketing/Stepper_Motor_Code.txt
(http://www.icstation.com/newsletter/eMarketing/Stepper_Motor_Code.txt)
steinie44 (/member/steinie44/) 2014-09-04 Reply

If you use a ULN2803, you can run 2 steppers. Put a PCF8574 IC in front of
that and you can use I2C, only 2 pins.

I More Comments

Newsletter About Us
Let your inbox help you discover our best Who We Are (/about/)
projects, classes, and contests. Instructables Advertise (/advertise/)
will help you learn how to make anything! Contact (/about/contact.jsp)
Jobs (/community/Positions-available-at-Instructables/)
enter email I'm in!
Help (/id/how-to-write-a-great-instructable/)
Find Us Resources
Facebook (http://www.facebook.com/instructables) For Teachers (/teachers/)
Youtube (http://www.youtube.com/user/instructablestv) Residency Program (/pier9residency)
Twitter (http://www.twitter.com/instructables) Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/?categoryGroup=all&category=all)
Pinterest (http://www.pinterest.com/instructables)
Answers (/tag/type-question/?sort=RECENT)
Google+ (https://plus.google.com/+instructables)
Sitemap (/sitemap/)

Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |


Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (https://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2017 Autodesk, Inc.

Potrebbero piacerti anche