Sensor Systems

Site Tools

theory:background:microcontrollers:simplearduino:simplified_arduino_microcontroller_boards

Simplified Arduino Microcontroller Boards

Several projects on this page make use of a microcontroller, or can be combined with a microcontroller. There are many options to make a microcontroller board in case an existing platform is not preferred. The easiest way to minimise a microcontroller board is to take the processor that is used on the Arduino, and mount it on an experimentation PCB. In that case, the development tools are still the low-threshold Arduino tools.

Hardware: The ATmega328P on an experimentation print

The processor used on the basic Arduino1) boards is the ATmega328P2) by Atmel. To function, it only needs

• 5V power supply voltage and
• a clock.

There are several options to implement the clock, like an on-chip option, but to remain Arduino-compatible, we prefer the external clock by means of a 16MHz crystal and two capacitors. In addition, for Arduino compatibility, we must have

• setting the right fuses.

The minimally required hardware is shown in figure 1 and available below as an Eagle3) schematic file. This set-up can be found in other tutorials as well4). Alternatively, this can be done on a breadboard5).

Fig. 1: Experimentation print design

The photograph in figure 1 shows an example of an ATmega328P solution on an experimentation board which uses a 3V battery (clip on the lower right) and a small buzzer. You can clearly see the 16MHz crystal.

Software: Programming the ATmega328P

To set the fuses and to burn the bootloader conform the Arduino platform it is advised to use te Arduino environment. This can be done with a dedicated programmer or with a second Arduino board:

• The Arduino page6) describes exactly what to do to program the bootloader from an Arduino board to a blank ATmega328P on an empty slave board7)
• The AVR-ISP-MKII is an in-system programmer from Atmel8). It is supported by the Arduino environment to program an empty ATmega328P in any board with an ICSP socket 9)10).

When all Arduino compatibility measures are taken into account (external clock, Arduino bootloader), we can place any ATmega328P processor on the board which is uploaded with an Arduino sketch. So, we can upload a sketch to a microcontroller on a regular Arduino board, and next move the processor physically form the Arduino board to our own simplified board. In this way, we avoid the need of implementing a full USB communication interface or ICSP socket.

In general, sensor applications may need one of two embedded software front-ends:

• detecting transitions and intervals: this is a matter of timing signal edges
• sampling with $500Hz$ up to $1kHz$: this needs equi-distant sampling at a relatively high rate.

For both problems, there are examples given on the read-out pulses with a microcontroller page.

Power reduction

The Arduino 2009 board consumes typically $25mA$ at $5V$ and $16MHz$, of which $50\%$ in FTDI chip and $50\%$ in the ATmega328P processor. Consider a $9V$ block battery which has a capacity of $500mAh$. With $25mA$ current, this means a plain Arduino board at work survives for $20hrs$ with this battery.

However, there are two power-saving options based on hardware that can be implemented easily to extend the battery life. First of all, reducing the supply voltage reduces the consumed power. Next, reducing the clock frequency reduces the power. In <ref ATMEGA_Power>, which comes from the Atmel ATmega328P datasheet11), we can see the operational point effect of reducing the supply voltage and clock frequency. When going from $5V$ to $3V$, and from $16MHz$ to $10MHz$, the ATmega current reduces from $10mA$ to $4mA$. This gives the opportunity to use a $3V$ battery of type CR2032H (capacity $240mAh$), and increases the life time to over three days. A consequence is that when programming the Arduino, all clock rates reduce with $10/16$ which includes the communication baud rate as well.

Fig. 2: Power consumption of the ATmega328p microcontroller at several operation voltages and clock frequencies

File Program Version Description
Simple Arduino board.sch Eagle 6.2 1.0 - 2012 Schematic for Arduino board
dg233_2012.pdf Acrobat April/May 2012 Geert Langereis, TU/e, Arduino course using mainly plain C
1) , 6)
Arduino development page, https://www.arduino.cc/
2) , 11)
Datasheet of the ATmega328P Atmel picoPower 8-bit AVR RISC-based microcontroller, http://www.atmel.com/devices/atmega328p.aspx
3)