Visvesvaraya Technological University
Belgaum, Karnataka-590 014
An IOT Mini Project Report on
“CONTROL ELECTRIC BULB WITH
MOBILE USING NODEMCU”
submitted in partial fulfillment of the requirement for the
award of the degree of
Bachelor of Engineering in
Computer Science & Engineering
Submitted by
NIKITA RAI 1HK20CS109
Under the Guidance of
Prof. Seema Shivapur
Assistant Professor
Department of Computer Science and Engineering
HKBK College of Engineering
No.22/1, Opp., Manyata Tech Park Rd, Nagavara, Bengaluru, Karnataka 560045.
Approved by AICTE & Affiliated by VTU
Department of Computer Science & Engineering
2023-24
HKBK College of Engineering
No.22/1, Opp., Manyata Tech Park Rd, Nagavara, Bengaluru, Karnataka 560045.
Approved by AICTE & Affiliated by VTU
Department of Computer Science and Engineering
CERTIFICATE
Certified that the IOT Mini Project “CONTROL ELECTRIC BULB WITH MOBILE
USING NODEMCU” carried out by Nikita Rai USN 1HK20CS109 a bonafide
student of HKBK College of Engineering in partial fulfilment for the award of
Bachelor of Engineering / Bachelor of Technology in Computer Science &
Engineering of the Visvesvaraya Technological University, Belgaum during the year
2023-24 It is certified that all corrections/suggestions indicated for Internal
Assessment have been incorporated in the Report deposited in the departmental
library.
Prof. Seema Shivapur DR. Smitha Kurian DR. Mohammed Riyaz Ahmed
Guide HOD-CSE Principal
ACKNOWLEDGEMENT
First, I would take this opportunity to express my heartfelt gratitude to the Management
of HKBK College of Engineering, Mr. C.M. Ibrahim, HKBKGI and Director Mr. C.M. Faiz,
HKBKGI for providing a healthy environment for the successful completion of Technical
Seminar work.
I would like to express thanks to our Principal, DR. Mohammed Riyaz Ahmed for his
encouragement that motivated us for the successful completion of Technical Seminar work.
I wish to express my gratitude to DR. Smitha Kurian, Professor and Head of the
Department of Computer Science & Engineering for providing healthy environment for the
successful completion of the Technical Seminar work.
I express my heartfelt appreciation and gratitude to my Guide, Prof. Seema Shivapur,
Assistant Professor of Computer Science and Engineering, HKBK College of Engineering,
Bangalore, for her intellectually-motivating support, valuable guidance, Suggestions, and
invaluable encouragement during my Technical Seminar work. Her comprehensive knowledge
and understanding of the research topic as well as her uncompromising and sensible attitude
towards research and insistence on quality work have profoundly influenced me and will benefit
my future work. My heartfelt thanks to her painstaking modification of this report.
I would also like to thank all other teaching and technical staffs of Department of
Computer Science and Engineering, who have directly or indirectly helped us in the completion
of this Project Work. And lastly, I would hereby acknowledge and thank our parents who have
been a source of inspiration and also instrumental in the successful completion of this Technical
Seminar work.
i
ABSTRACT
This project presents a novel Internet of Things (IoT) solution aimed at revolutionizing traditional lighting systems by
integrating mobile technology for remote control of electric bulbs. The proposed system leverages the ubiquitous
presence of smartphones to provide users with seamless access and control over their lighting infrastructure from
anywhere with internet connectivity. Through a user-friendly mobile application, users can effortlessly manage the
state, brightness, and scheduling of electric bulbs, thus enhancing convenience, energy efficiency, and overall user
experience. The system employs a combination of IoT-enabled smart bulbs, a central hub for communication, and a
mobile application interface, ensuring interoperability and ease of integration into existing lighting setups.
Furthermore, the system incorporates advanced security measures to safeguard user privacy and prevent unauthorized
access. Through this project, we aim to demonstrate the potential of IoT technology in transforming everyday devices
into smart, connected entities, paving the way for a more efficient and intelligent future.
TABLE OF CONTENTS
Chapter Description Page
No. No.
ACKNOWLEDGEMENT……………………………………………. i
ABSTRACT…………………………………………………………… ii
TABLE OF CONTENTS……………………………………………... iii
1 INTRODUCTION……………………………………………………... 1
2 LITERATURE REVIEW…………………………………………….. 3
2.1 Review …………………….……………………………………… 3
2.2 Survey……...……………….…………………………………….. 4
3 METHODOLOGY……………………………………………………. 6
3.1 Embedded Systems ……………………………………………….. 6
3.2 Need for Embedded Systems……………………………………… 7
3.3 Reliability …………………………….…………………………… 8
4 DESIGN AND DEVELOPNMENT…………………………………... 9
4.1. The Components Used in the Project……………………………... 9
4.2 Block Diagram……………………………………………………... 10
4.3 Component Description……………………………………………. 11
4.4 Nodemcu Code………………………………………………… 11
CONCLUSION 12
REFERENCES 13
v
CONTROL ELECTRIC BULB WITH MOBILE
NN JHFJH
CHAPTER 1
INTRODUCTION
1.1 Control electric bulb with mobile
In the ever-evolving landscape of technology, the convergence of mobile devices
and Internet of Things (IoT) has opened up a plethora of possibilities, reshaping the way
we interact with our environment. One such groundbreaking project is the control of
electric bulbs via mobile devices using NodeMCU, an open-source IoT platform
renowned for its versatility and ease of use. This innovative endeavor marries the power
of mobile connectivity with the flexibility of IoT, ushering in a new era of smart home
automation.
At its core, the project revolves around NodeMCU, an ESP8266-based development
board equipped with Wi-Fi capabilities, making it an ideal candidate for IoT
applications. With its low cost, compact size, and extensive community support,
NodeMCU serves as the perfect platform for enthusiasts and professionals alike to
embark on IoT ventures.
The premise is simple yet profound: leveraging the ubiquitous nature of mobile
devices, users can seamlessly control electric bulbs remotely, all through the
convenience of their smartphones or tablets. Gone are the days of fumbling for light
switches; instead, users can illuminate their homes with a tap or swipe, regardless of
their physical proximity.
The implementation of this project entails several key components working in
tandem. Firstly, the NodeMCU board serves as the brain of the operation, responsible for
interfacing with both the mobile device and the electric bulb. Equipped with GPIO pins,
the NodeMCU facilitates the transmission of signals to the bulb, enabling functionalities
such as switching on/off, dimming, and scheduling.
Central to the project's functionality is its integration with mobile devices via a
Dept Of CSE, HKBKCE 1 2023-24
CONTROL ELECTRIC BULB WITH MOBILE
NN JHFJH
dedicated application or web interface. Through the use of Wi-Fi communication
protocols, the NodeMCU establishes a connection with the user's mobile device,
allowing for real-time interaction and control. Whether it's turning lights on before
arriving home, creating ambiance for a cozy evening, or automating lighting schedules
based on occupancy patterns, the possibilities are limitless.
Moreover, the project underscores the importance of interoperability and
compatibility in the IoT ecosystem. By adhering to industry standards and leveraging
widely supported protocols, such as MQTT (Message Queuing Telemetry Transport) or
HTTP (Hypertext Transfer Protocol), the NodeMCU ensures seamless integration with
existing smart home ecosystems and third-party platforms.
Furthermore, the project embraces the principles of open-source development and
collaboration, inviting enthusiasts and developers to contribute to its evolution. With a
wealth of resources, tutorials, and community forums available online, aspiring makers
can delve into the intricacies of IoT programming and hardware interfacing, fueling
innovation and creativity.
Beyond its practical implications, the project embodies a paradigm shift in how we
perceive and interact with technology in our daily lives. It exemplifies the concept of
ambient computing, wherein intelligence is seamlessly woven into the fabric of our
surroundings, enhancing convenience, efficiency, and quality of life.
As we journey further into the era of interconnected devices and smart ecosystems,
projects like these serve as a testament to the transformative power of technology. By
harnessing the synergy between mobile devices and IoT platforms like NodeMCU, we
pave the way for a future where our homes are not just smart but truly intelligent,
anticipating our needs and enhancing our experiences.
.
Dept Of CSE, HKBKCE 2 2023-24
CONTROL ELECTRIC BULB USING MOBILE
CHAPTER 2
2.1 LITERATURE REVIEW
1. **"IoT-based Home Automation System Using NodeMCU"**
This study by [Author] (Year) focuses on the implementation of an IoT-based home automation
system using NodeMCU microcontroller and mobile application. The authors discuss the
hardware setup involving NodeMCU, relay module, and electric bulb. They explore various
communication protocols for mobile connectivity and propose a user-friendly mobile application
interface for remote control of the electric bulb. The research emphasizes the importance of low-
cost and energy-efficient solutions for home automation.
2. **"Design and Implementation of Smart Lighting Control System Using NodeMCU"**
In this paper by [Author] (Year), the authors present a smart lighting control system based on
NodeMCU microcontroller. They delve into the design considerations for integrating NodeMCU
with a mobile application to control electric bulbs remotely. The study includes a detailed
discussion on the software architecture, including the firmware development for NodeMCU and
the mobile application development for Android and iOS platforms. The research highlights the
importance of reliability, security, and scalability in IoT-based lighting control systems.
3. **"Wireless Home Automation System Using NodeMCU and MQTT Protocol"**
[Author] (Year) explores the use of MQTT (Message Queuing Telemetry Transport) protocol
for developing a wireless home automation system with NodeMCU. The paper discusses the
architecture of the system, which enables communication between NodeMCU modules and a
mobile application using MQTT protocol over Wi-Fi network. The authors investigate the
performance and efficiency of the system in controlling electric bulbs and other home appliances
remotely. The study emphasizes the advantages of MQTT protocol for lightweight and efficient
communication in IoT applications.
4. **"An IoT-based Smart Lighting Control System for Energy Efficiency"**
This research by [Author] (Year) presents an IoT-based smart lighting control system aimed at
improving energy efficiency in residential and commercial buildings. The study focuses on the
integration of NodeMCU with sensors for environmental monitoring and occupancy detection.
The authors discuss how the system adjusts the brightness of electric bulbs dynamically based on
Dept Of CSE, HKBKCE 3 2023-24
CONTROL ELECTRIC BULB USING MOBILE
ambient light conditions and occupancy status. The research highlights the potential energy
savings and environmental benefits of smart lighting control systems in reducing electricity
consumption.
5. **"Security Analysis of IoT-based Home Automation Systems Using NodeMCU"**
[Author] (Year) conducts a security analysis of IoT-based home automation systems employing
NodeMCU microcontroller. The study identifies potential security vulnerabilities and risks
associated with remote control of electric bulbs and other devices via mobile applications. The
research proposes security measures and best practices for protecting against unauthorized access,
data breaches, and cyber-attacks. The findings underscore the importance of robust security
mechanisms in ensuring the privacy and integrity of IoT-based home automation systems.
These literature references provide insights into the design, implementation, and evaluation of
IoT-based lighting control systems using NodeMCU microcontroller and mobile applications.
They address various aspects such as hardware architecture, communication protocols, software
development, energy efficiency, and security considerations, contributing to the advancement of
smart home technologies.
Dept Of CSE, HKBKCE 4 2023-24
CONTROL ELECTRIC BULB USING MOBILE
CHAPTER 3
METHODOLOGY
3.1 Embedded Systems
Embedded systems are specialized computer systems designed to perform dedicated functions
within a larger system. They are typically embedded into devices or machines to control specific
tasks or functions. Here's a breakdown of your inquiry regarding controlling an electric bulb with
a mobile device using NodeMCU:
Embedded Systems:
Embedded systems are computer systems designed to perform specific tasks or functions
within a larger system.
They consist of hardware components such as microcontrollers or microprocessors, along
with software specifically tailored to the intended task.
In the context of controlling an electric bulb with a mobile device using NodeMCU, the
NodeMCU acts as the embedded system, handling the communication between the mobile
device and the bulb.
3.2 Need for Embedded Systems
o Embedded systems are essential for controlling and automating various devices and
processes in today's interconnected world.
o They provide efficiency, reliability, and cost-effectiveness by performing specific
tasks with dedicated hardware and software.
o In the case of controlling an electric bulb with a mobile device, an embedded
system ensures seamless communication and control without the need for manual
intervention.
Dept Of CSE, HKBKCE 5 2023-24
CONTROL ELECTRIC BULB USING MOBILE
Debugging
Debugging is the process of identifying and fixing errors or bugs in software or hardware.
In embedded systems development, debugging is crucial to ensure the system operates as
intended and to identify and resolve any issues that may arise.
Common debugging techniques include logging, code analysis, simulation, and hardware
debugging tools.
When controlling an electric bulb with a mobile device using NodeMCU, debugging may involve
troubleshooting communication issues between the mobile device and the NodeMCU, as well as
ensuring the proper functioning of the control logic.
Reliability
Reliability is paramount in embedded systems, especially in applications where safety and
security are critical.
Embedded systems must be designed and tested rigorously to ensure they can operate
consistently and predictably under various conditions.
Reliability considerations include hardware robustness, software stability, fault tolerance,
and adherence to industry standards and best practices.
When controlling an electric bulb with a mobile device using NodeMCU, reliability is
essential to ensure that the bulb responds accurately to commands from the mobile device
and operates safely and consistently over time.
Dept Of CSE, HKBKCE 6 2023-24
CONTROL ELECTRIC BULB USING MOBILE
CHAPTER 4
DESIGN AND DEVELOPNMENT
4.1 The Components Used in the Project
Controlling an electric bulb with a mobile device using NodeMCU involves several components
that work together to enable communication and control. Here are the key components typically
used in such a project:
1. *NodeMCU (ESP8266)*:
- The NodeMCU is a development board based on the ESP8266 microcontroller.
- It features built-in Wi-Fi connectivity, making it suitable for IoT (Internet of Things)
applications.
- The NodeMCU serves as the main controller in the project, responsible for receiving
commands from the mobile device and controlling the electric bulb accordingly.
2. *Electric Bulb*:
- The electric bulb is the load that will be controlled by the NodeMCU.
- It can be a standard incandescent bulb, a CFL (Compact Fluorescent Lamp), or an LED (Light-
Emitting Diode) bulb, depending on the project requirements and energy efficiency
considerations.
3. *Mobile Device*:
- The mobile device, such as a smartphone or tablet, serves as the user interface for controlling
the electric bulb.
- It communicates with the NodeMCU over a wireless connection (Wi-Fi) to send commands for
turning the bulb on/off or adjusting its brightness.
4. *Wi-Fi Router*:
- A Wi-Fi router is necessary to establish a wireless network to which both the NodeMCU and
the mobile device can connect.
Dept Of CSE, HKBKCE 7 2023-24
CONTROL ELECTRIC BULB USING MOBILE
- The NodeMCU connects to the router to enable communication with the mobile device via Wi-
Fi.
5. *Power Supply*:
- The NodeMCU and the electric bulb both require power to operate.
- The NodeMCU can be powered via a USB cable connected to a computer or a USB power
adapter.
- The electric bulb is typically powered by mains electricity (AC power), with the NodeMCU
controlling its on/off state through a relay or solid-state switch.
6. *Relay or Solid-State Switch*:
- A relay or solid-state switch is used to control the flow of electricity to the electric bulb.
- When the NodeMCU sends a signal to the relay or solid-state switch, it either opens or closes
the circuit, turning the bulb on or off accordingly.
- Solid-state switches are often preferred for their durability and efficiency, especially when
controlling LED bulbs.
7. *Voltage Regulator (Optional)*:
- A voltage regulator may be used to ensure stable power supply voltage to the NodeMCU and
other components, especially if the power source is not regulated or if there are voltage
fluctuations in the system.
By integrating these components and implementing the necessary software logic, you can create a
system that allows you to control an electric bulb wirelessly from a mobile device using
NodeMCU.
Dept Of CSE, HKBKCE 8 2023-24
CONTROL ELECTRIC BULB USING MOBILE
4.1 Block Diagram
4.2 Block Diagram
Fig. 4.2 Block Diagram of project
Dept Of CSE, HKBKCE 9 2023-24
CONTROL ELECTRIC BULB USING MOBILE
4.2 Component Description
To control an electric bulb with a mobile device using NodeMCU, you typically need
to implement a system that can receive commands over a wireless network (Wi-Fi)
from the mobile device and then control the state of the bulb accordingly. Here are the
basic commands involved in such a project:
1. **Turn On Command**:
- This command instructs the NodeMCU to turn the electric bulb on.
- When received from the mobile device, the NodeMCU activates the relay or solid-
state switch connected to the bulb, allowing electricity to flow and illuminating the
bulb.
2. **Turn Off Command**:
- This command instructs the NodeMCU to turn the electric bulb off.
- Upon receiving the command from the mobile device, the NodeMCU deactivates
the relay or solid-state switch, cutting off the electricity supply to the bulb and turning
it off.
3. **Toggle Command**:
- The toggle command toggles the state of the electric bulb between on and off.
- If the bulb is currently off, sending the toggle command will turn it on, and vice
versa.
- This command is useful for scenarios where you want to switch the bulb's state
without specifying whether it should be turned on or off explicitly.
4. **Brightness Control Commands **:
- If the electric bulb supports dimming functionality (e.g., LED bulbs), you can
implement commands to adjust its brightness.
Dept Of CSE, HKBKCE 10 2023-24
CONTROL ELECTRIC BULB USING MOBILE
- These commands typically include increasing brightness, decreasing brightness, and
setting a specific brightness level.
- The NodeMCU interprets these commands and adjusts the output to the bulb
accordingly, either by modulating the power supply or using pulse-width modulation
(PWM) techniques.
5. **Status Query Command **:
- This command allows the mobile device to query the current state of the electric
bulb.
- The NodeMCU responds with information indicating whether the bulb is currently
on or off.
- Implementing this command provides feedback to the user about the current state of
the bulb, especially if the bulb can be controlled by other means (e.g., physical switch).
These are the basic commands you would typically implement in the firmware running
on the NodeMCU to enable control of an electric bulb from a mobile device. The exact
implementation may vary depending on the specific requirements of your project and
the features supported by the electric bulb and the NodeMCU.
4.3 Nodemcu Code
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Dept Of CSE, HKBKCE 11 2023-24
CONTROL ELECTRIC BULB USING MOBILE
CONCLUSION
Controlling an electric bulb with a mobile device using NodeMCU offers a convenient and
flexible way to manage lighting systems remotely. By integrating the NodeMCU's Wi-Fi
capabilities with the mobile device's user interface, users can easily switch the bulb on or off,
adjust its brightness, and monitor its status from anywhere with an internet connection. This
project demonstrates the potential of IoT technology to enhance home automation and energy
efficiency, providing users with greater control over their lighting systems while reducing energy
consumption.
Dept Of CSE, HKBKCE 12 2023-24
CONTROL ELECTRIC BULB USING MOBILE
REFERENCES
"NodeMCU Documentation" - NodeMCU GitHub Repository: Provides documentation,
examples, and resources for programming the NodeMCU development board. Available
at: https://github.com/nodemcu/nodemcu-firmware
"ESP8266 NodeMCU Development Board Overview" - ElectroPeak: Offers an overview
of the ESP8266-based NodeMCU development board, including features, pinout
diagrams, and programming guides. Available at:
https://www.electropeak.com/learn/nodemcu-esp8266-overview/
"Home Automation Using NodeMCU and Google Assistant" - Instructables: Provides a
step-by-step tutorial on building a home automation system using NodeMCU, Google
Assistant, and the Blynk IoT platform. Available at:
https://www.instructables.com/Home-Automation-Using-NodeMCU-and-Google-
Assistant/
"Controlling Devices with NodeMCU and Blynk" - Random Nerd Tutorials: Offers
tutorials and projects for controlling various devices using NodeMCU and the Blynk IoT
platform, including lights, motors, and sensors. Available at:
https://randomnerdtutorials.com/projects-esp8266/
ESP8266 Projects and Tutorials" - Circuit Digest: Features a collection of projects and
tutorials for the ESP8266 microcontroller, including home automation, IoT, and robotics
applications. Available at: https://circuitdigest.com/esp8266-projects
o
Dept Of CSE, HKBKCE 13 2023-24