element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Code for multiple soil moisture sensors
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 5 replies
  • Answers 5 answers
  • Subscribers 392 subscribers
  • Views 2201 views
  • Users 0 members are here
Related

Code for multiple soil moisture sensors

izzrahim
izzrahim over 6 years ago

Hi there, Im working on Soil Moisture Sensors using Arduino Uno, however I have no knowledge on how to come up with a code, here are things that i need to do:

1)  how to come up with a code, I will be using 6 analogs (6 sensors) of A0 to A5 at one time and I need them to have simultaneous readings.

2) Since I need to have 6 readings simultaneously, how do i put them in a code  and how to extract these 6 readings into PLX-DAQ excel.

3) how do I separate these 6 readings (from A0,A1,A2,A3,A4 & A5) into individual column in excel and serial monitor.

 

thanks in advance.

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 6 years ago +3 suggested
    An arduino typically cannot read all channels simultaneously. Analog channels can be read sequentially with about 0.1 ms between readings. For moisture readings this would normally be sufficient. To make…
  • mp2100
    mp2100 over 6 years ago +2 suggested
    Izz, How flexible are you for solutions (budget and programming language)? If Arduino is required, you’ll be limited by the memory of the computer, very few data points can be saved. You could use an add…
  • luislabmo
    luislabmo over 6 years ago in reply to izzrahim +2 suggested
    Hello Izz, This Arduino example is probably the starting point to learn how to read Analog input with an Arduino and then using the serial as output. Then, use the serial info produced by the arduino to…
Parents
  • dougw
    0 dougw over 6 years ago

    An arduino typically cannot read all channels simultaneously. Analog channels can be read sequentially with about 0.1 ms between readings. For moisture readings this would normally be sufficient.

    To make an arduino system that can read analog channels simultaneously requires external sample and hold circuitry or external A/D converters.

    Could you explain why you need simultaneous sampling in case there is a better way to achieve your requirement?

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • dougw
    0 dougw over 6 years ago

    An arduino typically cannot read all channels simultaneously. Analog channels can be read sequentially with about 0.1 ms between readings. For moisture readings this would normally be sufficient.

    To make an arduino system that can read analog channels simultaneously requires external sample and hold circuitry or external A/D converters.

    Could you explain why you need simultaneous sampling in case there is a better way to achieve your requirement?

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • izzrahim
    0 izzrahim over 6 years ago in reply to dougw

    Okay Thanks. I know nothing about Arduino and coding, can I ask for your assistance to help me with the coding (sketch), what to be included, what are the loops, basically how to get 6 analogs in a code.

     

    I'm doing this experiment of measuring volumetric water content in a one meter cylinder, and I'll be placing six soil moisture sensors inside the cylinder... later i will introduce water on the top and I need to measure (obtain readings) the water content in the cylinder at different height. And these readings are to be taken for 24 hours period: I need to have all six readings (since you mentioned that it cant be done simultaneously, therefore a gap of 0.1 ms should be fine) every five minutes.

     

    thanks for the explanation.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • luislabmo
    0 luislabmo over 6 years ago in reply to izzrahim

    Hello Izz,

     

    This Arduino example is probably the starting point to learn how to read Analog input with an Arduino and then using the serial as output.

     

    Then, use the serial info produced by the arduino to build the excel with your computer, few options that come to my mind:

    • Processing
    • Use the Parallax Data Acquisition tool:
      • One example here
      • Another example

    Good luck.

     

    Luis

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dougw
    0 dougw over 6 years ago in reply to izzrahim

    You could also measure the water depth with a single capacitance sensor:

     

    Keysight Technologies U1282A Digital Multimeter - Applications - Water Level Sensing

    Texas Instruments FDC2214 Capacitance to Digital - Review

     

    An arduino can measure capacitance using just 2 wires and a resistor.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube