My Projects

Started looking at PWM's on the ESP32 which are very comprehensive ,somebody's put a lot of thought into what you need PWM's for. There are categories of PWM the MCPWM is primarily aimed at motor control with 3 channels each having 2 sub channels which can be synchronised or asynchronous allowing brush less DC motor control the 2 sub channels can be configured complementary use to allow the to be hooked up to gate drivers for trapezoidal or sinusoidal operation with independent timers programmable deadband etc. The other set of PWM's are called LED_PWM which primarily aimed at driving led's now don't let the name confuse you into thinking all it can do is drive led's these two sets of 8 pwm's can be used as general purpose or my case servo motor pwm's as they have some nice features to make led's fade in and out without processor intervention which equally be applied to servo sweep and with the step and period being configurable to make var speed smooth servo control easy. Each ledc control block consists of 8 independent  pwm channels so channels of variable speed controls 16 fading leds and musical instruments each channel is configurable to give up to 24 effective buts with some dithering over the next of articles we'll put some code together to use with the servo control boards to control our bots, i'll try to present it both esp-idf code and arduino where possible one last note on the led pwm's there 8 channels of fast pwm which i got up to about 980kz during my tests and 8 channels of slow pwm i ran these at 5khz before i got bored with stepping it i'll crank them up at some point but as were actually going to be running them at 50hz it doesn't matter to much about the top end. Thats the intro done next time we'll put some code together to get it pwming.

Add comment

Security code