SmartAir

by beerstie10 in Circuits > Raspberry Pi

408 Views, 2 Favorites, 0 Comments

SmartAir

83011576_731266017619834_3828128317169476400_n.jpg
103311554_958138214636500_2117232383417122465_n.jpg
pi-4-hero.png
ada2028l_1.jpg
Fan-40mm-2P_LRG-628x628.jpg
images.jpg
Water_Level_Sensor_1-800x800.jpg
download.jpg
KY-015.jpg

In this tutorial I'll be showing you how you can make a smart humidifier with a Raspberry Pi.

Supplies

Each component can be found below, for a detailed version download the BOM.

- 1x Raspberry pi 4 model b

- 1x micro SD cart

- 1x micro SD card adapter

- 1 x breadboard

- 1x Raspberry pi t-cobbler

- 2x Ultrasonic humidifier element

- 1x Water level sensor

- 1x DHT11 Temperature-Humidity Sensor Module

- 1x Analog Carbon Monoxide Sensor (MQ7)

- 1x 24v DC fan

- 1x LCD display

- 1x Power supplies 5Vdc

- 1x Power supplies 24Vdc 1,5A

- 1x Transistor (BC337)

- 1x TIP120

- 1x MCP3008

- 2 x 220Ω resistors

Fritzing Schema

project_bb.png
project_schema.png
102947440_3093709734042872_4301186814225955619_n.jpg
103260848_277374703381371_7205190917431617068_n.jpg

it is really necessary that you make a fritzing diagram. This way you avoid a number of errors during testing.

Now also connect all components on your breadboard. Solder the two power supplies together and insert a plug.

Database

Screenshot_1.png

Here you can see my database model.

It has 3 tables: Sensors, Actuators and history. In the history table all information or reading is post up.

Raspberry Pi

spi-menu2.png

Before you can start you must first set your raspberry pi correctly. Follow the next steps in the terminal.

1.Run sudo raspi-config.

2.Use the down arrow to select 5 Interfacing Options

3.Arrow down to P4 SPI.

4.Select yes when it asks you to enable SPI

5.Also select yes if it asks about automatically loading the kernel module.

6.Use the right arrow to select the button.

7.Select yes when it asks to reboot.

Code

Screenshot_1.png

For the code you can download my version or if you can program yourself you can also do it yourself. you can find my code via the following link. Github link

Now test this code with your circuit so you know if everything works.

Screenshot_5.png

You can 3d print the housing or make your own design. Or make your own housing.

The housing consists of three parts: the main part, bottom part and the water tank.

The color doesn't matter much.
Here are my print settings: PLA, Infil= 10% and with support.

Files

Esembly

83343228_866290813858921_4479698032388464336_n.jpg
103787065_590500475207527_1640201145210639916_n.jpg

Now it's time to put all the components in the housing. make sure you assemble everything correctly so that it gets in. I have glued all components with hot glue but this can be done just as well with other types of glue. Also make sure that the fan is in the correct direction of rotation so that it blows into the housing.

When everything is in the housing, the project is ready for use.