Comparison of Arduino Uno and Arduino Zero

A project log for MightyWatt R3: 70W Electronic Load for Arduino

MightyWatt R3 is a programmable electronic load made as an Arduino shield

kaktus circuitskaktus circuits 03/31/2017 at 22:360 Comments

I was getting asked how does the Uno perform against Zero with MightyWatt R3.

Measurement rate

After fixing a watchdog reset flaw, I am now able to compare the performance of those two boards. This comparison was made using firmware version 3.0.2.

The venerable Arduino Uno uses 8-bit AVR from Atmel (well, Microchip…) – ATmega328P running at 16 MHz.

Arduino Zero (M0/M0Pro) has a 32-bit ARM Cortex M0+, SAMD21, from the same company, running at 48 MHz, i.e. three times faster.

How does it influence MightyWatt R3?

First of all, let me tell you that the ADC is precise but not terribly fast. In its 16-bit version (ADS1115), it does approximately 860 samples per second, meaning that it is not possible to get more than 430 complete measurements (current + voltage) per second. Plus, there is a communication overhead on the I2C bus and all the calculations the program must do in every pass of the main program loop. So, in the end, Arduino Uno makes about 220 measurements per second and 4350 main program loops. Arduino Zero finishes 237 measurements per second and 12500 main program loops. The measurement is thus about 8 % faster with Zero and there are 2.9 loops per every loop on Uno. This number is very close to the ratio of core clocks of the two Arduinos, which is 3. What was a little bit surprising for me is that a 32-bit ARM Cortex M0+ does not seem to have any additional advantage against an 8-bit AVR core besides the core clock speed. At least not in this application.


But what about the analog accuracy? In theory, it shouldn't be dependent on Arduino because the ADC and DAC are all part of the MightyWatt R3. However, Uno runs at 5 V and Zero at 3.3 V and while both the ADC and DAC as well as the rest of the analog circuitry has an excellent power supply rejection, it might have an impact. Let's see the numbers:

A calibration performed on Zero was uploaded to both Uno and Zero. A constant-voltage mode was used and a power supply limited to 1 A. Then, 20 V was set on the same MightyWatt R3, once using Uno and once using Zero as the control board.

With Zero, MightyWatt R3 reported 19.998 V while the multimeter (Keysight 34461A) measured 20.0036 V.

With Uno, MightyWatt R3 reported 20.000 V while the multimeter (Keysight 34461A) measured 20.0042 V.

The relative error of the set voltage was 0.018 % (Zero) and 0.021 % (Uno).

The relative error of the measured voltage was 0.028 % (Zero) and 0.021 % (Uno).

The relative difference of Uno vs. Zero was 0.003 % for the setting of voltage and 0.007 % for the measurement of voltage.

Because the difference of Uno vs. Zero is very small, the calibration can be used interchangeably between those two control boards.