brewsomeales
Published © GPL3+

3 Zone Temperature Sensor

This is the beginning of a temperature regulated home brew fermentation chamber.

IntermediateShowcase (no instructions)1 hour908
3 Zone Temperature Sensor

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DHT22 Temperature Sensor
DHT22 Temperature Sensor
Used DHT11 3 prong temp sensor
×3
LED (generic)
LED (generic)
×3
Jumper wires (generic)
Jumper wires (generic)
×20

Software apps and online services

Arduino Web Editor
Arduino Web Editor

Story

Read more

Schematics

3_Temperature_Sensors

regulate temperature in a fermentation chamber

Code

3_Temperature_Sensors

C/C++
Reading 3 Temperature Zones and putting a light on per certain temperature reading
#include <DHT.h>
#include <DHT_U.h>
#include "DHT.h"

#define DHTPIN 2  // DHT11 located at Pin 2 
#define DHTTYPE DHT11   // DHT11 3 Legs Left=GND, Middle=DATA, Right=5V Power.
DHT dht(DHTPIN, DHTTYPE);  // Initialize the DHT sensor named dht.
#define DHTPIN 4
#define DHTTYPE DHT11
DHT hot(DHTPIN, DHTTYPE);
#define DHTPIN 8
#define DHTTYPE DHT11
DHT cold(DHTPIN, DHTTYPE);



void setup() 
  // put your setup code here, to run once:
  {
 
  pinMode (7, OUTPUT);
  pinMode (10, OUTPUT);
  pinMode (12, OUTPUT);
  Serial.begin (9600);  // Baud rate of monitor or other display.
  Serial.println ( "Temperature!" );  // displays the word, Temperature !.
  dht.begin();  //Read from the DHT11 sensor labeled dht.
  hot.begin();
  cold.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  delay (1000);  // Represents a 5000 milisecond delay
  float h = dht.readHumidity ();
  float t = dht.readTemperature ();  // Read temperature as Celsius (default)
  float f = dht.readTemperature (true);  // Read temperature as F ( isFahrenheit = true)
  float h2 = hot.readHumidity ();
  float t2 = hot.readTemperature ();
  float f2 = hot.readTemperature (true);
  float h3 = cold.readHumidity ();
  float t3 = cold.readTemperature ();
  float f3 = cold.readTemperature (true);
  
  if (isnan (h) || isnan (t) ||  isnan(f)) {
    Serial.println ( "Failed to read from DHT sensor!");
    delay (10000);
  }
  if (isnan (h2) || isnan (t2) ||  isnan(f2)) {
    Serial.println ( "Failed to read from Hot Chamber sensor!");
    delay (10000);
  }
  if (isnan (h3) || isnan (t3) ||  isnan(f3)) {
    Serial.println ( "Failed to read from Hot Chamber sensor!");
    delay (10000);
  }
  
  float hif = dht.computeHeatIndex (f, h);
  float hic = dht.computeHeatIndex (t, h, false);
   
  Serial.print ( "Fermentor: ");
  Serial.print (hif);
  Serial.println (" *F");
  
  float hif2 = hot.computeHeatIndex (f, h);
  float hic2 = hot.computeHeatIndex (t, h, false);
  
  Serial.print ( "Hot Chamber: ");
  Serial.print (hif2);
  Serial.println ( " *F ");
  
  float hif3 = cold.computeHeatIndex (f, h);
  float hic3 = cold.computeHeatIndex (t, h, false);
  
  Serial.print ( "Cold Chamber: ");
  Serial.print (hif3);
  Serial.println ( " *F ");
  
  if (hif >60){  // Perameter for turning on and flashing led
    digitalWrite (7, HIGH);  //LED Flash 
    delay (300);
    digitalWrite (7, LOW);
    delay (0);  }
  
  if (hif2 >60){  // Perameter for turning on and flashing led
    digitalWrite (10, HIGH);  //LED Flash 
    delay (300);
    digitalWrite (10, LOW);
    delay (0);  }
    
    if (hif3 >60){  // Perameter for turning on and flashing led
    digitalWrite (12, HIGH);  //LED Flash 
    delay (300);
    digitalWrite (12, LOW);
    delay (0);  }
  
}

Credits

brewsomeales
0 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.