Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
  • 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

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Sensors
In this Tech Toolbox, we cover some of those technologies driving the next generation of connected systems, including ultra-low-power sensing strategies that extend node battery life, and 60 GHz CMOS radar for contactless health and presence detection.

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.

RSS Electro-Tech-Online.com Discussions

Featured Tutorials

Learn - VHDL Tutorials (22 Part)

  • VHDL Tutorial – 11: Designing half and full-subtractor circuits
    VHDL Tutorial – 11: Designing half and full-subtractor circuits
  • VHDL Tutorial – 12: Design a 8-bit parity generator and circuit checker
    VHDL Tutorial – 12: Design a 8-bit parity generator and circuit checker
  • VHDL tutorial 13: Design 3×8 decoder and 8×3 encoder using VHDL
    VHDL tutorial 13: Design 3×8 decoder and 8×3 encoder using VHDL
  • VHDL Tutorial 14: Design 1×8  demultiplexer and 8×1 multiplexer using VHDL
    VHDL Tutorial 14: Design 1×8  demultiplexer and 8×1 multiplexer using VHDL
  • VHDL Tutorial 17: Design a JK flip-flop (with preset and clear) using VHDL
    VHDL Tutorial 17: Design a JK flip-flop (with preset and clear) using VHDL
  • VHDL Tutorial 18: Design a T flip-flop (with enable and an active high reset input) using VHDL
    VHDL Tutorial 18: Design a T flip-flop (with enable and an active high reset input) using VHDL
More Tutorials >

Recent Articles

  • Amphenol RF launches 40 GHz solderless connectors
  • STMicroelectronics adds 200g vibration sensor for factories
  • Smarter HVAC Climate Solutions by TE
  • Amphenol RF adds NEX10 jack for 1.37 mm cable
  • Samtec headers support 2 to 50 pins

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • 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 © 2026 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
      • Sensor Series
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
  • Guest Post Guidelines
  • Advertise
  • Subscribe