Final Project Report: Lecturer
Final Project Report: Lecturer
Final Project Report: Lecturer
Lecturer:
Created By:
Ariel Effendi,
ROBOTIC
PRESIDENT UNIVERSITY
2022
Brief Description
This project aims to design android interface, arduino bot and write programs into arduino
microprocessor. Arduino car contains arduino microcontroller with basic mobility features.
The Arduino program contains mediation instructions between the android controller and
the Arduino car. Android mobile controllers use different mobile sensors to monitor
movement. A suitable program in the arduino microprocessor to interact with the android
controller must be created. Program has been successfully adhered via arduino IDE to
arduino microprocessor & loaded into it after proper logic checks to reduce hardware
loss/damage.
The street sweeper robot car can clean the room area and the movement of the robot car
moves manually using the mopping method to detect the freeway. By using a DC motor, the
car can move flexibly in all directions. We also use an additional dc motor as a mopping tool
which is covered with cloth and tissue. This car is also equipped with a parking sensor that
uses an ultrasonic sensor that is connected to the Arduino Uno. The robot car can be stopped
with the Android application when the house cleaning activity is finished
Project Requirements
Hardware:
Software:
Ø Arduino IDE
Ø Tinkercad
Ø NodeMcu Controller
Features of Street Sweeper Robot
- Car Control: The car is able to move forward, backward, left and right smoothly with a
relay distance of 15 meters.
- Ultrasonic Sensor: Able to detect objects as close as 30 - 20 - 10 cm.
- LED: Indicates that the sensor is approaching the object, then the LED will light up
according to the distance that is designed.
- Motor DC: As a car tire mover and also as a car mopping tool
Documentation Video
Google Drive Link:
https://drive.google.com/drive/folders/1yTcfp5v5ocsrCx33_HONY5UZI0pZPg7g?usp=sh
aring
Circuit Diagram
Car Controller
Car Parking
Phase 1
In phase 1 I started assembling cars efficiently. I started by installing the motor dynamo,
then I installed two tires and one small tire
Phase 2
In phase 2, we redesigned the engine position, we put Arduino Uno and Powerbank as the
second power source.
Street Sweeper Robot
Controller App
EXPERIENCES IN BUILDING
Iqbal
Problem:
- Obstacles in the installation of cranes where there is no place for cranes
- Trouble embedding additional car parking features in nodemcu
- Battery resources that always run out when used for testing
Solution:
- Replacing the crane feature with a mopping feature using 2 additional DC motors, adding an
Arduino Uno as a controller for car parking and adding resources with a power bank
Ivan
Problem:
- The robot is so sensitive. This caused error at some parts when we are present it at class
session
- Need a lot of money to buy a battery to run this robot
- The robot become heavy because have a lot of features
Solution:
- Keep the robot at a box, so when we bring the robot anywhere it will keep safe
- change the power supply from battery to powerbank or to rechargeable battery
- remove some parts that we are not really use like the arm, because our objective is creating
"room-sweeping-robot"
Heykel
Problem:
- We have to use 2 power supply for the sensor and the driver (dinamo)
Solution
- Change the power supply from battery 1 time use to powerbank
Dian
Problem:
- Errors from the section make it difficult for us to present because it is sensitive when we
present it
Solution:
- keep the robot in the box for safe
Ariel:
Problem:
- Gathering the neccesity tools and material for the prohect
Solution:
- Online Shopping
Skecth List Code
//Car Controller
#define ENA 14 // Enable/speed motors Right GPIO14(D5)
#define ENB 12 // Enable/speed motors Left GPIO12(D6)
#define IN_1 15 // L298N in1 motors Right GPIO15(D8)
#define IN_2 13 // L298N in2 motors Right GPIO13(D7)
#define IN_3 2 // L298N in3 motors Left GPIO2(D4)
#define IN_4 0 // L298N in4 motors Left GPIO0(D3)
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
void setup() {
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN_1, OUTPUT);
pinMode(IN_2, OUTPUT);
pinMode(IN_3, OUTPUT);
pinMode(IN_4, OUTPUT);
Serial.begin(115200);
// Connecting WiFi
WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);
// Starting WEB-server
server.on ( "/", HTTP_handleRoot );
server.onNotFound ( HTTP_handleRoot );
server.begin();
}
void goAhead(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}
void goBack(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}
void goRight(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}
void goLeft(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}
void goAheadRight(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar/speed_Coeff);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar);
}
void goAheadLeft(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, HIGH);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, HIGH);
analogWrite(ENB, speedCar/speed_Coeff);
}
void goBackRight(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar/speed_Coeff);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}
void goBackLeft(){
digitalWrite(IN_1, HIGH);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, HIGH);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar/speed_Coeff);
}
void stopRobot(){
digitalWrite(IN_1, LOW);
digitalWrite(IN_2, LOW);
analogWrite(ENA, speedCar);
digitalWrite(IN_3, LOW);
digitalWrite(IN_4, LOW);
analogWrite(ENB, speedCar);
}
void loop() {
server.handleClient();
command = server.arg("State");
if (command == "F") goAhead();
else if (command == "B") goBack();
else if (command == "L") goLeft();
else if (command == "R") goRight();
else if (command == "I") goAheadRight();
else if (command == "G") goAheadLeft();
else if (command == "J") goBackRight();
else if (command == "H") goBackLeft();
else if (command == "0") speedCar = 400;
else if (command == "1") speedCar = 470;
else if (command == "2") speedCar = 540;
else if (command == "3") speedCar = 610;
else if (command == "4") speedCar = 680;
else if (command == "5") speedCar = 750;
else if (command == "6") speedCar = 820;
else if (command == "7") speedCar = 890;
else if (command == "8") speedCar = 960;
else if (command == "9") speedCar = 1023;
else if (command == "S") stopRobot();
}
void HTTP_handleRoot(void) {
if( server.hasArg("State") ){
Serial.println(server.arg("State"));
}
server.send ( 200, "text/html", "" );
delay(1);
}
// Sensor Jarak
int trig = 6;
int echo = 7;
long durasi, jarak;
int merah = 4;
int kuning = 3;
int hijau = 2;
int buzzer = 5;
void setup() {
pinMode(trig, OUTPUT);
pinMode(echo, INPUT);
pinMode(merah, OUTPUT);
pinMode(kuning, OUTPUT);
pinMode(hijau, OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trig, LOW);
delayMicroseconds(8);
digitalWrite(trig, HIGH);
delayMicroseconds(8);
digitalWrite(trig, LOW);
delayMicroseconds(8);
durasi = pulseIn(echo, HIGH);
jarak = (durasi / 2) / 29.1;
if(jarak >= 16){
digitalWrite(hijau, HIGH);
digitalWrite(merah, LOW);
digitalWrite(kuning, LOW);
digitalWrite(buzzer, LOW);
}else if((jarak > 8)&&(jarak <16)){
digitalWrite(hijau, LOW);
digitalWrite(merah, LOW);
digitalWrite(kuning, HIGH);
digitalWrite(buzzer, LOW);
}else {
digitalWrite(hijau, LOW);
digitalWrite(merah, HIGH);
digitalWrite(kuning, LOW);
digitalWrite(buzzer, HIGH);
}
// Serial.print("Jarak Benda : ");
// Serial.print(jarak) ;
// Serial.println(" Cm");
}