Alternative microcontrollers compatible with Zumo shield and software

I’d like to use a microcontroller with more I/O than a UNO.
I’ve tried a Teensy 3.5, but ran into difficulty with the shield software (I suspect issues with timers and/or ISR configuration).
Are you aware of shield libraries for the Teensy?

Or, is the Seeeduino Mega (which uses an ATmega2560) an alternative?
Other options/suggestions?
Thanks.
Paul

Hello, Paul.

I am sorry you are having trouble using the Arduino libraries for the Zumo shield with the Teensy 3.5. We do not know of any Teensy libraries for the Zumo shield or others getting a Teensy to work with the shield. You might be able to get the Seeeduino Mega to work with the Zumo shield, but we have not tried and do not have any good resources to recommend.

Depending on how many I/O pins you really need for your application, you might consider using on of our A-Star 32U4 Prime boards, which has 26 available I/O lines.

- Amanda

Thank you Amanda.
I’ve recently discovered that versions of the Arduino Mega 2560 are available in smaller form factors (less than 10 cm x 10 cm). I’m going to give one of those a try. Given the “backwards compatibility” between the Mega and Uno, I expect the Pololu shield library will work fine with the Mega. I’ll post again later after my testing.
Paul

The AVRs used on the Arduino Mega and the Arduino Uno are entirely different. What exactly are you referring to being backwards compatible between the two Arduino boards? Also, we explicitly state in the Zumo Shield for Arduino User’s Guide (in the “Overview” section) that the shield is not compatible with the Arduino Mega; however, we have heard of others modifying the Zumo shield’s libraries and getting the shield to work with an Arduino Mega. Unfortunately, we do not have any good tutorials or resources to point you towards.

- Amanda

Thanks for continuing the conversation with me, Amanda.
While I do understand that the Uno and Mega use different micro-controller chips, as I understand it, both micro-controllers are from the same designer/manufacturer (Atmel).
And, it’s been my experience that (almost) any code written for the Uno will work on the Mega.
When the Shield User’s Guide noted the incompatibility with the Mega, I assumed that it was referring to mechanical incompatibility, not electrical (the blade gets in the way of installing a standard Mega board.
But, I sense that you mean to imply that the incompatibility is more severe than merely mechanical.
Can you provide any further information on the incompatibility?
Does it have something to do with the “re-definition” of the micro-controller’s timer function?
Thanks again.
Paul

You have the right idea; the issue is that each microcontroller can have different peripherals available, and the pins connected to them and the registers used to control them are also often different. The Arduino environment does a decent job of abstracting some of these differences to allow you to work with various boards consistently at a basic level, but the Zumo Shield is designed to take advantage of peripherals like timers on specific pins, and our software libraries rely on lower-level control of the microcontrollers to do more advanced things. If you look at the pinout diagrams for both the Arduino Mega and Arduino Uno, you’ll see that the pins provide different peripherals on each, which will make it harder to use some features on the Zumo Shield (e.g. buzzer) since our hardware and software are designed specifically to work with ATmega328P and ATmega32U4-based Arduinos.

- Amanda

Amanda:
Thanks for taking the time to explain this a little further … these are subtleties that I was not previously aware of.
If I do have any success getting a Mega to work with the Zumo Shield & Robot, I’ll make a point of sharing it here.
With the huge Arduino community out there, I would think that either someone has already tackled this problem before, or that someone might appreciate hearing about a solution.
Thanks again.
Paul

1 Like

On a whim, I decided to try a “normal” Arduino Mega 2560 on the Zumo Shield (which itself is mounted on the Zumo chassis with motors). Of course, I had to remove the steel “blade” to do this.
(I eventually do want to run this bot in Sumo-bot in competitions, so I’ll want to re-install the blade.
But, while I’m waiting for my “small form factor” Mega to arrive, I thought this would be a good experiment to try.)

While some of the Pololu code examples do NOT work (e.g., the Buzzer examples),
a number of examples DO appear to work correctly (e.g., ZumoMotorExample, and Compass).
All examples appear to compile with no error.
Conclusion?: Perhaps only minor modifications are needed to make the Mega 2560 be 100% compatible with the Pololu Shield S/W?
Paul

I would not consider modifying the Zumo shield’s PololuBuzzer library to support the Arduino Mega a minor modification, but if you have a good understanding of AVR timers and interrupts then it might seem like a minor change.

By the way, in case you are not already aware, the ZumoMotor library for the shield does not support 20kHz PWM frequencies for the Arduino Mega (or any other Arduino board not using an ATmega168, an ATmega328P, or an ATmega32U4), but should work at a basic level, using analogWrite() to produce the PWM signal.

- Amanda

Amanda:
Yes, I think I agree with you … Modifying the shield library may not be so trivial. So, I’m looking at using individual component libraries (for the motors and sensors) … And you anticipated my next move :slight_smile:
Regarding the motor driver library and the 20 kHz PWM: Can you tell me if there are performance advantages to this? Increased motor torque, perhaps?
Thanks.
Paul

Using a PWM frequency of 20kHZ or above just allows for quieter motor operation since it is ultrasonic.

- Amanda