Page 1 of 1

DTH11 sensor with relay

Posted: Wed Jan 04, 2017 12:06 am
by Artis
Hi can someone know how to connect relay to DTH11 sensor temperature readings. I added my flowcode file, in it in decison "relay ieslegsanas" i want to input "str>28" but its give me error. i think is becauce i should change str to bite. But when i do that my sensor readings aren't fine.

Re: DTH11 sensor with relay

Posted: Wed Jan 04, 2017 10:51 am
by Benj
Hello,

This should hopefully help. I use the strings to send data to the LCD and then read the temperature value again but this time as a whole number rather than a string. This way I can make the comparison directly on the value.
DHT11_Strada.fcfx
(11.52 KiB) Downloaded 267 times
You could add some hysteresis to stop the relay from oscillating on and off like this.
Hyst.jpg
Hyst.jpg (33.06 KiB) Viewed 3166 times

Re: DTH11 sensor with relay

Posted: Wed Jan 04, 2017 8:56 pm
by Artis
Thanks it's help a lot.