Hi there. Can you help me change temperature code for my fireplace? - Rex in New Zealand.
Here is what we do with it:
We have a fireplace with a wetback / water heating piece of copper in it with water running through it. It then goes to our hot water cylinder.
On the top pipe of the wetback is a lm35 arduino sensor. It goes to the arduino uno. The arduino uno has an output to a relay which turns on a pump and waaalaa the water pumps off to the cylinder and we all get a shower.
The problem is when the cylinder reaches above the pre set temperature in the arduino code the pump stays on and consumes all our electricity.
What I need want is this: I want the arduino to turn the pump on when the temperature is above 39 Degrees but I also want the arduino to only run the pump for 20 seconds every 5 min after the arduino reaches 50 degrees.
We are not running a lcd display so you can delete the display code.
Below is the code we are using now.
Can you techie folks out there change my code to do the above and post it back here or email it to me rex@rexshort.co.nz
Thanks heaps. Rex in NZ.
#include <LiquidCrystal.h>
int reading = 0;
int sensorPin = A0;
int relay =7;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
pinMode(relay,OUTPUT);
}
void loop() {
reading = analogRead(sensorPin);
int celsius = reading/2;
lcd.setCursor(0, 0);
lcd.print("Temperature:");
lcd.setCursor(0,1);
lcd.print(celsius, DEC);
lcd.print((char)223);
lcd.print("C");
if (celsius >39) {
digitalWrite(7,HIGH);
} else {
digitalWrite(7,LOW);
}
delay(10000);
lcd.clear();
}
fireplace.ino (738 Bytes)