Connecting multiple sensors and sending data through a wifi connection?

Please Advise.

I want to create a system with multiple sensors that measure impact on hit using an accelerometer to measure g-force. I want to process this data later on with an Android mobile application. Since I'm new to Arduino, I have lots of questions. Could this be achieved with a master-slave connection, where I have multiple slaves like 15 (Arduino nano, transceiver, accelerometer) connected to one master(Arduino nano, transceiver) via Wifi? The master would forward the collected data from the slave that had an impact to the app. The only concern I have is that the master could not cope with so much connections at once if this even possible..

Is there any other way which would be more ideal for this project? Also thought about Lora/IoT that has end nodes connection to a gateway/concentrator which in theory is the same I think as the master-slave. This probably would be more ideal as it has its own web API to use?

Any advice on hardware/creating this system would be much appreciated.

how much data and how often?
with WiFi you could run a TCP/IP stack and send UDP datagrams or set up multiple TCP connections (there may well be a limit though)

OK, WiFi - drop the Nano, you need an ESP8266, most practically an ESP-01 or WeMOS D1 Mini.

1 Like

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

What is the application that uses many accelerometers?

Thanks… Tom… :slight_smile:

So the data will probably be an Array of 50ints ish. Will not be sent frequently, only when there is an impact above the threshold. I need a local communication, as I do not want each sensor to be connected straight to the cloud. I want to access the collected data "offline", view sensor data live on the phone, once the mobile app has a 4G connection then It could upload the collected data using a restful web service.

bomexx:
Hi, Regarding to your answer - "OK, WiFi - drop the Nano, you need an ESP8266, most practically an ESP-01 or WeMOS D1 Mini." How many connections can these devices handle as a access point? I need to handle at least 15-16 connections at the same time although not all sensor going to send data, just only when there is on impact sensed by the accelerator. What technology would you recommend that would suit my needs? Sorry for bothering you..

" How many connections can these devices handle as a access point?

Methinks you are asking the wrong person here. :grinning: I have not done very much with the ESP, certainly nothing terribly sophisticated. My point was that the Nano is superfluous in this context; the ESP can do the data collection itself and then perform the WiFi access.

I would not necessarily specify the ESP as the aggregator - it might be able to do that or it might not, I do not know without deeper research. A Pi would be the more likely candidate. :sunglasses:

Hi,
You probably need ESP32.

Tom..... :slight_smile:

I've done similar but fewer nodes. D1 mini at each node collecting data. Central node a different ESP8266 board. Nodes have static IP addresses allocated in the router by locking an IP address to the MAC address. Central sends an empty packet to each node in turn which replies with its data. UDP throughout because it's simple and does the job. However using UDP you have to consider how missed, duplicated or errorred packets are handled.

PerryBebbington:
However using UDP you have to consider how missed, duplicated or errorred packets are handled.

you can check

  1. for lost and duplicate packets by adding a sequence number to each frame
  2. for errors by adding a checksum or CRC to each frame