Raspberry Pi Pico Long Range Radio (LoRa) Weather and Air Quality Station - Full Dashboard (DataCake + TTN), Rain-Proof and Long Range

I have just shared content in Guides > Wireless “Raspberry Pi Pico Long Range Radio (LoRa) Weather and Air Quality Station - Full Dashboard (DataCake + TTN), Rain-Proof and Long Range”





Read more

3 Likes

You guys really are another level as not only do you share a video setting things up but you also include all the necessary documentation and scripts!

Truly sensational work there Tim and I love how it uses readily available components plus the addition of LoRa-E5 is fantastic so I look forward to trying it out during some spare time and once I purchase some missing bits.

Your work is greatly appreciated!

3 Likes

Hey Razor,

Big love :heart:! I give 100% on every piece of content and I appreciate that you appreciate it :blush:. LoRa is properly rad too.

Kindest regards,
Tim

3 Likes

Hi Tim,
just following this though, although I intend trying a Cube Cell for my LoRa connection. I’ve noticed a few things that may help others.

  1. I think most Pico’s with headers have male headers, so stacking on the Power Timer leaves no sockets to make the LoRa-E5 connections. The Power Timer also has poor markings for orientation. GP0 seems to correspond to the pin marked ‘1’ on the Pico.
  2. To get around unsoldering headers, I’ve used a PicoDev Pico expansion board that I had on hand.
  3. Your explanation says the Power Timer will turn on every 1 hour, but you have not said that you actually have to set SW1, otherwise it defaults to 2 hours.

Also, do you have dimensions for the perspex so I can drill/cut some I have to suit this project?

regards
Dave

2 Likes

Heyya Dave,

Thanks for adding to the conversation! I’ve added those facts about setting the Power Timer HAT and selecting good headers for the Pico (female, facing upwards) to the guide.

The SVG file for the perspex can be found in the ZIP file at the bottom of the guide. That’ll provide you with all the dimensions needed :blush:. Just to cover all bases I’ll add an STL file representing the Laser Cut Part to the guide right now.

Very much look forward to seeing your Cube Cell, please share your progress!

Kindest regards,
Tim

1 Like

Thanks Tim,
found the SVG, but I’m not running any CAD software at the moment and it just defaults to displaying the overall shape in MS Edge. The STL just loads Paint.

Regards
Dave

2 Likes

Hey mate,

Check out the image below for all the dimensions of that plate. All dimensions are in mm. That should get you right into the thick of it :blush:.

Kind regards,
Tim

1 Like

Thanks Tim

2 Likes

Hi Tim,
Read your LoRa project and I find it very interesting. I am in the process of putting all components together to make a trail run. Since I live in Kiel, Germany I can not buy the MKRVRS LoRa-E5 board. A LoRa-E5 mini from Seee Studio was offered as substitute. Do you have any idea how I may be able to access the UART serial comm. from the Pi Pico. I am planning to use your Pico sooftware. Any suggestions ?

2 Likes

Tim,
having trouble getting the CubeCell to talk on it’s TX and RX pins… not helped by test_uart_connection(): returning LoRa-E5 detected. when it’s not connected or communicating.
I suggest you say LoRa-E5 NOT detected, and also looking for a specific ID string rather than just the +AT: OK.

Regards
Dave

1 Like

Hi team,

I’m having trouble understanding how the power timer HAT works. I’ve copied the code used in this tutorial and set the timer HAT to shut-off after 20minutes for testing. Once the Pi Pico sends the final HIGH (1) value to GPIO22, it should shut the pi off until another 20 minutes elapses if I am correct. So if this is right, the actual execution time for the code does not count itself to the timer right (basically the timer is not counting time when power is enabled for the Pi?).

Additionally, I ended my code (prior to the GPIO.value(1) command) with a led.on() statement to see if the led would shut off, which would indicate no power. However, the led never turned off. Is there something I am doing wrong or have I received a faulty power timer HAT? Any help would be appreciated.

EDIT: For those with the same issue, the problem is in the provided source code. The final try/except stops the code from going further to the sleep command as the program exits if it cannot connect to TTN (join_the_things_network). To fix this, add a ‘finally’ statement after the except block and add the GPIO sleep command there for it to work. This is quite an oversight/crucial to the project as the battery would continue to drain without anything being executed. Additionally, after testing, it seems that code execution time while the Pi is powered is counted as a part of the timer, so this is something to keep in mind if a higher frequency is used, as the pre-set times will be lower by the amount your code takes to run.

Thanks

2 Likes

Hey Bo,

You should be smooth sailing with that LoRa-E5 Module using our exact code in regards to accessing the UART Serial communications. You can also directly connect it to your computer as there is a built-in USB to UART function on board. So if you connect the LoRa-E5 mini to your PC with a USB type C cable, you can use serial communication software to send AT commands and read data from the board.

If you would like to see a whole bunch regarding that version of the LoRa-E5 Module come check here. Just be sure to set it up so that it uses the Radio Frequencies appropriate for your location in Germany.

Come pop back and write more messages if you need any extra help :blush:.

Kind regards,
Tim

1 Like

Hey Dave.

I don’t have experience with that CubeCell board. I have found some helpful forum posts regarding it that I will link here and here.

Also sometimes just swapping the RX and TX pins can be the solution to these kinds of problems. The silkscreen PCB notation is not always correct.

Hopefully, from those, you will be able to progress in your project.

Kindest regards,
Tim

1 Like

Hey Manny,

Thanks for improving my knowledge regarding the Power Timer!

And an even bigger thank you for drastically improving my script. You’re absolutely correct, it is crucial that the system reaches deep sleep mode even if it has failed transmission and that code update is the final piece to the puzzle. I thought I had addressed it by adding those | Try | Statements but I suppose not. I’ll be sure to update the script to incorporate the | Finally | statement :blush:!

Also for anyone else interested, check out the product page for more information and this guide as well (which is a very similar board, just in a different form factor).

Just so we are all on the same page, below is what the bottom of the | main.py | Script will now be. I presume your script would look exactly the same.

Kindest regards,
Tim

2 Likes

Thanks Tim,
got distracted from this for a while, but I had it talking. I still need to work out the AT command differences.
Dave

1 Like

Hello Tim,
Thank’s for your reply. First I will test the direct connection to my Mac via the LoRa-E5 USB to UART function. After that I am planning to solder wires to the TX and RX pins of LoRa-E5 module to my Pi Pico UART pins and run your SW code.
Best regards, Bo Mathisen

1 Like

Hello Tim,

Just found what I have been looking for: weather station using LORA.
I will start with the one you have described here, but looking for using a weather vane for direction and a wind speed indicator, which both I alredy have bought, but not studied yet.
I will come back later with questions, be sure :slight_smile:

Regards
Tom

https://www.ts20.no

Hi,

I’ve been using the Lora-e5 for a couple of weeks now, however, I cannot get ADR (adaptive data rate to work with TTN). I’ve set ADR to ON and have not used any force set AT commands to set txpower. I have also left the data rate at its default of DR0 SF12BW125K.

I can see on my gateway that the ADR bit is set to 1 on both the uplink and the downlink of the TTN server. However, I am not seeing the rate changing from the worst scheme (SF12) to something much faster even though I am testing it near the gateway within 5 metres.

Looking for some help or config that shows this working. Let me know if any further details are needed.

Thanks
Manny

1 Like

Hi Tim
I’ve been using a BLE Nano outside with temp/pressure/humidity sensor but have had problems with BLE range and reliability, so am keen to give LoRaWAN a go. I have available access points that should be within range, but am particularly interested in the battery life - is there any update on this?
Thanks
Mark

1 Like

Hi @Manny149192,

How long are you waiting between setting the ADR to ON and observing the data rate? TTN’s docs on ADR (Adaptive Data Rate | The Things Network) mention the following:

To determine the optimal data rate, the network needs some measurements (uplink messages). Currently The Things Stack takes the 20 most recent uplinks, starting at the moment the ADR bit is set.

You did mention you have been using the Lora-E5 for a couple of weeks, but I just want to check if you’re waiting long enough for TTN to run it’s ADR algorithm before observing if the data rate has changed?

Cheers,

Jacob

1 Like