Connecting 50+ ESP32 or ESP8266 devices on the same network

Thread Starter

zazas321

Joined Nov 29, 2015
661
Hello. I am building a large automation network with ESP32 or ESP8266 modules. I need to know whether I will be facing any problems regarding the WIFI/internet when connecting many devices on the same network.

1. ESP8266 is using HT20 mode whereas ESP32 is using HT40 mode. Now while I dont really understand a lot about the differences between these 2 modes, I read that device with HT20 mode consumes less spectrum which would in result give me more stable connection. Am I right here?

Are there any other considerations I must take into account when connecting so many devices on the same network?
 

DickCappels

Joined Aug 21, 2008
6,577
You probably know more about this than I but I would consider router capacity. I read that 250 is a common upper limit. You might have to go to a more complicated topology.

Since these devices are going to be in close proximity to each other, be careful that they don't all try to "talk" at one time. If you can, set things up so that collisions can be detected and damaged messages can be resent.
 

Irving

Joined Jan 30, 2016
1,000
Hi

Given the previous discussions on this subject, your traffic rates will be quite low, typically 2kbyes/sec or less per node. 250 devices is the limit on a single IP subnetwork which this will be. With typically 72Mbit min traffic rate on the wifi that's > 1500 packets/sec allowing for collisions/retries (from experience) or approx a continuous effective data rate of 24kbytes/sec on each node. Router throughput might become an issue, but I'd argue your RasberryPi central database node will be the ultimate bottleneck.

If you have a need for some priority nodes then set up a separate SSID/channel for these, but I doubt you'll need to do so. If you put in place the network monitoring that was previously suggested you can determine the average delay & transit times as the network grows and catch any issues before they become a problem.

ESP32 uses more bandwidth because it has higher data rate capability than ESP8266. You're probably better off with ESP32 performance/functionality in the long term however.
 

Thread Starter

zazas321

Joined Nov 29, 2015
661
I have a MQTT mosquitto broker installed on my raspberry PI and I am using node-red as interface to send/receive MQTT packets. The raspberry PI is also running a python script. Would raspberry PI 4 be a better choise here as I am too worried about the raspberry PI not coping with the amount of work it will need to do (Running apache php server, mysql database, sending/receiving mqtt data, displaying everything on NODE-RED interface, linking my local database to external database and running python script (scanning QR codes and linking code data to database) - these are the tasks raspberry PI will be doing
 

Irving

Joined Jan 30, 2016
1,000
Its a lot for a Pi, certainly a Pi4 will have greater throughput. Or split loads, put another Pi in as mqttbroker/network monitor

Incidentally, if you have a fast enough PC & the time and patience to learn/configure GNS3 is a network simulation tool that allows you try out networks. Probably overkill for this though.

Probably just as quick to set up a bunch of ESP32 devices with a simple script sending messages at a known rate and see how it all behaves.
 

Thread Starter

zazas321

Joined Nov 29, 2015
661
Thanks I will check it out. I will probably consider just buying raspberry PI 4 for now and see how that works. Would taking SD card from raspberry PI 3b+ and iserting into raspberry PI 4 allow me to use new board without the need of installing software,configuring everything as I did with my raspberry PI 3b+
 

Irving

Joined Jan 30, 2016
1,000
Thanks I will check it out. I will probably consider just buying raspberry PI 4 for now and see how that works. Would taking SD card from raspberry PI 3b+ and iserting into raspberry PI 4 allow me to use new board without the need of installing software,configuring everything as I did with my raspberry PI 3b+
I don' know, never tried. Given the hardware differences I suspect not, but can't hurt to try.
 

dendad

Joined Feb 20, 2016
3,602
SD cards wear out with repeated use. I had a Pi telephone exchange that died because of that. Have a look as there are many posts about this. In fact, Tesla cars have the same pronlem.
You can set the Linux up to not write to the SD card so much, or not at all once you have finished building your application.

And make some backups of your SD cards too. In my case, I did not test the backup and it was faulty. So, get the system running, then make backups, and put the original one away and run on one of the TESTED backups!
Not like I didn't :(
 

Irving

Joined Jan 30, 2016
1,000
SD cards wear out with repeated use. I had a Pi telephone exchange that died because of that. Have a look as there are many posts about this. In fact, Tesla cars have the same pronlem.
You can set the Linux up to not write to the SD card so much, or not at all once you have finished building your application.

And make some backups of your SD cards too. In my case, I did not test the backup and it was faulty. So, get the system running, then make backups, and put the original one away and run on one of the TESTED backups!
Not like I didn't :(
Flash devices have a limited number of write cycles, typically 500,000 now though its improving all the time. 5y ago it was <30,000.

So as @dendad says, back it up. Also use good branded product, SanDisk, Samsung, Panasonic, etc., not some no-name rip-off copy.
 
Top