Brushed motor with relay setup questions

Hiya

Have a rover with motor controllers that need a relay signal to go into reverse. I’ve set the MOT_PWM_TYPE to 3, and can see the PWM signal at min at idle, and increasing in each direction, as expected.
So I need to set up the relay output, but getting lost here. Its a Matek H743 ver 3 FC.

I’m using S2 and S3 for the PWM output, that works, and want to set up S4 and S5 for the relay signal, this is where I get stuck. How do I assign a relay output to a servo out pin?

In the docs it has categories for RELAY1_Parameters, RELAY2_Parameters, etc, but all I had on the Parameters List in Mission Planner was a section called RELAY, with very few options.

I suspect I’m in the wrong area.

Also, I noticed, even at minium PWM, its still generating a small PWM signal, enough to make the motors rotate slowly.

Any help would be appreciated.

Glenn

On a working balance bot with v4.5beta using PWM on Matek H743 Slim:

MOT_PWM_TYPE,3
RELAY1_DEFAULT,0
RELAY1_FUNCTION,5
RELAY1_PIN,50
RELAY2_DEFAULT,0
RELAY2_FUNCTION,6
RELAY2_PIN,51
SERVO7_FUNCTION,73
SERVO8_FUNCTION,74
WENC_PINA,53
WENC_PINB,52
WENC2_PINA,55
WENC2_PINB,54

I think on v4.5 relay _DEFAULT’s and _FUNCTION’s are new.

That covers PWM’s, DIR’s and encoders.

I dont seam to have the individual RELAY1_FUNCTION, etc options ?

I’m using 4.4. There must have been a way to set this up before 4.5

Glenn

No need to reply unless its something you feel could help others ( I’m sure it will, the brushed motor with relay documentation is lacking ).

I’ve gone back to plan F. I’m using a ESP8266 to convert the RC PWM signal to a PWM 16kHz output and relay output to suit my motor driver. I was wanting to take this out of the system and use the FC “Brushed with relay” instead, but sometimes its just easier to use something you already have working.

Thanks
Glenn

The extra options dont appear unless you actually enable the relay output.

the instructions for the relay is in “relays”
https://ardupilot.org/rover/docs/common-relay.html

On the same working balance bot when it had v4.4stable, also using PWM on Matek H743 Slim:

MOT_PWM_TYPE,3
RELAY_DEFAULT,0
RELAY_PIN,50
RELAY_PIN2,51
SERVO7_FUNCTION,73
SERVO8_FUNCTION,74
WENC_PINA,53
WENC_PINB,52
WENC2_PINA,55
WENC2_PINB,54

So it seems that before v4.5 there was a single RELAY_DEFAULT.

All your RELAY_PINx are -1, so you are not outputting DIR’s to your motor controller.