You are on page 1of 40

BENGKEL PEMBELAJARAN

ROBOTIK DAN INOVASI


(SIRIM RoboClinic)

MOSTI SOCIAL INNOVATION (MSI 2015)


SIRIM BERHAD
Al Malek Faisal Mohd Amin
Jurutera Kanan
Seksyen Sistem Pintar & RFID
Pusat Reka Bentuk Sistem
SIRIM Berhad, Bukit Jalil

7 - 9 Mac 2016

Enabling Businesses. Enhancing Lives


INTRODUCTION TO ROBOTIC

Enabling Businesses. Enhancing Lives


WHAT IS ROBOT ?
A mechanical machine that can perform tasks
automatically or with guidance, typically by remote
control.
An electro-mechanical machine that is guided by
computer and electronic programming.

Why Robot Was Invented ?


To reduce human labor.
To reduce error that being made by human.
To reduce human casualties

Enabling Businesses. Enhancing Lives


EXAMPLES:

Enabling Businesses. Enhancing Lives


Robot Range :
1.Humanoids
A robot that look alike or behave like human

Ex: ASIMO(Honda), TOPIO(TOSY Robotics)

Enabling Businesses. Enhancing Lives


2. Mobile robot
A robots that have the capability to move around in
their environment.
Ex: Automatic Guided Vehicle (AGV)
AGV is a mobile robot that follows markers or wires in the
floor, or uses vision or lasers.

Enabling Businesses. Enhancing Lives


3.Industrial Robot
an automatically controlled, reprogrammable,
multipurpose manipulator programmable in three or
more axes
Robot that consist of jointed arm that attach on fixed
based or surface
Typical application: Welding, painting, assembly

Ex: Gripper Assembler.

Enabling Businesses. Enhancing Lives


4. Service robot
A robot that is being use to assist human by
performing a job that is dirty, dull, distant, dangerous
or repetitive, including household chores
Ex: Roomba -autonomous robotic vacuum cleaners,

Bomb Disarmer

Enabling Businesses. Enhancing Lives


BASIC ROBOT ARCHITECTURE

Microcontroller

Input Device Output Device

Enabling Businesses. Enhancing Lives


INPUT DEVICE
An input device is any peripheral used to provide data
and control signals to an information processing
system (microcontroller or microprocessor).
Ex:
Button / Switch
Keyboard / Keypad
Mouse
Sensor / Detector ( a device that can measure physical
device and convert to signal)

Enabling Businesses. Enhancing Lives


OUTPUT DEVICE

Any equipment or device used to communicate the


results of data processing carried out by an
information processing system
Ex:
Liquid Crystal Display(LCD)
Light Emitting Diode(LED)
Motor movement
Printer
Sound

Enabling Businesses. Enhancing Lives


MICROCONTROLLER
A small computer on a single integrated circuit (IC)
containing a processor core, memory, and
programmable input/output peripherals.
Microcontroller is capable of computing and
manipulating data.
Ex: Zilong(Z80), ARM, Motorola(68HC11), Rabbit,
Microhip.

Enabling Businesses. Enhancing Lives


SIRIM ROBOKIT

Enabling Businesses. Enhancing Lives


SIRIM Robokit
- A SIRIM product for student to learn electronics, computer
programming, robotics and control system.

Objectives
- To understand the basic function of sensors and motor to create robotic
application.

Application
- Robotic
- Access Control & Security System
- Home Automation
- Wireless Inspection/detection System

Enabling Businesses. Enhancing Lives


SIRIM ROBOKITS - DRONE KIT

Enabling Businesses. Enhancing Lives


Label Description
A Microchip microcontroller PIC18F4520
(44 pin)
B Ports I/O pin 3 pins header (Port A, B, C
& E)
C Programmable Button
D PS2 Module
E 4 x LED indicator
F Buzzer
G 3 x Relay
H USB programmer connector
I External DC power supply 7 12 VDC
J Power On LED indicator
K +5 VDC & Gnd Output
L Crystal 20 MHz
M 3 Pin Power to ESC
Enabling Businesses. Enhancing Lives
INSTALLATION - DC POWER SUPPLY

Enabling Businesses. Enhancing Lives


INSTALLATION - USB PROGRAMMER

Enabling Businesses. Enhancing Lives


MICROCONTROLLER MAINBOARD

Enabling Businesses. Enhancing Lives


INTEGRATED DEVELOPMENT ENVIRONMENT (IDE)
Definition:
Suite of software tools for microcontroller
application development.
Software application that provides
comprehensive facilities to computer
programmers for software development.
All microcontroller manufacturers provide
development tools for their products
C code -> assembly code -> machine code
Examples
Microchip - MPLAB
Motorola - PE Micro
Atmel - AVR Studio
Enabling Businesses. Enhancing Lives
EXAMPLE OF IDE - CCS

Enabling Businesses. Enhancing Lives


HOW TO USE CCS COMPILER

Enabling Businesses. Enhancing Lives


Click the Source File to create a C file or project file

Or use project wizard to create a project file

To open existing file or project

Enabling Businesses. Enhancing Lives


Enabling Businesses. Enhancing Lives
Location of error

Suggestion / hint

Compile with error


Compile with no error

Enabling Businesses. Enhancing Lives


LED MODULE INTERFACING

LED is an electronic device that lights


up when electricity is passed through
it.

Enabling Businesses. Enhancing Lives


SAMPLE CODE - LED
#include "Head.h"
#include "Led.h"

void main()
{
led('D',0b00000101); //Led D2 D0 - ON
}

Enabling Businesses. Enhancing Lives


BUZZER MODULE INTERFACING

A buzzer is an audio signaling device.

Typical uses of buzzers and beepers


include alarm devices
Enabling Businesses. Enhancing Lives
SAMPLE CODE - BUZZER
#include "Head.h"
#include "Led.h"

void main()
{
led('D',0b10000000); //Buzzer D7 - ON
}

Enabling Businesses. Enhancing Lives


SAMPLE CODE (FOR LOOP)
#include "Head.h"
#include "Led.h"

int i;

void main()
{
for (i =0 ;i < 4 ; i++)
{
led('D',0b10000000); //Buzzer D7 - ON
delay_ms(400);
led('D',0b00000000); //Buzzer D7 OFF
delay_ms(2000);
}
}
Enabling Businesses. Enhancing Lives
SAMPLE CODE BUZZER OK
#include "Head.h"
#include "Led.h"

void main()
{
led('D',0b10000000); //Buzzer D7 - ON
delay_ms(250);
led('D',0b00000000); //Buzzer D7 - OFF
delay_ms(150);
led('D',0b10000000); //Buzzer D7 - ON
delay_ms(400);
led('D',0b00000000); //Buzzer D7 - OFF
delay_ms(200);
}

Enabling Businesses. Enhancing Lives


RELAY MODULE INTERFACING

A relay is an electrically operated


switch.

Relays are used where it is necessary


to control a circuit by a low-power
signal

Enabling Businesses. Enhancing Lives


SAMPLE CODE - RELAY
#include "Head.h"
#include "Led.h"

void main()
{
delay_ms(2000);
led('D',0b00010001); //Relay D4 - ON; Led D0 - ON
delay_ms(3000);
led('D',0b00100010); //Relay D5 - ON; Led D1 - ON
delay_ms(3000);
led('D',0b01000100); //Relay D6 - ON; Led D2 - ON
delay_ms(3000);
}

Enabling Businesses. Enhancing Lives


PUSH BUTTON SWITCH MODULE INTERFACING

A push-button is a simple switch


mechanism for controlling some aspect
of a machine or a process.

Enabling Businesses. Enhancing Lives


SAMPLE CODE PUSH BUTTON SWITCH
#include "Head.h"
#include "Led.h
#include "Button.h"

void main()
{
while(1)
{
if(input(pin_a4)==1)
{
led('D',0b00001010); //Led D3 D1 - ON
delay_ms(200);
}
else
{
led('D',0b00001111); //Led D3 D2 D1 D0 - ON
delay_ms(200);
}
}
}
Button A4 Pressed

Enabling Businesses. Enhancing Lives


PS2 CONTROLER MODULE INTERFACING

Enabling Businesses. Enhancing Lives


SAMPLE CODE PS2 CONTROLER MODULE
#include "Head.h"
#include "Led.h"
#include "Button.h"
#include "Controller_PS.c"

void main()
{
init_ps();
led('D',0b00001111); //Led D3 D2 D1 D0 - ON
delay_ms(1000);
led('D',0b00000000); //Led D3 D2 D1 D0 - OFF
delay_ms(100);
while(1)
{
read_controller();
if(PS2_Triangle == 0) {
led ('D',0b00000001); //Led D0 - ON
}
if(PS2_Circle==0) {
led ('D',0b00000010); //Led D1 - ON
}
if(PS2_X==0) {
led('D',0b00000100); //Led D2 - ON
}
if(PS2_Square==0) {
led('D',0b00001000); //Led D3 - ON
}
}
}

Enabling Businesses. Enhancing Lives


SIRIM ROBOKIT - DRONE

Enabling Businesses. Enhancing Lives


Function Port Servo servo1 -pin_b0
Aileron (Left) pin_b3 Servo4 servo2 -pin_b1
Aileron (Right) pin_b4 Servo5 servo3 -pin_b2
Throttle pin_b0 Servo1 servo4 -pin_b3
Elevator pin_b2 Servo3 servo5 -pin_b4
Rudder pin_b1 Servo2 servo6 -pin_b5
servo7 -pin_b6
servo8 -pin_b7
servo9 -pin_d0

Enabling Businesses. Enhancing Lives


Enabling Businesses. Enhancing Lives

You might also like