RC PWM input is not working!

We have 2 ODrive (3.6 - 56V) (0.5.2 fw) controllers that are connected to hoverboard wheels and we are trying to remote control them with an RC. We are defining the GPIOs 3 and 4 following the documentation:

 odrv0.config.gpio3_mode = GPIO_MODE_PWM
 odrv0.config.gpio3_pwm_mapping.min = -2
 odrv0.config.gpio3_pwm_mapping.max = 2
 odrv0.config.gpio3_pwm_mapping.endpoint = odrv0.axis0.controller._input_pos_property

 odrv0.config.gpio4_mode = GPIO_MODE_PWM
 odrv0.config.gpio4_pwm_mapping.min = -2
 odrv0.config.gpio4_pwm_mapping.max = 2
 odrv0.config.gpio4_pwm_mapping.endpoint = odrv0.axis1.controller._input_pos_property

GPIO 3 is working on one of the drivers and we can control the motor with it but GPIO 4 is not working and the result of odrv0.axis1.controller.input_vel is showing “0.0” all the time.

On the other driver neither GPIO 3 or 4 are working properly.
Any help is appreciated!

This is very curious. Do you have a GND wire in common between the RC transceiver and the ODrive on J2?

Not with J2. I have a wire from the recievers GND to the GND that is beside the 3.3v and the GPIOs.
By the way, My Odrivers are connected to the same power supplies but we had no problem with that before (we were controlling them via Arduino RX, TX).

We have now tested with GND in J2 and it still the same thing. We tested also to just keep one ODrive connected to the power at the same time. We are testing both with RC receiver and with Navio2 (raspberry HAT which sends same kind of PWM). GPIO3 is working as expected but not the GPIO4. And the other ODrive is not working for both GPIO3 ,GPIO4.

1 Like