How to drive a stepper motor with S curve?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
xky183
Posts: 1
Joined: Tue Apr 26, 2022 5:59 am

How to drive a stepper motor with S curve?

Post by xky183 » Wed Apr 27, 2022 2:06 am

Hi all,
I want drive a stepper motor with ESP32 and microPython,
The PWM duty will be fixed 50%,
I want use a timer IRQ for setting the freq of the PWM with 10ms period.
The freq of PWM will be in the range of 0.5k-50kHz,it is controled by the curve.
But I don't have a solution for getting the exactly number of PWM pulse in micropython.
Is there any way to know how many pulse generated by the timer(PWM mode)?

Thanks

tepalia02
Posts: 99
Joined: Mon Mar 21, 2022 5:13 am

Re: How to drive a stepper motor with S curve?

Post by tepalia02 » Wed Apr 27, 2022 6:15 am

I think this video will be helpful to you. It's about ESP32 MICROPYTHON PWM & SERVO CONTROL.
https://www.youtube.com/watch?v=U2KOOxmveZ4

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

Re: How to drive a stepper motor with S curve?

Post by OlivierLenoir » Wed Apr 27, 2022 4:00 pm

You can read this topic.
Project is here.

Post Reply