ARDU 2005 Arduino-based Multifunction
Mobile Ground Robotics
Instructor
Dafizal Derawi
PhD candidate (UTM), B. Eng with Honours (Australia)
CEO of Drabot
Founder of Arduino Drabot Community
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Dafizal Derawi
• CEO, Robotic Systems Enterprise
• Founder of Arduino Drabot Community
PhD candidate, Universiti Teknologi Malaysia (UTM), 2013 –
present.
Research Visitor, Autonomous Control Systems Laboratory,
Chiba, Japan, Dec 2014 – Dec 2015.
Research Assistant, Computer Vision & Robotic Research
Group, Australian National University (ANU), 2012
Tutor, Introduction to Electronics course, Research School of
Engineering, Australian National University (ANU), 2012
Bachelor of Engineering with Honours majoring in
Mechatronic Systems, ANU, 2011
Diploma in Electrical Engineering (Mechatronics) with Vice
Chancellor Award, UTM, 2009
Founder & President of Research & Innovation Club (RIC),
UTM KL, 2008
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Our activities….
[Link]/[Link]
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Store Department (Online Shop)
[Link]
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
“Learn how to be a developer,
rather than a user!”
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 1
UNMANNED GROUND
VEHICLE (UGV)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Introduction
• An unmanned ground vehicle (UGV) is a
vehicle that operates while in contact with the
ground and without an onboard human
presence (pilot).
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
A Gladiator Tactical Unmanned Ground Vehicle
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Remote-Operated
• controlled by a human operator via interface.
• actions are determined by the operator based
upon either direct visual observation or
remote use of sensors such as digital video
cameras.
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Autonomous
• Guardium used by the Israel Defense Forces to
operate as part of the border security
operations.
• uses its sensors to develop some limited
understanding of the environment, which is
then used by control algorithms to determine
the next action to take in the context of a
human provided mission goal
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 2
INTRODUCTION TO
ARDUINO
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.1 What is Arduino?
• Google now!!!!
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.1 What is Arduino?
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
More details…
• [Link]
• Training module
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Comparison…
• Parallax Basic Stamp, Netmedia's BX-24, MIT's Handyboard,
and many others offer similar functionality.
• BUT, Arduino:
– Inexpensive
– Cross-platform: Windows, Macintosh OSX, and Linux
operating systems
– Simple, clear programming environment
– Open source and extensible software
– Open source and extensible hardware
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Complete
Arduino-based
system overview
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.2.1 Arduino UNO (USA only) &
Genuino UNO (outside USA)
Arduino UNO (USA only) &
Genuino UNO (outside USA).
The price is around RM 96 -
RM 105
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Technical Specification
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.2.2 UNO compatible board
(used in this course)
DRABOT UNO
PRODUCT CODE: 201603032
PRICE: RM 40 ONLY
- Arduino Uno R3 Compatible
- USB Type A to B connector
(USB Cable is given)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Arduino UNO vs UNO compatible board
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
1.3 Arduino Software (IDE)
• You can tell your Arduino what to do by
writing code in the Arduino programming
language and using the Arduino development
environment.
• You can download Arduino Software from
– [Link]
• For those attend this course, please find
Arduino software inside the Software folder
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 3 COMPONENTS
& ELECTRICAL
FUNDAMENTAL
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
• Open picture of overall system in your training
module folder…
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Arduino Sensor Shield v5.0
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Ultrasonic HC-SR04
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Servo motor (9g Micro Servo)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Bluetooth Transceiver HC-05
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Motor Driver L298N
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
DC Brush Motor
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Compass Module
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Infrared Sensor (IR sensor)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Infrared Receiver & Transmitter
(Remote Control)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Battery
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Electrical Fundamentals
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Analog to Digital Converter
(ADC)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Pulse Width Modulation (PWM)
• To control speed.
• Increase PWM value in order to increase
speed.
• PWM value: 0 – 255 only!!!!
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Serial Communication
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 4
ARDUINO PROGRAMMING
LANGUAGE
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Introduction
• The Arduino language is based on C/C++.
Arduino programs.
• Three main parts:
1) Basic
2) Variables and constants
3) Functions
4) Control Structure
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Basic
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Syntax
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
#include
• #include is used to include outside libraries in your sketch. This
gives the programmer access to a large group of standard C libraries
(groups of pre-made functions), and also libraries written especially
for Arduino.
• Similar to #define, has no semicolon terminator, and the compiler
will yield cryptic error messages if you add one
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
#define
• #define is a useful C component that allows the programmer to give
a name to a constant value before the program is compiled.
• Syntax:
#define constantName value
//Note that the # is necessary
• Example:
#define ledPin 3
// The compiler will replace any mention of ledPin with the
// value 3 at compile time
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Maths operators
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Comparison operators
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Compound operators
• x++ means x = x+ 1
• x-- means x=x-1
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Variables
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Data Type RAM Number Range
void keyword N/A N/A
boolean 1 byte 0 to 1 (True or False)
byte 1 byte 0 to 255
char 1 byte -128 to 127
unsigned char 1 byte 0 to 255
int 2 byte -32,768 to 32,767
unsigned int 2 byte 0 to 65,535
word 2 byte 0 to 65,535
long 4 byte -2,147,483,648 to 2,147,483,647
unsigned long 4 byte 0 to 4,294,967,295
float 4 byte -3.4028235E+38 to 3.4028235E+38
double 4 byte -3.4028235E+38 to 3.4028235E+38
string 1 byte + x Arrays of chars
array 1 byte + x Collection of variables
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Functions: Digital
Write this in Write this in
Initialize this in void loop() void loop()
void setup() This function for This function for
Digital Output Digital Input
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Functions: Analog Input &
PWM (a.k.a Analog Output)
NO Initialization in Write this in Write this in
void setup() void loop() void loop()
This function for This function for
PWM Analog Input
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Control Structure
• Control structure
– if
– if…..else
– for
– while
– do…while
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if
• if, which is used in conjunction with a comparison
operator, tests whether a certain condition has been
reached, such as an input being above a certain
number.
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Format
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if…else
if (pinFiveInput < 500)
{
// action A
}
else
{
// action B
}
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if (pinFiveInput < 500)
{
// do Thing A
}
else if (pinFiveInput >= 1000)
{
// do Thing B
}
else
{
// do Thing C
}
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
for
• To repeat a block of statements enclosed in curly braces.
• An increment counter is usually used to increment and
terminate the loop.
• Useful for any repetitive operation, and is often used in
combination with arrays to operate on collections of
data/pins
• There are three parts to the for loop header:
for (initialization; condition; increment) {
//statement(s);
}
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 5
GETTING STARTED
(WINDOWS)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
1) Get an ARDUINO UNO / UNO
compatible board and USB cable
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2) Download and install the
Arduino Software (IDE)
• [Link]
• You can choose between the Installer (.exe) and the Zip packages.
• We suggest you use the first one that installs directly everything
you need to use the Arduino Software (IDE), including the drivers.
• With the Zip package you need to install the drivers manually.
• For those attend this course, please find the Arduino Software
inside the Software folder. You don’t need to download this
software.
• When the download finishes, proceed with the installation and
please allow the driver installation process.
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
3) Install the board drivers
• UNO compatible board user (used in this
module)
– You may have to install extra drivers for CH340.
– For those attend this course, please find this
driver inside the Software folder. You only need
to double click on the driver file and then
Windows will finish up the driver installation
from there
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
4) Connect the board
• The USB connection with the PC is necessary to
program the board and not just to power it up.
• The Uno and Mega automatically draw power from
either the USB or an external power supply.
• Connect the board to your computer using the USB
cable. The power LED should go on.
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
5) Launch the Arduino Software (IDE)
• Double-click the Arduino icon ([Link])
created by the installation process. (Note: if
the Arduino Software loads in the wrong
language, you can change it in the preferences
dialog. See the Arduino Software (IDE) page
for details.)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
6) Open the blink example
• File > Examples >[Link] > Blink
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
7) Select your board
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
8) Select your serial port
• Select the serial device of the board from the
Tools | Serial Port menu.
• This is likely to be COM3 or higher (COM1 and
COM2 are usually reserved for hardware serial
ports).
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
9) Upload the program
• click the "Upload" button in the environment.
• Wait a few seconds - you should see the RX
and TX leds on the board flashing.
• If the upload is successful, the message "Done
uploading." will appear in the status bar.
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Congratulation!!!
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 6
TUTORIAL
(refer module)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 6
TUTORIAL
(refer module)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 7
Project
(refer module)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
THANK YOU!!!!
training@[Link]
011-10880900
(WhatsApp/SMS)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Utusan, 17 Jan 2017
[Link]
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Drabot in Metro Ahad today (4 Dec 2016)
[Link] Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics