Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

IoT-based water geyser

By EG Projects August 23, 2021

In this article, we will control our home geyser from anywhere in the world. Life is fast and busy, and we all want to leverage the benefits of technology in our day-to-day life by automating where and when we can.

In this experiment, we will automate our geyser in integration with our alarm app so that whenever we wake up, we can get instant hot water. We will achieve this using the MQTT IoT protocol. MQTT is low weight low bandwidth data transmission protocol. For more details, you can refer to our previous articles.

Technical Insights
Using IoT, it is possible to control any physical object connected to the internet. When you connect your house with sensors then connect those sensors with the internet, you can control them from your cellphone from your laptop.

An IoT-based water geyser gives you control from your mobile device and uses the MQTT protocol as a communication protocol. You can control the geyser from an app, which can be installed on your cellphone as well as a laptop.

Basic network of our geyser’s control system
The geyser is connected to a unit with an ESP module programmed with an MQTT client program to connect to an MQTT broker. The ESP module connects to a Wi-Fi router for internet connectivity. The broker is hosted on the cloud, so there will be no need to open any port in-house router.

The anatomy of complete project
Note: To understand basic about MQTT and IoT refer to previous articles.

ESP8266 is connected to the broker and received instructions through the mobile app.

Let’s discuss in details about the core functions:

  • To control the geyser there is a mobile app which is basically a daily alarm app, you can set an alarm for any suitable time.
  • The app calculates hours and minutes until the alarm sounds and send the minutes to the broker followed by “on” command, on topic “ToESP”, the ESP module is subscribed to the topic.
  • When ESP module receives the “on” command it stores the minutes in a integer.
  • The converted value then passes to a function that calculates the time in seconds and other formats and returns the second.

  • To measure the time in ESP, there is a block of code containing a for loop that updates the value of a count variable every second. That’s how the time is compared with the received time.

  • The “time _in_switch_on” variable is now modified from the time which is taken by the geyser to heat the water. When you set an alarm of 5:00 AM, the geyser will start at 4:50, and the water will be heated in 10 minutes.

  • The variable “time_in_switch_on” stores the value in seconds and is compared with a variable “tick_seconds” in a function “function_to_trigger_gyeser_on()”.

  • After the geyser is on, it starts to count till 15 minutes exact, and when 15 minutes are passed, the geyser turns off, and the message is sent to the App.

There is also a functionality where you can switch off or ON the geyser at any time from mobile App. So, this is how the geyser is can be controlled from the internet.

Note: We are using open source library for publish and subscription through ESP client. We are not changing anything on those public libraries.

Soure code:

https://www.engineersgarage.com/wp-content/uploads/2021/08/Demo.mp4

You may also like:


  • How to use IoT-based D2D automation

  • Understanding MQTT protocol : IoT Part 14

  • MQTT Security : IOT Part 16

  • What are LoRa gateways and what types are available?

  • How to program an IoT-based coffee machine

  • IOT Standards and Protocols: IOT Part 3

Filed Under: Electronic Projects, PIC Microcontroller
Tagged With: IoT protocols, MQTT
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Voltage mode pushpull is a nonsense SMPS?
  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe