-->
Page 1 of 1

ESP8266 Stepper motor problem

PostPosted: Thu Aug 31, 2017 7:22 am
by TroyLeChat
Hello

My project is to connect a stepper motor to an ESP8266 type ESP12 / NodeMCU.

I tried everything without success.

Test 1:
http://www.instructables.com/id/Motoriz ... h-ESP8266/

Test 2:
http://www.instructables.com/id/Motoriz ... ler-Blind/

Test 3:
Arduino with stepper.ino
Basic example
Controller board module L298N
(Everything works under arduino Uno)

Test 4:
lua
Basic example
Controller board module L298N
(Everything works under arduino Uno)

I did all the tests with 2 other cards.
I changed the engine (NEMA 17, 28BYJ48).
Same result:

The engine vibrates without progressing

Help!!!

Simon

Re: ESP8266 Stepper motor problem

PostPosted: Thu Aug 31, 2017 10:47 am
by schufti
as the original authors of the linked articles have video-proof that their concepts work, we have to doubt that you did what you claim to have done.
Without a picture of your setup and your actual sketch we would have to rely on old "crystal ball" technique, which forbids itself on technical fora...

Re: ESP8266 Stepper motor problem

PostPosted: Fri Sep 01, 2017 3:13 am
by TroyLeChat
With Arduino UNO : Everything works well

Image




With ESP8266 : Not working

Image


The code is the same (pinout changes)

[i]#include <Stepper.h>

const int stepsPerRevolution = 200; // 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, D1,D2, D3,D4);

int stepCount = 0; // number of steps the motor has taken

void setup() {
// initialize the serial port:
Serial.begin(74880);
}

void loop() {
// step one step:
myStepper.step(1);
Serial.print("steps:");
Serial.println(stepCount);
stepCount++;
delay(500);
}
[/i]