The Latest Version of a Robotic Humidity Controller

0

Raspberry Pi – The Latest Version of a Robotic Humidity Controller.

Everybody loves showers. You will end up with walls that are moldy if you are not keeping your humidity in check.

But the sole solution to keep it check is by keeping the window open for all day long, which would work at the time of summers but would be a completely different story in winters and especially when temperature is very low. You will need to make a strategy when it comes to getting rid of humidity while in order to not to freeze order.

Initiate and monitor the temperature and humidity of your bathroom. We have to use the best materials to monitor the temperature and humidity. The method that we are using is easy to assemble. No soldering is required and if you try hard you can maintain your costs.

Raspberry Pi – Requirements:

A Monitor to control temperature and humidity.

A Visual feedback that has date, time, temperature and humidity.

Graph to trend humidity in the eventual forty minutes.

Internet of Things, Uploading of your temperature and humidity to the Ubidots cloud and access to some very nice visualization and monitoring widgets.

Raspberry Pi – Hardware Required:

A Raspberry Pi model will be required, here we are using A+ model other models will also work but in order to save our money and higher power consumption plus some features that will not be required we are using A+ model.

A 8 GB microSD card with the recent Raspbian installed would work well.

A sensor module for temperature and humidity. We are using module of AM2302 which is based on sensor DHT22, with pre-soldered resistors that you require, or else you can also utilize DHT22 or DHT11 sensor also but these sensors you will have to do some of the soldering yourself.

We will require an OLED display. You can use 128*64 OLED or 128*64 other display. While I have chosen 128*64 OLED display for a screen that is bright and contrast. You can also utilize 128*32 displays but in that case probably the graphs would not loss so cool.

If you would want to enable uploading the data to the cloud, use a WLAN USB dongle.

For your Raspberry Pi 5V micro USB power source. We are using the official power supply but you can spare your money by using it on cheap cost. This application is not at all too power consuming and especially if you are utilizing WLAN dongle.

Jumper cables, for connecting the sensor and the screen with the Raspberry Pi, female to female.

An empty Greek honey jar. It has to be Greek honey. You may try some less hale and hearty alternatives, but we do not know that it would work or not.

Step 1:

Raspberry Pi – Connecting the hardware:

Raspberry pi GPIO pinout

Greek Honey Jar with Humidity Controller

The complicated part in this step is to spot the pin out of your Raspberry Pi’s version. For the Raspberry Pi GPIO, there are actually two separate pin out numbering schemes. The one was endowed by creators of Raspberry Pi and the other is based on the Broadcom BCM2835 chip pin out. You can refer to the subsequent forum post: GPIO Header Pin out Clarification

We have utilized Raspberry Pi is an A+ V1.1 and we found out that the pin out corresponds with that of the graphic above the source is Raspberry Pi Spy, this being the BCM numbering scheme. Before you proceed to connect the sensor and the screen you will have to identify the GPIO pins.

About your Raspberry Pi pin outs we are certain:

Humidity sensor and temperature should be connected.

To a ground pin (e.g. pin 6, 9, 14, 20, 30, 34 or 39) connect sensor’s ground

To a 3V3 power pin (e.g. 1 or 17) connect sensor’s VCC

To GPIO4 connect the sensor’s data pin. In our board it was pin 7. You can choose another GPIO pin also but in that case you will have to change your code.

OLED display is connected.

There are ample of flavors and supported connection protocols in 128*64 display. While these are few that support SPI and others that support 12C and there are quite a lot that implement their own protocol. If the last variation is true for yours, then… you’re on your own! If not, then things are easier.

Your Raspberry Pi should be powered. You should install the latest version of Raspbian in your Raspberry’s microSD card.

Everything should be kept in the jar. You can follow this after all the steps in the project are completed.

Step 2:

Raspberry Pi – Create a cloud account

Ubidots

Add a data source that is latest with two variables temperature and humidity. After the account is being created.

For your new data source you would want to have an ApiClient and for each of your cariable you require a variable ID. Note them as you will need them later.

Step 3:

H3 Raspberry Pi – Install the software

Robotic Humidity Controller

To your Raspberry Pi login remotely.

Presume, you have logged in as user Pi and you have named your Raspberry humidity – monitor, Your terminal will look like this.

pi@humidity-monitor ~ $

Create a folder first where you can store your humidity monitor software.

mkdir humidity-monitor

and modify to the new folder:

cd humidity-monitor

The command line prompt will change to

pi@humidity-monitor ~/humidity-monitor $

It is now time to obtain the humidity-monitor sources:

git clone https://techprolet@bitbucket.org/techprolet/humidity-monitor.git

You have to edit the Ubidots variables’ data. Using your preferred editor, open the humidity-monitor.py script.

E.g.

nano humidity-monitor.py

Position the lines accountable for the Ubidots settings:

#Create an “API” object

api = ApiClient(“xxxxxxxxxxxxxxxxxxxxxxxxxx”)

#Create a “Variable” object

tempVar = api.get_variable(“xxxxxxxxxxxxxxxxxxxxxxx”)

humidVar = api.get_variable(“xxxxxxxxxxxxxxxxxxxxxxx”)

Replace the xxxxxx with the variables you got from your Ubidots registration

By typing the following , you can now run the humidity-monitor:

sudo python humidity-monitor.py

You can also make Raspberry execute the script each time it boots, so that you don’t have to physically run it each time you by accident pulled the plug.

You have to make the humidity_monitor.sh script executable first:

chmod 755 humidity_monitor.sh

Then generate a logs folder, where the implementation logs are obtainable to be stored:

mkdir logs

Then run crontab:

sudo crontab -e

And penetrate the following line

@reboot sh /home/pi/humidity-monitor/humidity_monitor.sh >/home/pi/humidity-monitor/logs/cronlog 2>&1

From now on, when the Raspberry Boots, the script will begin involuntarily.

Share.

About Author

Leave A Reply