Using two VNH5019 with Arduino DUE, need to use 11 PWM ports

Hi!

I am currently doing a project where I want to use two VNH5019 shields to power 4 DC-motors and 7 servo-motors. Is this possible?

I’ve been reading the user’s manual over and over about how I could remap connections to free up all the PWM-ports, but can’t really figure out how to do it.

Since the shield looks more geared towards the UNO, the digital ports in the shield cover the PWM-ports of the DUE that I want to use. I want to remap them to the digital ports of the DUE and thus free up the PWM ports so I can use them all.

I’m beginning to think it’s not doable, but since I’ve already bought the shields and DUE and started fiddling with them I can’t very well return them =(

Kind regards
dreh

Hello, dreh.

You should be able to control four DC motors with two VNH5019 shields using your Arduino Due. However, I am not sure how easy it would be to stack them and remap the pins. It might be easier to use the pins that are broken out on the left side of the board (see picture below).

If you still want to try remapping the board, you should refer to the “Remapping the Arduino Connections” section of the dual VNH5019 motor driver shield user’s guide. You will probably want to map the PWM pins that use the same timer together to the same board. If you still have problems remapping the pins, you could post a diagram of the remapped pins, and I might be able to give you some pointers.

Either way, you will probably have to write your own code or modify our library to get them to work. You might find this helpful.

Please note, the voltage on the current sense pins will exceed the Due’s 3.3 V limit when the current draw exceeds ~23 A. The Due should generally be able to handle this since the MCU’s integrated protection diodes will clamp the input voltage to a safe value. You can read more about this in the “What You Will Need” section of the user’s guide.

By the way, for an easy way to control servos, you might consider integrating our Maestro servo controller into your setup. You might find the “Getting Started” video on the Maestro category page helpful.

- Jeremy