Smart Serre

by JoVer_42 in Circuits > Raspberry Pi

687 Views, 2 Favorites, 0 Comments

Smart Serre

64646714_2377276522358773_5784853891493396480_n.jpg

In this tutorial I'll be showing you how you can make a fully automated conservatory using a Raspberry Pi.

Let's get started.

Supplies

The main components are the following: Raspberry Pi, mcp3008 chip, L293D chip, Soil Moisture Sensor, Dallas 18b20, Light Dependent Resistor (LDR) and if you prefer you can add a lcd screen (optional). You can see a detailed version in this excel document with links where you can buy the components.

Setup

EER Diagram 2.PNG

First things first, let's setup our Raspberry Pi, start by downloading an image on the micro SD-card. Then connect your Raspberry Pi to your computer using an ethernet cable. Now you can store the database in the Raspberry Pi. To do that I'm using 'MyQSL Workbench' but feel free to use another program. Start by making a new connection with the apipa address of your Raspberry Pi, then make the tables you can see in the picture. Once you have done that you'll have to fill the sensor table manually with all the sensors you're using.

Connect the Components

schakeling_bb.png
schakeling_schema.png
64445318_438304220351779_1984502957810384896_n.jpg
64600315_432197870949494_527076170361995264_n.jpg

First let's make the setup for this you will need a lot of jumper cables (male to male) and 2 220Ω resistor and if you choose to connect the lcd display then you'll also need a potentiometer.

Follow the scheme exactly, because 1 wrong placed wire could break your Raspberry Pi.

Make the Conservatory

64280035_445022602998417_2364456217448808448_n.jpg

The next step is fairly simple, you just buy any conservatory (doesn't really matter which one, jus make sure it's big enough) and assemble it.

Mount the Motor

64625061_836137340092435_7882147835867561984_n.jpg
64295300_375166963131559_2169712392974368768_n.jpg

This step may be a little trickier, we're going to assemble the motor so that it pushes the window open (the first picture is just a prototype). It's not the simplest in design but it works like a charm. I've connected a long screw to the motor and I've screwed a bolt on the screw. To that bolt I've attached a wooden stick and this stick pushes the window open. Because if the motor starts spinning, so will the screw, but because they're both fixed, they can't move which means that only the bolt (and the wooden stick) can move and so pushes or lowers the window.

Mount the Water Valve

64220276_414720399121104_3895007979912560640_n.jpg

The valve is way easier than the motor, if currency flows through the valve then it opens, which causes the water to go through, if no currency is flowing through then the valve is closed.

I've attached a short pipe to the valve so you can attach a reservoir for the water, just don't forget to regularly check if there're enough water left.

Website

Knipsel.JPG

Now we'll start with creating the website where you'll be able to see the last measurements and control the water valve and the window manually.

You can use my code for the website with this link https://github.com/NMCT-S2-Project-1/nmct-s2-proj...


Python Code

Now for the main code, I would advice to just copy my code, except if you know what you're doing of course. Use this link to go to my code https://github.com/NMCT-S2-Project-1/nmct-s2-proj...