User Tools

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

  • the Arduino bootloader
  • 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).

picture2.jpg 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

The bootloader

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).

Uploading programs (“sketches”)

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

Downloads

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)
CadSoft USA, Eagle Printed Circuit Board design software, http://www.cadsoftusa.com/
4)
Michele Menniti, March 14, 2012, Arduino ISP (In System Programming) and stand-alone circuits, http://www.open-electronics.org/arduino-isp-in-system-programming-and-stand-alone-circuits/
5)
Building an Arduino on a Breadboard, https://www.arduino.cc/en/Main/Standalone
7)
Using an Arduino as an AVR ISP (In-System Programmer), https://www.arduino.cc/en/Tutorial/ArduinoISP
9)
Burning sketches to the Arduino board with an external programmer, https://www.arduino.cc/en/Hacking/Programmer
10)
Arduino Tut. #5 - Bootloader Burning with AVR ISP MKII, https://www.youtube.com/watch?v=EsLOMdu50YU
theory/background/microcontrollers/simplearduino/simplified_arduino_microcontroller_boards.txt · Last modified: 2017/10/06 20:02 by glangereis