3

I was working on a project in which I need to collect soil moisture data for a farm. For this, I need to collect soil moisture value from 70 sections of the farm on a single Arduino. But, this is not possible as there are just 6 analog pins on Arduino Uno and 16 analog pins on Arduino Mega. I have restrictions on the number Arduino that I can use that is just one due to monetary constrains. The data would be collected at a delay of 5 seconds. The data gathered would be stored on SD card module which would be analyzed later. Any suggestion on how I can collect data from 70 analog sensors on a single Arduino would be highly appreciated. Are there any alternatives that I can use in place of Arduino? I heard that we could do something with AVR atmega Microcontroller, am I correct? I don't know how to use Microcontroller; any useful resources will be highly appreciated. Thank You.

4

There are fairly inexpensive chips called "analog multiplexers" which let you choose one input out of a range (8 or 16 is typical). You could take the reading, then switch to a different input, and take another reading.

I have a page about analog multiplexers.

Example of it in operation:

Multiplexer

In this example you have 8 inputs, and by setting the A/B/C pins appropriately, one of the 8 is selected and appears at the O/I pin (output/input).

There is a 16-channel model as well. I see the 16-pin chip (74HC4067) available on eBay for $US 1.26 right now. You can get four of them (which would give you 80 inputs) for $4.88.

Also see the Wikipedia article on multiplexers.


For this, I need to collect soil moisture value from 70 sections of the farm on a single Arduino.

Yes, well how will these sections get their data into one place? That is probably the bigger problem.

You may need to use a lengthy cable using RS485 (balanced signals) or maybe cheap radio transceivers.

Trying to use a "single Arduino" on what might be quite a large farm is the issue. It's not the Arduino's fault. You have to have some way of sending the data from the further points to where it is to be collected.

  • @ Nick Gammon: Thank you. Your answer was helpful. Relating to collection of data in one place, I was planning to use wires which will transfer the data to the Arduino. What problem will be caused by this? The idea of using radio transceivers is great. As I am planning to do this on a large scale, the major cost of my plan comes from the soil moisture sensor (as they are used majorly) . Now if I use a transmitter, I need to use it for all the soil moisture sensors which are doubling my budget. – OzoneX Mar 16 '17 at 6:34
  • If you are reading analog, extra wire adds extra resistance, which throws off your readings. Look into the ESP8266. WiFi module that costs about $5 at the cheapest and has a 1v analog input. You can drive it off batteries without an Arduino. – rpmerf Mar 16 '17 at 10:46
  • Quite right, although the OP seemed to want to keep the device count down. It seems odd to only have a "single Arduino" but to go and buy 70 x ESP8266. However that may well be the best solution. :) – Nick Gammon Mar 16 '17 at 21:01
1

You should use some cheap chips to collect the data and use only one with big capacity to finally combine and process the data further.

Consider using a cheap small Arduino to build a "base module" that can do some of the tasks needed, build a bunch of them and hook them up to a R485 bus, and have one master Arduino control them all. That would be a much more flexible and expandable system. The cheapes Arduinos cost around 10$. If you build your own you could probably do it even cheaper.

Source:

[1] http://forum.arduino.cc/index.php?topic=73861.0 (quote)

[2] https://arduino-info.wikispaces.com/RS485-Modules (bus)

0

Given that good moisture sensors are going to be an order of magnitude more expensive than the logger, I'd suggest that you are giving yourself more problems than it's worth to try to connect that many sensors to the same unit. A Pro-mini based logger rarely comes in >$25. Even though we can connect that many one-wire sensors to a single logger ( https://thecavepearlproject.org/2015/03/01/using-ds18b20-sensors-to-make-a-diy-thermistor-string-pt-1-the-build/ ) it's not a good idea from the perspective of the amount of data that is lost if you have a single point failure. Generally we only put 10-15 sensors on any one unit, and we try to deploy them in "parallel" sets so that if one multi-sensor unit does fail, we loose spatial resolution, but still have enough information to work with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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