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.
Wireless Communication with Multiple Arduinos
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- khanx359
- Posts: 2
- Joined: Tue Jul 13, 2021 11:18 am
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Wireless Communication with Multiple Arduinos
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:1. Can I use just 1 receiver on the central computer for multiple transmitters or do I need a receiver for each transmitter?
You'd need a microcontroller, yes. Your computer doesn't know how to talk to the radio modules directly.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 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
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: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.
https://www.adafruit.com/product/4201
- khanx359
- Posts: 2
- Joined: Tue Jul 13, 2021 11:18 am
Re: Wireless Communication with Multiple Arduinos
Got it. So the receiver is able to receive data from multiple transmitters at the same time?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.
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: 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
Thank you for the recommendation. I have thought about that but I think radio might be more reliable and consistent,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
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Wireless Communication with Multiple Arduinos
'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.khanx359 wrote:Got it. So the receiver is able to receive data from multiple transmitters at the same time?
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.
Yes.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?
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.khanx359 wrote:Can I use the same sketches available for the RFM69 transceiver itself?
The same sketches work for all different microcontrollers.
Please be positive and constructive with your questions and comments.