7

(avery) #1

Build your own Arduino


TUTORIAL


Make your projects Arduino-compatible


Build your own Arduino


he Arduino Uno is a great board for
prototyping with; however, it’s bulky
and a little pricey. This is because it
comes with a whole bunch of stuff you
might not need, such as a USB to serial
converter and a large number of exposed
headers. You can incorporate the core processing
component from the Arduino Uno (an ATmega328P)
and make it programmable from the Arduino IDE in a
smaller, cheaper, and more flexible way. That’s what
we’re doing with our ‘standalone’ Arduino.
The idea of the ‘standalone Arduino’ is to get rid
of all the components included in the development
board (Arduino Uno) that you just don’t need. So you
are left with a 16MHz crystal oscillator, a voltage
regulator, four capacitors, and the ATmega328P chip,
plus all the extra components that your project will
need. You can build the circuit either on a solderless

breadboard, a soldered protoboard, or a printed circuit
board (PCB). The last two options are better suited for
final projects, as they are more durable and resistant.
Before setting up the standalone Arduino in your
circuit, you will need to burn the bootloader on the
ATmega328P chip and program it with the Arduino
code. The easiest way to do this is by means of
the Arduino Uno. The connections between the
Arduino Uno and the standalone Arduino will be
different for bootloading and programming, so it
is recommended to perform these two tasks on a
solderless breadboard.

GETTING BURNED
Table 1 shows the connections between the Arduino
Uno and the standalone Arduino chip (ATmega328P)
for bootloading.
First, you have to load the ArduinoISP sketch on the
Arduino Uno with the Arduino IDE (File > Examples >
ArduinoISP). Then you have to select Tools > Board
> Arduino/Genuino Uno, and burn the bootloader
onto the ATmega328P chip: Tools > Burn Bootloader.
The bootloading process will take several seconds
to complete.
Once the standalone Arduino chip has the
bootloader burned, it is time to program it with the
Arduino code. We’ll do this via the Uno, but in order
to make sure that we program our separate chip, not

T


Table 1
The connections between the Uno and the raw ATMega328P.
Chip pin numbers are counted anti-clockwise, starting with the
pin immediately anti-clockwise of the U-shaped notch

Ricardo
Caja Calleja

An aerospace engineer
by profession, Ricardo
is deeply interested
in robotics and
automation. If there’s
nothing to repair at
home, he’ll make up
some plan to build
anything that includes
cables or screws.

funwithcables.wordpress.com

ARDUINO
UNO PIN

ATMEGA328P
CHIP PIN
5 V 7, 20
GND 8, 22
10 1
11 17
12 18
13 19

1

1

5

5

10

10

15

15

20

20

25

25

30

30

35

35

40

40

45

45

50

50

55

55

60

60

AB AB

CD CD

E E

FG FG

H H

IJ IJ

1312111098 765432
L

5V A0

ANALOG IN

AREF

1

GND

TXRX

RESET3V3 GNDGNDVIN A1A2A3A4A5

DIGITAL (PWM= )

Arduino TM

IOREF

ICSP

ICSP2
ON

POWER

10
RESET TX0RX0

ATMEGA328

Above
Burning the
bootloader
Free download pdf