how to use esp32 input capture and motor pwm function?

ESP_nilay
Posts: 4
Joined: Wed Dec 07, 2016 2:12 am

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

Postby ESP_nilay » Thu Apr 06, 2017 10:56 am

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 :)

ESP_nilay
Posts: 4
Joined: Wed Dec 07, 2016 2:12 am

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

Postby ESP_nilay » Thu Apr 06, 2017 10:59 am

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 :)

chopin1998
Posts: 14
Joined: Sat Dec 24, 2016 8:09 am

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

Postby chopin1998 » Fri Apr 07, 2017 3:36 am

nice!

alangman
Posts: 5
Joined: Wed Apr 05, 2017 12:47 pm

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

Postby alangman » Thu Apr 20, 2017 6:00 pm

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

DL88AI88
Posts: 29
Joined: Mon Aug 29, 2016 8:26 am

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

Postby DL88AI88 » Sun Apr 23, 2017 3:22 pm

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

DL88AI88
Posts: 29
Joined: Mon Aug 29, 2016 8:26 am

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

Postby DL88AI88 » Sat May 13, 2017 10:27 am

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

Who is online

Users browsing this forum: Google [Bot] and 291 guests