** 2020-08-17 ** Update: Due to pin numbering the original code of 2018 does not work on PlatformIO toolset. The code is changed and adapted to function with the current version an arduino-attiny library. The changes are only made in the OOP version of the code on GitLab.
In this post I will show you the development of a Low Power LoRa node with a ATtiny84. A lot of thanks to the guys on The Things Network forum. I took their code for ATtiny85 and modified it to use it for a ATtiny84. I used this processor because I was familiar with it and has more IO pins.
Main modules/electronics used:
- ATtiny84A microprocessor
- BME280 sensor
- RFM95W LoRa module
- 4.8 microAmpere in sleep mode (3.3V)
- 100mA @51 ms sending data SPF7
- About 2.2-3.6 V power supply (Lithium Battery)
- Measurement of Supply voltage, Temperature and Humidity in current version of the software.
Picture of the latest version:
I used 675 Zinc-Air Batteries to create a real small LoRa node. Here a picture to compare the size to a 9V battery:
The PCB size is 45 x 20 mm. Maximum height is about 18 mm without housing.
The code can be found at https://gitlab.com/iot-lab-org/ATtiny84_low_power_LoRa_node.git
** NEW ** 2018-05-15: OOP code at https://gitlab.com/iot-lab-org/ATtiny84_low_power_LoRa_node_OOP.git
The schematic and PCB design can be found at https://easyeda.com/Leo/ATtiny84_LoRa_Environment_Node-d542dfbcc50d456c80869380bc979266
The total cost (typically Dutch):
|BME280 (inclusief header pins-6 voudig)||aliexpress.com||€ 2,99|
|Printplaat LJK1801||EasyEDA||€ 1,98|
|Batterijen (2x) 675 Zink Air||Kijkshop||€ 0,67|
|IC-voet 14 pens||eoo-bv.nl||€ 0,16|
|C 100nF, raster 5 mm MKT||eoo-bv.nl||€ 0,15|
|C 470uF, 10V, 8,2x12mm axiaal||eoo-bv.nl||€ 0,10|
|Header-6pin female||martoparts.nl||€ 0,25|
|Header-2pin male||martoparts.nl||€ 0,03|
|Dupont-2pin female krimp||martoparts.nl||€ 0,10|
|3D print matriaal behuizing||€ 0,23|
Remember to remove the resistor on the BME280 to reduce current in sleep mode. Here (not) shown in second place from the top at the (original) 5 SMD parts.
The calculations I did to get the lifetime. Please correct me if I am wrong:
- 4.8 uA in sleep
- 100 mA @ 51 ms pulse every 5 minutes.
Power used in a year:
rest: 4.8 * 10E-6 A * 24hours * 365.25 days = 0.04104 Ah = 41.04 mAh per Year
sending: 100 *E-3 A * 288 measurements a day * 365.25 days * 51 * 10E-3 seconds / 3600 seconds in an hour = 0.149022 Ah = 149.022 mAh per Year.
Total 190 mAh per Year.
675 Battery (Zinc-Air): 640 mA => 3.37 Year
LS14250 Battery (Lithium): 1200mA => 6.3 Year
LS14500 Battery (Lithium): 2450mA => 12.9 Year
(This is incredible!, I do not believe it)
I am now testing a few nodes: outside, in the freezer (-20 degrees Celsius) and room temperature with different batteries.
Inside (box) and outside closure:
I designed and printed this closure myself (3D print). You only have to add 2x M4 x 60mm bolts and 2x M4 nuts. I made the design public available: https://grabcad.com/library/weather-station-stevenson-screen-1. You have to print the mid-section a few (8) times. I learned that it is called Stevenson screen. My design has the looks but not the scientific usability