Full Arduino Mini LoraWAN below 1uA Sleep Mode

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

5 Likes

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ā€¦)

1 Like

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

2 Likes

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

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

Fine to read that.

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

Greetings

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.

2 Likes

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 ;).

1 Like

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.

2 Likes

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?

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!

Mind sharing your sketch in some example fashion?

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.

1 Like

Am I missing somethingā€¦I donā€™t see any software on your github link thereā€¦ just details on the hardwareā€¦

1 Like

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

5 Likes

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

Is there a way to ā€œhackā€ the v1.2 board to get a variable delay?

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ā€¦

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.

The Adafruit breakboard for the TPL5110 has a trimpot. I find quite difficult to adjust it to get the required delay, at the end soldering a resistor is easier - at least more predictableā€¦

The way the TPL5510 is used in this design is just to wake-up the AVR from deep sleep like you would do with an RTC; it does not cut the power. When in deep sleep the ATmega328P retains its state, so it is not a problem to loop on the sleepā€¦