0% found this document useful (0 votes)
50 views

Practical Work 6

GROUP MEMBERS: Student 1: Student 2: Student 3: Student 4: PRACTICAL SKILL EVALUATION Aspect Score Scale Student 1 Student 2 Student 3 Student 4 Recognize the practical work properly Able to build speed/length/ logic coding Perform the program correctly Display the practical work task Complete task as assigned Total: LAB REPORT ASSESSMENT Aspect Score Scale Student 1 Student 2 Student 3 Student 4 Discussion Conclusion Question Total: Overall

Uploaded by

Nazfaizul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Practical Work 6

GROUP MEMBERS: Student 1: Student 2: Student 3: Student 4: PRACTICAL SKILL EVALUATION Aspect Score Scale Student 1 Student 2 Student 3 Student 4 Recognize the practical work properly Able to build speed/length/ logic coding Perform the program correctly Display the practical work task Complete task as assigned Total: LAB REPORT ASSESSMENT Aspect Score Scale Student 1 Student 2 Student 3 Student 4 Discussion Conclusion Question Total: Overall

Uploaded by

Nazfaizul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

[Type here] [Type here]

ELECTRICAL ENGINEERING DEPARTMENT


DEC50122: EMBEDDED ROBOTIC
PRACTICAL WORK : 1 / 2 / 3 / 4 / 5 / 6
TITLE :
PROGRAMME :
1.

LECTURER : 2.
3.
GROUP MEMBERS NAME REGISTRATION NUMBER
STUDENT 1 1.

STUDENT 2 2.

STUDENT 3 3.

STUDENT 4 4.

PRACTICAL SKILL EVALUATION (CLO3, PLO05)


SCORE
Excellent Good Average Weak Very Weak
Scale S1 S2 S3 S4
5 4 3 2 1
ASPECT
Recognize Shows a solid Shows Shows Shows some Shows little
the practical understanding to understanding to considerable understanding to understanding to
work do practical work do practical work understanding to do practical work do practical work X1
properly correctly properly do practical work
(P4)
The delay / speed The The code of The delay/ speed/ Unable to state
Able to
/ length / logic delay/speed/lengt
delay/ speed/ length/ logic code delay/ speed/
build
codes are very h/logic code is
length/ logic is is poorly stated length/ logic code
speed/lengt
well stated and simple to read,
readable; and very difficult X3
h (distance)
easily with some
however, it is a to read
/ logic
understandable. comments
little tricky to
coding (P3)
included.
understand.
The code is very The code is simple
The code is The code is poorly Unorganized code
Perform the
organized, easy to to read and is
readable; organized and
program
follow and in line supplemented by
however, it is a very difficult to X4
correctly
with the a few comments.
little tricky to read
(P4)
comments stated understand.
• Trends/ patterns • Trends / patterns • Trends/ patterns • Trends/ patterns • Trends/ patterns
Display the
are logically are logically are logically are not analysed are not analysed
practical
analysed analysed analysed Analysis is not No analysis X4
work task
Analysis is Analysis is too Analysis is relevant
(P4)
thoughtful general inconsistent
• Result: Excellent • Result: Clear and • Result: Clear and • Result: unclear, • Result:
and incredibly labelled, labelled, well missing labels, Disorganized,
beautifully excellent organized, well trends are not poorly recorded
recorded, highly recording recorded obvious, • Task: Not
structured flow. • Task: Completed • Task: disorganized, complete
Complete • Task: Complete with not more Completed with good recording Presentation: No
task as all tasks without than 2 errors some errors but shivering introduction and
X4
assigned error Presentation: • Presentation: • Task: Half explanation
(P4) • Presentation: very good completed
Introductions and
Excellent Introductions Presentation: has
introduction and and explanation. descriptions that an introduction
explanation. are commonly but the
used description is
inaccurate

80%

@Sesi 2:2022
B. LAB REPORT ASSESSMENT

SCORE
Excellent Good Average Weak Very Weak
SCALE SCORE
ASPECT 5 4 3 2 1

Able to write Able to write Able to write Write discussion Discussion was
discussion discussion with discussion with not related not written
clearly related clearly related to related to to practical work clearly and was X1
to practical work practical work practical work objective unrelated to
Discussion objective. Use objective objective the practical
good and work
appropriate objective.
language in
writing
Accurate Accurate A statement of A statement of No conclusion
statement of the statement of the the results of the the results of the included or
results of the lab results of the lab lab indicates lab indicates shows little X1
Conclusion indicates indicates whether results whether results effort and
whether results whether results support the support the reflection on
support the support the hypothesis hypothesis the lab
hypothesis hypothesis
Excellent. All- Almost of the Almost of the Some of the Incomplete/
important results have results have results are incorrect
trends have been correctly been correctly misinterpreted interpretation.
been interpreted and interpreted and and there is no Not answer
interpreted discussed. some correctly clear answer to the question
Question X2
correctly and Answer the answer the the question
discussed. question question
Answer the correctly
question
correctly.
20%

STUDENTS S1 S2 S3 S4

Total marks 100%

Prepared by: Revised by: Approved by:


POLITEKNIK IBRAHIM SULTAN
DEPARTMENT OF ELECTRICAL ENGINEERING

Course Code & Course: DEC50122 – Embedded Robotic Lecturer:


Programme: Date:
Assessment task: Labsheet 6 Total marks:

TITTLE : WIRELESS MOBILE ROBOT CONTROL USING BLUETOOTH HC-05

CLO3, P4
OUTCOMES : Upon completion the task, students should be able to:
i) Make Bluetooth HC-05 sensor to communicate with android and Arduino.
ii) Build Arduino program to control wireless mobile robot.

EQUIPMENTS / COMPONENTS:
ARDUINO UNO Board and DC motors, L298 motor driver, Bluetooth HC-05 sensor
and android smart phone.

THEORY: LOGIC OVERVIEW

The HC-05 Bluetooth module is the most economical and easiest way to go wireless (via Bluetooth).
This module makes it easy for you to wirelessly extend your serial interface, so you can control any
program running on your Laptop/android/hand phone with serial port interface.

The 4 pins are:


• VCC (Power 3.3 – 6V);
• GND;
• TXD;
• RXD;

Default pairing code: 1234


Default baudrate: 9600

Usually this Bluetooth module is used with the Arduino, but it can be used with others
microcontrollers devices. Here it’s how it’s wired with an Arduino:

3
Figure 1: Bluetooth Module Connection to Arduino Board

3
2

Figure 2 : Full Circuit Connection

**Notes:
1. Disconnect power HC-05 power connection before uploading program to the Arduino board.
2. The LED on the HC-05 should blink at 2-second intervals. This shows that the HC-05 is in AT mode.
If the LED blinks rapidly try the following:
a. Disconnect and reconnect the 5V power connection to the HC-05.
b. Check the connection.

4
Part A: Build the Bluetooth Controller
1. If you are using Android smartphone, install this app, Arduino Bluetooth controller.
https://play.google.com/store/apps/details?id=com.giumig.apps.bluetoothserialmonitor&hl
=en or search Arduino Bluetooth Controller apps using play store
2. Install the apps.
3. Turn ON the Bluetooth module.
4. Find the Bluetooth name and pairing.
5. Open Arduino Bluetooth Controller application.
6. Setup the Arduino Bluetooth Controller application by referring Table1.
Table 1
KEY INDICATOR SYMBOL MOVEMENT
A FORWARD
B REVERSE
C RIGHT
D LEFT
E STOP
F SPIN CW
G SPIN CCW

5
Part B - Sketch A:
// Name:

//Registration No:

#include <SoftwareSerial.h>

SoftwareSerial BTSerial(2, 3); // RX | TX

int EN1 = 11; // Enable Pin for motor right

int EN2 = 10 ; // Enable Pin for motor left

int IN1 = 13; // Control pin 1 for motor right

int IN2 = 12; // Control pin 2 for motor right

int IN3 = 9; // Control pin 1 for motor left

int IN4 = 8; // Control pin 2 for motor left

char state;

void setup() {

Serial.begin(9600); // initialize serial communication:

BTSerial.begin(9600); // HC-05 default speed in AT

pinMode(EN1, OUTPUT);

pinMode(EN2, OUTPUT);

pinMode(IN1, OUTPUT);

pinMode(IN2, OUTPUT);

pinMode(IN3, OUTPUT);

pinMode(IN4, OUTPUT);

void loop() {

if (BTSerial.available())

state = BTSerial.read();

Serial.print("received = ");
Serial.println(state);

if (state == 'A')

forward();

if (state == 'B')

reverse();

if (state == 'C')

turnLeft();

if (state == 'D')

turnRight();

if (state == 'E')

stopRobot();

if (state == 'F')

spinCW();

if (state == 'G')

spinCCW();

void forward()

Serial.println("Forward");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, HIGH); // right motor forward

digitalWrite(IN2, LOW); //
digitalWrite(IN3, LOW); // left motor forward

digitalWrite(IN4, HIGH); //

void reverse()

Serial.println("reverse");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, LOW); // right motor reverse

digitalWrite(IN2, HIGH); //

digitalWrite(IN3, HIGH); // left motor reverse

digitalWrite(IN4, LOW); //

void turnLeft()

Serial.println("Turn Left");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, HIGH); // right motor forward

digitalWrite(IN2, LOW); //

digitalWrite(IN3, LOW); // left motor stop

digitalWrite(IN4, LOW); //

void turnRight()

Serial.println("Turn Right");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, LOW); // right motor stop


digitalWrite(IN2, LOW); //

digitalWrite(IN3, LOW); // left motor forward

digitalWrite(IN4, HIGH); //

void stopRobot()

Serial.println("stop");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, LOW); // right motor stop

digitalWrite(IN2, LOW); //

digitalWrite(IN3, LOW); // left motor stop

digitalWrite(IN4, LOW); //

void spinCW()

Serial.println("spinCW");

analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, HIGH); // right motor reverse

digitalWrite(IN2, LOW); //

digitalWrite(IN3, LOW); // left motor forward

digitalWrite(IN4, HIGH); //

void spinCCW()

Serial.println("spinCCW");
analogWrite(EN1, 255); // Run in full speed

analogWrite(EN2, 255); // Run in full speed

digitalWrite(IN1, LOW); // right motor forward

digitalWrite(IN2, HIGH); //

digitalWrite(IN3, HIGH); // left motor reverse

digitalWrite(IN4, LOW); //

a) Verify and compile sketch (sketch A) using Arduino IDE.


b) Upload sketch A into robot.
c) Write your observation and conclusion.
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________

Question:

1. Make the robot spinCW 10 times and spinCCW 5 times in full speed before Stop?

2. Make the robot spinCW 10 times full speed and move Forward before it Stop?
8

You might also like