I have a dual channel motor driver module based on two L9110 H-bridges: enter image description here

The documentation and many, many tutorials on the internet mention that this can be used to drive two DC motors, or a signle bipolar stepper motor. Unfortunately, every bit of documentation or article I can find only provide examples on how two drive one or two DC motors, but nowhere can I find how to drive a stepper motor. Looking on Arduino.cc, I can find instructions on how to connect the stepper motor to an H-bridge, but not to one of these (very common) driver modules.

I gather that I connect the motor's four wires to the two screw terminals, where the two wires from one coil connect to the terminals labeled "motor a" and the two wires from the other coil connect to the terminals labeled "motor b". I also gather that you power both the circuit and the motor itself via the VCC and GND pins. However, I'm unsure what to do with the A-1A, A-1B, B-1A and B-1B pins. I gather from the examples on arduino.cc that you basically just connect these to 4 digital pins, and then use the Stepper class to drive it. Do any of these pins need to support PWM? All the examples seem to use pins 8, 9, 10 and 11, so it doesn't appear to make any use of the PWM function (since pin 8 doesn't support PWM).

It all seems simple enough, but since I want to fry neither my arduino nor the motor nor the board, I'm wondering if my line of reasoning is correct. Anyone have any experience with these boards who can shed some light on the matter?


closed as unclear what you're asking by Andy aka, Daniel Grillo, PeterJ, uint128_t, Nick Alexeev May 21 '16 at 17:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ PCB assembly part number and link to documentation, please. Also, if you cropped your photo it would show the board eight times larger for legibility. All details in the question rather than sprinkled through the comments. \$\endgroup\$ – Transistor May 20 '16 at 16:25
  • 1
    \$\begingroup\$ Try looking at examples for other H-bridges (those not hidden behind a shift register or sequencer IC). Your setup is simpler as it does not appear to have any enables. PWM would only matter if you want to do microstepping or want to try to implement a chopping current regulator in software (not recommended). Otherwise choose a supply voltage that will not push more than rated current in the steady state case, and accept that the loss of torque at speed is the price you pay for the simplicity of this driver. \$\endgroup\$ – Chris Stratton May 20 '16 at 18:34

The Arduino Stepper class does not use PWM. So you don't need to use PWM pins if that Stepper class is all you want to use.

To understand if you will fry it, try to find it's datasheet. One I downloaded (I don't know from where) is not the manufacturers, but says:

  • Input voltage: 2.5-12V DC
  • Each channel has a continuous output current 800 ma

You should be able to avoid one way to damage it by keeping its input voltage well under 12V.

The things that will cause that driver board to fry are:

  1. The stepper motor draws too much current, i.e. more than 800mA. You can check that by looking at the stepper motor' stall current, or resistance and doing an Ohm's law calculation for the motor voltage you plan to use.
  2. Wiring it up incorrectly to the motor.

It is very unlikely that the Arduino will be damaged providing it is only connected to ground and the A-1A, A-1B, B-1A and B-1B pins the way you have described in your question.

Do not connect any Arduino pins to the motor drivers VCC.

Before driving the motor, I recommend connecting some LEDs (with resistors) across the outputs, in both polarities. Then write and test a simple program to see that everything works. Keep things simple, and don't try using PWM, just use digital output on GPIO pins.

There are lots of examples on the stepper sequence to drive the pins. Start with the simplest, and drive it by 'hand' using four digitalWrites for each row:

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

and see if the LEDs are working as expected.

I would start with a lowish voltage, less than the motor rating, to see if anything moves.

Once you know it is all working for the simple case, you can try other stepper patterns. You could use the Arduino Stepper class which uses 'half-stepping'. You might also try using other libraries.

You might even try your hand at writing microstepping code using PWM (when all four pins will need to be PWM pins).

  • \$\begingroup\$ Thanks for the tip of using LED's to check if the board is behaving as expected, I never would've thought of that but it works perfectly and makes it super-easy to check if it's actually doing what I intended to do. \$\endgroup\$ – Bas May 23 '16 at 9:20

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