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 Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog LoRa MER Week 3.5:  Testing Turbidity and Posting Data to Internet
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fmilburn
  • Date Created: 21 Dec 2018 5:35 AM Date Created
  • Views 4277 views
  • Likes 10 likes
  • Comments 13 comments
  • mkr relay shield
  • buoy
  • mkr_giveaway_projects
  • sensors
  • lorawan
  • arduino_projects
  • lora
  • arduino mkr 1300
  • boat
  • arduino
  • mkr_smarterworld
  • wan_1300
Related
Recommended

LoRa MER Week 3.5:  Testing Turbidity and Posting Data to Internet

fmilburn
fmilburn
21 Dec 2018
image

Arduino Home

An Open-Source platform to create digital devices and interactive objects that sense and control physical devices.

Arduino Tutorials
Arduino Projects

 

I am building a prototype for a remote controlled vessel, the LoRa Marine Environmental Ranger (LoRa MER) that gathers environmental data and relays it to a shore based station using Arduino MKR WAN 1300 LoRa boards.  This post is the fifth in a series, and describes the turbidity sensor and how the shore based station will store and display data on the internet using a Raspberry Pi and adafruit.io.

image

Yes, there has been another name change :-)  

 

Implementation Status

Changes from last week are in red bold.  The RPR-0521RSRPR-0521RS Light sensor was described previously in my Rohm SensorShield RoadTest.

Boat

  • RC control and motors tested on land
  • MKR WAN 1300 firmware tested
  • Following sensors / hardware fitted temporarily and tested
    • ST3775 TFT Display
    • ICP10100  Atmospheric Pressure / Temperature
    • NEO-6M-0-001 GPS
    • Thermistor Water Temperature
    • Thermistor Air Temperature
    • KX224-I2C 3 axis Accelerometer
    • RPR-0521RSRPR-0521RS Light Sensor
    • TSW-10 Turbidity Sensor

Shore base:

  • Enclosure completed
  • TFT screen fitted
  • Firmware has LoRa reception (polls) and responds with RSSI
  • MKR WAN 1300 connected to Raspberry Pi by USB serial
  • Python script sends data over internet to adafruit.io
  • Dashboard implemented on adafruit.io

 

Turbidity

The turbidity, or cloudiness of a fluid, is caused by small suspended solids.  In this project the TSW-10 sensor from Amphenol will be used to get a rough indication of turbidity.  The sensor works by emitting light from an IR LED which travels through the water sample being tested to a phototransistor.  Increased levels of solids in the water reduce the light received by the phototransistor and are thus indicative of the turbidity.  The sensor is designed for  washing machines and dishwashers to sense when rinse water is clean.  There are standards for water bodies in some cases as well as drinking water.  However, the measurements here will be rough and serve only as a non-calibrated indication of turbidity.

 

The sensor was connected and tested as described in the datasheet.  Output voltage was measured with a Extech EX330 digital multimeter.  Supply from a bench power supply was set at 5V.  Three uncalibrated samples were tested.  The first was Seattle drinking water.  The second was made by adding a pinch of fine soil from my garden and mixing it till to my eye it looked like dirty pond water.  The third was made by diluting the second by about 5:1.

 

In the photo below the sensor is in open air and the sensor output reading is 2.98 V before being inserted into the samples.

image

To my surprise, the sensor output voltage increased to 3.66 V when inserted into the clean water sample.  I also noticed that voltage was somewhat influenced by ambient light and whether I was shading it with my hand.

image

Sensor output voltage dropped to 3.58 V in the intermediate sample.

image

The dirty sample had a sensor output voltage of 3.21 V.

image

The datasheet provides a graph with sensor output voltage as a function of turbidity in NTU.  There are two lines shown without an explanation.  The data from this experiment is plotted using 3 asterisks on the same graph below.

image

I am not sure how to interpret the graph but the experimental data is between the two lines - whatever they are - and the sensor is sensitive to turbidity.  It is possible to buy a powder for mixing standards for testing but at this point I don't intend to do so and will use the meter as indicative only.

 

Posting to the Internet

As previously noted, LoRaWAN is not implemented in my area and for the prototype a second MKR WAN 1300 has been connected to a Raspberry Pi via USB

image

A python script running on the Raspberry Pi parses the data and sends it to the free version of Adafruits Internet of Things service, adafruit.io.  For testing, the base station was placed on the other side of my small lab while the MKR WAN 1300 with the sensors was placed in front of my main computer and monitor as shown below.

image

A trial dashboard to show what is possible was developed.  In the screenshot below the air and water temperature are on dials along with the turbidity.  Acceleration is shown underneath the arrow icons representing x, y, and z directions while light intensity is graphed on the far right.

image

Different dashboards can be constructed and individual feeds can also be examined in detail.  The light intensity data is shown below where after being out for a while I came back to the lab and turned on the lights.  A while later I turned a light to be more directly on the sensor.

image

Adafruit has a free plan with restrictions as well as a premium plan with more access that costs $99 per year.  My own experience with these services is limited to a few experiments with adafruit.io.

 

The code is in an unrefined state for the boat and shore station but acceptable for testing the prototype.  I will post it on github after a bit more testing.

 

I've not tested the boat in water or done distance tests this week due to weather but also thought I would wait until the junior engineers (grandkids) were available to help next week.  They might be unhappy if I crashed the boat and they weren't there to help fish it out of the water.  On reflection, I am not going to mount the sensors until after making sure the boat runs OK.  There is a 90 day return / replacement but I doubt they would honor it if I have drilled holes and mounted various stuff on it.  So that will probably wait a week or two.

 

Next Steps

  • Test distance on land
  • First tests in water with the boat.

 

Comments, corrections, and ideas are always welcome!

 

Links

MKR WAN 1300: LoRa Marine Environmental Ranger  - This is the landing page which outlines the project

LoRa MER Week 1:  Making it Portable

LoRa MER Week 2: Boat in a Box

LoRa MER Week 3: Building a Shore station and Starting the Boat

  • Sign in to reply

Top Comments

  • genebren
    genebren over 6 years ago in reply to fmilburn +4
    Frank, Interesting thoughts on water sensing. I have developed image processing software for a microscope with CCD optics for counting mammalian cells. The processing was all about statistic and object…
  • fmilburn
    fmilburn over 6 years ago in reply to genebren +4
    True, but I think much of it may be inherent to the sensor itself. The phototransistor is bound to have variation in sensitivity and gain, plus there is the issue of alignment with the LED. This isn't…
  • fmilburn
    fmilburn over 6 years ago +3
    On reviewing this, I thought the points I plotted on the NTU graph should be clarified. As noted in the discussion, my samples are not calibrated so only the NTU value of the tap water, which should be…
  • mcb1
    mcb1 over 6 years ago in reply to fmilburn

    You might also want to enclose it inside a dark container to ensure the ambient aspect is removed.

     

    Looks like a very good project and is progressing well.

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 6 years ago in reply to genebren

    That would seem a good solution - a solid resin shaped to fit would be easier to use as a calibration standard tha a liquid.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 6 years ago in reply to genebren

    That's very interesting!

    I find optical sensing stuff fascinating. Very cool that home-made calibration standards can be made in this way.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 6 years ago in reply to shabaz

    Another approach is to use optically clear resin and cast cubes.  The cubes are clouded in varying amounts (5%, 10%, etc.).  These can be ice cube sized, or sized appropriately for your sensors.  We used to use an approach similar to this to create calibration standards for an optical density sensor and it worked out very well.

     

    Gene

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Problemchild
    Problemchild over 6 years ago in reply to fmilburn

    You'll need to calibrate  your own sensor I'm afraid. Pre done sensors are available but far too expensive as he market for them is so small and obviously comercial.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • 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