This project proposes to monitor the air temperature, luminosity and humidity, as well as grove temperature and humidity. It proposes too to network this measures which are so readable on the website Actoborad.com
To do, we connect 4 sensors to the Nucleo microcontroller L432KC :
- a luminosity sensor TLS2561 by Adafruit ;
- a humidity and temperature sensor DHT22 by Gotronic ;
- a tempearture probe DS1820 ;
- a humidity sensor Grove - Moisture sensor by Seeed Studio
Measures are done each 10 minutes and are networked via a Breakout TD1208 by Sigfox. As said higher, this one are readable on the website Actoboard.com On this microcontroller is also plugged an OLED Display 128x64 screen which will permanently display the last measures done. Finally, the system is electrically self-sufficent thanks to a 8x20cm photovoltaïc cell and a 1.5Ah battery. They are connected to the Nulceo with a LiPo Rider Pro by Seeed Studio. The system is put in a 3D printed box.
As you can see in the synoptic.
The code compiled in the microcontroller via os.mbed.com is named 'main.cpp'. The used libraries are available in the followed link, what is our project mbed: https://os.mbed.com/teams/Green-Team/code/greenhouse_proj/
Step 1: Networking
An important part of this project was to network measurements and make them easily accessible. Every 10 minutes, sensors measure differents parameters and a sigfox TD1208 module is used to transmit its measurements. The results are available on the Actoboard website :
After creating a bluemix account, we can use the Node-red application to display our results graphically.
Programmation on Node-red to recover informations from Actoboard
Public link to view results in real time : https://node-red-as.eu-gb.mybluemix.net/ui/#/0
Step 2: Components
For this project here is a list of the main components used:
Microcontroller : Nucleo STM32L432KC
Display : LCD screen
Sigfox : Sigfox module
About the sensors :
- Air sensor : DHT22 (Temperature and moisture)
- Luminosity sensor : Light sensor
Power supply :
- LIPO (alimentation adaptator Card)
Step 3: Consumption
One of the most important point of our project is that the system must be autonomous in energy. For this we use a battery and a solar cell. The battery can deliver a current of 1050 mA in 1 hour with a voltage of 3.7 V : 3,885Wh. The solar cell is used to recharge the battery, it delivers a voltage of 5.5 V under 360 mA --> a power equal 2 W.
Theoretical consumption of our system : - Temperature sensor DHT22 : at max 1.5 mA and at rest 0.05 mA - Grove temperature sensor: max 1.5 mA - Light sensor : 0.5 mA - Nucleo Cart : + 100 mA - LCD display : 20 mA - Sigfox TD1208 module : sending 24 mA (in this project, nothing is received with this module) and at rest 1.5 μA
At rest, the consumption is negligible compared to the power of the battery. When the system goes out of sleep (every 10 minutes), all the sensors make measurements, the screen displays the result and the sigfox module transmits these results. It is considered that all components consume a maximum at this time : we use about 158 mA every 10 minutes so 6 * 158 = 948 mA in 1 hour. The battery can hold a little over an hour before discharging completely.
The goal is to spend a minimum of energy to have the least possible need to recharge the battery. Otherwise, if the solar cell does not receive sunshine for a while, it could not charge the battery that would discharge and our system would turn off.
Step 4: Design PCB
Let's start the PCB part !
We had many problems for a step that we did not think we would take us so much time. First error: not having saved the PCB in several places. Indeed, the first PCB realised was deleted when the USB had some problems. Now all the files inside the USB are not accessible. Suddenly, it was necessary to find the necessary energy for this puzzle for the industrialization of our project. Small detail that remains important, it is necessary that the connections are all at the bottom side of the PCB and that one establishes a plan of mass. Once the courage found , we can do again the electronic scheme on ALTIUM as you can see below :
It contains the sensors, the Nucleo card, the Sigfox module and the LCD screen.
We switch to the PCB's part, we loose so much time on it, but at the end we succed it. Once printed we test it ... and here is the drama. The half NUCLEO card is reversed. We can also look at the diagram above. The left NUCLEO branch from 1 to 15 starting from the top, while the branch of the right 15 to 1 also from the top. What makes nothing work. It was necessary to recover his mind, to repeat for the 3rd time the emergency PCB paying attention to all the connections. Hallelujah the PCB is created, we can see it in the picture below:
Everything was perfect, the welds made by Mr SamSmile were of incomparable beauty. Too good to be true? Indeed, one and only problem:
Zoom it in a little closer:
We see that on the map on the right on which the PCB is based on an SDA connection on D7 and an SCL on D8 (exactly what we need). However when we tested with the components we did not understand the inconsistency of the information received, and suddenly when we looked again the documentation on the second documentation we notice that there is no specificity on D7 and D8.
As a result, our breadmaking works very well before adapting the connections on the PCB for easy routing. But once on the PCB not modified we get to receive the information despite all the sensors except the light sensor in this version.
Step 9: Design 3D BOX
Let's start the 3D design part !
Here we explain the 3D design part of the box to welcome our complete system. She took a lot of time and you will understand why. To summarize: We must be able to contain in our box the PCB and all its associated components. That is to say, think of the LCD screen but also all sensors by providing a space for each of them so that they can be usable and effective in their measurements. In addition, it also requires the power supply with its LIPO card which is connected to a battery and a photovoltaic panel that makes our system autonomous. We imagine a first box that will contain the PCB, all the sensors, the screen and the LIPO card connected to the battery. It is obviously necessary to foresee a specific place for the LCD screen, the light sensor (if it is hidden or on the side it will not receive the real light), for the temperature sensor, for the DHT22 it is necessary that it can measure the value close to the plant and without forgetting the grove moisture sensor which must have a contact with the direct earth. We do not forget the hole to connect the antenna to the module sigfox and another hole to pass the son of the photovoltaic panels to the map LIPO. Here is the main box:
We need a part to accommodate the photovoltaic panel and connect the panel to the LIPO board.
Here is the result :
We must be able to close this wonderful box!
Here is the adapted lid:
As we can see, this is a lid that has teeth that come inside the main box for better stability.
Here is when we add it on our wonderful box:
To gain resistance is added a sliding door which is introduced in the box but also in the lid which holds the two parts in a rigorous manner and provides reliability and of the security of components inside.
Here is the first version of sliding door:
To go even further, we thought to incorporate the photovoltaic module to the main box, so that it is at the same level as light sensor and its strategic position and to feel that the autonomous system is something of 'United.
Here is the second version of the sliding door with the possibility to clip the photovoltaic module previously presented:
Here is when we add it on our wonderful box which already has its superb lid:
You're a little lost ? Let us show you what is the final state of this magic box!
(Damage that we could not print it for now thanks to the 3D printer because I was asked for robustness, something I did, but I must believe that I have a little too much, in fact of the thickness being greater than 4mm , so I was not able to print it because would took to much material, too sad) ... But it is not too late for print it, at least if only for pleasure = D
So beautiful :