Paul RomanoEryk Cygielski
Published

Lane of Things - Group 709

We built a system to monitor the water temperature and clarity within a fish tank for the lane tech aquaponics class.

BeginnerShowcase (no instructions)3 hours835
Lane of Things - Group 709

Things used in this project

Hardware components

Photon
Particle Photon
×1
DFRobot Gravity: Analog Turbidity Sensor For Arduino
×1
DHT22 Temperature Sensor
DHT22 Temperature Sensor
×1
Dallas Temp DS18B20
×1

Story

Read more

Custom parts and enclosures

Enclosure File

The .ai of the enclosure in its final form.

Schematics

Aqua Sensor Diagram

Sensor Diagram

Code

Aqua Sensor Code

Arduino
Code for the particle microcontroller
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_DHT.h>

#define DHTPIN 0
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);

int tSensor;
double tVolt;
double checkHum;
double checkTemp;
double hum;
double wTemp;

void setup()
{
    Serial.begin(9600);
    pinMode(DHTPIN, INPUT);
    Particle.variable("tVolt", tVolt);
    Particle.variable("hum", hum);
    Particle.variable("wTemp", wTemp);
}

void loop()
{
    tSensor = analogRead(A0);
    tVolt = tSensor * (5.0/1024.0);
    
    checkHum = dht.getHumidity();
    checkTemp = dht.getTempFarenheit();
    
    if (checkHum > 0 && checkHum < 100)
        hum = checkHum;
        
    if (checkTemp > 32 && checkTemp < 100)
        wTemp = checkTemp;

    Serial.println("Analog: " + String(tSensor) + " | " + String(tVolt) + "V");
    Serial.println("Temp: " + String(checkTemp));
    Serial.println("Hum: " + String(checkHum));
    
    Serial.println("--------------------");
    
    delay(500);
}

Credits

Paul Romano

Paul Romano

-1 projects • 0 followers
Eryk Cygielski

Eryk Cygielski

-1 projects • 0 followers

Comments