Professional Documents
Culture Documents
Iot Based Smart Charger: An Esp8266 Based Automatic Charger
Iot Based Smart Charger: An Esp8266 Based Automatic Charger
1
Navjeet Kumar, 2Dorathy R, 3ShruthiM, 4Dr. Anusuya S
1
Department of Computer Science and Engineering, Saveetha School of Engineering
2
Final Year Student, Saveetha School of Engineering
3
Final Year Student, Saveetha School of Engineering
4
Head of the Department, Saveetha School of Engineering
12,3,4
Saveetha University
1
tonunavjeet@gmail.com, dorathyraja89@gmail.com, 3Imshruthi1997@gmail.com,
2
4
anusuya@saveetha.com
Abstract: The internet of things has many applications; like ESP8266, Particle Photon, and other Arduino
one of those is Smart Power Monitoring and Control based Wi-Fi modules.
Systems. Energy efficient devices can be designed in
IoT, which can reduce both, the power consumption 2. Literature Survey
and the human effort required to do so. This work has
been designed in to implement a smart charging system IoT is widespread and popular nowadays, is prevalent
that automatically controls its behaviour using the in research, the design includes Wi-Fi module, power
webserver and the phone which is being charged. The supply and remote-control plug [1]. The remote-control
device being used is a ESP8266, the Webserver which plug is a part of the IoT which connects the mobile
will be stored on the ESP8266 module acts as the IoT phone to other appliances and can be controlled from
platform. As the webserver is platform independent, it any place at any-time. The design used in this research
can be used on any device, like mobiles and laptops, has remote plug along with the Wi-Fi and power supply
these devices relay commands, and in turn the web module. The control strategy is depicted with the help
server toggles the charger through the ESP8266 of the comfortable design which consists of the 220V –
module. This project helps in automatic monitoring of Input and 5V, 6W – Output power supply. This
the device and sends notifications to the phone, which research design contains the STC 15L 204EA as the
is necessary if we want to reduce both the energy and core control chip to manage the device’s electrical relay
time needed to maintain said devices. This system functions and the control signals are transmitted in two
would be capable of turning on and off only when the diverged paths during the connection establishment.
device is connected and charge only when needed, and Also, the mobile phone can control the plug through
can be further improved to monitor other appliances. remote access by means of TCP port in the same Wi-Fi
There are various modules available, which when environment.This work gives an overview of
paired up with the charging circuit will turn the charger functionality of the ESP8266 Wi-Fi module.
into an IoT based device, like ESP8266, Particle Putta Sindhuja and Balamurugan [2] has
Photon, and other Arduino based modules, but projected a home automation system in which the user
ESP8266 is the most cost effective and also has low can be able to control and monitor appliances with the
power consumption. help of the IoT to minimize the energy usage. The
appliances are connected via an Ethernet to a router and
Keywords: IOT, ESP8266, ESP8266 Webserver, uses m-bed microcontroller and sensor-actuator units to
Smart Charger. control the power utilization. The designed system
enables client to monitor and control the appliances at
1. Introduction home from anywhere availing the IoT features of the
designed system thereby reducing the wastage of
A device that could monitor the power consumption energy.The interesting part of the hardware for this
and control it, will help vastly in reducing the wastage system comprises of the Hall effect sensor, Ethernet
of energy. This system would be capable of turning on break outboard, Appliances such as 10W bulb – 12V
and off only when the device is connected and charge fan, two channel relay, m-bed microcontroller – LPC
only when needed, and can be further improved to 1768 and Ethernet modem. The Relay needs 12v power
monitor other appliances. There are various modules supply, groove Electricity Sensor is employed to
available, which when paired up with the charging measure the energy consumption in each appliance.
circuit will turn the charger into an IoT based device, Xively is software which enables the cloud data storage
and its used to analyse the usage.This work gives the
565
International Journal of Pure and Applied Mathematics Special Issue
566
International Journal of Pure and Applied Mathematics Special Issue
Using the HTML5 API for battery, which is This system will work with a charging circuit
supported on almost all devices, we can interface with and be controlled through the ESP8266 controller,
the device directly and send alerts through the which in turn will be monitored by the mobile which is
webserver to the ESP8266 module. being charged currently. This system can be
implemented easily with any charger and any
i.) There are various modules available, which when smartphone.
paired up with the charging circuit will turn the The power supply going through the charger
charger into an IoT based device, ESP8266 is the degrades a little, due to the voltage regulator’s
most cost effective, has the least power efficiency, but overall, the voltage and current remains
consumption, and the widest operating temperature. constant. In order to avoid degradation of the current,
ii.) The module is controlled through the ESP8266 while charging phones, a secondary supply can be
webserver. The ESP8266 module is equipped with utilized, like in the case of charging laptops. By doing
and support HTML5, JAVA SCRIPT, PHP, AJAX, so, the powers supply going to the device remains the
etc. Simple webservers can be created on the same as the actual charging device’s.
ESP8266 module and can be used locally or The same circuit can be used for charging laptops,
remotely. by just replacing the USB ports with their respective
iii.) The task of charging is controlled by the device charging pins.
which is being charged i.e. the device that has been There are two methods of execution, automatic and
plugged in to the charger. It can also be handled assisted mode. The first method is completely
through the IoT web platform i.e. the web server. automated and doesn’t need user intervention, it’s
essentially plug and play. The second method is based
on timers and takes the timer value in minutes, which
USB female will automatically start once time limit is set and stop
once the time limit is reached.
Switch
led ESP8266 A.) Method 1: Automatic Mode
• CHARGE_STATUS: The mobile phone will
MB102 consist of a preloaded application which will be
Gnd able to monitor the battery status.
• POST: The CHARGE_STATUS will send a
notification to the ESP8266 module when the
Gnd Source CH_PD
CHARGE_STATUS returns 100% or any specified
Vcc threshold.
Drain Gate GPIO2 • DEEPSLEEP: This will be invoked and the module
will switch off and the charger will stop charging
USB micro B the mobile.
Figure 2. Circuit Diagram Pseudocode:
4. Proposed System
//on the client side
Begin
POST(BATTERY_STATUS);
If(BATTERY_STATUS==100)
//send interrupt to ESP8266 with POST
CHARGE_STATUS ();
End
567
International Journal of Pure and Applied Mathematics Special Issue
In this mode of execution, if the charger gets uses HTML5, JAVASCRIPT, CSS, etc. in order to
communicate with the client.
When the user enters the IP address of the
ESP8266 module, into the web browser in case of
Laptops and, into the Evothings Viewer in case of
mobile phones, for optimum performance.
Then the client is taken to the login page and
the clients enters the username and password, which is
admin and admin respectively. In this page the cookies
are stored, so the client has to login only once.
The next page is the main part of the system which
helps in automating the whole system. The server
receives the charge value i.e. the percentage, from the
client and sends it to the user at regular intervals.
Screenshot 1- login page
unplugged and plugged-in again, the process resumes i.) The user can control the charger using the
as is, because the process is dependent only on the automated method or the assisted method.
CHARGE_STATUS. ii.) User is supposed to enter the timer value in assisted
mode, in the form.
B.) Method 2: Assist Mode iii.) The timer value is sent to the server, and the
embedded code runs accordingly.
• TIMER_VALUE: The user assigns the time till the iv.) After the time is up the charger stops charging
phone will get charged, regardless of the automatically.
CHARGE_STATUS. v.) In automated mode, the user doesn’t have to do
anything the server automatically receives the
• POST: The TIMER_VALUE is entered it will be
batter y level and performs according to the pre-set
sent to the ESP8266 module and charging will
MAX and MIN charge ranges.
commence.
vi.) If the charge level reaches the MAX level, them the
• HANDLE_TIME: The ESP8266 starts the timer,
charger switches off and after some time when the
when the time is over the charger is switched off.
device discharges and reaches the MIN level it
Pseudocode: automatically turns on the charger /and charging
commences.
//on the client side
Begin Client Module
POST(TIMER_VALUE); In this system, the client module works on the web
//send interrupt to ESP8266 with POST browser or the Evothings viewer. The client enters the
SET_TIMER ();
End
Server Module
In this system, the server is the ESP8266 module which Screenshot 2- main page
hold the code for the webserver, which is used to username and password for the first-time access and
control the ESP8266 using the embedded code, which after a successful login attempt once, all the other
also resides in the ESP8266 module. The webserver
568
International Journal of Pure and Applied Mathematics Special Issue
569
570