switch off
You will have to add a switch between battery and the LoRa32u4 yourself.
Hi all,
I am using the lora32u4 Board (V1.3) for the temperature acquisition of the DS18B20 sensor and I send the data packet through LoRa (SF = 7 and 125K). I put the board in sleep mode (20 minutes between two sends) to save the battery, and I tried both possibilities:
LoRa.sleep ();
For (i = 0, i <150, i ++) { // 150*8s=20 minutes
Watchdog.sleep (8000); // first possibilitie
//LowPower.idle(SLEEP_8S,ADC_OFF,TIMER4_OFF,TIMER3_OFF,TIMER1_OFF,TIMER0_OFF,SPI_OFF,USART1_OFF,TWI_OFF,USB_OFF); // second possibilitie
Unfortunately I have a consumption of 20mA per day. which I find huge. Is there a way to save more energy?
Thank you
I think you do it right, with battery 450mAh I have 29 days uptime but TX every hour SF9 +14dBm: 15mAh. So I think you are fine since you TX ever 20’ vs 60’ but we don’t know your LoRa chip / SF / +dBm.
LoRa.sleep(); is unknown to me, I am using TinyLoRa. Maybe you will have benefit if can lower TX power or/and SF.
Since you want every 20’, maybe it’s better to use someting like TPL 5110 Example.
Like many other popular LoRa ‘development boards’ BSFrance LoRa32u4 was not designed for true low power applications.
There are additional components on the board (e.g. voltage regulator and battery charger) that will draw power when the MCU is in deep sleep
Do you mean 20 mAh per day?
Have you measured current usage of the board during normal operation and during deep sleep?
According to this post deep sleep current is around 230 uA (max), which when the board would be in deep sleep only would consume less than 6 mAh per 24 hours.
It’s not clear however whether that was measured for an Adafruit or BSFrance board.
Thanks for you replies.
I am using version V1.3 of BSFRANCE LORA32u4, and I would like to save my consumption in sleep mode. I have a consumption of about 20mAh / day (with a 1200mAh battery I have an autonomy of 60 days). I send a data every 20mn with Lora. and between two sends I use the watchdog.sleep function from the Adafruit_SleepyDog.h library.
Is there a solution to save more? I saw that the voltage regulator consumes a lot in sleep mode !. the fact of putting the EN pin to the mass allows to deactivate the regulator. in this case what is the point of deactivating it ?. Is the only solution left is to use the “Power Timer Breakout” component?
Thanks a lot.
With Adafruit feather 32u4 LoRa I have (after LoRa sleep - custom library): 0.15mA (0.16mA with fully charged battery NiMH LSD), 0.35mA with watchdog. I don’t have professional equipment to measure the mA, but I think it’s accurate.
@elmouss if you want better sleep de-solder battery charger. I don’t know if it’s easy. I prefer to try moteino, or arduino pro mini or 20μΑ - Rocketstream
Thanks clv for your answers.
Can you give me more details about: “after LoRa sleep - custom library”?
library used or part of the code?
Thanks a lot.
Sleeping stolen from gammon
Watchdog is consuming battery, I installed accellerometer to wake up: 0.15mA when deep sleep.
For my deep sleep experiements I added to the TinyLoRa library a sleep function: aka custom-library. I think not necessary. If you send a LoRa message the module it sleeps after send.
Thanks clv for your answers.
Looking at the code, I didn’t understand how to wake up the system (accelerometer ??).
Hello Guys, i need a little bit of help 'cause I’m not a very good programmer. I was able to join TTN using OTAA with BigLoRa v1.2 I’m also able to read a dht22 and send data to the ttn. I’m having bad time trying to implement some sort of sleep function, my goal is to use an interrupt to wake up and send the data to the ttn, but only when interrupt is fired. I’ve not fully understood how the lmic library menage the sending process so i do not know how to control the sleep and the lora message send. If anyone with a little bit of patience can help me it will be very appreciated. Thank You
Hi @AMG_EHU and @marcovanschagen and maybe other experienced Lora TTN enthusiasts! I have a question. Excuse me for bumbing this older thread, but it is applicable for my question.
I managed to get this JuniorIOT project (Lab – Bouw je eigen Lora TTN GPS tracker met de Arduino Lora32u4 – ook voor TTN Mapper – Junior IOT) up and running :-); I got some messages in the TTN console from my Lora32u4 device and I was at the point of working further from there. I want to make a GPS tracker for my boat, and measure battery voltage of my bilge pump.
However, I think with the upgrade to V3 my setup no longer works. I no longer received messages in the V2 console, and never got the V3 console working.
Does anyone know a nice “how-to” that works with a Lora32u4 device on TTN V3, like the JunioIOT one which is very readable and understandable? Thanks in advance!
Hi,
I noticed ‘lmic_slim.zip’ which is probably used as LoRaWAN library.
I have no experience with this library but is is not LoRaWAN compliant which is a problem with V3.
When adding an ABP device on V3 this will require manual addition of advanced device parameters in the console (search for V3 and ABP on the forum).
Another issue is that the LoRa32u4 board, actually its ATmega32u4 MCU has relatively little memory which makes it less suitable for more demanding projects that use the MCCI LMIC library (which is the preferred library for the SX1276 LoRa radio on these boards).
While it is possible to use MCCI LMIC with these boards, the sketches should not be too large or they won’t fit on the ATmega32u4.
Be prepared for some hurdles and learning curves to go through.
Maybe LMIC-node can help you make steps in the right direction.
Also see this thread for some tips to get MCCI LMIC working with 8-bit AVR (ATmega328, ATmega32u4) based boards.
Hi @bluejedi
thank you for your reply! I understand I am not using the right board for what I want to build.
For me it is no problem to change the board for another one, I got the Lora32u4 because of the easy-to-follow JuniorIOT guide in which this board is used, but I am willing to buy another one as long as there is a good how-to description for it … I need that for I am not that experienced
It would be great if you have a suggestion for an example GPS project for me that works on V3 TTN! Later on I can expand it with measurements of battery voltage, humidity, temperature and pressure.
In the mean time I will look into your suggestions to try with the Lora32u4.
Best regards
Frank
Hi, thanks for the compliment!
First of all, we startred this project in 2016/2017 and had to create a LMIC adoption. The Lora32U4 indeed has a small memory, where our LMIC cmpetes with other libraries which we need to read our different sensors. This version of what you could call a library does the trick, however it is not a V3 implementation.
Our code with this ‘library’ is still working, we have rolled out new devices on this code, as late as feb 2021. They are on the V2 version of the network. Yes, we want to port them to V3, without stopping their existing ABP session (meaning, without recoding their keys). Such is possible, but I still have to do this. In the V3 console you will need to enter the ‘old’ settings, which means this approach officially is not advisable.
I have not recently updated the published version of our code. Mostly due to online discussion about not being a suppoerted library. Hmm-kay? However there does not seem to be an other approach to use this device, so maybe I should make things a bit nicer to use.
There are some learnings I need to add for you to make the code work. I believe one of them is that it halts on the serial initialization maybe- look at the // on that line. I have a bit more feedback sitting in my inbox which I can use to improve our flow if you’d like that.
The code does not look at downlinks. which means a setting of 1 second or 5 seconds, is all fine. The updated lora standard does not like that. So you need to set all 8 channels in the v3 console to prevent V3 to send these details as downlink to the device. There may be more. I understand using these devices is now frowned upon, so this can never grow into any commercial lora solution. But for our approach it works great. Until now.
Please send me your learnings.
Did you manage to receive data from your device into the V3 console?
I don’t have any specific suggestion for a board for you. It will depend (as usual) on what your requirements for the board and the software are.
Requirements can cover all kinds of things.
It will be good to define your own clear set of requirements. They will be useful to help you search what you are looking for and provides clear information for others to try help you.
In the mean time have a look at information about LoRaWAN and GPS already available on the forum (Search is your friend).
you are more than welcome, this really is a very nice well-written guide that helps folks like me to step into the world of Lora! I have not found another example/tutorial/guide that is as clear as this one.
I will send you my learnings in a PM, but to answer your question: I got everything running in a V2 console in feb/march 2021 but never in a V3 console.
Cheers
It would be useful to the community if you shared your learnings on this thread - so everyone can benefit.
Yes indeed, unfortunately I have no solution yet to share
The main issue for me now is the configuration of the device in my TTN console in V3.
This project worked fine on TTN V2, however since V3 my device no longer works. So I deleted the device from the TTN console, and created a new one using the V3 console. My question is what configuration I should use for the Lora32u4 device: It is not a preconfigured Brand in the console, so I added it manually. Unfortunately a lot of the required info is not available here, nor here.
As I have no TTN coverage around my house, I need to try a configuration and drive a bit for TTN coverage and return to find no messages in the console
My current configuration is this:
- LoraWANversion: MAC V1.1
- Regional Parameters version: PHY 1.1 REV a
- Frequency plan: Europe 863-870 MHz (SF9 for Rx 2 - recommended)
- Activation mode: ABP
- LoraWAN class capabilities: None (class A only)
- Network defaults: use network’s Rx and frequency defaults.
- Cluster settings: external LoraWan backend servers not checked
- DevEUI 0097812F3262D947
- Device address 260*****
- NwkSKey 906333655DEF75A2704B3F**********
- SNwkSIntKey 906333655DEF75A2704B3F********** (same)
- NwkSEncKey 906333655DEF75A2704B3F********** (same)
- AppsKey 34E60C4963946911FCB4CF**********
Any comments for a better configuration is welcome!
Many thanks!
PS another possibility is that there are no TTN V3 gateways in my neighborhood (The Netherlands, Haarlemmermeer).