{"id":558,"date":"2019-01-05T14:56:43","date_gmt":"2019-01-05T14:56:43","guid":{"rendered":"http:\/\/www.adrian-smith31.co.uk\/blog\/?p=558"},"modified":"2020-11-09T17:10:56","modified_gmt":"2020-11-09T17:10:56","slug":"gas-and-smoke-detector-update","status":"publish","type":"post","link":"https:\/\/www.adrian-smith31.co.uk\/blog\/2019\/01\/gas-and-smoke-detector-update\/","title":{"rendered":"Gas and smoke detector update"},"content":{"rendered":"<p><a href=\"http:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2018\/03\/Gas_monitor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-366 alignleft\" src=\"http:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2018\/03\/Gas_monitor-205x300.jpg\" alt=\"\" width=\"205\" height=\"300\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2018\/03\/Gas_monitor-205x300.jpg 205w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2018\/03\/Gas_monitor.jpg 539w\" sizes=\"auto, (max-width: 205px) 100vw, 205px\" \/><\/a>A while ago I made a rather silly project as I had a spare MQ2 sensor laying round left over from a previous experiment. I decided to build a circuit that simply displays the analog value from the sensor on a 7 segment display. It was a bit pointless but it did detect gas, farts \ud83d\ude42 and smoke. I have since modified the project so it displays more meaningful results. I used an example to calculate the parts per million reading from the sensor by using a formula that works it out from the sensor&#8217;s response curve. This is found in the device&#8217;s data sheet. I still don&#8217;t expect it to be accurate but it definitely works.<\/p>\n<p>I&#8217;m going to be re-visiting some of my earlier projects and either scrapping or improving them now that I have learnt more about embedded programming and Ansi C \/ C++.<\/p>\n<p>The original post and modified code is <a href=\"http:\/\/www.adrian-smith31.co.uk\/blog\/2018\/02\/what-to-do-with-a-blown-faulty-atmega328-dont-throw-it-out-it-may-still-be-useful\/\">here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while ago I made a rather silly project as I had a spare MQ2 sensor laying round left over from a previous experiment. I decided to build a circuit that simply displays the analog value from the sensor on a 7 segment display. It was a bit pointless but it did detect gas, farts [&hellip;]<\/p>\n","protected":false},"author":179,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Gas and smoke detector update - Adrian's electronics blog","description":"A while ago I made a rather silly project as I had a spare MQ2 sensor laying round left over from a previous experiment. I decided to build a circuit that simpl"},"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-558","post","type-post","status-publish","format-standard","hentry","category-microcontrollers","category-projects"],"_links":{"self":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/users\/179"}],"replies":[{"embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":4,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"predecessor-version":[{"id":562,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/558\/revisions\/562"}],"wp:attachment":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}