I’m building a Rover with a brushed motor and “Pololu G2 High-Power Motor Driver”.
FC ist AUAV-X2.1 (which has a IOMCU)
Rover 4.0.0 stable
Motor is on SERVO2
MOT_PWM_TYPE 3 “Brushed With Relay”
SERVO2_FUNCTION 70
SERVO3 is the steering servo
From IOMCU hwdef.dat I can see that CH1 and CH2 are in timer group TIM2.
So it should be fine, if I connect motor on CH2 and don’t connect anything on CH1.
SERVO1_FUNCTION is set to PassThrough, because I want to have the signal also on SBUS-OUT. But the problem also exists, if I disable SERVO1 completely.
But the PWM signal of CH3 steering servo is randomly one of of the pictures below.
So I have to power the rover several times until I get the right servo signals. Need about 3-5 tries. If it hit the right signal, it is working correctly.
Hello, I don’t think the pwm groups is working yet. The backend part is ready but we don’t have way to parametrize which channel will be on which type.
Motor driver works perfect out of the box.
Wiring RC-Output to PWM.
First GPIO (AUX5 with AUAV-X2.1) to DIR.
I have it in a Traxxas TRX-4 crawler with the stock Titan brushed motor. I’m not a crawler expert. But speed control works quite sensitive with high torgue even at very low speed. Break at stick neutral position is also good.
The driver is in a sealed, watertight box. But it stays cool without cooling.
With 16kHz PWM frequency the motor is silent.
My plan was to replace this setup with a brushless system. But it works for me better as expected, so I keep it for now.
Furthermore I thought that PWM (type, frequency) is set on a timer group basis.
For iomcu CH1+CH2 are on TIM2:
So I thought configure CH2 (or CH1) to “Brushed with Relay” PWM mode, only CH1 and CH2 are set to brushed-motor PWM mode.
CH3, where steering servo is connected, is in a different timer group TIM4. So I thought CH3 should still produce servo PWM.
I already have connected 3 additional servo on CH4-6 for front/rear differential-lock and gear switch. I think they were working always correctly. But will check tonight again.
I’ll also try to connect the steering servo to CH7 or CH8 tonight.
I forgot to mention, that sometimes after powering up also the motor PWM (CH2) is audible. So the motor PWM frequency on CH2 is also sometimes below/different from the configured 16 kHz.
Again, I’m surprised that the different PWM-types are set randomly after powering up.
I connected steering servo to CH7.
Same picture as described in the initial post. Randomly it works, sometimes not.
Also the servo on CH4-6 only work, if steering servo is working.
Thanks again for the report and the confirmation on the Pololu motor driver.
Sorry to ask you to do more and more but I was wondering if you could download a dataflash log when it works and when it doesn’t work? It might be necessary to set LOG_DISARMED = 1 in order to produce logs when the vehicle isn’t armed.
In the meantime I moved the throttle "Brushed With Relay” away from the IOMCU CH 2 to the FMU CH 9. All IOMCU CH1-8 are now working reliable with servos.