Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Arduino Microcontroller Guide pdf
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Arduino Microcontroller Guide

[attachment=55739]

Introduction

Overview


The Arduino microcontroller is an easy to use yet powerful single board computer that has
gained considerable traction in the hobby and professional market. The Arduino is open-source,
which means hardware is reasonably priced and development software is free. This guide is for
students in ME 2011, or students anywhere who are confronting the Arduino for the first time.
For advanced Arduino users, prowl the web; there are lots of resources.

What You Need for a Working System

1. Arduino Duemilanove board
2. USB programming cable (A to B)
3. 9V battery or external power supply (for stand-alone operation)
4. Solderless breadboard for external circuits, and 22 g solid wire for connections
5. Host PC running the Arduino development environment. Versions exist for Windows, Mac
and Linux

Connecting a Battery

For stand-alone operation, the board is powered by a battery rather than through the USB
connection to the computer. While the external power can be anywhere in the range of 6 to 24 V
(for example, you could use a car battery), a standard 9 V battery is convenient. While you could
jam the leads of a battery snap into the Vin and Gnd connections on the board, it is better to
solder the battery snap leads to a DC power plug and connect to the power jack on the board. A
suitable plug is part number 28760 from www.jameco.com. Here is what this looks like.

Troubleshooting

If there is a syntax error in the program caused by a mistake in typing, an error message will
appear in the bottom of the program window. Generally, staring at the error will reveal the
problem. If you continue to have problems, try these ideas
Run the Arduino program again
Check that the USB cable is secure at both ends.
Reboot your PC because sometimes the serial port can lock up
If a “Serial port…already in use” error appears when uploading
Ask a friend for help

Solderless Breadboards

A solderless breadboard is an essential tool for rapidly prototyping electronic circuits.
Components and wire push into breadboard holes. Rows and columns of holes are internally
connected to make connections easy. Wires run from the breadboard to the I/O pins on the
Arduino board. Make connections using short lengths of 22 g solid wire stripped of insulation
about 0.25” at each end. Here is a photo of a breadboard showing which runs are connected
internally. The pairs of horizontal runs at the top and bottom are useful for running power and
ground. Convention is to make the red colored run +5 V and the blue colored run Gnd. The
power runs are sometimes called “power busses”.

Flashing an LED

Light emitting diodes (LED's) are handy for checking out what the Arduino can do.. For this
task, you need an LED, a 330 ohm resistor, and some short
pieces of 22 or 24 g wire. The figure to the right is a sketch
of an LED and its symbol used in electronic schematics
Using 22 g solid wire, connect the 5V power pin on the
Arduino to the bottom red power bus on the breadboard and
the Gnd pin on the Arduino to the bottom blue power buss
on the breadboard. Connect the notched or flat side of the LED (the notch or flat is on the rim
that surrounds the LED base; look carefully because it can be hard to find) to the Gnd bus and
the other side to a free hole in main area of the breadboard Place the resistor so that one end is in
the same column as the LED and the other end is in a free column. From that column, connect a
wire to digital pin 2 on the Arduino board.

Reading a switch

The LED exercise shows how the Arduino can control
the outside world. Many applications require reading the
state of sensors, including switches. The figure to the
right shows a picture of a pushbutton switch and its
schematic symbol. Note that the symbol represents a
switch whose contacts are normally open, but then are
shorted when the button is pushed. If you have a switch,
use the continuity (beeper) function of a digital multimeter
(DMM) to understand when the leads are open and
when they are connected as the button is pushed.
For this exercise, the Arduino will read the state of a normally-open push button switch and
display the results on the PC using the serial.println() command. You will need a switch, a 10
kohm resistor and some pieces of 22 g hookup wire. If you don't have a switch, substitute two
wires and manually connect their free ends to simulate a switch closure. The figure below shows
the schematic for the circuit on the left and a realization on the right.