Remapping + 2 Dual MC33926 + Arduino2560 + 2 stepper

I would like to drive two stepper motors Nema 23 (#1478) with an Arduino Mega 2560 board and two Dual MC33926 shields (one needed per motor, if i’m right). I know that a mapping of pins matching between the Arduino board and the Dual MC33926 shield is setting by default in the DualMC33926MotorShield library in Arduino. But if i want to use two shields with the same Arduino, so for instance i can’t use the same A0 pin the board for the two shields. So i need to remap one of the shields to make it matching other pins on Arduino than the ones set by default.
My questions are:

  • Do you think it’s possible to connect two shields on the same Arduino board if i “remap” one of them?
  • Is it possible to remap and if so, how can i proceed?
    Thank you,

Hello, Pauline.

It should be possible to control two stepper motors with two MC33926 shields and an Arduino. If you want to stack the shields on top of one another, you will have to remap one of the shields; however, it will probably be easier to just use the pins on the left side of one of the shields and make connections to the unused pins on the Arduino.

For controlling a stepper motor, you might find the code in this post helpful.

Another user has posted a proposed wiring diagram for connecting three VNH5019 shields (which are very similar to the MC33926 shield) to a single Arduino Mega that you might also find helpful in this thread.

- Jeremy