I would like to start learning to play with SPWM (Sinusoidal PWM) to generate a sine wave via PWM to control a 3 phase DC brushless motor. I would like to try to mimic what others have done using an Atmel micro. Like this one.
https://github.com/Terbytes/Arduino-Atmel-sPWM
I have tried the MCPWM BLDC motor control example just to get all the hardware proved out.
https://github.com/espressif/esp-idf/tr ... dc_control
Atmel has OCRxA & OCRxB registers (Output Compare Register), which (unless I am wrong) the ESP32 does not. So I am trying to figure out a way to overcome this. The second thing that has me wondering if this is even possible is that the ESP32 is running the RTOS which is great but not really geared towards this kind of thing, so I am not sure if this is something I should even bother with doing because of the latency issues.
Anyone have any thoughts about this?
Can the ESP32 do SPWM (Sinusoidal PWM)
-
- Posts: 1
- Joined: Wed Jul 10, 2019 7:00 pm
Re: Can the ESP32 do SPWM (Sinusoidal PWM)
Hi, i would like to do the exact same thing. I want to drive a dc motor with a damped sine function. Did you have any success?
Im am a total newbie btw but i need this for my thesis.
Im am a total newbie btw but i need this for my thesis.
Re: Can the ESP32 do SPWM (Sinusoidal PWM)
Nope, just wound up using the BLDC example with some tweaking.
Who is online
Users browsing this forum: No registered users and 131 guests