Arduino/Gizduino Quick Start: Engr. Roma L. Mercado RND Engineer/Technical Support at E-Gizmo Mechatronix Central

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 77

Arduino/Gizduino Quick Start

Engr. Roma L. Mercado


RND Engineer/Technical Support
@ e-Gizmo Mechatronix Central

egizmo.technical@gmail.com
Outline

Know what is a microcontroller

What is Arduino/Genuino

Hardware Specifications
Objectives

Introduction to GizDuino

To know what is Gizduino

Learn how to program Gizduino
What is a microntroller?

Small computer on a single IC

Configurable pins

Programmable Function

With Built-in Memory RAM, ROM

Has Built-in Peripherals
- Timer,ADC,UART/SPI/I2C/PWM/Comparators
ATMEGA328/328P


Microcontroller Developed by Atmel

Widely used on Arduino

8-bit Microcontroller

28 pins

32 Kbytes Flash Memory “Self-programmable”
Basic Setup

Atmega 328 IC DIP 28

Breadboard

Supply

Crystal Oscillator

Resonator Bypass

Reset Pull-up

Filter Capacitor

Bypass Capacitor

Reset Switch

ADC Supply
ATmega328P
23 pins General Purpose I/Os
Outputs
Outputs

LED

Transistor

Buzzer

DC Motor

Servo Motor

Sensor
INPUTS

ADC -switch
- Voltage measurement
- LDR
SENSOR
- Temperature -
Proximity
- Position
What is Arduino?

A project which began in Ivrea (Italy) in 2003

Device for controlling student-built interaction
design
- it is less expensive
- more modern
- than what is available
- Basic Stamp
Who is Arduino?
Arduino

Open Source Hardware
- Based on Wiring

Open Source Software
- Based on Processing
Multi-platform (Windows, Mac, Linux)
Programmed via USB

Named the project after a local bar Arduin of Ivrea
- Italian masculine first name
- “strong friend”
- English equivalent is “Hardwin”
What is Gizduino?

It is an Open-Source physical computing
platform based on a simple input/output
(I/O)board and the use of standard
programming language.

It is a tool for implementing a program you have
designed.

Gizduino is programmed using the IDE
(Integrated Development Environment).

An Arduino Compatible
Gizduino V (Atmega328P) v5.0

GizDuino V
(Atmega 168P or 328P)
20 I/Os
16/32kB Flash memory
*UART Automatic Switch
Arduino VS GizduinoV
Driver : FTDI Driver :Prolific

Memory 16KBytes,32KBytes Memory 32KBytes


Number of Pins Number of Pins
20 Digital I/Os 20 Digital I/Os
6 Analog Inputs 6 Analog Inputs
UART 1 UART 1
#withnewfeaturesonboard
General Specifications

Microcontroller: Atmega328P

Power Input: USB (+5V), E xternal (7~12V)

Input voltage (limits): 6~20V

DC Current per pins: 40mA

Digital I/O Pins: 20 Digital (6 for PWM)

Analog Input Pins: 6

Flash Memory: 32kB (2kB used by
bootloader)
Bet. Gizduino v4.1 to Gizduino V5
Gizduino PLUS (Atmega644P) v4.0

GizDuinoPLUS
(Atmega 164P/324P/644P)
32 I/Os
16/32/64kB Flash memory
*UART Automatic Switch
Arduino VS GizduinoPLUS

Memory 16KBytes,32KBytes Memory 64KBytes


Number of Pins Number of Pins
20 Digital I/Os 32 Digital I/Os
6 Analog Inputs 8 Analog Inputs
UART 1 UART 2
#withnewfeaturesonboard
General Specifications

Microcontroller: Atmega644P

Power Input: USB (+5V), E xternal (7~12V)

Input voltage (limits): 6~20V

DC Current per pins: 40mA

Digital I/O Pins: 32 Digital (6 for PWM)

Analog Input Pins: 8

Flash Memory: 64kB (2kB used by
bootloader)
Bet. Gizduino v3 to GizduinoPLUS v4

Gizduino+ v3.0 GizduinPLUS v4.0


GizDuino PLUS Major Parts
Major parts Presentation
Major parts Presentation
Why Gizduino?

Low-cost

Locally-available

Simple programming

Open-Source, (Software and Hardware)

A microcontroller board family

Made in the Philippines
Gizduino mini Boards

GizDuino mini
(Atmega 168P or 328P)
W/ or w/o pins
Gizduino PLUS mini Board

GizDuino PLUS mini


(Atmega 164P/324P/644P)
W/ or W/o Pins
Gizduino mini USB board

GizDuino mini USB


(Atmega 168P or 328P)
W/ or W/o Pins
Gizduino X (Atmega1281) v2.0
GizDuino X
54 I/Os
128kB Flash Memory
With Serial RX disable switch
New Features

3. Protoboard Ready alternate pin layout


- you can solder additional header on this pins.
This will allow you to mount and connect your
gizDuinoPLUS board to a standard perforated
prototyping PCBs.
New Features
4. Buffered UART TX/RX indicator
- a visual means to monitor the activity of one of
the most used port of your gizDuino. LEDs
flashes when data (of sufficient duration) flows
through these pins.
New Features
5. UART switch
- a shield or extension device that connects
through your gizDuino UART can interface with
the program downloading process, resulting in
those “STK-500” failures.
New Features
6. Buffered I/O 13 indicator
- you can even use the internal pull ups of the I/O
13 and use it as if the LED is not there.
Gizduino Shields
Gizduino Shields
Interface & Peripheral kits
HOW ARE Y OU
SO FAR?
Getting Started with GizduinoPLUS
Correct handling of Gizduino

Avoid touching the male pins, also the
components on the board.

Place the board on a non-conducting surface.

Hold the boards on its sides or the edges of
pcb.

Do not touch the board when powered and
adding or removing components like modules
or shields.
Setting Up
1. Install Prolific USB Driver

2. Install Arduino Software


Softwares and Driver

Arduino IDE with gizDuino Patch
- Download: https://github.com/e-
Gizmo/Arduino-1.8.2-IDE-Windows


Device Driver
- GizduinoPLUS uses Prolific Chip
http://www.prolific.com.tw/US/ShowProduct.as
px?p_id=225&pcid=41
Install the Prolific Driver

Open arduino 1.0.6 folder > driver folder >
prolific USB drivers >
PL2303_Prolific_Driver_Installer.exe
Open the Arduino IDE

Click the Arduino IDE application
Arduino IDE
Connect GizduinoPLUS to PC

Connect the Gizduino board to your PC using
USB Cable (TypeA - TypeB mini). The green
and red power LED should turn on.
Open the Blink sketch

File>Examples>Basics>Blink.ino
Select the board

Tools>Board menu and select “Gizduino + w/
ATmega644”
Getting Up and Running

Tools> Serial Port menu and Select COM #
Uploading the Program

Click “Upload” to verify the code and upload the
sketch to your board.
Sample Blink sketch

If the blink sketch is successfully uploaded,

The Message “Done Uploading” appear in the
status bar
Success!


Now the Program is running to the board, LED
turning alternately ON and OFF.
Blink Test
Blink Sketch
Arduino Programming
Operators
Variables
Arduino Programming
Setup()
- called when a sketch starts running
- to initialize
Libraries,variables, pinModes,


The setup function runs once when you
press reset or power the board.
Setup()
int LEDpin = 13;
void setup(){
pinMode(LEDpin, OUTPUT);
digitalWrite(LEDpin, LOW);
}
void loop(){

}
loop()
- Executed reapeatedly
- Allows the program to change and respond.


The loop function runs over and over
again forever
loop()
int LEDpin = 13;
void setup(){
pinMode(LEDpin, OUTPUT);
}
void loop(){
digitalWrite(LEDpin, HIGH); delay(100);
digitalWrite(LEDpin, LOW); delay(100);
}
pinMode

pinMode(pin, mode)
-set a digital pin as an input or an
output.
pin – the number to set
Digital: 0-19 ;Analog:A0-A5
mode – either INPUT or OUTPUT

ex.pinMode(13, OUTPUT);
digitalWrite

digitalWrite(pin, value)
-for digital: HIGH or LOW
pin – the number to set
Digital: 0-19 ;Analog:A0-A5
value – either HIGH or LOW

ex.digitalWrite(13, HIGH);
delay(ms)

delay(value)
-amount of time to pauses the program
(milliseconds)
1 second = 1x10-3 seconds =1000ms


ex.delay(1000);
Review

The BASIC FUNDAMENTAL


IN ELECTRONICS

Current – is a flow of electrical charge carriers.

Voltage – measure of work done in making the
electric charges flow.

Resistance –measure of the difficulty to add an
electric current through that conductor.

Ohm's Law – Voltage = Current x Resistance

Power Equation – Power = Voltage x Current
Electronics

Ground – or earth is the reference point in an electrical
circuit.

Load – is an electrical component or portion of a circuit
that consumes electric power.
Workshop
Breadboard connections
Light Emitting Diode (LED)

(+)

Anode Cathode
(+) (-)
Activity #1

With the LED turned on, the light pauses for
1second and pause again for 100ms
while the LED is off.
Activity #2

Create a blinking LED wave like running lights. We'll
use eight LEDs.

Digital pins11,10,9,8,7,6,5,4
Switch

Button switches connect two points in a circuit
when you press the button, the LED (or whatever)
is turned ON (if it's off) or OFF (if on).

Latch – change state and retain it until the next
change state.
Switch

Latching
- Button 1: pin 2
- LED1: pin10

Button Switch
- Button 2: pin 3
- LED2: pin 11
Switch
Questions?
THANK YOU FOR COMING!

The Spirit of Invention


Robotics-Electronics Components and Technology Store
We stock the largest selection of Robotics Components in the
Philippines
Website: www.e-gizmo.com
Tel no.: (02) 536-3378
FB page: facebook.com/eGizmoMechatronix

You might also like