Zumo with Arduino 101

I’ve received an Arduino 101 and was wondering if it would work with the Zumo robot in place of an Uno?

Sorry to answer my own question, but I found a Zumo and gave it a try. It works great, except for the reset button on the Arduino 101 being located right “above” a capacitor on the Zumo board. The result being that the boards can’t quite be fully seated, nor the button used. Other than that, it’s pure awesomeness so far.

Hello.

Thanks for following up on your question. We had not tried using the two together (we designed the Zumo before the Arduino 101 was available), so it is good to hear that someone got them working. It is also good to know about the reset button.

-Jon

CircuitPeople, I have a Zumo but wasn’t able to get it running with the Arduino 101. The Zumo worked with my Edison board (though a bit long) and the Arduino Uno; but not the 101.
With the Arduino 101, see the same interference with the capacitor / reset button you mention; but the real problem is it goes in circles, meaning only one motor is working. I assumed it was a PWM assignment problem with the Curie chip like I ran into with the Edison board, but unlike the Edison board I didn’t find a PWM swizzle jumper. Did you have to do anything special to get the Zumo to work with the Arduino101?

Still looking for a solution. A bit more detail on the problem. When using the Zumomotor example the right motor always runs forward. Looking at the user guide that is Digital Pin 7. I have two Zumos and the both have the same problem. Both work fine with Arduino Unos.
I’d really like to get this solved before the upcoming Sumobot contest. Any ideas would be appreciated.

Turns out the issue was related to a corrupted library file. Now the Zumomotor example works. Next issue is getting the sensor array to work. Analog inputs don’t seem to work right, likely another user error, if I discover anything important I’ll provide an update.

Hi.

Thank you for letting us know what the issue was. It is not clear exactly how you are using your analog inputs, but in case you didn’t realize it, the Zumo sensor array uses our QTR-RC sensors. Those sensors rely on the timing of a pulse and are generally used with digital inputs. They do not output an analog signal.

-Claire

Claire,
I investigated the sensor array a bit more. And as you pointed out the inputs are used as digital reads (pins 4,5,11,A0,A2,A3) not analog signals.
I believe the problem is that the Uno is 5V IO and 101 is 3.3V. As expected when I measured the pin thresholds they toggle at different levels. The sensor reading is going to have significantly different timings which is what I observed. The timing pulses readings were very small. I’ll play around with the calibration a bit more, the first attempt produced insistent results across the array. Not sure if the changing the drive high time will affect anything. It might need a different RC constant for the different IO voltages which might be hard to do.
Any thoughts?
Jeff

Using 3.3V logic with that sensor means that the capacitor on it does not fully discharge, so that might account for the shorter pulses you are seeing. Some variation between sensors is expected, and that can usually be accounted for by calibrating. I also expect calibrating to help with the differences in operation that come from using a 3.3V system.

If you continue to have issues, could you try running the QTRRCExample.ino which can be found on the git hub page for our QTR sensor library and post the output? Note that you will probably have to modify the example a little to have the right number of sensors and use the correct pins. You can find what pins are used by the sensor in the “Adding a Zumo reflectance sensor array (optional)” section of the Zumo shield user’s guide which is linked to on the Resources tab of the Zumo shield’s product page.

-Claire

I ran the QTRRCRawValuesExample, adjusting the number of sensors from the default 8 to 6

define NUM_SENSORS 6 // number of sensors used

and adjusting the pin assignment for the array
QTRSensorsRC qtrrc((unsigned char[]) {5,A2,A0,11,A3,4},NUM_SENSORS, TIMEOUT, EMITTER_PIN);

The results were all 2’s regardless of whether the sensor is on a white or black surface.

Do you have the LEDON shorting block installed on your sensor array? Could you try running that modified example again but with the argument QTR_NO_EMITTER_PIN instead of EMITTER_PIN?

-Claire

I’m curious if folks investigating issues related to IO voltage differences have made any further progress. I’m interested in using a Arduino 101 with the Zumo shield as well. The combo of Zumo, Bluetooth and RTOS are very attractive.

Claire,
Sorry it took a while, I received some QTR-1A sensors and was playing with them. They worked quite nicely as an alternative, but would like to keep trying to get the digital sensor array to work.

I ran some tests with the SensorCalibration example in the sensor array library LEDON shorting block on and off; with and without the QTR_NO_EMITTER. Here are the results.

test #1
shorting block ON
SensorCalibration example

  • default initiation:
    reflectanceSensors.init();

2 2 2 2 2 2
2 2 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

test #2
shorting block ON
SensorCalibration example

  • initiation:
    byte pins[] = {4, A5, 11, A0, A2, 5};
    reflectanceSensors.init(pins, 6);

2 2000 2 2 2 2
2 2000 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

test #3
shorting block ON
SensorCalibration example

  • initiation:
    reflectanceSensors.init(QTR_NO_EMITTER_PIN);

2 2 2 2 2 2
2 2 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

test #4
shorting block ON
SensorCalibration example

  • initiation:
    byte pins[] = {4, A5, 11, A0, A2, 5};
    reflectanceSensors.init(pins, 6, QTR_NO_EMITTER_PIN);

2 255 2 2 2 2
2 255 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

test #5
shorting block OFF
SensorCalibration example

  • initiation:
    reflectanceSensors.init(QTR_NO_EMITTER_PIN);

2 2 2 2 2 2
2 2 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

test #6
shorting block OFF
SensorCalibration example

  • initiation:
    byte pins[] = {4, A5, 11, A0, A2, 5};
    reflectanceSensors.init(pins, 6, QTR_NO_EMITTER_PIN);

2 255 2 2 2 2
2 255 2 2 2 2

0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

I talked to another engineer here about your problem and he suspects that the processor on the Arduino 101 handles the commands for pinMode and digitalWrite a little differently than the traditional AVRs and that might be causing the issue. Could you try finding the QTRSensors.cpp file in your Arduino\libraries\zumo-shield-master\QTRSensors folder and replacing it with the one I have attached? In the attached file I swapped lines 433 and 434 so they now read:

pinMode(_pins[i], OUTPUT);   // make sensor line an output     
digitalWrite(_pins[i], HIGH);// drive sensor line high

QTRSensors.cpp (17.5 KB)

-Claire

Success!
The new library worked with the stock calibration example. See the results below while moving the Zumo across the white boundary line.

test #A - revised library
shorting block ON
SensorCalibration example

  • default initiation:
    reflectanceSensors.init();

198 145 158 171 170 222
2000 2000 2000 2000 2000 2000

1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 138 2080
1000 1000 1000 827 43 1000 2171
1000 1000 768 121 0 1000 2031
988 64 1000 1000 80 368 2064
1000 27 171 324 383 448 2186
135 301 311 371 393 444 2981
114 294 304 364 386 429 3005
398 7 1000 14 217 413 2432
1000 1000 1000 1000 1000 80 2047
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 1000 2500
1000 1000 1000 1000 1000 51 2030
171 329 317 378 400 451 2909
28 210 291 358 388 431 3321

Thanks a ton.