Full Arduino Mini LoraWAN below 1uA Sleep Mode


#222

@Charles

Sorry for a late reply. Could not upload the sketch, but have a link for you (compressed in RAR):

https://www.dropbox.com/s/lmfrqnfjhp0p8vd/LoraWAN-BME280-NEW.rar?dl=0

Will also measure it with CurrentRanger as soon as I get it from Felix.


(Gry Kyo) #223

So this is still sitting on the shelf in my kitchen and waking up every 15 minutes to check temp/humidity and battery voltage. Battery was installed as it shipped from Ali Express, 3.3v (LiFeP04) and never charged before or since. That was in April and this is how the battery and frames looks now. I had an admirer reset the Arduino once since the battery went in but it has run continuously since April.

HallardConsole
HallardNodeRedUI

I am tempted to check the cell voltage in case the voltage divider is not right but I actually did this before :blush:
Impressive @Charles


(Amedee) #224

Before I start by trial and error…

Does anybody have the magical incantations to upload the OptiBoot firmware compiled by @Charles on 3.3v Arduino Pro using avrdude?
(Or any other tool which doesn’t require MS Windows…)


(Amedee) #225

Answering to myself…

Worked fine with the Arduino IDE, and the following modifications to boards.txt:

## Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328P
## ---------------------------------------------------
pro.menu.cpu.8MHzatmega328=ATmega328P (3.3V, 8 MHz)

pro.menu.cpu.8MHzatmega328.upload.maximum_size=32256
pro.menu.cpu.8MHzatmega328.upload.maximum_data_size=2048
# pro.menu.cpu.8MHzatmega328.upload.speed=57600
pro.menu.cpu.8MHzatmega328.upload.speed=250000

pro.menu.cpu.8MHzatmega328.bootloader.low_fuses=0xFF
# pro.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDA
pro.menu.cpu.8MHzatmega328.bootloader.high_fuses=0xDE
# pro.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0xFD
pro.menu.cpu.8MHzatmega328.bootloader.extended_fuses=0xFE
# pro.menu.cpu.8MHzatmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
pro.menu.cpu.8MHzatmega328.bootloader.file=optiboot/optiboot_flash_atmega328p_250000_8MHZ.hex

pro.menu.cpu.8MHzatmega328.build.mcu=atmega328p
pro.menu.cpu.8MHzatmega328.build.f_cpu=8000000L

Edit: actually, boards definitin where already posted in Full Arduino Mini LoraWAN below 1uA Sleep Mode


(Mat89) #226

Hello Charles

Great video and test, the low power consumption is amazing!
What is you preffered way to power those boards?
Lets say you’re using some rechargeable batteries. If using LI-Ion this would mean that a LDO is required which also needs a bit of power all the time (for exmaple the MCP177-33: typical 1.2uA input quiscient current), as the absolute maximum rating for the RFM95 is 3.9V according to its datasheet.
A full Li-Ion battery gives you about 4.15-4.20 volts.

Appreciate your reply
Mat89


(Jens) #227

Hello.

We use for our NucleonBaseNodes used LiLon`s (1250 mAh) with an voltage (full) ~4,2V. We connect it to VCC on our Nodes and everything runs well.

Yes we know it is out off specification, but when it run? Why not. :wink:

Last workshop we made 9 BaseNodes like this and we call it WeatherNodes (NucleonBaseNode & BME280). They all run fine.

Greetings and have a nice day

Nordrunner


(Jens) #228

Fine to read that.

Yes it was the next step (improvement) for our Nodes.

Greetings


(LoRaTracker) #229

Myself, I would not be too concerned about the differance between a node runing at less than 0.8uA without a regulator, versus circa 2.5uA with a low cost MCP1700 or similar.

Take an example, a node that uses a pack of AA Alkalines to power a node for 5 years. At a capacity of 2800mAhr, the battery goes flat in 5 years doing useful stuff such as reading sensors and doing transmissions. Thats an average of 1.53mAhr per day.

The ‘good’ node uses in that 5 years 0.0008 x 24 x 365 x 5 = 35mAhr doing sleep. The ‘bad’ node uses 0.0025 x 24 x 365 x 5 = 109mAhr in sleep.

The difference in mAhr used during sleep, between good node and bad node is 109mAhr - 35mAhr = 74mAhr, or around 50 days extra battery life over the 5 years, big deal.

So no need to follow the crazy advice to operate the LoRa device direct from a LiPo, just use a regulator, it has very little affect on battery life.


(Mat89) #230

Yes, I’m already using an MCP1700-33. Just asked because this is the ‘1ua sleep mode’ thread and I haven’t seen any LDO on the board ;).


(LoRaTracker) #231

If the very small amount of current the regulator uses is somehow significant, and its not in a lot of cases, use a LIFePO4 to power the node. These are safe to use on LoRa devices without a regulator, safer then LiPo bombs too.

If 150mA output is enough, there is the MCP1711, quiescent current of 0.6uA.


(Amedee) #232

Re. @Charles bootloaders (from Pro-Mini-ICSP-FTDI)…

With a Pro Mini 8MHz 3.3v, I can only use the 57600 Kbps bootloader, with the 115200 and 250Mbps ones I can’t upoad a sketch, I always get:

avrdude: stk500_recv(): programmer is not responding                                        
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00      
...

I tested with 2 different FTDI boards and 2 different computers (OSX and Linux) with no difference…

It is not a big deal as I mainly wanted a smaller bootloader, upload speed being a bonus, but is anybody having better luck with Pro Mini 8MHz 3.3v?


(Everhamme) #233

I love this thread… just spent many many hours though trying to figure out how to acquire the parts to populate the board on aliexpress.

I think I got them all… I spent about $130 usd for the parts to make 8 demo boards.

Would be helpful if someone more experienced than I put up an ali parts list just to be sure the right parts can be acquired.

I found most of the parts from this other thread…

But I had to search manually for the other parts myself…

I also then realized I need to surface mount a bunch of components.

Im looking forward to getting 8 of these working in 2019!


(Everhamme) #234

Mind sharing your sketch in some example fashion?


(Gry Kyo) #235

I take no credit for the code behind this @everhamme, I am pretty sure I have used all of Charles Hallard’s code. The project is his with plenty of support HERE on his GitHub repo and on this thread. I am sure I found a link in the thread to well optimised code which I think he improves further with a lightweight bootloader. Search this thread would be my first hint.

Shows the node based on his PCB in operation with low power numbers.


(Everhamme) #236

Am I missing something…I don’t see any software on your github link there… just details on the hardware…


(Gry Kyo) #237

No, you are correct, that repo is hardware, the PCB that @Charles designed. This thread has all the information you need to get the pcb’s, learn a lot about LiPo / LiFePO4 batteries, the voltage tolerance of the Arduino and the RFM95 radio. There is also a ton of information about modding your Arduino by taking the LDO and power LED off the board but if you drill into the posts there is some code and other stuff too!

Charles’s bootloader:

Charles’s PCB

Charles’s post with code, much debug stripped out:

And tkerby’s code

Hope this keeps you busy for a while :wink:

Garry


(Walkabout) #238

Hello Charles,

I would like to offer some Lora Boards from you in my electronics shop as a DIY kit. May I do that, or do I have to consider something special?

With kind regards

Stefan


(Basse) #239

Is there a way to “hack” the v1.2 board to get a variable delay?


(Amedee) #240

What do you mean by variable?

In software?

You can either use it without the TPL5110, or use a resistor which gives you enough granularity and sleep multiple times…

I typically set the TPL5110 delay to 5 minutes, if I want a 30 minutes TTN update interval, I sleep 6 times…


(Basse) #241

Sorry. I think a ”trimpot” or ”potentiometer” is the device to use to have a variable resistance?

But it seems kinda hard to ”hack” it by soldrering trimpot instead of the resistor there…

How do you keep count of 6 sleeps? Is there som kind of persistent storage in the Arduino?

Sorry for the noobish questions.