Giter Site home page Giter Site logo

abelgomez / chanams Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 48.04 MB

The Chana Monitoring System (CMS) is a home project for something as simple as controlling that a deposit of water does not overflow when an A/C system has been running unattended for long time.

License: GNU Lesser General Public License v3.0

C++ 91.04% C 2.68% HTML 3.77% JavaScript 1.36% Shell 1.15%

chanams's Introduction

Chana Monitoring System

The Chana Monitoring System (CMS) is a home project for something as simple as controlling that a deposit of water does not overflow when an A/C system has been running unattended for long time. This is a clear example of overengineering when an engineer has the time and the will to learn new stuff 😄 . Since I already had the materials, it already uses a DHT22 sensor for measuring outdoors temperature and humidity. The CMS has been designed with three goals in mind:

  • The monitoring sensors must be cordless, able to be placed outdoors without requiring any wire directly connected to any device indoor.
  • The alarms and other messages must be displayed and ringed indoors, so that they can be seen and heard easily.
  • Outdoors devices must run with unexpensive batteries for a relatively long period of time (weeks/months).

In order to achieve this, the CMS has been built using two inexpensive NodeMCU v3 (ESP8266) microcontrollers, which are wifi capable. Each of these microcontrollers have been used to create the CMS interior module and the CMS exterior module. They use MQTT to communicate with each other.

Chan Monitoring System

To make the exterior module really cordless, I opted for powering it with batteries (the interior module works with a standard USB cable). In order to save power, the NodeMCU v3 (ESP8266) in the exterior module makes extensive use of the deep sleep mode.

Since the CMS is to be used by non-technical users, I opted for using 4 regular AA NiMH batteries for powering the exterior module: they are widespread, easy to charge, and easy to replace in case of damage. 4 NiMH batteries provide max 5.6 volts when fully charged, providing most of the time nearly 4.8 volts. These voltages are enough to power the internal voltage regulator of the NodeMCU v3 (an AMS1117), and provide the 3.3 volts required by the ESP8266 considering the dropout voltage of the regulator.

Nevertheless, the quiescent current of the AMS1117 is still too high (~5mA), draining considerable battery even in deep sleep. For such a reason, the NodeMCU v3 board of the exterior module has been modified, changing the AMS1117 voltage regulator by a AP7361C-33ER-13 low dropout regulator, which is pin compatible with the AMS1117, has a considerably lower quiescent current (~60uA), and remains within the specs when powered using 4 AA NiMH batteries.

Voltage regulator hack

Other parts of the NodeMCU v3 also consume battery in sleep mode, but this modification is simple and good enough to make the exterior module battery to last for weeks without further hacks. Next plot shows how the battery voltage changes (until the exterior module dies), when the exterior module wakes up and connects to the wifi to send data once every minute. In that case, the battery exterior module lasts for nearly 20 days.

Discharge curve

In normal conditions, this period can be increased notably, and as a consequence, the battery lasts for several months.

User Manual

⚠️ Only in spanish! ⚠️

There's available a full user manual of the CMS in doc/manual-ES/out/document.pdf.

Interior module

PCB

Bill of materials

Qty Description
1 Double-sided PCB (70mm x 90mm)
1 NodeMCU v3 (ESP8266)
1 16x2 LCD display HD44780 1602A
1 FC-113 I2C interface for 1602A
1 Push button (normally open)
1 Red LED
1 Yellow LED
1 Green LED
2 1 kΩ resistor
1 100 Ω resistor
1 Piezo buzzer
1 Logic level converter
1 2 position switch (3 pin)
-- Pin headers
-- Dupont connectors
-- Wires

PCB Design

Front Back
Interior PCB Front Interior PCB Back
Interior PCB Front Interior PCB Front

Stand

Bill of materials

Qty Description
1 Methacrylate sheet 3mm thick (270mm x 90mm)
8 M3 nylon hex nuts
8 M3 x 6mm nylon Phillips head screws
4 M3 x 6mm + 6mm nylon screws

Stand Design

Description Blueprint / Representation
Interior body template Interior body blueprint
Interior body (side view) Interior body side
Interior (design view) Interior body design
Result Interior

Exterior module

PCB

Bill of Materials

Qty Description
1 Double-sided PCB (50mm x 70mm)
1 1 NodeMCU v3 (ESP8266)
1 1 DHT22 sensor board
1 AP7361C-33ER-13 low dropout regulator
1 Push button (normally open)
1 4 AA Battery holder
1 Float switch (normally closed, but can be easily changed)
1 100 Ω resistor
1 220 Ω resistor
1 2 position switch (3 pin)
-- Pin headers
-- Dupont connectors
-- Wires

PCB Design

Front Back
Exterior PCB Front Exterior PCB Back
Interior PCB Front Interior PCB Front

Case

Bill of Materials

Qty Description
1 Methacrylate sheet 3mm thick (105mm x 70mm)
1 Methacrylate sheet 2mm thick (125mm x 115mm)
1 Methacrylate sheet 2mm thick (170mm x 160mm)
4 M3 nylon hex nuts
2 M3 x 6mm nylon Phillips head screws
4 M3 x 10mm + 6mm nylon screws

Additionally, a countersunk magnet can be attached to the top of the case to attach the device to the steel case of the external A/C unit:

Qty Description
1 Countersunk magnet (⌀30mm)
1 M3 x 10mm countersunk screw
2 M3 steel hex nuts
-- Washer(s)

Case Design

Description Blueprint / Representation
Exterior main case template Exterior body blueprint
Exterior lid template Exterior cover blueprint
Exterior skeleton template Exterior skeleton blueprint
Exterior skeleton (side view) Exterior skeleton side view
Exterior (design view) Exterior body desing
Result Exterior

Dependencies

Library name License Repository URL
ArduinoJson MIT https://github.com/bblanchon/ArduinoJson
Adafruit Unified Sensor Apache 2.0 https://github.com/adafruit/Adafruit_Sensor
DHT sensor library MIT https://github.com/adafruit/DHT-sensor-library
LiquidCrystal_I2C Unknown https://github.com/marcoschwartz/LiquidCrystal_I2C
PubSubClient MIT https://github.com/knolleary/pubsubclient
TaskScheduler BSD 3-Clause https://github.com/arkhipenko/TaskScheduler
uMQTTBroker MIT https://github.com/martin-ger/uMQTTBroker
WiFiManager* MIT https://github.com/tzapu/WiFiManager

*NOTE: WiFiManager has been heavily modified and is included in the lib folder. The modified code includes excerpts from ESP8266HTTPUpdateServer library (LGPL).

chanams's People

Contributors

abelgomez avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.