{"id":49,"date":"2011-07-25T19:26:24","date_gmt":"2011-07-25T23:26:24","guid":{"rendered":"http:\/\/fll-freak.com\/blog\/?p=49"},"modified":"2025-04-21T00:54:37","modified_gmt":"2025-04-21T04:54:37","slug":"indoor-lightning","status":"publish","type":"post","link":"https:\/\/fll-freak.com\/blog\/?p=49","title":{"rendered":"Indoor Lightning"},"content":{"rendered":"<p>Strange as it may be, my lightning detector goes off every few minutes&#8230; but without the thunder and blinding flash of light. <!--more-->It did not take long to tract the problem down to several things:<\/p>\n<ul>\n<li>My furnace kicking on and off in the adjacent room<\/li>\n<li>Florescent lights turning on and off (mostly with electronic ballasts)<\/li>\n<li>Any sudden draw of current like 5 60W light bulbs coming on at once<\/li>\n<li>Other non specific sources.<\/li>\n<\/ul>\n<p>So how to differentiate lightning from household sparks?<\/p>\n<p>Well I waited many long weeks before a real lightning storm came through the area. And when it did, I had my answer. Real lightning is not at all like my piezo sparker. The sparker is a short two or three pulse event. A lightning strike is hundreds\/thousands of events over up to 100 milliseconds.<\/p>\n<p>So after some thought, I came up with a simple way to capitalize on this signal feature. I simply integrate (sum up) each ADC count as it becomes available. If the time since the last sample is more than 500 milliseconds, I reset the sum back to zero. The last stage is to threshold this value to claim a lightning strike.<\/p>\n<p>Now the strike data I also integrate and over one threshold claim a storm in the distance and over a second claim a danger and start computer shutdown procedures. To prevent this integration from accumulating over a long time, I subtract a small value from the sum every minute. This has the effect of driving the sum towards zero as the lightning strike drives it up.<\/p>\n<p>So far in the few storms that have passed, the system has worked fairly well. I still have not allowed it to shutdown the computers on its own. I want a little more test data first.<\/p>\n<p>Areas to work on:<\/p>\n<ul>\n<li>Move the algorithms into the MSP430 micro and out of the Linux Python code.<\/li>\n<li>Add a small buzzer to the MSP430 and a silence button for audio alerts<\/li>\n<li>Commit the project to either and hand wired\u00a0 board or to a custom PCB<\/li>\n<li>Put the whole thing into an enclosure.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Strange as it may be, my lightning detector goes off every few minutes&#8230; but without the thunder and blinding flash of light.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-lightning-detector","category-projects"],"_links":{"self":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49"}],"version-history":[{"count":9,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/49\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}