A student project for ENGR114 at Portland Community College. Uses MATLAB to read a turbidity sensor connected to an Arudino over serial.
Our group was tasked with creating MATLAB code to call data from an Arduino hooked up to a turbidity sensor for the hydroponic fish tank-garden in the engineering department. Using Arduino and MATLAB the water turbidity produced from a TSW-10 Turbidity Sensor will produce measurements that will be uploaded to ThingSpeak via MATLAB where progressive turbidity data will be stored and plotted against time for any necessary reference. A plot of the turbidity as a function of time will also be generated for a visual representation of the turbidity. The Arduino will produce an analog reading for turbidity that is converted to a voltage reading (where more voltage is less turbid water), then which MATLAB outputs the NTU reading for correct tubidity units.
component | vendor |
---|---|
Arduino | SparkFun RedBoard - Programmed with Arduino |
Turbidity Sensor | Gravity Analog Turbidity Sensor |
Jumper wires | Jumper Wires Premium 6" M/M Pack of 10 |
Mini-B USB cable | SparkFun USB Mini-B Cable - 6 Foot |
3D-Print Boat Template | Thingiverse |
The turb_sens_1_2.ino script was run in Arduino.
The NTU_code_3_15.m script was run in MATLAB.
Future work for the turbidity sensor could involve integrating the temperature sensor to dial into a more accurate reading as there is a correlation between turbidity and temperature. Adding a wifi shield would be a helpful component as well and eliminate the need for a laptop to be present at the fish tank. Turbidity effects the fish health, cleaner water produces healthier fertilization, healthier feritilization results in healthier plants, healthier plants results in better fruit production, and so forth.
GNU General Public License v3.0