Have you have ever wanted to collect weather data from a dev board that is further away than your backyard! Well I have something cool to show you. This is my Weatherproof LoRa Environmental Monitor. A Pico-based weather station that transmits its data through long-range radio (up to 10km) to display on this gorgeous dashboard. All this data is accessible from any internet connected device. Its completely battery-powered, conserves energy with a power timer and better yet all software aspects are completely FREE.

Transcript

Hey gang, Tim here at Core Electronics. Have you ever wanted to collect weather data from a Dev board that's further away than your backyard? Well, I have something cool to show you. This is my weatherproof lower environmental monitor pico-based weather station that transmits its data through long-range radio up to 10 kilometers to display on this gorgeous dashboard. All this data is accessible from any internet connected device. It's called completely battery powered, conserves energy with a power timer, and best yet, all the software aspects are completely free. Let's crack on in!

Before demonstrating exactly how I built this, let me show you my favourite features. This station accurately senses temperature, humidity, and air pressure, provides an air quality index number, and measures the volatile organic compounds and the carbon dioxide amounts in its direct environment. It does this thanks to the PiicoDev BME-280 and the ENS 160 modules. Environmental sensors are a common tool for the maker, but solving the problem of collecting that data in remote areas can sometimes cause some head scratching. That's why we use the Makerverse LoRaE5 breakout and the Things Network. LoRa encodes data in a chirp signal that can travel really long ranges, and the Things Network consolidates it into the internet. This method of communication is best suited for small parcels of information, whether GPS or soil moisture data are great applications.

With the data on the internet, the IoT platform Data Cake allows me to create and set my data dashboard publicly, so anyone in the world can jump in and see exactly what's going on with the weather around Core Electronics. Link to my public website in the description. As you can see, the full dashboard shows the current data, historical data, an image of the device, and even the location of the device. Data Cake even makes it easy to create mobile-friendly dashboards. Better yet, using Data Cake, I have scheduled periodic emails to myself of all the data received over the week. That means I will not lose any historical data ever. Also setup is an email warning me if the device has remained offline for too long, so I know exactly when to replace the batteries in the system. Furthermore, Data Cake will let you set up threshold triggers. I have it set up to trigger me an email whenever the air quality index number gets higher than five. That way, I know the instant there's something potentially dangerous going on and I can run away.

In deep sleep, this system consumes a really tiny 35 nanoamps. That means right here we have a very long lasting system. Check the description for updates on how long my real life field tests actually lasted. On the table before me is everything I utilize to make this project a reality. We have a Raspberry Pi Pico, a Makerverse LoRaE5 module, we have an antenna to go with it, a PiicoDev air quality sensor and atmospheric sensor, we have a Makerverse power timer HAT and three AAA batteries and a battery holder. I have also used this waterproof Stevenson's screen case in combination with these 3D printed and laser cut components to mount all the hardware inside. To connect it all together, I have used some Dupont jumper cables, PiicoDev connectors, some M2.5 screws and standoffs, and finally I used a data capable micro USB to USB cable and a desktop computer to program the Raspberry Pi Pico from start.

With that all electrical connections are now complete and your setup will look like this, we will now mount this whole assembly onto the laser cut acrylic mount using standoffs and fasteners when appropriate. Now bring in that 3D printed PLA mounting bracket and attach the whole assembly directly to the bottom of the weatherproof case. Orcad and SVG files to make the case mounts as well as the wiring schematics can be found in the full written up article.

And with that all built, connect up your Raspberry Pi Pico into the USB port of your computer. In software time, so I jumped into Thonny IDE and threw in the necessary scripts to make this run. All the scripts can be found at the bottom of the full written up article. Then I set up my lower device with the things Network. Come check out my the things Network guide linked down below which shows you step by step exactly how to do this.

This will demonstrate exactly how to weave the virtual fabric between these two systems, the things Network and Data K. Start by setting up an API key in the things Network. Jump into the console of the things Network and click on the API Keys found on the left side of the screen. Click add API key and fill out the form. Make sure to click the options that I have clicked here. This will create a special API key and throw up a window like that. Make sure to copy it to your clipboard and save that API key. You're going to need it very soon.

Now it's time to create an account with datacake. Click on the account making link down in the description to start this process. This service is going to facilitate our visual data dashboard. With that complete, it will now open up into the devices home page. From here click on ADD device. On screen now are the steps to take when adding a LoRaWAN new product device. When you get to Stage 2 make sure to select the things stack version 3. Be ready with your Dev eui and other secret numbers which you can find in the things Network console. Be aware that you should keep these numbers secret but for tutorial use today I'm showing you everything.

As soon as you finish that wizard you will now be able to access the dashboard page. From here click on configuration. Fill out the configuration page appropriately as you can see me doing now. When you get to the low raw ad section click on the button change found next to the things stack version 3. With that button clicked you will now have this form. Fill it out in a similar manner to me. Know that the TTI API key is the one we created at the start of this section. Copy and paste it in. With that done and everything happy is now going to look green with the words downlinks configured.

We are now at the payload decoder section of the configuration. We require a JavaScript decoding script so we can turn our data into numbers readily understood by data cake. The JavaScript you need is found in the main article. Smash a copy and paste it into the coding section. You can even test it in the browser with the example LoRa payload found at the top of the example. If your system is looking like this now know that you're getting really really close. Scroll down a section lower and you're going to see The Field section. For each measurement that we want to capture we need to fill out a unique field for them. Do so for each Unique Piece of data by clicking on the add field button. Then once all the fields are completed run the main.py script on your Raspberry Pi picot. All going well the edge collected data from it will now present itself in the completed Fields list. Go ahead now and put some batteries into the timer app.

The process of filling out a complete dashboard becomes quite intuitive once you play around with it. Doing so is actually proper fun. For demonstration, I'm going to create a gauge for temperature. Navigate to the dashboard like so, click on the toggle on the far right of the screen. That's going to enable you to edit your dashboard. Whenever you swap that toggle back, it's going to save what you have created. Now press the add widget button. There are lots of fleshed out choices here, which is awesome. The temperature, click on value. Doing so will now present the edit value widget window. Fill out all the tabs like I'm doing here. With that complete, click save and untoggle that top right slider. You will now have created a temperature widget showing the most up-to-date temperature. It also acts like a gauge, moving up and down smoothly as new data comes in. It shows the minimum and the maximum range of the BME-280 chip of the PiicoDev atmospheric sensor, so it is always going to provide you accurate readings.

Continue forward using this same method and your dashboard will be fully fleshed out in no time. Know that you can also set up mobile friendly web pages using this exact same method. Just click on this button here. So with that all complete, all that was left for me to do was install it. All those extra features like setting up a public web page, setting up periodic emails, setting up threshold triggers and out of battery alerts are easily done inside Data Cake. Check the write-up linked down below if you need a hand with any of it. Also know that you can see all the data that's been saved by Data Cake on the histories page as well. You can of course turn that emailed CSV file into great graphs using software like Excel, which will provide you with even more options. And that's that.

I'm a full-time maker with great knowledge of the weather and I'm always happy to help. So until next time, stay cozy.

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.