SlideShare a Scribd company logo
1 of 23
SMART KEY
This device is used to operate motorcycle, by multi optional like, manually, through
application, Voice Assistant, smartwatch, and whatsapp messages . To make this circuit it
requires such as ESP8266, two relay channel models, This device is called SMART-KEY
. It is operated through the whatsapp message by sending “key on” and “key off” ,And
coming to the application we need to press on off bottons in the app(designed for this
smart-key) .And for voice assistance we are using google and Alexa to control the smart-
key . And same like application for smartwatch also used to control the smart-key . We
should place this device in Scooty or bike This device is secure and Non- Hackable . It is
operated through wifi and it’s range unlimited range . We can operate this device with
multiple options first one . By using smartphone (application) .Second by using Whatsapp
. third by using manual . Forth by using smartwatch . And voice assistant . This mobile
application is to access and control the vehicle . It is encrypted device . And this device is
said to be embedded system .
System architecture
The system architecture for the SMART-KEY device involves the integration of various components and technologies to enable seamless
motorcycle control. Here is a high-level overview of the system architecture.
Manual Control: The SMART-KEY device incorporates physical buttons or switches that allow users to manually control the motorcycle's
operation.
Smartphone Application: A dedicated mobile application serves as the primary interface for users to interact with the SMART-KEY. It
provides a graphical user interface (GUI) with intuitive controls, allowing users to send commands and customize settings.
Voice Assistants: Integration with voice assistants, such as Google Assistant and Alexa, enables users to control the SMART-KEY through
voice commands, offering hands-free operation.
Smartwatch: The SMART-KEY can also be paired with a compatible smartwatch, providing users with a compact and wearable control
interface.
ESP8266 Microcontroller: The ESP8266 acts as the core component of the SMART-KEY device, facilitating wireless communication
between the user interfaces and the motorcycle's control system.
Wi-Fi Connectivity: The ESP8266 connects to a Wi-Fi network, enabling communication between the SMART-KEY and other devices,
such as smartphones or voice assistants.
WhatsApp Integration: The SMART-KEY device utilizes WhatsApp messaging as a means of control. Users can send specific commands,
such as "key on" or "key off," via WhatsApp messages to activate or deactivate the motorcycle.
Relay Channel Models: The SMART-KEY incorporates two relay channel models to interface with the motorcycle's ignition system. These
relays enable the device to control the on/off state of the motorcycle's engine or other electrical components.
Embedded System: The SMART-KEY is designed as an embedded system, combining hardware and software to enable seamless
integration with the motorcycle's existing control system. It utilizes the ESP8266 microcontroller to process commands and trigger the
appropriate relay actions.
Encryption: The SMART-KEY device employs advanced encryption technology to ensure secure communication between the user
interfaces and the motorcycle. This encryption prevents unauthorized access and enhances the overall security of the system.
Power Source: The SMART-KEY device is powered either by the motorcycle's electrical system or through a separate power source,
depending on the design and installation requirements.
By integrating these components and technologies, the SMART-KEY device provides users with a versatile and secure means of
controlling their motorcycles through multiple interfaces, offering enhanced convenience and control options.
WORKING
This SMART-KEY device working principle is quit similar to the remote control of car keys . To operate this
marquee smart key we are using firebase database add mit app inventor application to make customise api for
Smart Key . In this my key ESP8226 add two channel relay model is used to operate scooty . For this smart key
we have separate application that application name is called Smartkey in that application two buttons are available
one button for turn on Scooty add one more button for finding a scooty . First button Toggle button on and off
when we press on the data will go to firebase database from there it will come to nodemcu . In Nodemcu having
GPI0 pins D0 and D1. D0 pin is to turn on Scooty . D1 pin is to find scooty it means that if we lost Scotty it will
indicate . When data come from firebase database it goes to nodemcu . In nodemcu D0 pin will become high .
Later the data go back for firebase database cloud . This is the working principle of Smart Key . By the same way
using Whatsapp Smartkey is operated . Like when we send message key on in Whatsapp it goes to ThingESP .
From there it goes to nodeMCU D0 will be high . Again from nodemcu to ThingESP Cloud from cloud to
Whatsapp reply like “key turn on” . when D0 will be high the relay will pass the current in the circuit so it can be
used like a switch then scooty will turn on by this way. When it become active low the scooty will turn off and the
relay stop flowing current .
EVALAUTION AND RESULT :
CUSTOMIZED APPLICATION FOR SMART-KEY SCOOTY WHEN IT IS IN “ON” and “OFF” state .
A TYPICAL EXAMPLE OF OPERATION USING WHATSAPP:
THIS IS HOW I MADE SMART-KEY DESIGN
Firebase database cloud to store the data (when it is in on)
Firebase database to store data in cloud (this when it is in off )
ESP8266 12-E NodeMCU Kit
The ESP8266 12-E NodeMCU kit pinout diagram is shown below.
Best Pins to Use – ESP8266
One important thing to notice about ESP8266 is that the GPIO number doesn’t match the label on the board silkscreen. For example, D0 corresponds to GPIO16 and D1
corresponds to GPIO5.
The following table shows the correspondence between the labels on the silkscreen and the GPIO number as well as what pins are the best to use in your projects, and which
ones you need to be cautious.
The pins highlighted in green are OK to use. The ones highlighted in yellow are OK to use, but you need to pay attention because they may have unexpected behavior mainly at
boot. The pins highlighted in red are not recommended to use as inputs or outputs.
Continue reading for a more detailled and in-depth analysis of the ESP8266 GPIOs and its functions.
Label GPIO Input Output Notes
D0 GPIO16 no interrupt no PWM or I2C support
HIGH at boot
used to wake up from deep
sleep
D1 GPIO5 OK OK often used as SCL (I2C)
D2 GPIO4 OK OK often used as SDA (I2C)
D3 GPIO0 pulled up OK
connected to FLASH button,
boot fails if pulled LOW
D4 GPIO2 pulled up OK
HIGH at boot
connected to on-board LED,
boot fails if pulled LOW
D5 GPIO14 OK OK SPI (SCLK)
D6 GPIO12 OK OK SPI (MISO)
D7 GPIO13 OK OK SPI (MOSI)
D8 GPIO15 pulled to GND OK
SPI (CS)
Boot fails if pulled HIGH
RX GPIO3 OK RX pin HIGH at boot
TX GPIO1 TX pin OK
HIGH at boot
debug output at boot, boot
fails if pulled LOW
A0 ADC0 Analog Input X
GPIOs connected to the Flash Chip
GPIO6 to GPIO11 are usually connected to the flash chip in ESP8266 boards. So,
these pins are not recommended to use.
Pins used during Boot
The ESP8266 can be prevented from booting if some pins are pulled LOW or HIGH.
The following list shows the state of the following pins on BOOT:
 GPIO16: pin is high at BOOT
 GPIO0: boot failure if pulled LOW
 GPIO2: pin is high on BOOT, boot failure if pulled LOW
 GPIO15: boot failure if pulled HIGH
 GPIO3: pin is high at BOOT
 GPIO1: pin is high at BOOT, boot failure if pulled LOW
 GPIO10: pin is high at BOOT
 GPIO9: pin is high at BOOT
Pins HIGH at Boot
There are certain pins that output a 3.3V signal when the
ESP8266 boots. This may be problematic if you have relays
or other peripherals connected to those GPIOs. The
following GPIOs output a HIGH signal on boot:
 GPIO16
 GPIO3
 GPIO1
 GPIO10
 GPIO9
Additionally, the other GPIOs, except GPIO5 and GPIO4, can
output a low-voltage signal at boot, which can be
problematic if these are connected to transistors or relays.
You can read this article that investigates the state and
behavior of each GPIO on boot.
Interface Two Channel Relay Module with
ESP8266
Two-Channel Relay Module Pinout
Let’s take a look at the pinout.
Control Pins:
VCC pin provides power to the built-in optocouplers and, optionally, the relay’s electromagnet (if you keep the jumper
in place). Connect it to the 5V pin on the ESP8266.
GND is the common ground pin.
IN1 & IN2 pins control the relay. These are active low pins, which means that pulling them LOW activates the relay
and pulling them HIGH deactivates it.
Power Supply Selection Pins:
JD-VCC provides power to the relay’s electromagnet. When the jumper is in place, JD-VCC is shorted to VCC,
allowing the electromagnets to be powered by the ESP8266 Vin line. Without the jumper cap, you’d have to connect it
to a separate 5V power source.
VCC pin is shorted to the JD-VCC pin with the jumper cap on. Keep this pin disconnected if you remove the jumper.
GND is the common ground pin.
Output Terminals:
COM terminal connects to the device you intend to control.
NC terminal is normally connected to the COM terminal, unless you activate the relay, which breaks the connection.
NO terminal is normally open, unless you activate the relay that connects it to the COM terminal.
ARDUINO IDE 2.1.0
Arduino IDE 2.10 is an integrated development environment (IDE) specifically designed for programming Arduino boards. It is an
upgraded version of the original Arduino IDE, offering new features, improvements, and an enhanced user interface. Here is some
information about Arduino IDE 2.10:
CODE FOR SMART KEY BOTH WHATSAPP AND APPILCACTION
#include <ESP8266WiFi.h>
#include <ThingESP.h>
#include <ArduinoJson.h>
#include <Firebase_ESP_Client.h>
#include "addons/TokenHelper.h"
#include "addons/RTDBHelper.h"
ThingESP8266 thing("USERID", "PROJECT-NAME", "usingwhatsApp");
int KEY = D0;
unsigned long previousMillis = 0;
const long INTERVAL = 6000;
// Network Credentials
#define WIFI_SSID "WIFI-NAME"
#define WIFI_PASSWORD "WIFI-PASSWORD"
// Firebase API Key
#define API_KEY "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
// RTDB URL
#define DATABASE_URL "XXXXXXXXXXXXXXXXXXXXXXXXXX"
#include <ESP8266WiFi.h>: Includes the library for ESP8266 Wi-Fi
communication.
#include <ThingESP.h>: Includes the library for integrating the
ESP8266 with the Thing+ platform.
#include <ArduinoJson.h>: Includes the library for working with JSON
data.
#include <Firebase_ESP_Client.h>: Includes the library for interfacing
with the Firebase Realtime Database (RTDB) on ESP8266.
#include "addons/TokenHelper.h" and #include
"addons/RTDBHelper.h": Includes custom helper libraries for token
management and Firebase RTDB handling.
ThingESP8266 thing("USERID", "PROJECT-NAME",
"usingwhatsApp");: Creates a ThingESP8266 object named thing with
the specified user ID, project name, and device name (using WhatsApp
as a label).
int KEY = D0;: Defines the GPIO pin D0 as the pin for controlling the
key of the home automation system.
unsigned long previousMillis = 0; and const long INTERVAL = 6000;:
Defines variables to manage timing, setting the update interval to 6
seconds.
#define WIFI_SSID "WIFI-NAME" and #define WIFI_PASSWORD
"WIFI-PASSWORD": Defines the network SSID and password for the
Wi-Fi connection.
#define API_KEY "XXXXXXXXXXXXXXXX": Defines the Firebase
API key for authentication.
#define DATABASE_URL "XXXXXXXXXXXXXXX": Defines the
URL of the Firebase Realtime Database.
FirebaseData fbdo;
FirebaseAuth auth;
FirebaseConfig config;
String sValue, sValue2;
bool signupOK = false;
String HandleResponse(String query) {
if (query == "key on") {
digitalWrite(KEY, 1);
return "Done: KEY Turned ON";
}
else if (query == "key off") {
digitalWrite(KEY, 0);
return "Done: KEY Turned OFF";
}
else if (query == "key status")
return digitalRead(KEY) ? "KEY is OFF" : "KEY is
ON";
else return "Your query was invalid..";
}
FirebaseData fbdo;: Creates a FirebaseData object named fbdo
to interact with the Firebase RTDB.
FirebaseAuth auth; and FirebaseConfig config;: Create
FirebaseAuth and FirebaseConfig objects to handle Firebase
authentication and configuration.
String sValue, sValue2;: Declares String variables to store
values from Firebase.
bool signupOK = false;: Initializes a boolean variable
signupOK to keep track of the success of Firebase signup.
String HandleResponse(String query) {...}: Defines a function
named HandleResponse that takes a String query as input and
returns a response based on the received query. This function
will be used to handle messages received through WhatsApp.
void setup() {
Serial.begin(115200);
pinMode(KEY, OUTPUT);
pinMode(D1, OUTPUT);
pinMode(D0, OUTPUT);
// Connect to WiFi
thing.SetWiFi(WIFI_SSID, WIFI_PASSWORD);
thing.initDevice();
// Connect to Firebase
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
config.api_key = API_KEY;
config.database_url = DATABASE_URL;
void setup() {...}: Begins the setup function.
a. Serial.begin(115200);: Initializes the
serial communication at a baud rate of
115200.
b. pinMode(KEY, OUTPUT);,
pinMode(D1, OUTPUT);, pinMode(D0,
OUTPUT);: Sets the defined pins as
OUTPUT for controlling the devices.
c. thing.SetWiFi(WIFI_SSID,
WIFI_PASSWORD);, thing.initDevice();:
Sets the Wi-Fi credentials for
ThingESP8266 and initializes the device.
d. WiFi.begin(WIFI_SSID,
WIFI_PASSWORD); ...: Connects the
ESP8266 to Wi-Fi using the provided
credentials and displays the local IP address
when connected.
e. config.api_key = API_KEY;,
config.database_url = DATABASE_URL;
...: Sets up the Firebase configuration with
the API key and RTDB URL.
/* Sign up */
if (Firebase.signUp(&config, &auth, "", "")) {
Serial.println("ok");
signupOK = true;
}
else {
Serial.printf("%sn", config.signer.signupError.message.c_str());
}
/* Assign the callback function for the long running token generation task */
config.token_status_callback = tokenStatusCallback; //see
addons/TokenHelper.h
Firebase.begin(&config, &auth);
Firebase.reconnectWiFi(true);
}
f. if
(Firebase.signUp(&config,
&auth, "", "")) {...}: Tries to
sign up the device with
Firebase using the provided
config and auth objects.
g.
config.token_status_callback
= tokenStatusCallback; ...:
Assigns the token status
callback function for long-
running token generation.
h. Firebase.begin(&config,
&auth);,
Firebase.reconnectWiFi(true);:
Initializes Firebase with the
config and auth objects and
enables Wi-Fi reconnection.
void loop()
{
thing.Handle();
if (Firebase.ready() && signupOK ) {
if (Firebase.RTDB.getString(&fbdo, "/L1")) {
if (fbdo.dataType() == "string") {
sValue = fbdo.stringData();
int a = sValue.toInt();
Serial.println(a);
if (a == 1){
digitalWrite(D1,LOW);
}else{
digitalWrite(D1,HIGH);
}
}
}
else {
Serial.println(fbdo.errorReason());
}
void loop() {...}:
Begins the main loop.
a. thing.Handle();:
Handles the
communication with
the Thing+ platform.
b. if (Firebase.ready()
&& signupOK) {...}:
Checks if Firebase is
ready and the signup
process was
successful.
c. if
(Firebase.RTDB.getSt
ring(&fbdo, "/L1"))
{...}: Retrieves the
value from the "/L1"
path in the Firebase
RTDB and converts it
to an integer.
d. if
(Firebase.RTDB.getStrin
g(&fbdo, "/L2")) {...}:
Retrieves the value from
the "/L2" path in the
Firebase RTDB and
converts it to an integer.
e. Based on the retrieved
values, the corresponding
pins (D1 and D0) are set
to either HIGH or LOW
using the digitalWrite()
function to control the
connected devices.
if (Firebase.RTDB.getString(&fbdo, "/L2")) {
if (fbdo.dataType() == "string") {
sValue2 = fbdo.stringData();
int b = sValue2.toInt();
Serial.println(b);
if (b == 1){
digitalWrite(D0,LOW);
}else{
digitalWrite(D0,HIGH);
}
}
}
else {
Serial.println(fbdo.errorReason());
}
}
}
Conclusion:
In conclusion, the SMART-KEY device revolutionizes the operation of motorcycles by offering a wide
range of convenient control options. With its combination of the ESP8266 microcontroller and two relay
channel models, this device provides users with the ability to control their motorcycles manually, through
a dedicated smartphone application, voice assistants, smartwatches, and even via WhatsApp messages.
The SMART-KEY ensures enhanced security, non-hackability, and seamless integration within the
motorcycle's system. It operates through a secure Wi-Fi connection, allowing for unlimited range
operation and personalized settings through the dedicated mobile application. With its encrypted design
and embedded system technology, the SMART-KEY enhances the overall motorcycle ownership
experience, prioritizing convenience and security.

More Related Content

Similar to ppt for mini project (1).ppt

Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...
chandan kumar
 
Stacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rulesStacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rules
IT Tech
 

Similar to ppt for mini project (1).ppt (20)

smart home automation system
smart home automation systemsmart home automation system
smart home automation system
 
IRJET- Wireless Home Automation System using OpenHAB
IRJET- Wireless Home Automation System using OpenHABIRJET- Wireless Home Automation System using OpenHAB
IRJET- Wireless Home Automation System using OpenHAB
 
iot1presentation-191219142803.pdf
iot1presentation-191219142803.pdfiot1presentation-191219142803.pdf
iot1presentation-191219142803.pdf
 
IoT Based Home Automation System Presantation
IoT Based Home Automation System PresantationIoT Based Home Automation System Presantation
IoT Based Home Automation System Presantation
 
NodeMCU || Controlling and observing a robotic car with a smartphone through...
NodeMCU || Controlling and observing a robotic car with a  smartphone through...NodeMCU || Controlling and observing a robotic car with a  smartphone through...
NodeMCU || Controlling and observing a robotic car with a smartphone through...
 
Ijecet 06 08_002
Ijecet 06 08_002Ijecet 06 08_002
Ijecet 06 08_002
 
Chapter 2.doc
Chapter 2.docChapter 2.doc
Chapter 2.doc
 
Arduino bluetooth controlled robot
Arduino bluetooth controlled robotArduino bluetooth controlled robot
Arduino bluetooth controlled robot
 
Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...
 
Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...Speed and direction control of dc motor using android mobile application chan...
Speed and direction control of dc motor using android mobile application chan...
 
Design of home automation base on internet
Design of home automation base on internetDesign of home automation base on internet
Design of home automation base on internet
 
DIGITAL LOGIC DESIGN (1) PROJECT REPORT.docx
DIGITAL LOGIC DESIGN (1) PROJECT REPORT.docxDIGITAL LOGIC DESIGN (1) PROJECT REPORT.docx
DIGITAL LOGIC DESIGN (1) PROJECT REPORT.docx
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
Stacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rulesStacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rules
 
Stacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rulesStacking cisco 3750 switches benefits & stacking rules
Stacking cisco 3750 switches benefits & stacking rules
 
IRJET- IoT based Industrial Automation
IRJET-  	  IoT based Industrial AutomationIRJET-  	  IoT based Industrial Automation
IRJET- IoT based Industrial Automation
 
IRJET - IoT based Home Automation System through Voice Control using Google A...
IRJET - IoT based Home Automation System through Voice Control using Google A...IRJET - IoT based Home Automation System through Voice Control using Google A...
IRJET - IoT based Home Automation System through Voice Control using Google A...
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION  Arduino PAPER ABOUT INTRODUCTION
Arduino PAPER ABOUT INTRODUCTION
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 

Recently uploaded

21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
Sampad Kar
 

Recently uploaded (20)

Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
Vip ℂall Girls Karkardooma Phone No 9999965857 High Profile ℂall Girl Delhi N...
 
Introduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of ArduinoIntroduction to Arduino Programming: Features of Arduino
Introduction to Arduino Programming: Features of Arduino
 
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
The battle for RAG, explore the pros and cons of using KnowledgeGraphs and Ve...
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 

ppt for mini project (1).ppt

  • 1. SMART KEY This device is used to operate motorcycle, by multi optional like, manually, through application, Voice Assistant, smartwatch, and whatsapp messages . To make this circuit it requires such as ESP8266, two relay channel models, This device is called SMART-KEY . It is operated through the whatsapp message by sending “key on” and “key off” ,And coming to the application we need to press on off bottons in the app(designed for this smart-key) .And for voice assistance we are using google and Alexa to control the smart- key . And same like application for smartwatch also used to control the smart-key . We should place this device in Scooty or bike This device is secure and Non- Hackable . It is operated through wifi and it’s range unlimited range . We can operate this device with multiple options first one . By using smartphone (application) .Second by using Whatsapp . third by using manual . Forth by using smartwatch . And voice assistant . This mobile application is to access and control the vehicle . It is encrypted device . And this device is said to be embedded system .
  • 2.
  • 3. System architecture The system architecture for the SMART-KEY device involves the integration of various components and technologies to enable seamless motorcycle control. Here is a high-level overview of the system architecture. Manual Control: The SMART-KEY device incorporates physical buttons or switches that allow users to manually control the motorcycle's operation. Smartphone Application: A dedicated mobile application serves as the primary interface for users to interact with the SMART-KEY. It provides a graphical user interface (GUI) with intuitive controls, allowing users to send commands and customize settings. Voice Assistants: Integration with voice assistants, such as Google Assistant and Alexa, enables users to control the SMART-KEY through voice commands, offering hands-free operation. Smartwatch: The SMART-KEY can also be paired with a compatible smartwatch, providing users with a compact and wearable control interface. ESP8266 Microcontroller: The ESP8266 acts as the core component of the SMART-KEY device, facilitating wireless communication between the user interfaces and the motorcycle's control system. Wi-Fi Connectivity: The ESP8266 connects to a Wi-Fi network, enabling communication between the SMART-KEY and other devices, such as smartphones or voice assistants. WhatsApp Integration: The SMART-KEY device utilizes WhatsApp messaging as a means of control. Users can send specific commands, such as "key on" or "key off," via WhatsApp messages to activate or deactivate the motorcycle. Relay Channel Models: The SMART-KEY incorporates two relay channel models to interface with the motorcycle's ignition system. These relays enable the device to control the on/off state of the motorcycle's engine or other electrical components. Embedded System: The SMART-KEY is designed as an embedded system, combining hardware and software to enable seamless integration with the motorcycle's existing control system. It utilizes the ESP8266 microcontroller to process commands and trigger the appropriate relay actions. Encryption: The SMART-KEY device employs advanced encryption technology to ensure secure communication between the user interfaces and the motorcycle. This encryption prevents unauthorized access and enhances the overall security of the system. Power Source: The SMART-KEY device is powered either by the motorcycle's electrical system or through a separate power source, depending on the design and installation requirements. By integrating these components and technologies, the SMART-KEY device provides users with a versatile and secure means of controlling their motorcycles through multiple interfaces, offering enhanced convenience and control options.
  • 4. WORKING This SMART-KEY device working principle is quit similar to the remote control of car keys . To operate this marquee smart key we are using firebase database add mit app inventor application to make customise api for Smart Key . In this my key ESP8226 add two channel relay model is used to operate scooty . For this smart key we have separate application that application name is called Smartkey in that application two buttons are available one button for turn on Scooty add one more button for finding a scooty . First button Toggle button on and off when we press on the data will go to firebase database from there it will come to nodemcu . In Nodemcu having GPI0 pins D0 and D1. D0 pin is to turn on Scooty . D1 pin is to find scooty it means that if we lost Scotty it will indicate . When data come from firebase database it goes to nodemcu . In nodemcu D0 pin will become high . Later the data go back for firebase database cloud . This is the working principle of Smart Key . By the same way using Whatsapp Smartkey is operated . Like when we send message key on in Whatsapp it goes to ThingESP . From there it goes to nodeMCU D0 will be high . Again from nodemcu to ThingESP Cloud from cloud to Whatsapp reply like “key turn on” . when D0 will be high the relay will pass the current in the circuit so it can be used like a switch then scooty will turn on by this way. When it become active low the scooty will turn off and the relay stop flowing current .
  • 5. EVALAUTION AND RESULT : CUSTOMIZED APPLICATION FOR SMART-KEY SCOOTY WHEN IT IS IN “ON” and “OFF” state .
  • 6. A TYPICAL EXAMPLE OF OPERATION USING WHATSAPP:
  • 7. THIS IS HOW I MADE SMART-KEY DESIGN
  • 8. Firebase database cloud to store the data (when it is in on)
  • 9. Firebase database to store data in cloud (this when it is in off )
  • 10. ESP8266 12-E NodeMCU Kit The ESP8266 12-E NodeMCU kit pinout diagram is shown below.
  • 11. Best Pins to Use – ESP8266 One important thing to notice about ESP8266 is that the GPIO number doesn’t match the label on the board silkscreen. For example, D0 corresponds to GPIO16 and D1 corresponds to GPIO5. The following table shows the correspondence between the labels on the silkscreen and the GPIO number as well as what pins are the best to use in your projects, and which ones you need to be cautious. The pins highlighted in green are OK to use. The ones highlighted in yellow are OK to use, but you need to pay attention because they may have unexpected behavior mainly at boot. The pins highlighted in red are not recommended to use as inputs or outputs. Continue reading for a more detailled and in-depth analysis of the ESP8266 GPIOs and its functions. Label GPIO Input Output Notes D0 GPIO16 no interrupt no PWM or I2C support HIGH at boot used to wake up from deep sleep D1 GPIO5 OK OK often used as SCL (I2C) D2 GPIO4 OK OK often used as SDA (I2C) D3 GPIO0 pulled up OK connected to FLASH button, boot fails if pulled LOW D4 GPIO2 pulled up OK HIGH at boot connected to on-board LED, boot fails if pulled LOW D5 GPIO14 OK OK SPI (SCLK) D6 GPIO12 OK OK SPI (MISO) D7 GPIO13 OK OK SPI (MOSI) D8 GPIO15 pulled to GND OK SPI (CS) Boot fails if pulled HIGH RX GPIO3 OK RX pin HIGH at boot TX GPIO1 TX pin OK HIGH at boot debug output at boot, boot fails if pulled LOW A0 ADC0 Analog Input X
  • 12. GPIOs connected to the Flash Chip GPIO6 to GPIO11 are usually connected to the flash chip in ESP8266 boards. So, these pins are not recommended to use. Pins used during Boot The ESP8266 can be prevented from booting if some pins are pulled LOW or HIGH. The following list shows the state of the following pins on BOOT:  GPIO16: pin is high at BOOT  GPIO0: boot failure if pulled LOW  GPIO2: pin is high on BOOT, boot failure if pulled LOW  GPIO15: boot failure if pulled HIGH  GPIO3: pin is high at BOOT  GPIO1: pin is high at BOOT, boot failure if pulled LOW  GPIO10: pin is high at BOOT  GPIO9: pin is high at BOOT
  • 13. Pins HIGH at Boot There are certain pins that output a 3.3V signal when the ESP8266 boots. This may be problematic if you have relays or other peripherals connected to those GPIOs. The following GPIOs output a HIGH signal on boot:  GPIO16  GPIO3  GPIO1  GPIO10  GPIO9 Additionally, the other GPIOs, except GPIO5 and GPIO4, can output a low-voltage signal at boot, which can be problematic if these are connected to transistors or relays. You can read this article that investigates the state and behavior of each GPIO on boot.
  • 14. Interface Two Channel Relay Module with ESP8266 Two-Channel Relay Module Pinout Let’s take a look at the pinout.
  • 15. Control Pins: VCC pin provides power to the built-in optocouplers and, optionally, the relay’s electromagnet (if you keep the jumper in place). Connect it to the 5V pin on the ESP8266. GND is the common ground pin. IN1 & IN2 pins control the relay. These are active low pins, which means that pulling them LOW activates the relay and pulling them HIGH deactivates it. Power Supply Selection Pins: JD-VCC provides power to the relay’s electromagnet. When the jumper is in place, JD-VCC is shorted to VCC, allowing the electromagnets to be powered by the ESP8266 Vin line. Without the jumper cap, you’d have to connect it to a separate 5V power source. VCC pin is shorted to the JD-VCC pin with the jumper cap on. Keep this pin disconnected if you remove the jumper. GND is the common ground pin. Output Terminals: COM terminal connects to the device you intend to control. NC terminal is normally connected to the COM terminal, unless you activate the relay, which breaks the connection. NO terminal is normally open, unless you activate the relay that connects it to the COM terminal.
  • 16. ARDUINO IDE 2.1.0 Arduino IDE 2.10 is an integrated development environment (IDE) specifically designed for programming Arduino boards. It is an upgraded version of the original Arduino IDE, offering new features, improvements, and an enhanced user interface. Here is some information about Arduino IDE 2.10:
  • 17. CODE FOR SMART KEY BOTH WHATSAPP AND APPILCACTION #include <ESP8266WiFi.h> #include <ThingESP.h> #include <ArduinoJson.h> #include <Firebase_ESP_Client.h> #include "addons/TokenHelper.h" #include "addons/RTDBHelper.h" ThingESP8266 thing("USERID", "PROJECT-NAME", "usingwhatsApp"); int KEY = D0; unsigned long previousMillis = 0; const long INTERVAL = 6000; // Network Credentials #define WIFI_SSID "WIFI-NAME" #define WIFI_PASSWORD "WIFI-PASSWORD" // Firebase API Key #define API_KEY "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" // RTDB URL #define DATABASE_URL "XXXXXXXXXXXXXXXXXXXXXXXXXX" #include <ESP8266WiFi.h>: Includes the library for ESP8266 Wi-Fi communication. #include <ThingESP.h>: Includes the library for integrating the ESP8266 with the Thing+ platform. #include <ArduinoJson.h>: Includes the library for working with JSON data. #include <Firebase_ESP_Client.h>: Includes the library for interfacing with the Firebase Realtime Database (RTDB) on ESP8266. #include "addons/TokenHelper.h" and #include "addons/RTDBHelper.h": Includes custom helper libraries for token management and Firebase RTDB handling. ThingESP8266 thing("USERID", "PROJECT-NAME", "usingwhatsApp");: Creates a ThingESP8266 object named thing with the specified user ID, project name, and device name (using WhatsApp as a label). int KEY = D0;: Defines the GPIO pin D0 as the pin for controlling the key of the home automation system. unsigned long previousMillis = 0; and const long INTERVAL = 6000;: Defines variables to manage timing, setting the update interval to 6 seconds. #define WIFI_SSID "WIFI-NAME" and #define WIFI_PASSWORD "WIFI-PASSWORD": Defines the network SSID and password for the Wi-Fi connection. #define API_KEY "XXXXXXXXXXXXXXXX": Defines the Firebase API key for authentication. #define DATABASE_URL "XXXXXXXXXXXXXXX": Defines the URL of the Firebase Realtime Database.
  • 18. FirebaseData fbdo; FirebaseAuth auth; FirebaseConfig config; String sValue, sValue2; bool signupOK = false; String HandleResponse(String query) { if (query == "key on") { digitalWrite(KEY, 1); return "Done: KEY Turned ON"; } else if (query == "key off") { digitalWrite(KEY, 0); return "Done: KEY Turned OFF"; } else if (query == "key status") return digitalRead(KEY) ? "KEY is OFF" : "KEY is ON"; else return "Your query was invalid.."; } FirebaseData fbdo;: Creates a FirebaseData object named fbdo to interact with the Firebase RTDB. FirebaseAuth auth; and FirebaseConfig config;: Create FirebaseAuth and FirebaseConfig objects to handle Firebase authentication and configuration. String sValue, sValue2;: Declares String variables to store values from Firebase. bool signupOK = false;: Initializes a boolean variable signupOK to keep track of the success of Firebase signup. String HandleResponse(String query) {...}: Defines a function named HandleResponse that takes a String query as input and returns a response based on the received query. This function will be used to handle messages received through WhatsApp.
  • 19. void setup() { Serial.begin(115200); pinMode(KEY, OUTPUT); pinMode(D1, OUTPUT); pinMode(D0, OUTPUT); // Connect to WiFi thing.SetWiFi(WIFI_SSID, WIFI_PASSWORD); thing.initDevice(); // Connect to Firebase WiFi.begin(WIFI_SSID, WIFI_PASSWORD); Serial.print("Connecting to Wi-Fi"); while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(300); } Serial.println(); Serial.print("Connected with IP: "); Serial.println(WiFi.localIP()); Serial.println(); config.api_key = API_KEY; config.database_url = DATABASE_URL; void setup() {...}: Begins the setup function. a. Serial.begin(115200);: Initializes the serial communication at a baud rate of 115200. b. pinMode(KEY, OUTPUT);, pinMode(D1, OUTPUT);, pinMode(D0, OUTPUT);: Sets the defined pins as OUTPUT for controlling the devices. c. thing.SetWiFi(WIFI_SSID, WIFI_PASSWORD);, thing.initDevice();: Sets the Wi-Fi credentials for ThingESP8266 and initializes the device. d. WiFi.begin(WIFI_SSID, WIFI_PASSWORD); ...: Connects the ESP8266 to Wi-Fi using the provided credentials and displays the local IP address when connected. e. config.api_key = API_KEY;, config.database_url = DATABASE_URL; ...: Sets up the Firebase configuration with the API key and RTDB URL.
  • 20. /* Sign up */ if (Firebase.signUp(&config, &auth, "", "")) { Serial.println("ok"); signupOK = true; } else { Serial.printf("%sn", config.signer.signupError.message.c_str()); } /* Assign the callback function for the long running token generation task */ config.token_status_callback = tokenStatusCallback; //see addons/TokenHelper.h Firebase.begin(&config, &auth); Firebase.reconnectWiFi(true); } f. if (Firebase.signUp(&config, &auth, "", "")) {...}: Tries to sign up the device with Firebase using the provided config and auth objects. g. config.token_status_callback = tokenStatusCallback; ...: Assigns the token status callback function for long- running token generation. h. Firebase.begin(&config, &auth);, Firebase.reconnectWiFi(true);: Initializes Firebase with the config and auth objects and enables Wi-Fi reconnection.
  • 21. void loop() { thing.Handle(); if (Firebase.ready() && signupOK ) { if (Firebase.RTDB.getString(&fbdo, "/L1")) { if (fbdo.dataType() == "string") { sValue = fbdo.stringData(); int a = sValue.toInt(); Serial.println(a); if (a == 1){ digitalWrite(D1,LOW); }else{ digitalWrite(D1,HIGH); } } } else { Serial.println(fbdo.errorReason()); } void loop() {...}: Begins the main loop. a. thing.Handle();: Handles the communication with the Thing+ platform. b. if (Firebase.ready() && signupOK) {...}: Checks if Firebase is ready and the signup process was successful. c. if (Firebase.RTDB.getSt ring(&fbdo, "/L1")) {...}: Retrieves the value from the "/L1" path in the Firebase RTDB and converts it to an integer.
  • 22. d. if (Firebase.RTDB.getStrin g(&fbdo, "/L2")) {...}: Retrieves the value from the "/L2" path in the Firebase RTDB and converts it to an integer. e. Based on the retrieved values, the corresponding pins (D1 and D0) are set to either HIGH or LOW using the digitalWrite() function to control the connected devices. if (Firebase.RTDB.getString(&fbdo, "/L2")) { if (fbdo.dataType() == "string") { sValue2 = fbdo.stringData(); int b = sValue2.toInt(); Serial.println(b); if (b == 1){ digitalWrite(D0,LOW); }else{ digitalWrite(D0,HIGH); } } } else { Serial.println(fbdo.errorReason()); } } }
  • 23. Conclusion: In conclusion, the SMART-KEY device revolutionizes the operation of motorcycles by offering a wide range of convenient control options. With its combination of the ESP8266 microcontroller and two relay channel models, this device provides users with the ability to control their motorcycles manually, through a dedicated smartphone application, voice assistants, smartwatches, and even via WhatsApp messages. The SMART-KEY ensures enhanced security, non-hackability, and seamless integration within the motorcycle's system. It operates through a secure Wi-Fi connection, allowing for unlimited range operation and personalized settings through the dedicated mobile application. With its encrypted design and embedded system technology, the SMART-KEY enhances the overall motorcycle ownership experience, prioritizing convenience and security.