Can the ESP32 do SPWM (Sinusoidal PWM)
Posted: Sun May 26, 2019 1:08 pm
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?
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?