Page 2 of 2

Re: how to use esp32 input capture and motor pwm function?

Posted: Thu Apr 06, 2017 10:56 am
by ESP_nilay
chopin1998 wrote:Hi,
I noticed that datasheet said there are 4 pwm modules with input capture function in esp32, but I cannot find REG desc or code snippet on it.

Somebody used that?
There are two drivers under progress for driving the motors : Basic PWM (bpwm) and MCPWM (Motor Control PWM) . They will feature on the fly frequency and duty changes, they will have sync, capture, fault & dead-time subunits and will also be able to generate the signals for driving bridge driver circuits. This will add 2 BPWM groups (with 4 pwm channels each) and 2 MCPWM groups(with 3 pwm channels each) to the peripherals family. They should be out in the next RC of esp-idf :)

Re: how to use esp32 input capture and motor pwm function?

Posted: Thu Apr 06, 2017 10:59 am
by ESP_nilay
alangman wrote:We also have an application which requires motor control and are evaluating the ESP32 for that function. Would be great to take a peak at the motor PWM.

Is it possible to provide some early information?

Best
Alan
There are two drivers in progress for driving the motors : Basic PWM (bpwm) and MCPWM (Motor Control PWM) . They will feature on the fly frequency and duty changes, they will have sync, capture, fault & dead-time subunits and will also be able to generate the signals for driving bridge driver circuits. This will add 2 BPWM groups (with 4 pwm channels each) and 2 MCPWM groups(with 3 pwm channels each) to the peripherals family. They should be out in the next RC of esp-idf :)

Re: how to use esp32 input capture and motor pwm function?

Posted: Fri Apr 07, 2017 3:36 am
by chopin1998
nice!

Re: how to use esp32 input capture and motor pwm function?

Posted: Thu Apr 20, 2017 6:00 pm
by alangman
ESP_nilay wrote: There are two drivers in progress for driving the motors : Basic PWM (bpwm) and MCPWM (Motor Control PWM) . They will feature on the fly frequency and duty changes, they will have sync, capture, fault & dead-time subunits and will also be able to generate the signals for driving bridge driver circuits. This will add 2 BPWM groups (with 4 pwm channels each) and 2 MCPWM groups(with 3 pwm channels each) to the peripherals family. They should be out in the next RC of esp-idf :)

Thanks ESP_nilay!

That sounds awesome! Do you have an idea when the next RC of esp-idf with this functionality will be released? Is there any chance of getting a pre-release of the motor "chapter" in the data? Have an engineer wanting to use another processor for the motor control, and would so like to standardize on the ESP32!

Best

A

Re: how to use esp32 input capture and motor pwm function?

Posted: Sun Apr 23, 2017 3:22 pm
by DL88AI88
Hi ESP_nilay,

good news! Thank you.

There are some information provided here, already:
Api description of (datasheet v1.5 page 10)

PWM0_OUT0~2 (shouldn't it be PWM0_OUT_IN0~2 ?)
PWM1_OUT_IN0~2
PWM0_FLT_IN0~2
PWM1_FLT_IN0~2
PWM0_CAP_IN0~2
PWM1_CAP_IN0~2
PWM0_SYNC_IN0~2
PWM1_SYNC_IN0~2

It is said that one can use AnyGPIOs *
Three channels of 16-bit timers generate PWM waveforms;
each has a pair of output signals.
Three fault detection signals.
Three event capture signals.
Three sync signals.

Can you validate or correct these information
according to your statement?

May I also place some wishes for the library here :oops: :
one should define settings like
pwmmotor_frequency_khz (kiloHertz)
pwmmotor_frequency_hz (Hertz)
pwmmotor_period_s (seconds)
pwmmotor_period_ms (milliseconds)
pwmmotor_period_us (microseconds)
pwmmotor_pulsewidth_s (seconds)
pwmmotor_pulsewidth_ms (milliseconds)
pwmmotor_pulsewidth_us (microseconds)

This would be nice.

Thank you in advance.
Looking forward to the next release.

Best regards.

DL88AI88

Re: how to use esp32 input capture and motor pwm function?

Posted: Sat May 13, 2017 10:27 am
by DL88AI88
Hi there,

great news, mcpwm is out now:
official espressif example on github.

Examples for brushed motors, brushless motors and servos are provided.

Thank you very much!

Best regards

DL88AI88