LoRaWAN Environmental Sensor Live | Google sheets Helium Integration Tutorial | DIY helium Miner

0 48006 Medium

Hey, what's up, Guys! Akarsh here from CETech.

In the article before the previous one, we made a Helium Node using the Wisblock Technology-based RAK Helium Developer Kit. You can check that article out from here and the video description of the project from here. In that article, we made a simple Helium node connected to a data-only Hotspot, and through that hotspot, we received the data sent to the node on our Helium Staging Console. Now in this project, we are going to upscale our previous project a bit. We will make an Environment Sensor node using the RAK1906 Environment Sensor from the Wisblock based Helium Developer Kit. We will connect that node to our data only Hotspot. But in addition to the previous article where we received the data on the staging console and decoded that to retrieve the original message, We will use the Integrations available on the Helium Platform. We will use the Google Sheets Integration and with that, we will be able to receive the data in a Google Sheet in the form of a spreadsheet. The data will be stored there but we can also check the live data flow on the Staging Console as well. Sounds Interesting? Indeed it is and when you will get your hands on it. You will also understand how easy it is to make this project. So let's jump straight to it.

 

Get PCBs for Your Projects Manufactured

projectImage

You must check out PCBWAY for ordering PCBs online for cheap!

You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. Check out their online Gerber viewer function. PCBWAY takes care of its customers a lot that's why they offer reward points with every purchase that you make from them these reward points can be redeemed for various useful items from their gift shop.

 

 

About RAK1906 Wisblock Environment Sensor

projectImage

RAK1906 is a WisBlock Sensor that extends the WisBlock system with environmental air quality and condition sensors. A ready-to-use SW library and tutorial make it easy to build up motion data acquisition system.

RAK1906 is not only measuring air temperature, humidity, and barometric pressure. It has as well an integrated gas sensor to acquire information about air quality. RAK1906 combined with the RAK4631 WisBlock Core is ready to go system for air quality and condition system. Its use cases are personal air quality trackers, weather stations, or gas detection, The acquired data can be send using LoRaWan communication, LoRa point-to-point connections, and BLE. RAK1906 is ideal for battery-powered applications because of its low power consumption. In addition, the WisBlock system allows to power down the module completely to reduce the power consumption of the system even more. Some Features of this Sensor are:-

Using the Bosch BME680 environment sensor

Low power consumption

Small form factor

Temperature range: -40°C to +85°C

Humidity range: 0% to 100%

Pressure range: 300 to1100 hPa

Gas sensor response time < 1s

Gas sensor direct output of IAQ: Index for Air Quality

You can check out the datasheet of the sensor form here to get more details about the sensor.

 

Setting up the Node

projectImage

In this step, we will set up the Environment Node. We will complete the Hardware setup first which is just a simple connection of Sensor with board and after that, we will complete the Software setup. Now moving on to the Hardware Setup we need to Take the Wisblock RAK4631 Core module to connect the LoRa Antenna to it and after that, we need to connect the RAK1906 Wisblock Environment Sensor module to the Port-A of the Core module and we are done. That's it on the Hardware side. Now we need to connect our Core module to our Laptop and start setting up the Software part of the Project.

 

We need to follow the steps given below to complete the setup:-

 

Before programming the Node made by us. We need to make sure that our Arduino IDE is loaded with RAK boards and other related libraries. We did all of that in the previous article which you can access from ​here.

projectImage

Once the Arduino IDE is ready. We need to head over to the Github repository for this project from ​here. In the Github repository, there is a file named "​Helium Environment sensor.ino". This is the code for this project and we need to open it in our Arduino IDE.

 

projectImage

Now as the code is open we just need to add the OTAA keys in the code at relevant places. To get the OTAA keys we need to go to the Helium Staging Console. You can open that from ​here. On the Staging Console we need to Add a New Device for that we need to click the Add New Device button and after giving our device a name, We can save our device.

projectImage

Now in the list of devices, Our newly added device will appear. We need to click on that device and the Device details page will open up. There you will see your Device EUI, App EUI, and App Key. We need to expand those keys and after that, we need to copy and paste these in the code at their relevant places according to their name.

So with this, our code is ready to be uploaded. So we just need to select the correct board, correct COM Port, and then we need to hit the upload button.

projectImage

Now to check that our node is working or not. We can open the Serial monitor and there we will see things like node has sent a Join request and some other status details as well.

 

projectImage

We will now move on to the Staging Console to see the Live data visualization. There we will see that the Join accept was sent by the node and that was accepted by the Hotspot. When we open the Debugger, we will see the environment data sent by the Node. The payload field in the received data packet is our message but it is an encoded one and is not human readable. So for that part now we will use the Integrations available in the Staging Console

projectImage

Now as we need to add an Integration so we will click on the Integrations button. The Integrations window will open up. In that window, we need to click on the Add New Integration button. It will open up all the available Integrations. Out of all these Integrations, we will select the Google Sheets one as we need to log the Environment data in the form of a Spreadsheet.

projectImage

In the Google Sheets Integration. we need to add enter a Google Form ID from where the data is to be collected. So we will first create a Blank Google form.

projectImage

In the Google form, we need to create 4 fields where the data gets logged. We will create them with the names: Temperature, Pressure, Humidity, and Gas. For all the fields, we will keep the datatype as Short Answer.

projectImage

With this our Google form is ready. Now we need to click the send button. The pop-up showing various sending modes will open up. From that, we need to copy the sharing link and paste that in the Google forms ID tab present on the Integration page.

projectImage

Out of the link that we pasted, we need to remove the part other than the Google Forms ID. So we will remove all the things from the link other than the middle part which is a bit longer compared to the other parts. After removing the extra things we will be left with an ID without any forward and backward slashes in it.

projectImage

Then we will click on the "Get Google Form Fields" button. The fields that we entered in the form will appear on the page. Now we will click the "Generate Function Body with fields above" button. Now we need to give a name to our Integration.

projectImage

Now in the update function body box, we need to update the decoder function with our own function. For that, we need to go back to the Github repository of the page. There is a file named "​Console Decoder" we need to open that file, copy the whole code and we need to paste our code in place of the pre-written code.

projectImage

After this, we need to click the Add Integration button. As the Integration is added, a page will open showing various details of the Integration. Now we need to connect our Integration to the Device that we added in the initial steps. For that, we need to open the "Flows" tab.

projectImage

In the Flows tab, we need to add a node. We can create a node by clicking on the Nodes button. As we click the Nodes button, we will see a Devices tab that we need to open. In that tab, the name of our added device will appear.

projectImage

We need to drag and drop that on the Flows page next to the flow which shows the Integration that we added and we need to connect those by dragging the left mouse button from the bubble on the added node to the bubble on the function node and we need to save the changes that we made.

So this was the detailed step-by-step ​procedure of doing the hardware and the software setup of the Environment Sensing Helium Node. There are some minor details in the setup that you can miss by only reading the steps. So I will recommend you to check the video once from ​here to get all the steps done perfectly.

 

Checking the Google Sheet

projectImage

Now as we are done with the Complete setup of the Node we will check if the Node and the Integration are working or not and we will also check the Google Sheet where the data is getting stored. For that first, we need to go back to the Google form that we created. On that page, there will be a tab named Responses. We need to open that tab. In that tab, there will be the environment data that is received by the hotspot. But that data is not in the form of a spreadsheet. To open that data in the form of a spreadsheet, we need to click on the Sheets button present on the Responses page. A pop-up will open up asking us to create a new spreadsheet or adding an existing one. We need to click on the Add a new spreadsheet button. This will open our spreadsheet.

projectImage

We will see some data added to the sheet and after a regular interval, we will see the data getting updated into the Sheet. We need to check the data on the Arduino Serial Monitor as well and with that, we can cross-check the values that are being added to the Spreadsheet. So this was it for this project. See how easy it was to create a Helium node and getting our data published on Online servers like Google Sheets. etc. We can use more Integrations that are available on the Helium Console such as the Adafruit IO, Ubidots, etc.

projectImage

We can also add our own Custom Integration as well like the Reyax MQTT Broker that we used in one of our previous projects. You can check that out from here, Youtube video of that project is also available which you can check out from over ​here. We also made a Data only hotspot in one of our projects, You can head over to that project from here and the video of the project can be accessed from ​here.

So this was it for this project, I hope you liked the project. We will be back with some more interesting projects soon.

License
All Rights
Reserved
licensBg
0