LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Soil Moisture sensor

Hello everyone, 

 

I am trying to get a soil moisture sensor working on labview. 

 

http://www.dfrobot.com/index.php?route=product/product&product_id=599&search=Soil+Moisture+Sensor+%2...

 

It has an analog output between 0 and 4,2 v . however in the Ardunion IDE i can get values from 0 too 900 in the serial monitor. 

 

How can i see the same values on labview ? any ideas ?

0 Kudos
Message 1 of 4
(4,630 Views)

Wild guess - the Arduino is reporting the integer counts that the A/D is providing.

 

If it's a 10-bit range (1024 counts), then 4.2 / 5 * 1024 = 860 - that's about your 900 count.

 

Simply multiply the counts by 5 / 1024 to get Volts, or multiply Volts * 1024 / 5 to get counts.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(4,612 Views)

Why would you even want to???  900 is just an arbitrary number like 4.2.  Just set up an indicator of your choice and scale it so it displays from 0% (dry) to 100% (soaked) and you're done.  I would use the meter indicator and make the color bar go from red to blue (or brown to green if it's for a plant).

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 3 of 4
(4,594 Views)

Thanks 😄

0 Kudos
Message 4 of 4
(4,584 Views)