# ATTiny LoRa Nodes

**URL:** <https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629>\
**Category:** Hardware\
**Created:** [October 9, 2019, 11:01pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629 "2019-10-09T23:01:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 9, 2019, 11:01pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/1 "2019-10-09T23:01:30Z")

</div>

Does anyone have any experience with the ATTiny84/RFM95 combo?

I have a working ATTiny84 lora node based on the implementation provided by Leo Korbee [[https://gitlab.com/iot-lab-org/ATtiny84\_low\_power\_LoRa\_node\_OOP](https://gitlab.com/iot-lab-org/ATtiny84_low_power_LoRa_node_OOP) ]. The problem I am having is that the RSSI values from it are 20 dBm lower than the exact same setup running on an arduino pro-mini with the Sandeep Mistry LoRa library. I’ve tried a bunch of things to get the RSSI values down but have had no luck. Maybe someone here can help me out. It’s making me a bit mental.

Cheers.

---

<div class="post-metadata">

**Author:** ![cslorabox](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cslorabox/32/35697_2.png) [@cslorabox](https://www.thethingsnetwork.org/forum/u/cslorabox)\
**Post date:** [October 10, 2019, 1:53am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/2 "2019-10-10T01:53:35Z")

</div>

If all else fails, make each version log all registers writes to the radio chip, and diff them…

It’s not clear what you hope to gain by using an ATtiny, the LoRa chip costs enough to hide the cost of a halfway decent processor.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 10, 2019, 6:21am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/3 "2019-10-10T06:21:23Z")

</div>

> [@taintedsushi](#):
>
> The problem I am having is that the RSSI values from it are 20 dBm lower than the exact same setup running on an arduino pro-mini with the Sandeep Mistry LoRa library.

The way RSSI is calculated has changed from when the SX127x devices were first introduced. The ‘new’ calculation can indeed vary by 20dB to the ‘old’ method.

Ask the library author, Leo Korbee, which method they are using.

For a TTN node, its not that important what the received RSSI is showing as anyway.

> I’ve tried a bunch of things to get the RSSI values down but have had no luck. Maybe someone here can help me out. It’s making me a bit mental.

It might be helpful to the forum if you could tell us what ‘a bunch of things’ is, we dont know.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 10, 2019, 6:29am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/4 "2019-10-10T06:29:32Z")

</div>

> [@taintedsushi](#):
>
> I have a working ATTiny84 lora node based on the implementation provided by Leo Korbee [[https://gitlab.com/iot-lab-org/ATtiny84\_low\_power\_LoRa\_node\_OOP](https://gitlab.com/iot-lab-org/ATtiny84_low_power_LoRa_node_OOP) ].

And the obvious question is why use an ATtiny84 ? I would imagine an ATTiny84 is going to be very memory constrained when running the software for a TTN node.

When you compile the code for a TTN node (using that library) how much free flash and memory do you end up with ?

---

<div class="post-metadata">

**Author:** ![kimwo](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kimwo/32/48358_2.png) [@kimwo](https://www.thethingsnetwork.org/forum/u/kimwo)\
**Post date:** [October 10, 2019, 8:39am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/5 "2019-10-10T08:39:47Z")

</div>

Because it is smaller and cheaper. I have run one for over seven months on two silver oxide coincells about 180 maH. 30000 plus messages so far and voltage levels indicate it will go for over a year. Very little space left. Reading a bmp280 but had to send raw data back to server for processing.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 10, 2019, 9:10am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/6 "2019-10-10T09:10:55Z")

</div>

Smaller, interesting.

What package is the ATTiny84 ?

---

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 10, 2019, 10:39am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/7 "2019-10-10T10:39:58Z")

</div>

Querying all the registers is a bit above my pay grade at present but I’ll look into that. It might be good skill to acquire in any event. I’m basically at the level of changing register values by poking them with a stick.

I wanted the ATtiny primarily for size and power consumption.[quote=“cslorabox, post:2, topic:30629, full:true”]  
If all else fails, make each version log all registers writes to the radio chip, and diff them…

It’s not clear what you hope to gain by using an ATtiny, the LoRa chip costs enough to hide the cost of a halfway decent processor.  
[/quote]

---

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 10, 2019, 10:49am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/8 "2019-10-10T10:49:08Z")

</div>

> [@LoRaTracker](#):
>
> > [@taintedsushi](#):
> >
> > I have a working ATTiny84 lora node based on the implementation provided by Leo Korbee [[https://gitlab.com/iot-lab-org/ATtiny84\_low\_power\_LoRa\_node\_OOP](https://gitlab.com/iot-lab-org/ATtiny84_low_power_LoRa_node_OOP) ].
> 
> And the obvious question is why use an ATtiny84 ? I would imagine an ATTiny84 is going to be very memory constrained when running the software for a TTN node.
> 
> When you compile the code for a TTN node (using that library) how much free flash and memory do you end up with ?

OK, I see how this forum works now. Protocol adjusted.

I don’t plan to have this connected to TTN, just my single channel gateway which means I can dispense with a bunch of the coding. I’ll remove whatever I don’t use from the libraries and hopefully it will stay under budget.

Right now a basic hello world sketch with all appropriate libraries runs around 1780 bytes (21%)

---

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 10, 2019, 10:51am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/9 "2019-10-10T10:51:17Z")

</div>

> [@LoRaTracker](#):
>
> Smaller, interesting.
> 
> What package is the ATTiny84 ?

The ATtiny84 is a 14 pin chip. Nice and tidy with enough I/O to do some real work.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 10, 2019, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/10 "2019-10-10T11:08:22Z")

</div>

> [@taintedsushi](#):
>
> **I don’t plan to have this connected to TTN** , just my single channel gateway which means I can dispense with a bunch of the coding. I’ll remove whatever I don’t use from the libraries and hopefully it will stay under budget.

Then its not really a topic for discussion\help in this TTN forum.

---

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 10, 2019, 11:10am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/11 "2019-10-10T11:10:14Z")

</div>

> [@LoRaTracker](#):
>
> > [@taintedsushi](#):
> >
> > The problem I am having is that the RSSI values from it are 20 dBm lower than the exact same setup running on an arduino pro-mini with the Sandeep Mistry LoRa library.
> 
> The way RSSI is calculated has changed from when the SX127x devices were first introduced. The ‘new’ calculation can indeed vary by 20dB to the ‘old’ method.
> 
> Ask the library author, Leo Korbee, which method they are using.
> 
> For a TTN node, its not that important what the received RSSI is showing as anyway.
> 
> It might be helpful to the forum if you could tell us what ‘a bunch of things’ is, we dont know.

I could be wrong here but, it seems like RSSI is calculated at the gateway which would make it independent of the node

What I’ve tried to do is match up the chip configuration for the Korbee library with the Sandeep one for things like TX power, Low data rate optimization, and PA config. Hardware wise, they are essentially identical.

---

<div class="post-metadata">

**Author:** ![taintedsushi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/taintedsushi/32/25844_2.png) [@taintedsushi](https://www.thethingsnetwork.org/forum/u/taintedsushi)\
**Post date:** [October 10, 2019, 11:14am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/12 "2019-10-10T11:14:15Z")

</div>

> [@](#):
>
> Then its not really a topic for discussion\help in this TTN forum.

I’m sorry.

I’m not trying to be difficult. It just seemed like there is a lot of knowledgeable people here who might be able to help. I’ll try to find a more appropriate forum to post this problem. Thanks anyway.

Cheers.

---

<div class="post-metadata">

**Author:** ![rharte](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/rharte/32/37824_2.png) [@rharte](https://www.thethingsnetwork.org/forum/u/rharte)\
**Post date:** [October 12, 2019, 12:26pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/13 "2019-10-12T12:26:57Z")

</div>

We are running the RFM95 with an ATtiny85 and a limited LoRa stack. It’s limited in the way that not all MAC commands are implemented, but it does run the full functionality: up- and downlinks, all SF and channels, OTAA, ABP, etc.

What I don’t understand: how is your processor of any influence on the RSSI as this is measured by the RFM. Or do you mean the RSSI values reported on the TTN receiver side?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [October 12, 2019, 12:51pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/14 "2019-10-12T12:51:08Z")

</div>

> [@rharte](#):
>
> What I don’t understand: how is your processor of any influence on the RSSI as this is measured by the RFM. Or do you mean the RSSI values reported on the TTN receiver side?

The RFM95 does put a value in one of its registers, which is indicative of the signal level.

However its up to the program running on the processor to turn that register value into an RSSI value we would recognise. The calculation for that is in the datasheet and has changed over the years. Thus it is entirely possible a library using the ‘old’ calculation will display a different RSSI than a library based on the ‘new’ calculation.

---

<div class="post-metadata">

**Author:** ![djeremaille](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/djeremaille/32/35697_2.png) [@djeremaille](https://www.thethingsnetwork.org/forum/u/djeremaille)\
**Post date:** [July 13, 2021, 8:09am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/15 "2021-07-13T08:09:36Z")

</div>

Hi,  
I’m new in the LoRa world. I tried to find the infos concerning the attiny85 but it’s not my native langage and i’m lost.

Is it possible to activate a digital output of the attiny85 when receiving a certain message via LoRa module?

My idea is to use the attiny to reset an ESP32-cam after It has been put in deep sleep.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [July 13, 2021, 8:12am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/16 "2021-07-13T08:12:06Z")

</div>

> [@djeremaille](#):
>
> Is it possible to activate a digital output of the attiny85 when receiving a certain message via LoRa module?

No, principally because the LoRaWAN implementation that fits in to an ATtiny doesn’t support downlinks.

Try a bigger device - for such a simple application you could use a Pro Mini + RFM95 and MCCI LMIC 3.3.0.

---

<div class="post-metadata">

**Author:** ![djeremaille](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/djeremaille/32/35697_2.png) [@djeremaille](https://www.thethingsnetwork.org/forum/u/djeremaille)\
**Post date:** [July 13, 2021, 8:31am UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/17 "2021-07-13T08:31:18Z")

</div>

> [@descartes](#):
>
> MCCI LMIC 3.3.0.

Thanks a lot for the quick answer!  
I have some arduino nano and some atmega328p. I will try with that and SX1276

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 13, 2021, 12:32pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/18 "2021-07-13T12:32:58Z")

</div>

> [@djeremaille](#):
>
> I have some arduino nano and some atmega328p. I will try with that and SX1276

A 3.3V Pro Mini would be a better choice than a Nano.

The SX1276 is a 3.3V device so you cannot connect it directly to your 5V Nano.

---

<div class="post-metadata">

**Author:** ![Archer](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/archer/32/45881_2.png) [@Archer](https://www.thethingsnetwork.org/forum/u/Archer)\
**Post date:** [July 13, 2021, 2:09pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/19 "2021-07-13T14:09:13Z")

</div>

You can see another implementation of the ATTiny84 at [https://attno.de](https://attno.de). Unfortunately, the source code there does not support downlink/ ADR either.

Therefore, the attnode v3 was developed, which works with the ATTiny 3216 and supports both downlink and ADR.

In the meantime, Rainer has developed a firmware for the ATTiny84 with LMIC support, but I have not yet tested whether it meets all the requirements. Here is the sketch for a soil moisture sensor with the chip. [https://gitlab.thethingsnetwork.de/RainerWieland/cnsms-01](https://gitlab.thethingsnetwork.de/RainerWieland/cnsms-01)

The attnode v3 is also available as µ - it still has the format of the RFM95. (here: [https://github.com/theArcher73/attnode\_v3\_micro](https://github.com/theArcher73/attnode_v3_micro))

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [July 13, 2021, 2:50pm UTC](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629/20 "2021-07-13T14:50:47Z")

</div>

> [@Archer](#):
>
> Therefore, the attnode v3 was developed, which works with the ATTiny 3216 and supports both downlink and ADR.

Cool - with the right settings you can get MCC LMIC 3.3.0 on to that with room for a couple of sensors. Sadly I can’t find any 3216’s at present as I was going to make a design for that.

> [@Archer](#):
>
> In the meantime, Rainer has developed a firmware for the ATTiny84 with LMIC support, but I have not yet tested whether it meets all the requirements. Here is the sketch for a soil moisture sensor with the chip. [https://gitlab.thethingsnetwork.de/RainerWieland/cnsms-01](https://gitlab.thethingsnetwork.de/RainerWieland/cnsms-01)

It looks like a mixture of things in this repro - the Heltech uses a fuller stack but the cnSMS-01 is using SlimLoRa which the author recently reported as having timing issues - I asked for info so it could be looked out (on here and on the GitHub repro) but he’s not responded. I’d anticipate that the SlimLoRa is going to have some challenges interacting with the v3 network server.

[Next page](https://www.thethingsnetwork.org/forum/t/attiny-lora-nodes/30629.md?page=2)
