Hi guys,
First of all, I'm a junior programmer, so no electrical skills at all. Maybe I'll use some wrong therms but hope someone will understand the problem I'm facing
What I'm trying to do, is a web server where the client controls a home heater (simulated by an LED).
I'm using: - arduino uno R3
- temperature sensor ( 50+ Senzori pentru Placi de Dezvoltare - Robofun.ro )
- relay (similar to this: http://www.dhgate.com/2-channel-relay-module-for-arduino-arm-pic/p-ff80808137e9dbf3013826966df333e8.html )
I've programmed arduino to turn on the relay if the temperature drops under 22C ( the LED simulating the heater will light up)
Problem: each time the relay turns on, the temperature jumps ~2 degrees up - so from 22 C temp gets 24. Lets suppose the real temperature is 22C: now the temperature value in arduino is 24. In order to turn the relay off, temp should drop under 22. So from 24 to 22 temp decreases with 2C, but when it reaches value 22, the real value of temperature is 20. At this point, the temperature from ardiono drops to 20 - correct value;
I've tried many software solutions, but the temperature error is not stable at all - sometimes I get 1 degree error, somethimes 3 degrees;
What i've tried: - Chebyshev filter (Chebyshev filter - Wikipedia) - worked somehow, but still not accurate.
- Connected Arduino 3V3 pin to Arduino AREF pin like in the second image Using a Temp Sensor | TMP36 Temperature Sensor | Adafruit Learning System but didn't used any of those resistors because I don't know what type is the one from left, connected to 3v3 pin and analog pin0. If someone knows, I'll appreciate his help.
I'd be very happy to find a solution to this..
Thanks