Is RFM69 lib fitted for autonomous network?

Started by od1, October 22, 2017, 07:49:44 AM

od1

Hi everyone,
First of all, I'd like to thank Felix and this community for all the information available here. I'm working on an experimental project, and I believe now building it is within my reach!
The project is basically a network of a dozens of nodes. They contain each a motion sensor and an LED. When a node detects a motion, it turns its own LED off and tells an other specific node to turn its LED on.
It will take place in remote places and will be battery powered. I guess it's best to use a central node to coordinate all the nodes, but it will also be battery powered. There is not a big constraint regarding autonomy (a couple of days minimum), because the network might be disassembled and reassembled quite often.
From what I've read so far it seems that the lowpowerlab RFM69 library is a good fit for my needs, but I still wonder: is it meant for such an "autonomous" network, with no real computer connected to it?

syrinxtech

od1,

Not sure what you mean by an "autonomous" network, but I guess it really depends on how much you expect from the AT328?  If you're simply detecting motion, turning off an LED, and sending a message to another node to turn on an LED, I'm pretty sure the Moteino and RFM69 library will easily suffice.  Depending on your other needs, you don't necessarily need a central node since it becomes a single point of failure.  If you're only sending the message to one other node, that's easy.  If you want to send a message to all nodes you have broadcast capability.  If you wanted a subset of nodes you could either broadcast and include additional logic to decide whether to act on the message (ala multicast).

If you look around this forum you will find lots of excellent work by lots of people to give you maximum battery life.  You could setup the Moteino to sleep (along with the radio) until motion is detected, saving tons of battery life.  Once the motion is detected, you wake up the Moteino and the radio to send your message.  Once processing is complete you resume sleep.

As far as what I think of regarding "autonomy", I have a weather station outside for over a year that is completely autonomous, running solely on a LiPO and a solar cell.  I haven't been outside to check it in months and it gets cold (close to 0) and hot (over 100 F) and it's still ticking.


od1

Hi syrinxtech,

Thank you for you answer. By autonomous I meant closed nd independent network.

I don't expect much more from the AT328 but what you said. What you say by not having a central node is very interesting. Using node to node communication means smaller range, which also means it is not necessary to use RFM69 module anymore. I could go for the nRF24L01+ which might be sufficient in my case, saving some mAh and a few bucks. Of course it means not using Moteino or any LowPowerLab lib. I guess I'll do some tests to make sure I don't need more complex communication capabilities.

syrinxtech

Well, if you wanted a "mesh" network, you could use the Moteino and RFM69 with the RadioHead libraries that would give you the option of a meshed network that could be used to extend range.  Or, you could use a Moteino with a LoRA radio and get multi-km distances over open spaces.

I played with the nRF24L01+ a while back and quickly found that to me, the Moteino/RFM69 provided a much greater distance.  If you're talking dozens of sensors I assumed you wanted some decent amount of space between them.

Don't get me wrong, you certainly could code a central node.  I use a "basestation" in my home weather reporting environment.  I have a bunch of sensors around the house (water leak, temp/humidity, etc) that all report to the basestation which then relays pertinent information to display stations around the house and also uploads data to Freeboard so I can view the info over the Internet.  You just have to decide how best to structure the network and the Moteino family can probably handle it.

Felix

od1, welcome,

There is no intrinsic requirement to have a central node. All nodes can hear all other nodes on the same frequency/network ID, if they are within sensible range. Hence you can code each node to respond to any other node's actions.

The simple example of that is my SwitchMote kit, which includes a Moteino.

Each SwitchMote:

- can work independently of anything (well thats kind of pointless since it's not really an upgrade from a regular dumb light switch)
- can pair with another SwitchMote so they control each other's light - this does not require a central node
- can pair with each other and also inform a central node of what they are doing (this is the full circle where a central node can also intervene and control the switchmotes, ie home automation)

od1

Hello,
Thank you syrinxtech and Felix for your answers.
The SwitchMote code appeared to be too complex for me, I couldn't understand what to keep for my needs.
If it can help someone, I managed to handle node to node communication with the Sparkfun's guide: https://learn.sparkfun.com/tutorials/rfm69hcw-hookup-guide#running-the-example-code
It is super basic, but for starting it's just what I needed.