2

For context, I come from a very software-heavy background so I know very little about hardware.

I'm looking to build a system that requires at least 6 sensors (pH, electrical conductivity, humidity, temperature, light intensity, flow rate), and I want to send all of this input over WiFi at ~10 minute intervals. Most of these sensors will be analogue.

I noticed that for example the Arduino Uno only has 6 analogue inputs. Plus from research, I would need to connect a WiFi module to the Uno which seems too much of a hassle and added cost.

I'm looking at the ARDUINO NANO 33 IOT right now. It seems perfect for what I want to do since it's cheap, has 8 analogue pins, and has WiFi out-of-the-box. Is my reasoning correct in choosing this Arduino? I'm wondering why something with WiFi capability and more pins is cheaper than the Uno.

Thanks in advance!

4
  • 1
    Some of the types of sensors you mention are available with a digital interface (I2C or SPI) and do not require an analog interface. If you need more analog inputs than you have analog pins available, you could also use an external I2C ADC which are available with 8 or more channels and 12 or more bits of resolution.
    – StarCat
    Jan 28, 2021 at 15:31
  • You can get around a limited number of analog pins by multiplexing sensors on a single one. Power each sensor with a different digital pin, and have all of their outputs go to the same analog pin. On each poll, power up one sensor at a time, read its output on the analog pin, power down the sensor, power up the next one, read etc etc. This is one technique I use in my indoor grow rooms. I use NodeMCU-12e or Wemos D1 minis.
    – stevieb
    Jan 28, 2021 at 19:13
  • In short, Uno is over-engineered with 20-year old technology. Many of the things needed can be done with a single silicon nowadays. Based on what you want to do, I would say Nano 33 IoT is a good choice.
    – hcheung
    Jan 29, 2021 at 0:13
  • 1
    The ESP32's ADC, while not perfect, is far more capable than the UNO's. No onboard ADC is really worth a darn compared to something cheap and awesome like a $2 ADS1115 4 port 15bit ADC. I would use a nodeMCU and one of those; $5, done. For the cost of one NANO33, you can get 4 or 5 of that setup. Nobody buys actual Arduino boards, unless they don't know any better.
    – dandavis
    Jan 29, 2021 at 5:30

2 Answers 2

3

For short answer: Just use NodeMCU ESP32 or any ESP32 dev board.

TLDR;

ESP32 dev board pinout

ESP32 is actually a wifi module but has very powerful processor (240MHz max), way more faster than Arduino Uno (atmega328 @16MHz). Because of this, wifi comes as natural for ESP32.

You can even buy ESP32 dev board around US$10 (include shipping) while the esp32 module itself costs only $5

Arduino UNO 33 IOT is simply SAMD21 (@48MHz) with external wifi module. This wifi module alone costs about US$10. This configuration is similar to Arduino UNO + wifi shield but of course cheaper because you don't need an extra costly shield for wifi.

The expensive wifi shield is actually HDG204 wifi SIP (system in package) + 32-bit AVR AT32UC3C1512C (66MHz max). Pretty much the wifi shield piggy back on Arduino UNO is 4 times faster than 8-bit micro atmega328 of Arduino UNO. So... it's pricey.

Edit:

ESP32 has 2x 12-bit ADC with 16 channels exposed out to IO pin on most of ESP32 dev board.

If you just read some temperature sensors, range finder sensors, humidity sensors... You are good with most of ADC inside microcontrollers these days. Unless you are building instrumentational device, well, this is a whole different story.

10
  • Could you explain how this answers the question?
    – StarCat
    Jan 28, 2021 at 15:56
  • 1
    According to me this almost answers the whole question except why is it cheaper .
    – xbox gamer
    Jan 28, 2021 at 16:06
  • 2
    the WiFi module on Nano 33 IoT is an ESP32
    – Juraj
    Jan 28, 2021 at 16:37
  • One of the issues in the question was the number of analog ports available. You did not mention them in your answer.
    – StarCat
    Jan 28, 2021 at 16:47
  • OP is looking for interfacing with a lot of analog sensor. ESP-32 won't be a good choice if you want to use ADC, it is noisy, non-linear...
    – hcheung
    Jan 29, 2021 at 0:08
0

Doesn't matter the number of analog pins if you're doing 10 minute polls.

Run the power to each sensor from its own digital pin. Connect the sensor outputs to a single analog pin. Note that any analog pin can be used as a digital pin, but not vice-versa.

Start with all sensors turned off (ie. the individual digital power pins turned LOW). When you poll, turn HIGH a single sensor's digital pin, read the output on the analog pin, and then power back down the sensor. Move on to sensor two, sensor three etc.

This is pretty much multiplexing the analog pin. I do this all the time in my indoor grow room environment automation systems.

Typically I use Wemos D1 minis for the task, or NodeMCU-12e devices. The last batch of D1 minis I paid less than $10 for five of them, shipping and taxes included. Both devices I mentioned have wifi and bluetooth inherent. I even reprogram them over the air (OTA).

3
  • :-O how do you turn off power to an analog sensor circuit? for example LDR, CT, temperature sensor circuits would interfere with each other
    – Juraj
    Jan 28, 2021 at 20:13
  • You do that on your Wemos D1 which has only one mediocre ADC?
    – hcheung
    Jan 29, 2021 at 0:15
  • For 10K LDR, 10K thermistor or some low power sensors (under 10mA), those can be powered using an IO pin for each sensor without problem. Just turn one on when needed then turn off when done
    – SimonVu14
    Feb 6, 2021 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.