How to connect a H-bridge to Pixhawk

Normally for the rover one channel is used for throttle and another for steering by using a servo. The other option is to use the skid steer mode, where two PWM channels are used to control the rover like a tank by using two servos.

I’m building a FrobitPro robot based on design from University of Southern Denmark that uses two H-bridge motor controllers (Simple-H 20A from robotshop.com) for a skid steering robot where the H-bridges is connected to a Pixhawk. The problem is that each H-bridge needs two PWM inputs and an enable input, where one PWM input controls CW rotation speed and the other controls CCW rotation speed. How do I connect this setup, or can I buy a part that would convert the RC PWM signal to two PWM signals for the H-bridge?

Another problem seems to be that the ArduRover does not support to make the motors turn backwards, but only turn forward all the time? Which means that the robot will not be able to turn 360 degrees on the spot?

Any advices are very welcome
Best regards
Søren Møller Dath, Denmark

@soren51929277,
Your best solution will probably be to put together an Arduino Pro Mini programed to take the one input and convert it to the required two outputs.
Since the ArduRover firmware is setup to use the Elevator (Pitch) channel as the throttle, neutral (stopped) will be at a PWM value of 1500us while any PWM value greater than 1500us will cause faster forward speeds and any PWM value less than 1500us will cause faster reverse speeds.
You will need to program the Pro Mini to provide a CW PWM output when the PWM input is greater than 1500us and a CCW PWM output when the PWM input is less than 1500us.
If you search the web, I suspect that you can find examples of how to drive an H bridge using just one PWM input that has a range of 1000us to 2000us and a neutral position of 1500us.
Regards,
TCIII AVD

1 Like

Thank you for the really nice explanation. It makes good sense to connect an external Arduino to split the PWM signals. I think this solution would be a lot easier for me instead of trying to change the code in ArduRover. Regarding the enable signal for the H-bridge, I could imagine that something like this would work:
if(PWMinput == 1500) //The motor should be stopped
EnableOut = 0
else //The motor should be active
EnableOut =1

Or maybe the Enable signal for the H-bridges could just be held active all the time.

Regards
Søren

1 Like

Pixhawk seems to much controller for what you need. But it would allow programming to route with auto mission.

I used a Parallax chip call a Propeller and two XBee 2.4g modules and built my own code.

Using a single joy stick and an H-Bridge in a Tank I was able to get it to go forward and backwards and even do a 360 on dime.

checkout this link: parallax.com/product/32500

Mike

I have same problem. How did You handle it?

The solution is here: