{"id":168,"date":"2025-09-27T18:05:41","date_gmt":"2025-09-27T12:35:41","guid":{"rendered":"https:\/\/vikashmishra.online\/blogs\/?p=168"},"modified":"2025-09-27T18:05:41","modified_gmt":"2025-09-27T12:35:41","slug":"my-first-small-iot-project-a-smart-water-tank-level-monitor","status":"publish","type":"post","link":"https:\/\/vikashmishra.online\/blogs\/my-first-small-iot-project-a-smart-water-tank-level-monitor\/","title":{"rendered":"My First Small IoT Project: A Smart Water Tank Level Monitor"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Starting your first Internet of Things (IoT) project can feel like opening a black box of circuits, code, and 3D printing fails. But the payoff\u2014when that little red LED finally blinks, or in my case, when the <strong>water level reading finally appears on the screen<\/strong>\u2014is worth every moment of frustration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My goal was simple: stop climbing onto the roof to check the tank and instead build a reliable water level monitoring system using an ESP32.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Hardest Part Wasn&#8217;t the Code\u2014It Was the Plastic<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When I began, I thought the coding and wiring would be my biggest challenge.<br>Turns out, it was the housing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The device needed to sit securely on the tank cap and survive outdoors. That meant designing a custom, weatherproof enclosure. This is where I dove into 3D modeling with Blender\u2014and failed many times.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I printed version after version:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Too small<\/li>\n\n\n\n<li>Walls too thin<\/li>\n\n\n\n<li>Ultrasonic sensor hole misaligned<\/li>\n\n\n\n<li>Mounting screw holes stripped<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Each mistake was frustrating, but every failure taught me something new. Eventually, I managed to design and print the perfect enclosure\u2014watertight, sturdy, and snugly mounted on the tank cap.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The feeling when a digital design becomes a working physical object is simply incredible!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The IoT Brains and Sensory Organs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s the simple but powerful hardware setup I used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ESP32 Development Board<\/strong> \u2013 The brain of the project. Powerful, has built-in Wi-Fi (great for data logging or sending alerts), and beginner-friendly with the Arduino IDE.<\/li>\n\n\n\n<li><strong>Ultrasonic Distance Sensor (HC-SR04 or similar)<\/strong> \u2013 The core sensor. It measures the distance between the sensor and the water surface.<\/li>\n\n\n\n<li><strong>DHT11\/DHT22 Sensor<\/strong> \u2013 Bonus sensor for temperature and humidity inside the enclosure. Not required for water monitoring, but great for learning to integrate multiple sensors.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">From Distance to Liters: The Simple Physics<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The trick is converting the distance measured by the sensor into meaningful values like <strong>water level percentage<\/strong> and <strong>remaining tank capacity<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Known values in my setup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Distance from sensor to bottom (Dfloor) = 120 cm<\/li>\n\n\n\n<li>Distance when tank is empty (Dempty) = 20 cm<\/li>\n\n\n\n<li>Tank capacity (Vcapacity) = 1000 liters<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: Usable Water Height<\/strong><br>Hmax = Dfloor \u2013 Dempty = 100 cm<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Current Water Height<\/strong><br>Hwater = Dfloor \u2013 Dmeasured<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Water Level Percentage<\/strong><br>Level% = (Hwater \/ Hmax) \u00d7 100<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since Hmax = 100 cm, every 1 cm of water = 1% full.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Volume Remaining<\/strong><br>Volume = (Hwater \/ 100) \u00d7 Vcapacity<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a 1000-liter tank and 100 cm usable height, every 1 cm of water \u2248 10 liters.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Connect with Me \u2013 Buy This Smart IoT Project!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019m passionate about making practical IoT solutions accessible and affordable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this project excites you, you don\u2019t need to build it from scratch\u2014I\u2019ve already developed and tested a <strong>ready-to-install Smart Water Tank Level Monitor<\/strong>. It\u2019s compact, weatherproof, Wi-Fi enabled, and fully calibrated for home use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udca7 This device will save you <strong>time, effort, and water<\/strong> by giving you accurate tank readings instantly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83d\udc49 If you\u2019d like to purchase one, simply connect with me:<br>\ud83d\udce9 <strong><a>mail@vikashmishra.online<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The ESP32 Code, Web Integration, and Hosting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The ESP32 code powering this project not only calculates the water level but also integrates <strong>Wi-Fi connectivity<\/strong>. To ensure efficiency, it uses a <strong>smart reporting algorithm<\/strong>\u2014sending data to the server only when the water level changes by 1% or more. This saves bandwidth and reduces server load.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For hosting, I use <strong><a href=\"https:\/\/cloudpoko.com\">CLOUDPOKO.com<\/a><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why CLOUDPOKO?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Super-fast, reliable servers<\/li>\n\n\n\n<li>Affordable plans perfect for IoT API calls<\/li>\n\n\n\n<li>Easy setup for PHP-based dashboards<\/li>\n\n\n\n<li>Outstanding uptime and support<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">CLOUDPOKO has been the <strong>backbone of my IoT setup<\/strong>. If you\u2019re planning to host your own IoT projects or even personal websites, I highly recommend them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the backend, I built a simple <strong>PHP dashboard<\/strong> to collect sensor data and display real-time water levels. It\u2019s lightweight, efficient, and works seamlessly with CLOUDPOKO hosting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(I\u2019ll share the complete ESP32 (Arduino) code in my next blog.)<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting your first Internet of Things (IoT) project can feel like opening a black box of circuits, code, and 3D printing fails. But the payoff\u2014when that little red LED finally blinks, or in my case, when the water level reading finally appears on the screen\u2014is worth every moment of frustration. My goal was simple: stop &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/vikashmishra.online\/blogs\/my-first-small-iot-project-a-smart-water-tank-level-monitor\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My First Small IoT Project: A Smart Water Tank Level Monitor&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":169,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[209,33,54,55,56,210,116,53,34],"tags":[259,255,262,266,264,249,129,258,261,254,37,256,265,252,263,251,257,253,250,260],"class_list":["post-168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d-printer","category-automation","category-diy-tech","category-home-automation","category-iot","category-my-3d-printing-journey","category-personal-experience","category-personal-tech","category-web-scripting","tag-affordable-iot-projects-for-beginners-with-esp32","tag-arduino-ide-iot","tag-best-hosting-for-iot-projects-cloudpoko-review","tag-buy-low-cost-iot-based-water-tank-level-monitoring-device","tag-diy-3d-printed-enclosure-for-iot-projects","tag-diy-iot-device","tag-esp32-projects","tag-esp32-ultrasonic-sensor-water-level-monitoring-project","tag-how-to-build-a-smart-water-tank-level-monitor-using-esp32","tag-iot-for-beginners","tag-iot-projects","tag-low-cost-iot-solutions","tag-real-time-water-tank-level-monitoring-with-arduino-ide","tag-smart-home-automation","tag-smart-home-water-management-system-with-iot","tag-smart-water-tank-monitor","tag-step-by-step-iot-water-tank-monitoring-system-tutorial","tag-ultrasonic-sensor-project","tag-water-tank-level-sensor","tag-wi-fi-enabled-smart-water-tank-level-indicator-using-esp32"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":64,"url":"https:\/\/vikashmishra.online\/blogs\/liberating-my-digital-life-how-i-use-n8n-for-daily-work-home-and-building-tools-with-esp32\/","url_meta":{"origin":168,"position":0},"title":"Liberating My Digital Life: How I Use n8n for Daily Work, Home, and Building Tools with ESP32","author":"Vikash Mishra","date":"July 25, 2025","format":false,"excerpt":"The author shares their experience with n8n, an open-source automation platform that simplifies digital tasks across work and home. With features like self-hosting for privacy, visual workflow creation, and integration with hardware like ESP32, n8n transforms daily routines, reduces manual effort, and enhances productivity without escalating costs.","rel":"","context":"In &quot;AI Tools&quot;","block_context":{"text":"AI Tools","link":"https:\/\/vikashmishra.online\/blogs\/category\/ai-tools\/"},"img":{"alt_text":"n8n esp32","src":"https:\/\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/07\/n8n-esp32.avif","width":350,"height":200,"srcset":"https:\/\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/07\/n8n-esp32.avif 1x, https:\/\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/07\/n8n-esp32.avif 1.5x, https:\/\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/07\/n8n-esp32.avif 2x"},"classes":[]},{"id":277,"url":"https:\/\/vikashmishra.online\/blogs\/home-assistant-for-makers-how-to-integrate-custom-esp32-sensors-and-actuators\/","url_meta":{"origin":168,"position":1},"title":"Home Assistant for Makers: How to Integrate Custom ESP32 Sensors and Actuators","author":"Vikash Mishra","date":"October 27, 2026","format":false,"excerpt":"For many makers, the transition from building standalone Arduino gadgets to creating a unified smart home system can feel like hitting a brick wall. You might have a perfectly functioning ESP32-based weather station or a custom motorized blind controller sitting on your workbench, but the moment you try to integrate\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/vikashmishra.online\/blogs\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":276,"url":"https:\/\/vikashmishra.online\/blogs\/from-breadboard-to-pcb-a-guide-to-professionalizing-your-esp32-iot-projects\/","url_meta":{"origin":168,"position":2},"title":"From Breadboard to PCB: A Guide to Professionalizing Your ESP32 IoT Projects","author":"Vikash Mishra","date":"October 27, 2026","format":false,"excerpt":"You\u2019ve just finished your latest masterpiece: an ESP32-based weather station that monitors soil moisture and uploads data to an AWS dashboard. It works perfectly, but there is a glaring problem. It is currently a chaotic \"rat's nest\" of jumper wires, a breadboard that loses connection if you sneeze too hard,\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/vikashmishra.online\/blogs\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":128,"url":"https:\/\/vikashmishra.online\/blogs\/my-next-diy-obsession-from-smart-home-to-3d-printing\/","url_meta":{"origin":168,"position":3},"title":"My Next DIY Obsession: From Smart Home to 3D Printing","author":"Vikash Mishra","date":"August 25, 2025","format":false,"excerpt":"If you've followed my previous blog post, you'll know I've been deep into building my own DIY smart home ecosystem. My goal is to create a fully customized, open-source-powered \"brain of the house,\" from automatic door locks to intelligent climate control. It's been a rewarding challenge, but as my little\u2026","rel":"","context":"In &quot;DIY Tech&quot;","block_context":{"text":"DIY Tech","link":"https:\/\/vikashmishra.online\/blogs\/category\/diy-tech\/"},"img":{"alt_text":"IoT 3D Printing Banner","src":"https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/IoT-3D-Printing-Banner.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":109,"url":"https:\/\/vikashmishra.online\/blogs\/better-late-than-never-my-diy-smart-home-revolution-is-underway\/","url_meta":{"origin":168,"position":4},"title":"Better Late Than Never: My DIY Smart Home Revolution is Underway!","author":"Vikash Mishra","date":"August 13, 2025","format":false,"excerpt":"NOTE: All the materials\/software\/solutions I'll be using in this project will be open-source and designed by me; no ready-to-use solutions will be used. It will be a complete personal project. Introduction: Ever felt like you missed the boat on the smart home trend? For years, I watched from the sidelines\u2026","rel":"","context":"In &quot;Automation&quot;","block_context":{"text":"Automation","link":"https:\/\/vikashmishra.online\/blogs\/category\/automation\/"},"img":{"alt_text":"home automation","src":"https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/home-automation.webp?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/home-automation.webp?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/home-automation.webp?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/08\/home-automation.webp?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":275,"url":"https:\/\/vikashmishra.online\/blogs\/mastering-petg-why-its-the-perfect-material-for-functional-3d-printed-iot-enclosures\/","url_meta":{"origin":168,"position":5},"title":"Mastering PETG: Why It\u2019s the Perfect Material for Functional 3D Printed IoT Enclosures","author":"Vikash Mishra","date":"October 26, 2026","format":false,"excerpt":"If you've ever spent a weekend meticulously soldering components for a custom smart home sensor, only to have the enclosure warp under the sun\u2019s glare or snap while you were snapping the lid shut, you know the frustration of choosing the wrong 3D printing material. For the longest time, the\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/vikashmishra.online\/blogs\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/vikashmishra.online\/blogs\/wp-content\/uploads\/2025\/09\/Home-Dashboard.png","_links":{"self":[{"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":1,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":170,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/posts\/168\/revisions\/170"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/media\/169"}],"wp:attachment":[{"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vikashmishra.online\/blogs\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}