You are on page 1of 3

Mastering Arduino, Quickest Startup Guide

Pre-requisites#:
Necessary: Knowledge of basic electronics and circuits (KVL, KCL etc.), Understanding of the
Breadboard
#Optional: Basic coding background would be extremely helpful
1. How to setup Arduino and start programming:
(Reference: http://spectrum.ieee.org/geek-life/hands-on/the-making-of-arduino/0)
Arduino is a low-cost microcontroller board and user-friendly programming software that allows DIY
electronics-based projects to take off rapidly.
-Introduction/History
(i) Name: Originated in Italy by a group of friends who are tasks to create a user-friendly tool for
Banzis students at Interaction Design Institute Ivrea (IDII) for rapid prototyping of electronics
circuitry.

Environment

Arduino
(Microcontroller)

OUTPUT

Arduino Software

INPUT

Image Source: APC Magazine, Arduino


Masterclass Part4: Build a mini robot

YOU

(ii) Key Components of Arduino PCB (similar variations; e.g. Arduino Uno, Arduino Mini)
-Basic Key Components: (i) Pins (PWM, Digital, Analogue) (ii) AT Mega328(microcontroller) (iii)
Crystal Oscillator (iv) Power Jack (v) TX/RX (vi) Additional Components (FDTI) (vii) USB Cable (types:
MicroUSB, MiniUSB) [Get Image Done]
(iii) Software Setup: http://arduino.cc/en/Main/Software
Installation Guide: [Make a Video/Screenshots; Ezvideo: Windows & MAC Users]
2. Breadboard Usage
(Reference: https://learn.sparkfun.com/tutorials/how-to-use-a-breadboard)
-What is inside a breadboard?
-Connecting things in a breadboard
-Types of breadboard for Prototyping
Comments/Tips:
1) Adopt common anode/cathode to reduce the number of wirings required (especially useful when connecting many LEDs
together with a common ground i.e. common cathode (-ve))
2) Understanding how a circuitry is placed parallel or series on the breadboard is important in translating circuit diagrams
onto the actual breadboard
3) Ensure polarity of certain components is well understood prior to assembly of circuitry on the breadboard. See
datasheets of the components for more details. (E.g. LEDs generally require resistors)

Dexter Chew Xuan Han


10/05/2014

3. Coding: Arduino Basic Codes


(Reference: http://arduino.cc/en/Tutorial/HomePage)
(i) Basic Arduino Setup Code
Comments/Tips:
1) General Terms: Reading: Microprocessor obtains data from sensor; Writing: Microprocessor produces an output for
an action (e.g. Servo motion, LEDs blinking etc.)
2) The Arduino reads the code in a chronological from, from top to bottom and loops about the code chronologically within
the loop as well (Suggestion: An understanding of State Machines (SM) will assist in the coding of Arduino that requires
different operations in certain situations)
3) Make sure you end each line with a ;, certain lines doesnt need to like loops, if, for,
4) Serial Monitor VS Sketch Reading speed (i.e. 9600 baud)
5) analogRead(): Arduino reads the voltage and converts into integer values that is readable from the serial monitor.
Conversion resolution is about 5 volts/1024units or 0.0049volts (4.99mV) per unit.

(ii) Basic Commands:

BareMinimum: The bare minimum of code needed to start an Arduino sketch. Access via Example Sketch. [Sketch layout]
Blink: Turn an LED on and off.
DigitalReadSerial: Read a switch, print the state out to the Arduino Serial Monitor.
AnalogReadSerial: Read an analogue input pin, print its state out to the Arduino Serial Monitor.
Fade: Demonstrates the use of analog output to fade an LED.
ReadAnalogVoltage : Reads an analog input and prints the voltage to the serial monitor

(iii) Uploading Code Guide:


Typical Troubleshooting Common Errors
(I) avrdude errors
(Solution1: Reconnect the Arduino to the Computer Port
Solution2: Off Arduino, disconnect external components (TX, RX, Reset Pins) and re-upload the code;
ensure that the uploading connection cable especially the FDTI is connected securely)
(II) Unable to detect COM ports; cause, multiple plugging in and out of the USB cable that computer
registers different devices for the same port even without device present)
(Solution: 1) Restart Arduino software 2) Restart computer)
4. Sample Project(s): [STEP BY STEP Video Assembly Instructions + Free Code]
Comments/Tips:
1) When purchasing new components, read through the datasheet for the specs of the equipment

AIM: Showing the concept of input and output + applications; Show the use of certain electronics
without the need of Arduino (e.g. MOSFETs)
Project Sample 1A: Arduino microprocessor, Jumper wires, Resistors, LEDs, UltrasonicSensor
(1) Input: Ultrasonic Sensor (Analogue input)
(2) Output: LEDs (Digital Output (HIGH/LOW))
Objective: Using Ultrasonic sensor to detect the number of people walking pass and lighting up the
LEDS when people come too close to the Ultrasonic sensor. (Intermediate level: Pulsating LEDs with
rate directly proportional to the distance from the setup)
Application=Protection system for a museum display
Project Sample 1B: Arduino microprocessor, Jumper wires, Resistors, LEDs, Photoresistor (LDR)
(1) Input: Photoresistor/Light Dependent Resistor* (Analogue input)
(2) Output: LEDs (Digital Output (HIGH/LOW))
Dexter Chew Xuan Han
10/05/2014

Objective: Reading off analogue readings from the photoresistors potential difference and output
LEDs when the reading is lower or higher (depending on how the circuit is arranged) than the desired
analogue value
Application=Automatic Lights on/off system
Project Sample 2: Transistor, Jumper wires, Resistors, LEDs, Photoresistor (LDR)
(Reference: https://www.youtube.com/watch?v=LQImmpcFDBw)
(1) Input: Photoresistor/ Light Dependent Resistor
(2) Output: LEDs
E.g. Use a purely non-digital circuitry to set up the same function as the Project Sample 1B.
Application= Automatic Lights on/off system
*Photoresistor/LDR/Cadmium Sulfide: A resistor whose resistance decreases with increasing light intensity.

5. Supporting Documents:
(i) Arduino Website (http://www.arduino.cc/)
(ii) Local Vendors
-External Vendors
1. sgBotics
1. Sparkfun Electronics (Provides great examples along with components)
2. Robot R Us
3. SWATEC
(iii) Small Projects /Tutorials
1. APCMAG: http://apcmag.com/
2. Instructables: http://www.instructables.com/id/Arduino-Projects/
3. duino4Projects: http://duino4projects.com/arduino-projects/
4. Jeremy Blum: http://www.youtube.com/user/sciguy14
-END-

Dexter Chew Xuan Han


10/05/2014

You might also like