H bridge won't work correctly

Hi all, wonder if I can pick you brains on this one please.

I am building a rover now that I’m converting my 50cc pocket quad rc conversion over to electric but I can’t get the H Bridge I bought to play ball with ardupilot :frowning:

Its a duty cycle controller with two inputs controlling one output and using an arduino nano with rc pwm to duty cycle pwm converter I can control the motor flawlessly from a straight RX (flysky ia6b) but no matter what I try, I cannot get the thing to work right when connected to the flight controller.

Although it takes two inputs, I have found that in reality it wants a signal on one and a baseline from a dormant channel on the other and that’s what I did with the RX and what I’ve tried to do with the flight controller.

If I connect it to the FC though the arduino pwm converter I can get the motor to spin in both directions but its stuttering very badly at all throttle levels and it makes no difference what controller type I select in config, normal and brushed bipolar both behave the same and oddly I haven’t been able to get a response at all from it if I hook it up directly (without arduino pwm converter) and select brushed bipolar.

I have another controller (actually a two channel controller that can control two motors independently from two separate pwm inputs) which supports either rc pwm or duty cycle without any external converter and that is working fine but it’s not rated for the current that the motor will pull under load but is rated for Bursts way above that (10A average/50A burst and the MOSFETs are rated for 50A) so may be fine with heatsinks but I’d like to get the h bridge working if I can as its rated for higher continuous loads.

The controller that works OK is an APO-D1 (technically an H-Bridge itself) and the H-Bridge is a BTS7960B based controller.

Here’s images of the two, the red one is the one that works, the blue one is the BTS7960B which im having trouble with.

thanks, Steve.

Do you have links to the blue H-bridge?

I’m not following the above quote. By “baseline” do you mean signal ground?

Do I understand correctly that the blue h-bridge will work with a Nano? Is the Nano a 5V logic or 3.3V logic.

Some h-bridges will work with both 3.3V logic and 5V logic but some h-bridges needed high logic states than a 3.3V microcontroller generates directly.

What was the PWM frequency generated by the Nano? What PWM frequency does the robot controller generate?

Some of the older H-bridges work better with low PWM frequencies. I often use 200Hz if the h-bridge doesn’t support ultrasonic frequencies to avoid the high pitch whine these can produce.

From the video below, I learned the BTS7960B requires 5V logic. Most flight controllers these days need a level shifter if the 5V device requires 5V logic.
A lot of 5V logic devices will work with 3.3V, apparently the BTS7960B h-bridge isn’t one of the 3.3V friendly devices. (Edit: I’m wrong about this.)

Edit: After watching a bit more of the video, I’m not so sure it won’t work with 3.3V logic. Make sure you watch the video. He describes the purpose of the various input and output pins.

The nano is 5v logic, I don’t know if thats why it will work with a plain RX but not with the flight controller (fc is omnibus f4 pro and 3.3v)

I have no idea what frequency the nano is working with, its simply flashed with a basic sketch to convert rc pwm to duty cycle and I’ve not really read into it any further.

I would have thought that the nano would be fine with 3.3v though, they are pretty tolerant devices and I expected it to work with ardupilot set to normal mode but it glitches out every couple of seconds and the motor goes jittery :frowning:

As said, I tried hooking up direct and selecting brushed bidirectional but I get no response from the h bridge at all.

What I mean by baseline is a dormant channel sitting static at pwm mid point.

If I set the second input to do anything other than sit at mid pwm 1500? The motor does strange things and its like the two are fighting each other and it will reverse direction multiple times through the throttle range, if I don’t connect the second to a input at all then the motor will not respond at all its like it looks at the idle channel and says above that is one way and below it is the other.

It works flawlessly though the arduino nano acting as a pwm converter and a basic RX , its frustrating that its playing up when connected to the fc :frowning:

You need to define the output ports as servo output . In arduino you are using write 1-250 i gues . It’s a h brige not an esc … The resolution is difrent but it will work :slight_smile: good luck with the project