Translate

Sunday, April 7, 2019

fHelper - MQTT edition



Ok, time to sum up this version of fHelper project.

After a series of tests and experiments, the Huzzah32 client is quite stable and reliable to read the capacitive soil sensor.

After adding a ambient temperature and humidity sensor (AM2302 or DHT-22) and setting a dashboard using node-red, the project is ready for the final stage, using a PCB to hold the client.


Client


The client is based on an Huzzah32 board (eventually to be replaced by a more cheap version of WROOM processor), a capacitive soil sensor and a AM2302 humidity/temperature sensor.
Every 25 seconds the client goes to read the sensors and send the read data via MQTT to the server and then sends the data to the server on 3 topics :


  • topic 1 : ambient temperature
  • topic 2 : ambient humidity
  • topic 3 : soil humidity
The client is also listening to an input topic to control a LED.
The client has a couple of checks for the connection. If a disconnect is detected the client retry to reconnect and if takes too long reset itself.

The code is present int he fHelper-MQTT repository.

This the schematic of the client (available on EasyEda) :


and this is the PCB :



Is in planning to redesign completely the board in order to use directly the Wroom32 chipset and not the Huzzah32 board.

And finally the PCB arrived !



And here the final board attached to a pole planted in the vase.



Server

The Node-Red server is running over a Raspberry Pi 3 on the same network.
The server receive the feeds from the client and prepare graphs and instant visualization of the values.
A function check the inputs from the soil humidity in order to determine when is time to water the plant.
The LED on the client is turned ON and an email is sent out to notify the need to water the plant.
After adding the water the LED can be turned off from the UI.
Is also possible to reset all the graphs and visualization from the UI clicking on the RESET GRAPHS button.

The Dashboard UI

The flow schematic
Note that the flow uses the node-red-dashboard plugin, so other UI plugins need to be removed.





No comments:

Post a Comment