Introduction: Venti - Smart Ventilation
This instructable is a step by step guide to make a ventilation system using Raspberry Pi. This was an assignment for school, I study MCT (Media and communication technology) at HOWEST Kortrijk, where we had to use at least 3 different sensors, an actuator and a display.
The ventilation measures the outside and inside temperature, the humidity and the percentage of light.
These data is sent to a database. The values are displayed on a small website I made where you can also add your preferences. The back-end is running on a Raspberry Pi.
Step 1: Supplies
- Raspberry Pi 3 B+ with power supply and SD-card
- 9V battery
- DHT11 humidity and temperature sensor
- 2 9V fans
- OLED display
- One wire temperature sensor
- Light dependent resistor
- Jumping wires (male-female and male-male)
- 4.7k Ohm resistor
- 10k Ohm resistor
- Multiplex (18mm and 3mm)
- Plexiglass (4mm)
- Wood glue
More information in my Bill of Materials
Step 2: Circuit
This is the circuit for my project. It contains a lot of wires but it is not that difficult to build.
Make sure to enable the following interfaces on your Raspberry Pi
- SPI: for MCP
- I2C: for OLED display
I used the following libraries:
- DHT library: https://learn.adafruit.com/dht
(Note: This sensor is not really precisely, if you need it to be, I would recommend looking for an other kind.)
- L293D library: https://l293d.readthedocs.io/en/stable/user-guide/installation/
- Install the Adafruit_SSD1306 library from packages
- Install the Adafruti_DHT library from packages
Step 3: Enclosure
After making the circuit, I started building the enclosure. I wanted to put everything in a miniature kitchen. I used MDF 3mm, 18mm and plexiglass 4mm. I made a lot of holes with a drill to put the cables through.
The sketch was made on a scale of 1:3 cm and 1 box has a length of 0,5cm for a reference.
Step 4: Database
I used this database for the code I link in the next step. It was made with MySQL and hosted on Raspberry Pi with MariaDB.
Step 5: Code
I put all the code in one github repository, you can find the front-end as well as the back-end over there.
Code: My github repository or download and unzipped the files I uploaded here.