Go Down

Topic: Need help with NodeMCU / ESP8266 MotorShield with Step Motor 28BYJ-48  (Read 1 time) previous topic - next topic


Hi, (Sorry for my english)

I have trouble to use the motor 28BYJ-48 with a ESP8266 NodeMCU + MotorShield ESP12E

I want to built this Project :


The main code are in LUA but; I find a another project with a Arduino Source code.
And i want to use Arduino Gui to program it.

The main program work (WebServer) But the motor don't work.

I just want to move this motor forward and reverse to start.

If someone have a code to drive the 28BYJ-48 with this pintout..this will be helpful :) THX


I see the motor shield from China Seller can be fault

I just can't move the motor...
I LUA or Arduino


Your picture does not show any power connections to the board to run the NodeMCU and the stepper motor. If your using the USB on the NodeMCU to power the system then you probably wont have enough power and risk damaging your NodeMCU.
Don't PM me for help as I will ignore it.


Hi all, another newbie here.

Did the OP ever get anywhere with this? I think I might have the same driver board from www.doit.am and cannot get my 28BYJ-48 stepper to do anything with it.

I'm connecting the wires as OP but am also providing 5v from external source to the board and motor (while disconnected from USB). I see the NodeMCU led blinking as I've set it in the code, so I know that my code is running ok, but nothing happens to the motor.

I'm also looking to write my code with Arduino IDE much rather than with LUA but am clueless what the Stepper (or AccelStepper) pinouts should be for the driver board.

Stepper motor itself seems ok based on testing the coil pairs with a led.

Any help much appreciated.



and thank you for the tip!

I too was aiming to make a version of the IKEA Roller Blind that the OP is referencing

...and as a software developer have taken a LEGO approach to the electronics parts, as-in: "build as in a the pictures".  Supporting that with next to no understanding on what is a BIPOLAR and UNIPOLAR stepper motor.

As far as I can tell I had the same parts than in the Instructables and connected as in the pictures/videos and expected something to happen. Not so much.

Will need to do my homework, although, to be honest, wouldn't know how to connect that driver to the nodemcu either.


This hookup works for me with an Arduino Nano.

Arduino pin 8 to In 1 on ULN2003 module, motor plugs into module socket.
                     10 to In 2   "       "          "             
                      9 to In 3    "       "          "             
                     11 to In 4    "       "          "

And works with the Arduino stepper library, here's the "stepper_oneRevolution" example sketch from the stepper library, modified for the 28BYJ-48, steps per revolution changed to 2048, speed changed to 8 RPM (16 RPM is about max for the 28BYJ-48 without missing steps.
Code: [Select]

 Stepper Motor Control - one revolution

 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor should revolve one revolution in one direction, then
 one revolution in the other direction.

 Created 11 Mar. 2007
 Modified 30 Nov. 2009
 by Tom Igoe


#include <Stepper.h>

const int stepsPerRevolution = 2048;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  // set the speed at 60 rpm:
  // initialize the serial port:

void loop() {
  // step one revolution  in one direction:

  // step one revolution in the other direction:


Go Up