where the variables reside. The largest floating-point array I
can declare in an Uno before I get an out of memory
error is about 400 elements. In a Due, I can fit an array of
more than 500,000 elements before I run out of memory.
So far, I’ve never run out of space for data and variables
using a Due, but I’ve encountered the limits of an Uno too
While the Due has more digital and analog I/O than
an Uno, it retains the form factor of the two rows of pins
in the exact same configuration as the Uno. This means
the same shields that plug into the Uno can be used on
In addition to more digital I/Os — all of which can be
used as interrupts — there are 12 ADC (analog-to-digital
converter) pins, each capable of 12-bit resolution. Its spec
says it has 2 DAC pins each at 12-bit resolution, but they
are not so useful. Their output swing is limited to a voltage
range from 1/6 Vref to 5/6 Vref. When the Vref is 3.3V,
this is a range of 0.55V to 2.75V. It’s possible to add a
buffer amplifier to turn this range into a 0 to 5V range, but
for that effort, it’s easier to just get a good DAC (
digital-to-analog converter) shield.
The only slight downside is that the Due runs at 3.3V.
We have to be careful what we plug into it. The retail
price of a Due is approximately $49 at SparkFun and
Adafruit, but less than $20 on eBay (see Resources 1 and
2). The Due has become my first choice for all my
The Best ADC/DAC Shield
To go with this high performance microcontroller, the
Digilent Analog Shield (DAS) is the best analog interface
shield I have found (see Resource 3). Its pin footprint
matches the standard Arduino footprint and just
plugs into the Due (Figure 3). It’s important to
move the blue jumper pin located in the
bottom middle of the shield to the center
position for 3.3V operation. This is one of a
number of important tips to follow to get your
data acquisition system working the first time
(refer to the sidebar).
The DAS uses the SPI bus as the interface
to the Due. These are dedicated pins brought
out in the center left of the board. A socket in
the bottom of the DAS shield plugs directly into
the SPI pins of the Due.
This shield has four channels of 16-bit
analog input using the TI ADS8343 ADC, and
four channels of 16-bit analog output using the
TI DAC8564 DAC. The voltage range as input
or output for both the ADC and DAC is ±5V.
This means each bit level resolution is 10
v/65535 = 0.153 mV.
In addition, there are four DC voltages available to
drive analog front-end electronics. There is a fixed ±5V
supply, a variable ± 7.5V supply, and a fixed high accuracy
2.500V reference. I’ve measured the 2.500V reference
with a seven-digit Keithley DMM and found it to be within
1 mV of 2.500V. This is an absolute accuracy of 0.04%.
It’s a handy reference to have available — especially for
Having the other two bipolar power supplies on the
16 June 2017
Eight Tips to Get Your System
Working the First Time
1. Be sure to select the 3.3V pin on the DAS, using the blue
jumper in the lower middle pins.
2. Download the DAS library from wepro’s GitHub, NOT the
Digilent released library. No other library works with the
3. After installing the new library, be sure to close the IDE
completely, then re-open it so the library is available.
4. Be sure to add the #include SPI.h, followed by #include
5. Be sure the Arduino Due (programming port) is selected
under Tools/boards and the correct COM port for the
Arduino Due (programming port) is checked.
6. Download the latest version of PLX-DAQ v2.9 from
7. Remember to disconnect the controller before you try to
upload another sketch. The PLX-DAQ will hold the serial
port until it is disconnected.
8. Set your Serial.begin() rate to no higher than 15,000
baud. Try higher rates until you begin to lose data.
■ FIGURE 3. Example of a Digilent Analog Shield plugged into an
Arduino Due mounted next to a solderless breadboard. This is a