Introduction to Arduino & Robotics

41
Zubayer Al Billal Khan Research Consultant CPSD IT limited [email protected] www.zubayer.name Introduction to... Arduino & Robotics

Transcript of Introduction to Arduino & Robotics

Page 1: Introduction to Arduino & Robotics

Zubayer Al Billal KhanResearch Consultant

CPSD IT limited

[email protected]

Introduction to...

Arduino & Robotics

Page 2: Introduction to Arduino & Robotics

Contents: Introduction on Arduino1. What is Micro-Controller?2. What is Arduino? 3. Types of Arduino.4. Arduino UNO board.5. Sensors:.6. What is “Function”?7. Control statements [if, if… else, switch case.].8. Loop statements[while, for, do… while.].9. Common functions. Workshop on robotics

Page 3: Introduction to Arduino & Robotics

Introduction

Design, organize, and collaborate

Page 4: Introduction to Arduino & Robotics

Famous microcontroller

manufacturers are MicroChip,

Atmel, Intel, Analog devices, and

more.[list]

It is a micro-computer. As any

computer it has internal CPU, RAM,

IOs interface.

It is used for control purposes, and

for data analysis.

Micro-Controller:

Page 5: Introduction to Arduino & Robotics

Ard

uin

o.

What is Arduino?A microcontroller board, contains on-board power supply, USB port to communicate with PC, and an Atmel microcontroller chip.It simplify the process of creating any control system by providing the standard board that can be programmed and connected to the system without the need to any sophisticated PCB design and implementation.It is an open source hardware, any one can get the details of its design and modify it or make his own one himself.

Page 6: Introduction to Arduino & Robotics

Arduino boards:

UNO Mega LilyPad

Arduino BT Arduino Nano Arduino Mini

Page 7: Introduction to Arduino & Robotics

Arduino UNO:

Digital output~: PWM.0,1: Serial port.

In circuit Serial programming

Atmel MicroController

Analog input.Power Supply

USB port

Power input

Page 8: Introduction to Arduino & Robotics

Dig

ital

an

d a

nal

og.

Digital or Analog?All physical quantities are analog.Analog means that the quantity can take any value between its minimum value and maximum value.Digital means that the quantity can take specific levels of values with specific offset between each other.

Ex: 1- Digital: English alpha consists of 26 letter, there is no letter between Aand B.- Square waves are Digital.Ex.: 2- Analog: Temperature, can take any value[-1,12.8,25.002,… etc.].- Sine waves are analog.

Page 9: Introduction to Arduino & Robotics

Sen

sors

Sensors:A device that transforms the physical quantity into electrical value.Ex.: Light sensor transduce the light into change in voltage or resistance.

Page 10: Introduction to Arduino & Robotics

Sen

sors

Light sensors:- Photo-Resistor [photo-cell].- Photo-Diode.- Photo-Transistor.

Page 11: Introduction to Arduino & Robotics

Sen

sors

Photo Resistor:- The value of the resistance depends on

the incident light density.- 1 K-Ohm at light, 10 K-Ohm at

darkness.

Photo Diode:- The current is controlled by the incident light density.

Photo Transistor:- Base-emitter junction is controlled

by the incident light density, has an amplification effect.

Page 12: Introduction to Arduino & Robotics

Arduino Coding.

Stylize, edit, and animate your media

Page 13: Introduction to Arduino & Robotics

Integer: used with integer variables with value between 2147483647 and -2147483647.Ex: int x=1200;Character: used with single character, represent value from -127 to 128.Ex. char c=‘r’;Long: Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647.Ex. long u=199203;Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information.Ex. float num=1.291; [The same as double type]

Data Types and operators

You may need to know about these typed: Array, Boolean, byte, etc. here.

Page 14: Introduction to Arduino & Robotics

Statement represents a command, it ends with ;Ex:int x;x=13;Operators are symbols that used to indicate a specific function: - Math operators: [+,-,*,/,%,^]- Logic operators: [==, !=, &&, ||]- Comparison operators: [==, >, <, !=, <=, >=]Syntax: ; Semicolon, {} curly braces, //single line comment, /*Multi-line comments*/

Statement and operators:

Page 15: Introduction to Arduino & Robotics

Compound Operators: ++ (increment)-- (decrement)+= (compound addition)-= (compound subtraction)*= (compound multiplication)/= (compound division)

Statement and operators:

Page 16: Introduction to Arduino & Robotics

If Conditioning: if(condition){statements-1;…Statement-N;}else if(condition2){Statements;}Else{statements;}

Control statements:

Page 17: Introduction to Arduino & Robotics

Switch case: switch (var) {

case 1://do something when var equals 1break;

case 2://do something when var equals 2break;

default: // if nothing else matches, do the default// default is optional

}

Control statements:

Page 18: Introduction to Arduino & Robotics

Do… while:do{Statements;}while(condition); // the statements are run at least once.

While: While(condition){statements;}forfor (int i=0; i <= val; i++){

statements;}

Loop statements:

Use break statement to stop the loop whenever needed.

Page 19: Introduction to Arduino & Robotics

Void setup(){}Used to indicate the initial values of system on starting.Void loop(){}Contains the statements that will run whenever the system is powered after setup.

Code structure:

Page 20: Introduction to Arduino & Robotics

Led blinking example:Used functions: pinMode();digitalRead();digitalWrite();delay(time_ms);other functions: analogRead();analogWrite();//PWM.

Input and output:

Page 21: Introduction to Arduino & Robotics

You can download the Arduino IDE

(The program used to write code and

uploading it to arduino boards) from:

http://arduino.cc/en/Main/Software

Arduino IDE:

Page 22: Introduction to Arduino & Robotics

Here you can learn how to program Arduino and what each code

means and do, from here:

http://arduino.cc/en/Reference/HomePage

Arduino Reference:

Page 23: Introduction to Arduino & Robotics

Robotics

Page 24: Introduction to Arduino & Robotics

DEFINATION

9 August 2017Seminar on Robotics & Embeded system

Robotics is the branch of technology that deals

with the design, construction, operation, and

application of robots .

The word ROBOTICS is used to collectively

define a field in engineering that covers the

mimicking of various Human characteristics.

It is the application of electronics, mechanical,

electrical and computer engineering.

Page 25: Introduction to Arduino & Robotics

Laws of Robotics

Isaac Asimov proposed three “Laws of Robotics” and later added the “ zeroth law ”.

Law 0: A robot may not injure humanity or through inaction, allow humanity to come to harm.

Law 1: A robot may not injure a human being or through inaction, allow a human being to come to harm, unless this would violate a higher order law.

Law 2: A robot must obey orders given to it by human beings, except where such orders would conflict with a higher order law.

Law 3: A robot must protect its own existence as long as such protection does not conflict with a higher order law.

Page 26: Introduction to Arduino & Robotics

Uses of Robotics:

Agriculture

Automobile

Construction

Entertainment

Health care

Household purposes

Laboratories:

Law en forcement : surveillance, air port Security, spying, etc.

Manufacturing

Military: demining, surveillance, attack, etc.

Mining, excavation and exploration

Transportation: air, ground, rail, space, etc.

Utilities: gas, water and electricity

Warehouses

Page 27: Introduction to Arduino & Robotics

Robotic Industry – Now A Days

1. Aurotek Corp.2. Axium Inc.3. Daihen Corp.4. Denso Wave Inc.5. Ellison Technologies Inc.6. Kawasaki Robotics Inc.7. Kuka AG8. Mitsubishi Electric Corp.9. Nachi Fujikoshi Corp.10.Pari Robotics11.Reis Robotics

12.Rockwell Automation Inc.13.Schunk GmbH14.Staubli International AG15.TM Robotics16.Yamaha Robotics17.Honda 18.IRobot

World top Robotic Industry

Page 28: Introduction to Arduino & Robotics

Components of ROBOTS

Power Supply

Sensors

Controller

Effectors

Actuators

Page 29: Introduction to Arduino & Robotics

POWER SUPPLY

Suitable power supply is needed to run the motors and associated circuitry.

Typical power requirement ranges from 3V to 24V DC.

Power supply must be adjusted as per the ratings of the components.

Power supply must be regulated using voltage regulator and current regulator ICs.

Page 30: Introduction to Arduino & Robotics

POWER SUPPLY

Rechargeable 12V Battery LM317 Current Regulator IC with Heat Sink

LM7805 Voltage Regulator IC

Page 31: Introduction to Arduino & Robotics

EFFECTORS

Effectors are the parts of a Robot which execute the certain task.

Effectors pick up or modify objects or somehow cause an effect to the environment.

Examples: Mechanical grippers, Vacuum Grippers, Wheels, etc.

Page 32: Introduction to Arduino & Robotics

ACTUATORS

Actuator is the actual mechanism that enables the effectors to execute an action.Actuators typically include electric motors, hydraulic or pneumatic cylinders, gears, etc.

Gears

Pneumatic Cylinder

Pneumatic Motor

Page 33: Introduction to Arduino & Robotics

• DC Motors

o As the name suggests, a motor which uses a DC (Direct Current) power

o Can run in both directions

o Speed Controllable

Page 34: Introduction to Arduino & Robotics

• Stepper Motors

o Used for measured rotation

o Can be held at a particular position of the shaft

o Ideal for many autonomous robots requiring higher precision

Page 35: Introduction to Arduino & Robotics

Servo Motors :

o Used in closed loop control systems in which work is the control variable.

o An integral feedback device (resolver) or devices (encoder and tachometer) are either incorporated within the servo motor or are remotely mounted, often on the load itself

Page 36: Introduction to Arduino & Robotics

Physical Property Technology

Contact Bump, SwitchDistance Ultrasound, Radar, Infra RedLight Level Photo Cells, Cameras, LDRsSound Level MicrophonesStrain Strain GaugesRotation EncodersMagnetism CompassesSmell ChemicalsTemperature Thermistors, Infra RedInclination Inclinometers, GyroscopePressure Pressure GaugesAltitude Altimeters

SENSORS

Page 37: Introduction to Arduino & Robotics

CONTROLLER

Controller provides the necessary intelligence to control the action of the robot. It receives the information from the sensors and activates the actuators to perform the task. It comprises complex electronics circuit. Micro Controllers are used in Automatic Robots whereas different electronic switching components are used in Manual Robots. The set of instructions is written in High Level Language, compiled and converted into Machine Code(HEX code) and burnt in the Micro Controller with the help of Computer Software .

Page 38: Introduction to Arduino & Robotics

CONTROLLER

Page 39: Introduction to Arduino & Robotics

The Scope Of Robotic Industry In Bangladesh

Page 40: Introduction to Arduino & Robotics

Resource link:

• EMK Makerlab Community:https://www.facebook.com/groups/emkmakerlab/

• Youtube: https://www.youtube.com/user/imagineeringstudiobd

• Project links:https://www.hackster.io/Zubayer

Page 41: Introduction to Arduino & Robotics

VLSI EGY- I.GEEK – S3GeeksThanks for coming