Analog to Digital Conversion Using Microcontroller Education Boards
1. Our goal is to study the performance of the Analog-to-Digital
converter (ADC) built into the Tiva C Launchpad and
compare it with the built-in ADC of the Arduino and MSP430.
Throughout our endeavor we clarify some terms and we
increase our understanding of the architecture and
programming of microcontrollers.
Conclusions & Future Work
Analog to Digital Conversion using Microcontroller Education Boards
John Wells, Kyle Vandruten, Awad Alahmadi, Kassiani Kotsidou
Electronics Engineering Technology, Department of Physics & Geology, Northern Kentucky University
Abstract Experiment
Definitions
Microprocessor - An integrated circuit that contains all the
functions of a central processing unit of a computer. It is the
heart and the brain of a computer system.
Microcontroller - A small microcomputer that governs an
embedded system within a machine. A microcontroller is
comprised of a microprocessor, memory, and I/O peripherals.
Analog to Digital Converter - A device that converts a
continuous physical quantity (usually voltage) to a digital
number that represents the quantity's amplitude.
Figure 1. Schematic diagram of computer system
Historical Notes
In early 1970’s Intel implemented the first microprocessor
chip.
Few years later Texas Instruments introduced the first
microcontroller chip.
Because of their success in the OEM (Original Equipment
Manufacturer) market, TI did not develop an educational
line of microcontrollers till after 2000. The TI evaluation
board is called Launchpad.
Arduino is another open source electronic platform which
allows easy prototyping for the education industry. Arduino
started in 2005 and before the introduction of the TI
Launchpad.
The development environment for the Launchpad and
Arduino is based on Processing programming language,
which was developed in 2001.
Development Environment
The development environment for the Arduino platform is
called ‘Arduino’ and the development environment for the
Launchpad platform is called ‘Energia.’
A program written in Arduino and Energia is called sketch.
Energia forked from Arduino and as Figure 2. shows the two
environments are very similar. Energia and Arduino sketches
are written in C++ like language that hides many details from
the end user.
Figure 2. Energia and Arduino development environments
[
1
]
K. Schindler, Introduction to Microprocessor Based Systems
Using the ARM Processor (2nd Edition), Pearson Learning
Solutions, January 8, 2013.
[
2
]
A. Pal, MICROCONTROLLERS : PRINCIPLES AND
APPLICATIONS, PHI, August 30, 2011.
[
3
]
S. Barrett and D. Pack, Microcontroller Programming and
Interfacing: Texas Instruments MSP430 (Synthesis Lectures
on Digital Circuits and Systems) 1st Edition, Morgan &
Claypool Publishers, August 1, 2011.
[
4
]
A. V. Deshmukh, Microcontrollers: Theory and Applications,
Tata McGraw-Hill, 2005.
[
5
]
http://energia.nu/.
[
6
]
http://www.arduino.org/.
Bibliography
Communication Methods
The simplest way by which microcontrollers exchange data
with each other and with other peripheral devices is
through UART, which stands for Universal Asynchronous
Receiver/Transmitter. The UART is an integrated circuit
having all the necessary software for controlling the serial
port of a microcontroller. UARTs work at a slow
transmission speed because
1. They provide for asynchronous communication, that is,
start and stop bits are embedded in the data stream. In
particular, start and stops bits are appended to each
character.
2. They provide for serial communication, that is, one bit is
transmitted at a time.
Microcontrollers are usually equipped with I2C (Inter-
Integrated Communication) and SPI (Serial Peripheral
Interface). Both I2C and SPI are synchronous, so they allow
for faster data transmission compared to UART. However,
both I2C and SPI are serial and hence the supported data
speeds are at the low end. I2C and SPI have their own
advantages and limitations, and their suitability depends
on the application.
Tiva C Series Connected Launchpad
MSP430G Launchpad
We compared the analog-to-digital conversion of the
following microcontrollers, when the input voltage is
maximum:
Arduino Uno, which features a 10-bit A/D converter and Vmax
=5.3 V; this makes the resolution Delta=5.176 mV.
MSP430G Launchpad, which features a 10-bit A/D converter
and Vmax =3.6 V; this makes the resolution Delta=3.516 mV.
Tiva C Series Connected Launchpad, which features a 12-bit
A/D converter and Vmax =3.4 V; this makes the resolution
Delta=0.830 mV.
The maximum input values were found experimentally. The
reported maximum input values are close to these values.
The input voltage was a pure 10 Hz sinusoidal and the
Arduino and Energia sketches were passing the raw data to
the Processing sketch for further consumption.
Arduino Uno
From the three figures, the A/D Converters of Arduino
Uno, MSP430G Launchpad and Tiva C Series Launchpad
have comparable performance.
The Tiva C Launchpad was expecting to outperform the
other two education boards as it s based on an ARM
processor. However, this is not the case because the built-
in A/D converter does not take full advantage of the
capabilities of the microprocessor. External A/D
converters will help with the speed and the accuracy. And
Texas Instruments offers a large number of analog to
digital devices.
The speed will also improve a lot if we bypass the serial
communication between the Arduino/Energia and
Processing environments. Towards this end, one may
explore the use of microSD Bootstraps and Shields. The
use of parallel techniques will allow for the successful
digitization of signals with higher frequency.
The Arduino Uno and some variations of the Launchpad
support the concept of the reference voltage Vref.
The reference voltage dictates the maximum input
voltage. The advantage of the reference voltage is two
fold. 1) Without the reference voltage, the maximum input
voltage can be accurately determined only experimentally.
2) The resolution Delta can be reduced depending on the
input voltage. In other words, if the peak input voltage is
less than the maximum voltage, accuracy can still be
preserved.