Introduction: SmartAir

About: student MCT at Howest (Kortrijk Belgium)

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


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

Step 1: Fritzing Schema

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.

Step 2: Database

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.

Step 3: Raspberry Pi

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.

Step 4: Code

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.

Step 5:

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.


Step 6: Esembly

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.