DIY Series: Wireless Stepper Motor Control

Interested in learning more about stepper motor control? Check out our instructional video, schematics, and Arduino code below to build your very own wireless stepper motor controller — a great addition to all of your DIY home automation projects!

diy-stepper-motor-1

List of materials:

https://www.circuitspecialists.com/arduino-uno-r3-plus.html – 1 piece

https://www.circuitspecialists.com/wb-104-3+j.html – 1 pc.

https://www.circuitspecialists.com/l934hd.html – 2 pc.

https://www.circuitspecialists.com/r18-29a-black.html – 1 pc.

https://www.circuitspecialists.com/r18-29a-red.html – 1 pc.

https://www.circuitspecialists.com/uln2003a.html – 1 pc.

https://www.circuitspecialists.com/rxd4140-434.html – 1 pc.

https://www.circuitspecialists.com/nema_16_step_motor_39byg101.html – 1 pc.

https://www.circuitspecialists.com/gfp151u-5volt.html – 1 pc.

https://www.circuitspecialists.com/ra1.0k.html – 2 pc.

https://www.circuitspecialists.com/ra10k.html – 2 pc.

https://www.circuitspecialists.com/cd4013.html – 2 pc.

https://www.circuitspecialists.com/31va401.html – 1 pc.

https://www.circuitspecialists.com/2n3904.html – 2 pc.

Total Cost: $85.00 + shipping

Stepper motor control with OSEPP UNO R3 Plus and ULN2003 in FritzingImg2

 

RXD4140 circuit for wireless control – only channels 1 and 2 (D3, D2) are used. D1 and D0 do not need connections.

Img4

ARDUINO CODE

#include <Stepper.h>

int forward = 2;

int reverse = 3;

Stepper motor(200, 10,11,12,13);

void setup() {

pinMode(forward,INPUT);

pinMode(reverse,INPUT);

Serial.begin(9600);

}

void loop() {

int Speed = analogRead(A0);

int RPM = map(Speed, 0, 1023, 0, 100);

int f = digitalRead(forward);

int r = digitalRead(reverse);

if(f == 1 && r == 0 && RPM > 1){

motor.step(1);

motor.setSpeed(RPM);

delay(.01);

}

if(r == 1 && f== 0 && RPM > 1){

motor.step(-1);

motor.setSpeed(RPM);

delay(0.01);

}

delay(5);

Serial.println(RPM);

}

Wayne

It was 1971 when an amazing new device called the Integrated Circuit became the new big thing in electronic design and manufacturing, and the Thorpe family started their mail order catalog, Superconductor Supermart. Wayne is still active on a daily basis with Circuit Specialists, serving as a consultant and intermediary to all of its international vendors.

Leave a Reply