Brushed DC Motors with Relay Question

I am working on implementing a Pixhawk 4 in an application that is running two industrial VFD’s as motor controllers. I am operating the Pixhawk in a skid steer mode. Each of motors (VFD’s) are required to move both forward and reverse.

Each VFD will require a relay signal to command either forward or reverse rotation plus a PWM output for the speed command. I have set the Pixhawk motor type to “Brushed with relay.” To be clear, for proper control each VFD requires two relay pins for rotational direction (one pin for FWD one for REV) and one PWM output for speed.

The setup for skid steer mode and brushed with relay motors tutorials appear, to me, to show that when configured in this way, I would end up with two relay outputs (AUX OUT 5&6) and two PWM outputs (Servo 1 & 3) by default. I have added additional relay outputs by changing the BRD_PWM_COUNT to “2” which gives the two additional relay pins I need.

My questions is, how do I now assign these 4 relay outputs (AUX OUT 3,4,5,6) to operate in conjunction with a particular servo output such that when commanded the appropriate relay output goes high to command rotation direction in conjunction with the correct servo PWM (speed) output?

To give an operational example, the intent is for an RC user to push the left joystick forward (from center position) resulting in the left motor being commanded to rotate in the FWD direction. The further forward the stick is pushed, the faster higher the PWM frequency from the servo output. If the joystick is pulled back past center, the VFD is commanded to rotate in reverse with increasing speed.

Any guidance is very much appreciated!

So for each motor the relays are the opposite of each other? ie:
VFD Foward = Servo1 1000-2000 PWM, AUX3 = HIGH, AUX4 = LOW
VFD Reverse= Servo1 1000-2000 PWM, AUX3 = LOW, AUX4 = HIGH

The skid-steering only supports 1 AUX channel & 1 Servo channel per motor.

What you could do is have 4 skid-steering motors configured (two left, two right) with one of each reversed.

Wouldn’t this be easier with an R/C PWM to 4-20mA (or 0-10V) type converter?

steehendade, this is a good idea, thank you. Your example above is correct.

Ill look into configuring this way.

Thanks again!

kelly,

yes it would be easier but I would not have directional control with a PWM to analog converter. Up to this point I have been using an arduino programmed to swich DO’s based on PWM input. I am trying to add the pixhawk so that some level of autonomous operation can be achieved rather than just RC control

stephendade,

You wrote “The skid-steering only supports 1 AUX channel & 1 Servo channel per motor”

Does this mean I should not configure using this mode and use a customem non typical configuration? Or should I still set the pixhawk to operate in skid steer mode?

thanks!

Maybe. I have a sneaking suspicion that the brushless controls are only for the throttle channels. So if you’re running two VFD motors on the Rover firmware and not in skid steering mode, you’ll only get the 1 throttle channel. If you run in skid steering mode you’ll get 2 throttle channels.

The Copter firmware will give you many throttle channels (since it’s designed to work with many motors).

@larosee

Did you ever figure out how to configure this in Mission Planner?