So, the project I am making will be great help to the agricultural field, where we need to run several tests on the soil before we can start plantations.
Now, my EnvironmentCube is a smart cube which just needs to be placed in soil and then leave the rest of the work to the cube. It is equipped with several high quality sensors which will measure almost all the factors that are needed to be considered when we are testing the land.
It will measure the salinity level of the sand, water content, temperature, humidity and the air quality of the surrounding environment which will be a great help.
Now, the readings can be accessed readily from the Thingspeak api with the help of sigfox technology at the backend part.
Now the steps to create this project are :
1.) Constructyourown3 D printedcube: Now the first step is to make the casing of your cube. Keep in mind that you need to fit a small power source for your arduino nano and the Bluetooth module, keep holes for the sensor outlets and make the cube such that you can open and close it whenever you want. I didn't have access to a 3D printer so I cant share an image of the box I used.
Now that you have your cube casing ready, lets proceed to the next step. Now we will connect out sensors to the arduino MKR fox 1200 board which have 7 input pins available, which would be enough for our sensors.
We will use a custom size breadboard for parallel voltage outputs for our sensors. The connection process of sensors is described for arduino UNO, the same connections will be made to the MKR board.
Now that we have all the hardware connections ready, lets get our software part ready.
3.) Setting up the software part for obtaining readings:
Now we set up our board and configure it with the sigfox first.
The first step is the official page of Arduino MKRFox 1200:
After this, you must register your Sigfox board. You can follow this steps:
SigFox First Configuration: https://www.arduino.cc/en/Tutorial/SigFoxFirstConf...
This procedure registers your board and connects the board to the internet network.
You will require this steps to access the readings of your board on the thingspeak dashboard using its API.
Now, the next step is creating a thingspeak account.
Now, after your account is created, you can create a new channel. Now your channel can receive the data from the Sigfox backend. For this reason, you must select the API key of your channel and add to the URL in the Sigfox Backend system. Go to API keys page and write your API keys on your Sigfox Backend page. See the next step.
1 / 2
Create a new Callback command on SigFox backend portal.https://backend.sigfox.com
Click on Device type and after click on "Callbacks".
Select Type DATA and Uplink
Select Channel URL
Add this line to "Custom payload config":
status::uint:8 temp::int:16:little-endian t::int:16:little-endian h::int:16:little-endian
Select "Use HTTP method" GET
Add this line to your Callback. Modify the ############# with your Thingspeak api key.
1 / 2
First of all, install the Sigfox library on your Arduino IDE. This is the Arduino libraries. You can see the official guide to add the Arduino libraries: https://www.arduino.cc/en/Guide/Libraries
Install the Arduino Low Power libraries, Sigfox and the required libraries for all the sensors what we use.
In the callback data on the backend page, there are the names of the variables of your Arduino code. See inside the code.
t = dht.readTemperature();msg.t = convertoFloatToInt16(t, 60, -60);h = dht.readHumidity();msg.h = convertoFloatToUInt16(h, 110);[...]msg.moduleTemperature = convertoFloatToInt16(temperature, 60, -60);[...]SigFox.write((uint8_t*)&msg, 12);
The code catches the Temperature and Humidity data by the DHT-11 sensor, and convert the data to "int". After sending the data to the Thingspeak platform by using the SigFox.write command. Now the same process is followed for all the sensors that we are using.
Now, the biggest advantage using this arduino board is that it is a low energy device so it is possible to power that whole cube with just a battery, which makes it a very compact device.
I have attached a sample arduino code for the temperature and humidity sensor so it will be easy for you to write the codes for the different sensors, you just need to simply import the specific libraries and modify the pin numbers, and use the sigfox.write function to send the data to thingspeak dashboard for monitoring.