Using a xiao samd21 and L9110 HG7881 Dual Channel Stepper Motor Driver to control one stepper motor

Hi,
I’m looking to control a stepper motor. I have a HG7881 Dual-Channel Motor Driver Board Stepper Motor Driver Controller and a seeeduino xiao samd21. I’m new to Arduino and was hoping for some guidance on connections and programming to make the motor just run forward and backwards.
Many thanks in advance for any advice given.
Regards,
Peter.

Hi there, and Welcome
So the samd21 is Good , a little light weight but what you need is totally doable.
Check out the WiKi page there are some examples that will jump start your efforts.
Motor direction to be controlled by what a Button or sensor?
Lot’s of options there too.
HTH
GL :slight_smile: PJ

Thank you for your reply I can see there’s lots of information there and I need to look at examples within the program. Hopefully it’ll make sense soon.
The direction is to be controlled by two buttons.
Peter.

Hi there,
Yes the Expansion boards accept the grove buttons and peripherals, really easy way to go.
you don’t need the display but cool for more advanced stuff. The “Grove Connectors” are the basic standard and they make everything but an “Underwater basket weaver” so can’t go wrong for selection.
HTH
GL :slight_smile: PJ :v:

Hi,
I found an example of stepper control in the Arduino IDE programme, called one step at a time, and have copied the code into my XIAO.
As the HG7881 Dual-Channel Motor Driver Board works when the trigger pins are negative (low) I’m not sure if this setup will work or how to connect everything together if it’s possible. Any thoughts or comments please.
Peter.

Hi there,
Well you can set the state of the outputs and invert the logic is easy. Active LOW (like the LED’s) instead of Active High. Just set the State b4 you test for the trigger condition.
HTH
GL :slight_smile: PJ

Thank you again for your comments and help.
I’m going to try using the XIAO with the the SN754410NE chip as space is a big issue and this looks easier to programme and connect.
I’ll get back if I get stuck.
thank you
Peter.

1 Like

Hi there,
Good Choice , TI chip.
makes it easier and small…

GL :slight_smile: PJ

My website may help you
——
Steppermotor has a rich product line, and each motor has its own unique advantages and characteristics, which can meet the needs of different customers and different applications.

Hi there,
WOW, Bookmarked… Nice stuff I’m eye’ing HARD this thin guy :sunglasses:
495_thumb_G_16946015184651
GL :slight_smile: PJ :v: