Introduction: The Floger : a Device to Monitor Weather Parameter
A small connected and AUTONOMUS device to monitor several usefull varaibles to help you gardening
This device is designed to measure different weather parameters :
- Floor and air temperature
- Floor and air moisture
display it on a lcd screen and also send it on actoboard via a sigfox module (you may also send it from actoboard to an other device or database but we won't talk about it in this Instuctable).
As I said the divice is autonomus so of course we will use a baterry powered by a solar panel but the most important thing is that the device will mostly never be in use : indeed we will program it to take measurement only every hours for example or unless you ask it to measure rignt now. So at the end the device we be in use less than 30 secondes every hours.
- We will use Mbed to load the code, which I will generously share :'), in the microcontroller so if you are familiar with it it's a plus (if you are not don't worry I will explain it step by step).
- I am also giving all the files to make your pcb so you will just have to print it.
Step 1: Components
For this project I used sensors of course but you will also need microcontrollers and an alimentation system.
Here is the list of components I used :
Floor sensors :
Air sensors :
- Temperature and moisture : temperature and moisture of air are on the same sensor
Luminosity sensor :
Microcontroller cards : We will use 2 microcontroller
- Solar cell
- Alimentation adaptator Card : On this card we will connect the battery and the solar cell (so the battery will be able to charge). On the other side of the alimentation card we will connect the STM32L432KC with an USB cable to power the entire system (in 3.3V).
- The sigfox module will allow us to send our data to actoboard
Step 2: PCB and Code
To start I will share pcb's files. They are on a format that will normaly work on most of the printers .
To print it you can easily find an electric/technical shop that's will be able to do it.
You will have to make severral VIA on the pcb (don't worry they are indicated)
- First step you have to create an account on MBED
- Once this is done just click on the following LINK you will have access to the project (in read mode only).
When you have reached to the mbed project with the previous link import it to your workspace (compiler).
Then connect your STM32 to your computer, compile the main file on mbed and copy this file into the STM32 (with a simple copy/paste).
Step 3: Wiring the Components
/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\
This step is only here to show you how to connect the components together IF you want to test them on a labdec for example and because it's always good to know how things works otherwise you can skip this step and just set the components on the pcb they will be connected
/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\/!\ /!\
Here you have 3 schema about how to wire all components together.
PS : obviously RED cable go to 3.3V alimentation and BLACK cable go to the ground.
For the beging if you just want to test all the componenents you can do it without the alimentation part by connectiong your STM32L432KC to your computer.
Step 4: Actoboard
On this part I will explain you how to set up your account on Actoboard retrieve all the data sent by your Sigfox module.
Frist of all go to Actoboard website and create an account
Once you're done create a new data source (image 1).
Will have to find Akeru (image 2) then when you get it and clic on it you will arrive to the "Connect your Akeru device" window (image 3).
Enter the name you to give to your data source, its modem number and PAC (this 2 informations a given on you sigfox module, they are unique).
The last part is setting the format of data you will retrieve :
lum::int:8 temp_A::int:8 hum_A::int:8 temp_S::int:8 hum_S::int:8
DO NOT change the format unless your also able to change the code i gave you (at least you change the name but not format or number of bite).
So in order you have : luminosity (lum), air temperature (temp_A), air moisture (hum_A), ground temperture (temp_S) and ground moisture (hum_S).
Now you can verify, if Actoboard receive messages from your Sigfox module, on the right of the same window (image 4). Furthermore, you can get in shape your data with a dashboard, for it : Create a new dashboard, click on it and add a new widget (image 5). Now a new window named "Add widget" is openned (image 6), click on the second tab "Widgets", and choose one.
Here, for exemple, i will show how to display the value of the luminosity. So choose the second widget "Value" and tmodify the Widget settings (image 7), add a data set and choose witch variable you want to display. Now if you return on your dashboard the value your variable will appear (image 8).
Step 5: Display Issues
In this section I will tell you what values are expected from our sensors and how you can check them.
If you have done everything right from the start, by now you should have valeus on your screen and actoboard
If this you do not see anything on screen nor on actoboard
- First of all please check all your connections between sensors and microcontroller.
- If you are sur about your connections its might be your LCD screen (they are a bit fragile). You should still have the value on actoboard if you properly followed the last step
In case you are having some issues setting up actoboard here is a third way to have your values : Putty
How to use Putty :
- Connect your device on your computer and open windows peripheral manager and find on which port your device is connected (picture 2).
- Then open Putty and select serial (red in picture 3) and inquire the COM port number u found in previous step (orange in picture 3).
- Click on OK. A console will open displaying values
Step 6: Thank You
Thank you if you tried to make your own FLOGER :) or even if you just read this !
If you have any comments, questions or improvement feel free to share !