Maximising Microcontroller I/O Pins With Cloud Data Collection

This is more of a thought experiment than an actual project but I am trying to figure out how to maximise the number of analog I/O pins I could collect data from and send to cloud storage via a microcontroller like the Arduino Due.

Appologies if this kind of theoretical question is discouraged I just want to learn and have a better understanding of the limiting factors. This is what I've come up with, now tell me all the reasons why it is a terrible idea and how to do it properly.

The Arduino Due has 54 digital input/output pins which might be able to be expanded with 13 Mux break out boards (SparkFun Analog/Digital MUX Breakout - CD74HC4067 - BOB-09056 - SparkFun Electronics) to obtain 208 analog pins (832 analog pins if daisy chaining is possible but I assume daisy chaining is not possible). The Arduino Due runs at 3.3V with a 12-bit ADC which results in a sensing resolution of 0.8 milli volts. A wifi chip can be connected to the Arduino Due's UART port. This can transfer data to the internet through a Starlink dish and router. A Starlink router can connect to 128 different devices at once. Which means it can process data from 26,624 sensors at once (106,500 with daisy chaining).

Some possible bottlenecks are with power, processing and bandwidth limitations.

  • Power will be routed directly to the sensors and break out boards instead of through the Arduino so power capacity won't be exceeded. The power consumption of all this could be high but could be optimised in the future.
  • Processing capacity is limited by the ADC conversion time (1 micro second), multiplexing overhead (0.001 to 1 micro seconds), software overhead and data transfer and storage. However Chat GPT thinks that a sampling rate of one sample per second is easily achievable.
  • Bandwidth. There are two bottlenecks here the first is between the Arduino Due and the WiFi chip through the UART connection which can handle about 0.1Mbps and the second from the WiFi chip to the Starlink router which can handle between 50Mbps to 150Mbps. So if the 12-bit ADC generates 12 bits of data every second from the 208 sensors this would be a bit rate of 0.002Mbps. In other words this system could handle a sampling rate of 46 times per second before running into a bandwidth bottleneck.

So none of these bottlenecks seem to impact the feasibility of this design. But I'm sure there are other problems. Please let me know what they are.

With the proper hardware that is unlimited. You can add external port expanders, serial chips, etc. The real question is how fast can you process the data.

That is very interesting. You are saying with the setup I described that I could daisy chain Mux break out boards for as long as I want until I hit the Arduino Due's microprocessor computational capacity. And even at that point I could still add more I/O pins just at the cost of an ever slower sampling rate.

1 Like

Bingo you have it!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.