Wireless Communication with Multiple Arduinos

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
khanx359
 
Posts: 2
Joined: Tue Jul 13, 2021 11:18 am

Wireless Communication with Multiple Arduinos

Post by khanx359 »

I am trying to create two spatial maps of some air pollution sensors in a room. One setup is the VOC sensor SGP30 hooked to an Arduino Mega and another, the particulate matter sensor PMS5003 hooked to an Arduino Uno. I will be having 3-5 of each setup in a room and get the air quality data. I want the sensors to only transmit numbers (CSV values) to a central server (computer) which will do all the data analysis. Due to the distance being anywhere between a few meters to under a kilometer, I am thinking of using radio communication (Adafruit RFM69HCW Transceivers- https://www.adafruit.com/product/3070).

Still trying to learn how IoT and sensor networks work so here are some of my questions:

1. Can I use just 1 receiver on the central computer for multiple transmitters or do I need a receiver for each transmitter?

2. If I understood correctly, I would have to connect the receiver chip(s) to an Arduino connected to a computer and not directly to the computer?

3. How easy is this to use? Are there any other simpler methods/chips I could use? Please do recommend. Trying to look at what the best way to transmit data would be.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Wireless Communication with Multiple Arduinos

Post by adafruit_support_mike »

khanx359 wrote:1. Can I use just 1 receiver on the central computer for multiple transmitters or do I need a receiver for each transmitter?
One receiver will work for any number of transmitters. One of the example sketches shows how to assign ID numbers to radios so you can route messages to a specific device. All the radios hear each other though, so it's a matter of deciding when to listen and what to ignore.
khanx359 wrote:2. If I understood correctly, I would have to connect the receiver chip(s) to an Arduino connected to a computer and not directly to the computer?
You'd need a microcontroller, yes. Your computer doesn't know how to talk to the radio modules directly.

You can use an Arduino, but we also have boards that can tell the computer they're USB devices like a keyboard. That might make it easier to get data into the computer:

https://www.adafruit.com/?q=packet+radi ... =BestMatch
khanx359 wrote:3. How easy is this to use? Are there any other simpler methods/chips I could use? Please do recommend. Trying to look at what the best way to transmit data would be.
The other option would be Wifi. The computer would be a server and all the remote devices would send messages to that. That's certainly possible, and arguably a bit more flexible than packet radio because there are all sorts of internet services. Our AirLift ESP32 boards handle all the work of making and maintaining a Wifi connection so the main microcontroller doesn't have to:

https://www.adafruit.com/product/4201

User avatar
khanx359
 
Posts: 2
Joined: Tue Jul 13, 2021 11:18 am

Re: Wireless Communication with Multiple Arduinos

Post by khanx359 »

adafruit_support_mike wrote: One receiver will work for any number of transmitters. One of the example sketches shows how to assign ID numbers to radios so you can route messages to a specific device. All the radios hear each other though, so it's a matter of deciding when to listen and what to ignore.
Got it. So the receiver is able to receive data from multiple transmitters at the same time?
adafruit_support_mike wrote: You can use an Arduino, but we also have boards that can tell the computer they're USB devices like a keyboard. That might make it easier to get data into the computer:

https://www.adafruit.com/?q=packet+radi ... =BestMatch
So you're saying instead of using an Arduino Uno/Mega and another RFM69 transceiver, I could just use the Feather M0 Radio with RFM69 board? Which example sketches could I use to receive data? Can I use the same sketches available for the RFM69 transceiver itself?
adafruit_support_mike wrote: The other option would be Wifi. The computer would be a server and all the remote devices would send messages to that. That's certainly possible, and arguably a bit more flexible than packet radio because there are all sorts of internet services. Our AirLift ESP32 boards handle all the work of making and maintaining a Wifi connection so the main microcontroller doesn't have to:

https://www.adafruit.com/product/4201
Thank you for the recommendation. I have thought about that but I think radio might be more reliable and consistent,

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Wireless Communication with Multiple Arduinos

Post by adafruit_support_mike »

khanx359 wrote:Got it. So the receiver is able to receive data from multiple transmitters at the same time?
'At the same time' is an idea that needs careful handling in hardware and programming. A bus can carry several people 'at the same time', where that term means 'simultaneously', but having a conversation with several people 'at the same time' only works if people take turns talking and listening.

Packet radio is like a conversation. A radio can only receive messages from one other radio at a time, but it can receive messages from several other radios one after the other. There's no need to reconfigure the radio to listen for a specific transmitter from one message to the next. It will take whatever message happens to show up next.
khanx359 wrote:So you're saying instead of using an Arduino Uno/Mega and another RFM69 transceiver, I could just use the Feather M0 Radio with RFM69 board?
Yes.
khanx359 wrote:Can I use the same sketches available for the RFM69 transceiver itself?
The packet radio modules aren't programmable. There are no sketches for them, and they don't do anything useful on their own. You always need some kind of microcontroller to tell them what to do.

The same sketches work for all different microcontrollers.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”