So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Heiniketh
#87224 I am having some issues trying to drive a 28byj-48 stepper motor. I have modified the example stepper motor code to have a simple design and for some reason I am getting a wdt reset. I tried driving the motor from just my computer power supply, then using an external 2A supply but the board resets both ways. The code is very simple, and its just trying to rotate CCW.
I appreciate the help.
Here is the serial log:

Soft WDT reset


ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 01a0
3fffff80: 3fffdad0 00000400 3ffee2e8 402013fb
3fffff90: 3fffdad0 00000000 3ffee358 40201078
3fffffa0: feefeffe feefeffe 3ffee358 40201d14
3fffffb0: feefeffe feefeffe 3ffe84e0 40100c21

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3456, room 16
tail 0
chksum 0x84
csum 0x84

I used the exception decoder and here is the output:
Decoding stack results
0x40201258: Stepper::stepMotor(int) (C:\Program Files at x86)\Arduino\libraries\Stepper\src\Stepper.cpp line 283
0x402013fb: Stepper::step(int) (C:\Program Files at x86)\Arduino\libraries\Stepper\src\Stepper.cpp line 198
0x40201078: loop() at C:\Users\Ani\Documents\Arduino\motor_rotations/motor_rotations.ino line 23
0x40201d14: loop_wrapper() at C:\Users\Ani\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\cores\esp8266\core_esp8266_main.cpp line 197
You do not have the required permissions to view the files attached to this post.
User avatar
By rudy
#87230 Disconnect the stepper and then run the code. If you don't get wdt resets then the problem is most likely electrical.

What are you using to drive the stepper motor? (eg. ULN2004) And do you have diodes across the coil windings?