ATtiny84 Low power LoRa node

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

Technical specifications:

  • 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:

Final version of the node

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 schematic:

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):

Device Shop/webshop Price
ATtiny84 eoo-bv.nl  €       2,90
RFM95W aliexpress.com  €       4,60
BME280 (inclusief header pins-6 voudig) aliexpress.com  €       2,99
Printplaat LJK1801 EasyEDA  €       1,98
Batterijen (2x) 675 Zink Air Kijkshop  €       0,67
Batterij-veren Hackerstore.nl  €       1,10
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
Totaal  €     15,25

 

Current measurements:

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:

Information:

  • 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.

Useable time:

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)

 

Testing:

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: http://a360.co/2FBE9M9. 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 :smile:

 

 

 

9 thoughts on “ATtiny84 Low power LoRa node

  1. Hello,

    Thanks for the complements, great to hear that you’re gonna use my design. Have fun with it!

    About the 470uF capacitor:
    Because of the 3.3 V working voltage a 6,3 Volt Capacitor would be enough. I bought a 10 V capacitor because a 6,3 V was not available or the size was not appropriate for my (physical) design.
    You may choose yourself what size or voltage you want to use. The capacity is also arbitrary, I did not make any calculation. Ik know when the RFM95W is sending data It wil draw 100mA in 50uSeconds.
    I guessed that will be heavy load for the battery, so I decided to add this capacitor to catch this pulse a bit, and to prevent the voltage to drop to much near the end of the lifetime of the battery.

    The 100nF capacitor you mentioned is fine. This 100nF capacitor is a (default) interference suppression capacitor for high frequencies.

    Leo.

  2. wonderful job conventions … I would use it for communication between 2 lora, so if you want to take out the thing network, what can I do to tell you step by step … thanks …

  3. Cheap but neat, I like it. I think the 675 battery with a much higher leakage current (selfdischarging) and narrow temp. working range can’t reach this numbers.
    To even lower current consumption heres my thoughts:
    – ordinary 470uF elko can draw several uA of current (leakage), eg. Nichicon KL series (very low leakage) only up to 0.2uA (200nA)
    – ATinny84 sleeping with wake up on external pin signal draw only ~0.5uA ( http://www.gammon.com.au/forum/?id=11488&reply=9#reply9 ), watchdog is disabled for the external hardware timer eg. TPL5110 with operating current 35nA
    – last but not least, check please this interesting document from TI: http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=swra365b&fileType=pdf
    maby Lora module can do same trick at 2.1V with TPS62730 DC-DC converter (30nA at sleep/bypass mode) and TX current (100mA at 3.3V) will drop by nearly 30% without any penalty like eg. max efective TX RF power output

    Correct: ATtiny85 sleep mode and wake on pin change: >0.2uA at 3.3V, >0.1uA at 2.1V

  4. When you want tot use Lora as a peer-to-peer connection it is better to use other examples.
    The Things Network LoRa is based on the LoRa based transmit technics and the LoRaWAN layer.
    The LoraWAN layer is responsible for encrypting data and authentication etc.
    This LoRaWAN layer uses also a lot of recourses of the microcontroller.

    For Peer-to-Peer connections you do not have to use this layer, It is easier to connect, using only the LoRa Transmit technics.

    An example is available here, it uses an ATmega32u4 and RFM95:

    https://www.elecrow.com/wiki/index.php?title=32u4_with_Lora_RFM95_IOT_Board-868MHz

    You can use the code to use it as starting point to program an ATtiny84 and RFM95.

    I hope this information will help you to solve your problem.

    Leo.

  5. It seems you’re an expert on this area (leak current/minimal power). Thank you very much for your comments on this!
    I’ll study the documentation an use some idea’s in my next designs!

    I’m now studying on Low power ARM processor (STM32L series) to make the node smaller (SMD design) and powerful processing possibilities.

    Leo.

  6. I’m definitely not an expert but thank you 🙂

    STM32L series is a very good choose, these parts are maybe best-in-class for now in power efficiency but i think some new optimised 8-bit MCUs still can beat them in some simple tasks that requires ultra low current consumption.

    You may already know that, but anyway I forgot to mention that ATtiny84A instead of ATtiny84 is a power-optimised version: https://www.google.pl/url?sa=t&source=web&rct=j&url=http://ww1.microchip.com/downloads/en/AppNotes/doc8187.pdf&ved=2ahUKEwiVwpW37ZvbAhWGC-wKHXxPBO4QFjAAegQIBxAB&usg=AOvVaw1H_SRtMiH_iLNmccZ2ewAQ

    sorry about that but 2nd correction on: “ATtiny85 sleep mode and wake on pin change: <0.2uA at 3.3V, <0.1uA at 2.1V" (less than <)

  7. Can i integrate this device in TTN seamless, or is it a Point-tp-point device. It would be nice, if TTN integrattion is possible. Thx. g.

  8. You can integrate this device in TTN seamless. It uses ABP Activation Method.
    I’ve now 4 of these devices running on different batteries (Saft LS14250 and Saft LS14500).
    One of them is placed in a freezer (-20 degrees Celsius).

    Leo.

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 7 =