0

I'm using a dual h bridge to control two dc motors on an inverted pendulum (cart-pole system). At the moment, I have to send two different pulse width modulated signals to the two enable pins to control the two motor speeds and four digital write commands to control the directions.

Ideally, I want to switch the two motors simultaneously in the same direction and with the same speed. So, I'd like to be able to control both motors' speeds with only one pulse width modulation signal and control both motor directions with only two digital write commands.

Is there a way I can do with with Arduino? Can one PWM signal from a single arduino pin be sent to two enable pins at the same time? Can the same be done for a single digital output pin? If so, how can I accomplish this?

1
  • How precisely do you need to match the speeds? A single PWM control will likely result in (slightly) miss-matched speeds.
    – Tut
    Apr 2, 2015 at 18:00

1 Answer 1

2

You can connect a single output to as many input loads as you like, provided the current is sufficient to hold the output voltage within the input thresholds. See the datasheet for the H bridge to find out what the input load and thresholds are, and compare them with the output from the Arduino.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.