[Solved for now] Stepper motor control in micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
macrimarco001
Posts: 7
Joined: Thu Mar 18, 2021 10:22 pm

[Solved for now] Stepper motor control in micropython

Post by macrimarco001 » Thu Mar 18, 2021 10:31 pm

Hello guys, i am a new member of this forum. I recently bought an esp32 board and installed on it micropython. Since i know some of the basics of python i was thinking about making diy projects witsh this fantastic language and platform.

I have benn all day long trying to figure out how to drive a stepper motor (nema23) with an external driver such as a DM556. I cannot understand how to do it :(.
so i am now asking for your prescious help.
I am sorry if my english isn't that great.
best wishes guys.

ps. i hope i choose the right topic.
Last edited by macrimarco001 on Fri Mar 19, 2021 10:39 pm, edited 1 time in total.

User avatar
OlivierLenoir
Posts: 126
Joined: Fri Dec 13, 2019 7:10 pm
Location: Picardie, FR

Re: Stepper motor control in micropython

Post by OlivierLenoir » Fri Mar 19, 2021 6:04 am

According to the DM556 datasheet, you should be able to use project MicroPython-Multiaxis to drive stepper motors with DM556.

macrimarco001
Posts: 7
Joined: Thu Mar 18, 2021 10:22 pm

Re: Stepper motor control in micropython

Post by macrimarco001 » Fri Mar 19, 2021 8:26 am

Thanks, is there a guide? Or an example code?

User avatar
OlivierLenoir
Posts: 126
Joined: Fri Dec 13, 2019 7:10 pm
Location: Picardie, FR

Re: Stepper motor control in micropython

Post by OlivierLenoir » Fri Mar 19, 2021 6:40 pm

In case you're using an ESP32 device with RMT you can use this.

In case you're using an other standard GPIO device, you can use this.

The standard example is here.

Feel free to let know if you need additional information.
Last edited by OlivierLenoir on Tue Jul 13, 2021 2:44 pm, edited 1 time in total.

macrimarco001
Posts: 7
Joined: Thu Mar 18, 2021 10:22 pm

Re: Stepper motor control in micropython

Post by macrimarco001 » Fri Mar 19, 2021 7:30 pm

While I was waiting for an answer I started some experiments and came up with the motor moving thank to you.
Thank you, thank you, thank you.

I'll write if I'll need further help. Love your availability to help people.

To tell the truth I have another problem but i think I have to write a new post because it is not part of this project.

Best wishes 🙂

Post Reply