{"id":502,"date":"2022-11-22T17:52:26","date_gmt":"2022-11-22T17:52:26","guid":{"rendered":"https:\/\/portfolio.wcu.edu\/jrnichols4\/?p=502"},"modified":"2022-11-23T04:25:25","modified_gmt":"2022-11-23T04:25:25","slug":"flame-sensor-and-relay","status":"publish","type":"post","link":"https:\/\/portfolio.wcu.edu\/jrnichols4\/2022\/11\/22\/flame-sensor-and-relay\/","title":{"rendered":"Flame Sensor and Relay"},"content":{"rendered":"<p>In this project, we were originally supposed to use a temperature sensor to detect a fire and then signal to a relay to turn on a fan, but the temperature sensor only worked when in contact with the heat source so we jury-rigged the temperature sensor into an IR sensor.<\/p>\n<p>&nbsp;<\/p>\n<p>Our original sensors looked like this, (<a href=\"https:\/\/arduinomodules.info\/ky-028-digital-temperature-sensor-module\/\">Image source<\/a>).<\/p>\n<p><img decoding=\"async\" class=\"n3VNCb KAlRDb\" src=\"https:\/\/arduinomodules.info\/wp-content\/uploads\/KY-028_Digital_temperature_module_arduino.jpg\" alt=\"KY-028 Digital Temperature Sensor Module - ArduinoModulesInfo\" data-noaft=\"1\" \/><\/p>\n<p>Mine currently looks like this<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.discordapp.com\/attachments\/557636131114582076\/1044668249876480111\/IMG_0352.jpg\" \/><\/p>\n<p>With the newly modified sensor, I used this code to read the output from the sensor and use that to switch a relay when it senses infrared light.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.discordapp.com\/attachments\/557636131114582076\/1044666441842032660\/image.png\" \/><\/p>\n<p>The relay is normally closed, which means there isn&#8217;t power running out of it unless it is switched. In other words, there isn&#8217;t power running to the fan from the relay unless there is a signal from pin 13 on the Arduino. So if the IR sensor picks up a certain level of infrared light, it signals the normally closed relay to switch and allow power to run through it to the fan. This is demonstrated in the <a href=\"https:\/\/www.youtube.com\/watch?v=dwfU3oaqVEs\">following YouTube video<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Flame Sensor Relay\" width=\"1080\" height=\"608\" src=\"https:\/\/www.youtube.com\/embed\/dwfU3oaqVEs?feature=oembed\"  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this project, we were originally supposed to use a temperature sensor to detect a fire and then signal to a relay to turn on a fan, but the temperature sensor only worked when in contact with the heat source so we jury-rigged the temperature sensor into an IR sensor. &nbsp; Our original sensors looked [&hellip;]<\/p>\n","protected":false},"author":1929,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-502","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/users\/1929"}],"replies":[{"embeddable":true,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/comments?post=502"}],"version-history":[{"count":3,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/posts\/502\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/media?parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/categories?post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/portfolio.wcu.edu\/jrnichols4\/wp-json\/wp\/v2\/tags?post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}