<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection</link><pubDate>Fri, 13 Oct 2023 13:56:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Current Revision posted to Documents by cstanton on 10/13/2023 1:56:11 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when Andy was chatting with his friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. He mentioned that he&amp;#39;d been experimenting with radar-based human presence detection modules.&amp;nbsp;&amp;nbsp;&lt;span class="TextRun SCXW43487033 BCX0" lang="EN-US" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;In this episode, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Andy&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; embarks on a Halloween-inspired engineering adventure. &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Smoke machines are a staple when it comes to setting up a spooky &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;atmosphere&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;so why not&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; reverse&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;-&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;engineer&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; one?&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; However, before delving into the circuitry, Andy emphasize&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;s&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; the importance of safety when dealing with smoke machines, highlighting the risks associated with their heaters and mains voltages.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW43487033 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because he&amp;#39;s going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. He thought it was a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;After ensuring the machine is safely powered down, Andy carefully dissects it, revealing its inner components. He uncovers a simple control box with LEDs and a button, which seem to be a system for disabling the button when the machine is not properly warmed up. &amp;nbsp;The machine itself houses a pump, heating element, and temperature sensor, which he reverse-engineers in order to devise a method for automating the process. The goal is to trigger the smoke machine automatically when it detects a human presence via motion sensor.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To replace the remote control, Andy designs a custom control circuit, which includes added protection measures. He incorporates components like a relay, opto-isolator, RC snubber, and MOV varistor to ensure reliable operation and prevent interference. The inclusion of TVS diodes and a PTC fuse on the input side enhances safety.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When he took it apart to see the electronics, the main thing he noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. He&amp;#39;s seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, he suspected the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing he&amp;#39;s found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, he installed a relay contact, and for the LED, he used an opto-coupler. He had initially used an opto-coupler to drive the relay, but when testing, he found that needed quite a bit of current to activate. He swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, He decided to add protection too. He added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, he added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, he decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. he realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, he decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, he tries driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although he mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span data-contrast="auto"&gt;For the input side, you can apply a low voltage across the photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before he soldered the Pi Pico in place he tested the other components and realized that he had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, he realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. He reproduced that in his circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. Andy&amp;#39;s friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, Andy thought he&amp;rsquo;d be quite capable of maintaining a Python program. He considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span data-contrast="auto"&gt;Downloads and Support Links &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/secret-element14-presents/m/files/148354" data-e14adj="t"&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spider&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-63651" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('63651'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-e8c9c" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('e8c9c'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-cd315" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('cd315'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b0d20" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b0d20'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-cb683" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('cb683'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d6c10" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d6c10'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-300c6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('300c6'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3be3d" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('3be3d'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-af614" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('af614'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d0e4b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d0e4b'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-03b4a" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('03b4a'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-80df1" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('80df1'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-f3516" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('f3516'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-bc685" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('bc685'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-181bb" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('181bb'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-f9b75" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('f9b75'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-65a69" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('65a69'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection/revision/5</link><pubDate>Fri, 13 Oct 2023 13:31:53 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Revision 5 posted to Documents by pchan on 10/13/2023 1:31:53 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when Andy was chatting with his friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. He mentioned that he&amp;#39;d been experimenting with radar-based human presence detection modules.&amp;nbsp;&amp;nbsp;&lt;span class="TextRun SCXW43487033 BCX0" lang="EN-US" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;In this episode, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Andy&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; embarks on a Halloween-inspired engineering adventure. &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Smoke machines are a staple when it comes to setting up a spooky &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;atmosphere&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;so why not&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; reverse&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;-&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;engineer&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; one?&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; However, before delving into the circuitry, Andy emphasize&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;s&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; the importance of safety when dealing with smoke machines, highlighting the risks associated with their heaters and mains voltages.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW43487033 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because he&amp;#39;s going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. He thought it was a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;After ensuring the machine is safely powered down, Andy carefully dissects it, revealing its inner components. He uncovers a simple control box with LEDs and a button, which seem to be a system for disabling the button when the machine is not properly warmed up. &amp;nbsp;The machine itself houses a pump, heating element, and temperature sensor, which he reverse-engineers in order to devise a method for automating the process. The goal is to trigger the smoke machine automatically when it detects a human presence via motion sensor.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To replace the remote control, Andy designs a custom control circuit, which includes added protection measures. He incorporates components like a relay, opto-isolator, RC snubber, and MOV varistor to ensure reliable operation and prevent interference. The inclusion of TVS diodes and a PTC fuse on the input side enhances safety.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When he took it apart to see the electronics, the main thing he noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. He&amp;#39;s seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, he suspected the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing he&amp;#39;s found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, he installed a relay contact, and for the LED, he used an opto-coupler. He had initially used an opto-coupler to drive the relay, but when testing, he found that needed quite a bit of current to activate. He swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, He decided to add protection too. He added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, he added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, he decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. he realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, he decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, he tries driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although he mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the input side, you can apply a low voltage across the photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before he soldered the Pi Pico in place he tested the other components and realized that he had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, he realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. He reproduced that in his circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. Andy&amp;#39;s friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, Andy thought he&amp;rsquo;d be quite capable of maintaining a Python program. He considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Full code is available at: &lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spiders&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hcg56phe0"&gt;&lt;span&gt;Bonus Content:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/secret-element14-presents/m/files/148354" data-e14adj="t"&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-551c1" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('551c1'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-144f0" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('144f0'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-9faaf" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('9faaf'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-39b5f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('39b5f'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-a262b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('a262b'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-ccb48" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('ccb48'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-8ef22" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('8ef22'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-edb32" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('edb32'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3ecca" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('3ecca'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3a658" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('3a658'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d6654" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d6654'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-70546" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('70546'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-a7350" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('a7350'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3a456" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('3a456'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4238e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('4238e'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-99869" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('99869'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-55545" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('55545'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection/revision/3</link><pubDate>Thu, 12 Oct 2023 15:39:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Revision 3 posted to Documents by tariq.ahmad on 10/12/2023 3:39:37 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when Andy was chatting with his friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. He mentioned that he&amp;#39;d been experimenting with radar-based human presence detection modules.&amp;nbsp;&amp;nbsp;&lt;span class="TextRun SCXW43487033 BCX0" lang="EN-US" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;In this episode, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Andy&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; embarks on a Halloween-inspired engineering adventure. &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Smoke machines are a staple when it comes to setting up a spooky &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;atmosphere&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;so why not&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; reverse&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;-&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;engineer&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; one?&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; However, before delving into the circuitry, Andy emphasize&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;s&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; the importance of safety when dealing with smoke machines, highlighting the risks associated with their heaters and mains voltages.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW43487033 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because he&amp;#39;s going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. He thought it was a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;After ensuring the machine is safely powered down, Andy carefully dissects it, revealing its inner components. He uncovers a simple control box with LEDs and a button, which seem to be a system for disabling the button when the machine is not properly warmed up. &amp;nbsp;The machine itself houses a pump, heating element, and temperature sensor, which he reverse-engineers in order to devise a method for automating the process. The goal is to trigger the smoke machine automatically when it detects a human presence via motion sensor.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To replace the remote control, Andy designs a custom control circuit, which includes added protection measures. He incorporates components like a relay, opto-isolator, RC snubber, and MOV varistor to ensure reliable operation and prevent interference. The inclusion of TVS diodes and a PTC fuse on the input side enhances safety.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When he took it apart to see the electronics, the main thing he noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. He&amp;#39;s seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, he suspected the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing he&amp;#39;s found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, he installed a relay contact, and for the LED, he used an opto-coupler. He had initially used an opto-coupler to drive the relay, but when testing, he found that needed quite a bit of current to activate. He swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, He decided to add protection too. He added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, he added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, he decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. he realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, he decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, he tries driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although he mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the input side, you can apply a low voltage across the photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before he soldered the Pi Pico in place he tested the other components and realized that he had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, he realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. He reproduced that in his circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. Andy&amp;#39;s friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, Andy thought he&amp;rsquo;d be quite capable of maintaining a Python program. He considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Full code is available at: &lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spiders&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hcg56phe0"&gt;&lt;span&gt;Bonus Content:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/secret-element14-presents/m/files/148354" data-e14adj="t"&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-9b9e1" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('9b9e1'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4e3c7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('4e3c7'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-e725b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('e725b'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-62593" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('62593'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-83a2d" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('83a2d'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-fa8b6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('fa8b6'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-bd7f7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('bd7f7'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1d565" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('1d565'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-91bbe" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('91bbe'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-dbb09" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('dbb09'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1e410" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('1e410'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-cebe6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('cebe6'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1aee9" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('1aee9'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-52167" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('52167'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d535e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d535e'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-ded06" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('ded06'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-a4470" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('a4470'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection/revision/4</link><pubDate>Thu, 12 Oct 2023 15:39:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Revision 4 posted to Documents by pchan on 10/12/2023 3:39:37 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when Andy was chatting with his friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. He mentioned that he&amp;#39;d been experimenting with radar-based human presence detection modules.&amp;nbsp;&amp;nbsp;&lt;span class="TextRun SCXW43487033 BCX0" lang="EN-US" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;In this episode, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Andy&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; embarks on a Halloween-inspired engineering adventure. &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;Smoke machines are a staple when it comes to setting up a spooky &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;atmosphere&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;, &lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;so why not&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; reverse&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;-&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;engineer&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; one?&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; However, before delving into the circuitry, Andy emphasize&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt;s&lt;/span&gt;&lt;span class="NormalTextRun SCXW43487033 BCX0"&gt; the importance of safety when dealing with smoke machines, highlighting the risks associated with their heaters and mains voltages.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW43487033 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because he&amp;#39;s going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. He thought it was a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;After ensuring the machine is safely powered down, Andy carefully dissects it, revealing its inner components. He uncovers a simple control box with LEDs and a button, which seem to be a system for disabling the button when the machine is not properly warmed up. &amp;nbsp;The machine itself houses a pump, heating element, and temperature sensor, which he reverse-engineers in order to devise a method for automating the process. The goal is to trigger the smoke machine automatically when it detects a human presence via motion sensor.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To replace the remote control, Andy designs a custom control circuit, which includes added protection measures. He incorporates components like a relay, opto-isolator, RC snubber, and MOV varistor to ensure reliable operation and prevent interference. The inclusion of TVS diodes and a PTC fuse on the input side enhances safety.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When he took it apart to see the electronics, the main thing he noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. He&amp;#39;s seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, he suspected the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing he&amp;#39;s found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, he installed a relay contact, and for the LED, he used an opto-coupler. He had initially used an opto-coupler to drive the relay, but when testing, he found that needed quite a bit of current to activate. He swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, He decided to add protection too. He added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, he added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, he decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. he realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, he decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, he tries driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although he mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the input side, you can apply a low voltage across the photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before he soldered the Pi Pico in place he tested the other components and realized that he had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, he realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. He reproduced that in his circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. Andy&amp;#39;s friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, Andy thought he&amp;rsquo;d be quite capable of maintaining a Python program. He considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Full code is available at: &lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spiders&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hcg56phe0"&gt;&lt;span&gt;Bonus Content:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/secret-element14-presents/m/files/148354" data-e14adj="t"&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-04033" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('04033'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-50a99" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('50a99'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-afeed" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('afeed'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-73c00" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('73c00'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-223e4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('223e4'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d1a11" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d1a11'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-e1a6f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('e1a6f'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-c086f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('c086f'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6ef0b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('6ef0b'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-8267d" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('8267d'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6bada" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('6bada'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-68333" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('68333'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b42a4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b42a4'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-7e71c" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('7e71c'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-dae4b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('dae4b'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1efb5" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('1efb5'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b4a39" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b4a39'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection/revision/2</link><pubDate>Wed, 11 Oct 2023 20:23:02 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Revision 2 posted to Documents by tariq.ahmad on 10/11/2023 8:23:02 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when I was chatting with my friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. I mentioned that I&amp;#39;d been experimenting with radar-based human presence detection modules.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because I was going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. I thought that a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When I took it apart to see the electronics, the main thing I noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. I&amp;#39;ve seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, I suspect the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing I&amp;#39;ve found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, I installed a relay contact, and for the LED, I used an opto-coupler. I had initially used an opto-coupler to drive the relay, but when testing, I found that needed quite a bit of current to activate. I swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, I decided to add protection too. I added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, I added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, I decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. I realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, I decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, we try driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although I mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the input side, we can apply a low voltage across our photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before I soldered the Pi Pico in place I tested the other components and realized that I had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, I realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. I reproduced that in my circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. My friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, I thought he&amp;rsquo;d be quite capable of maintaining a Python program. I had considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Full code is available at: &lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spiders&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hcg56phe0"&gt;&lt;span&gt;Bonus Content:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/secret-element14-presents/m/files/148354" data-e14adj="t"&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-f7d67" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('f7d67'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b0973" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b0973'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-a911e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('a911e'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-bc00c" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('bc00c'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-68d3e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('68d3e'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-62413" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('62413'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-af057" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('af057'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-125d7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('125d7'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-accb8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('accb8'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4778b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('4778b'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-48955" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('48955'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-41a38" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('41a38'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-584ef" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('584ef'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-45044" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('45044'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-7e095" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('7e095'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-84dea" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('84dea'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-8e5c8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('8e5c8'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item><item><title>Episode 624: Modding A Smoke Machine to Add Motion Detection</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection/revision/1</link><pubDate>Wed, 11 Oct 2023 20:15:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a678801c-1645-46e5-97fd-ba5c3f50a5ff</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28342/episode-624-modding-a-smoke-machine-to-add-motion-detection#comments</comments><description>Revision 1 posted to Documents by tariq.ahmad on 10/11/2023 8:15:56 PM&lt;br /&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;This project came about when I was chatting with my friend Andrew about Halloween. He wanted to know how easy it was to trigger effects from the motion of people passing by. I mentioned that I&amp;#39;d been experimenting with radar-based human presence detection modules.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=bsARcwzV21Q"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The effect to trigger was a smoke machine. Smoke machines are inexpensive and because I was going to be taking it apart, it made sense to get a new one rather than break Andrew&amp;rsquo;s only one. One thing that stood out in the manual was the warning that the remote control button had mains level voltages, 240v AC in the UK. I thought that a bit strange and knew it could add challenges to the project, particularly around safety.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;When I took it apart to see the electronics, the main thing I noticed was that there were hardly any components. The control box consisted of a PCB with two LEDs and one button. Three wires headed back to the unit. The LEDs turn on when the heater is up to temperature. I&amp;#39;ve seen this kind of thing with welders where it is called &amp;quot;Duty Cycle&amp;quot;; you can only run the system for a period of time before you need to let it take a break. In this case, I suspect the smoke cools the heater and it needs time to warm up again.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/3247.MicrosoftTeams_2D00_image-_2800_2_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;In the smoke machine were small devices that appeared to be a pump, heating element, and some kind of temperature sensor. The rest of the box was empty, apart from a space for the bottle of smoke liquid. The temperature sensor turned out to be a simple bimetallic strip, which opened a switch when it reached the desired temperature.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The thing I&amp;#39;ve found with these really simple designs is that they can often be tuned to the components they have; this is an important factor when swapping in automation circuitry.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the switch, I installed a relay contact, and for the LED, I used an opto-coupler. I had initially used an opto-coupler to drive the relay, but when testing, I found that needed quite a bit of current to activate. I swapped it for a TIP31C transistor, which worked reliably. It required a bit of reworking of the board, but conveniently the transistor fit in the holes left by the opto-coupler.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/8037.MicrosoftTeams_2D00_image-_2800_3_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To prevent radio interference when the relay was activated, I added an &amp;quot;RC snubber&amp;quot;, a component that resembles a large capacitor, but also contains a small resistance. This stops clicks and pops in the radio or mobile when the contacts make or break. It is important to get a device that is rated for 240V. On top of this, I added an MOV (or varistor), which suppresses spikes and prevents the relay contacts from welding shut if there is a high current due to an inductive load such as a motor, or in this case, a pump.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;On the input side, I decided to add protection too. I added some TVS diodes to ensure that the voltage across the LEDs does not get too high. Next, I added a PTC fuse; this ensures that the current through the opto-coupler is restricted.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;To control the system, I decided on a Pi Pico as they are inexpensive. In addition, the MicroPython coding is straightforward, making it easier to modify, if necessary.  Pi Picos are easy to power from batteries.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The human presence sensor provides a logic level output, which goes high when a person is detected. I realized, however, that this is a 5V signal, and the Pi runs at 3.3V. To keep things simple, I decided on a 5V boost regulator to provide the power for the sensor and a simple resistive potential divider to set the logic level back to 3.3V.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/2260.MicrosoftTeams_2D00_image-_2800_4_2900_.png" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The opto-coupler connected to &amp;quot;heater ready&amp;quot; signal is pulsed at 50Hz. But because this is an AC signal, the diode will only be conducting on half the cycle. In order to detect this, the number of pulses are counted each second. If this is above a limit (approximately 20), it would signal that the heater was ready and smoke could be triggered.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Testing&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The circuit is best tested with low level signals before the mains voltages are applied. &lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before populating the Pi Pico, we try driving the opto-coupler using a wire from the battery to the input pin and listen for the relay&amp;rsquo;s click on. Adding an LED and resistor to form a circuit on the high side will test that the relay circuit is working, although I mostly tested that by listening for the click when the coil was energized.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;For the input side, we can apply a low voltage across our photo transistor either by using a simple AC transformer or a signal generator&lt;/span&gt;&lt;span data-contrast="auto"&gt;.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/7041.MicrosoftTeams_2D00_image-_2800_5_2900_.png" /&gt;&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Before I soldered the Pi Pico in place I tested the other components and realized that I had also wired the inbound optocoupler to the battery VSys rather than the V3.3. So another little adjustment was needed for the board. Finally, I realized rather late that the LEDs in the remote also had a tiny resistor, hiding under the board. I reproduced that in my circuit by breaking the track and soldering across the pins of the related components.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt;Code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;The code for the project was written in MicroPython. My friend is a professional .NET software developer, but he doesn&amp;rsquo;t have a lot of experience with C. However, I thought he&amp;rsquo;d be quite capable of maintaining a Python program. I had considered the Meadow board series, but those are quite expensive, and the Pi Pico seemed a better choice. The main challenge was detecting pulses. That was accomplished using an interrupt to look for the change of state on an I/O pin and simply counting them. A timer then checks to see how many pulses have been detected.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;A second interrupt checks to see if the motion sensor has changed states, and when both conditions are met, the code utilizes some randomization to generate the effect without being too predictable.&lt;/span&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;Full code is available at: &lt;a id="" href="https://github.com/Workshopshed/Spiders" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://github.com/Workshopshed/Spiders&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span data-contrast="auto"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hcg56phe0"&gt;&lt;span&gt;Bonus Content:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Download Code&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hcg5j6jc3"&gt;Bill of Material:&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-bd8f5" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663,2885658~2,3374763~2,17127720,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2&amp;nsku=95Y2774 ,57AC7626~2,78AK9993~2,57P71060,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_BUY_KIT" class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('bd8f5'));" data-farnell="3446663,2885658~2,3374763~2,1712772~10,3643332~2,3235855~3,3556340~2,3531522,3009698,1021351~2,2946123~2,3780503~30,3770785,1175831,1886342~2,9801197~2" data-newark="95Y2774 ,57AC7626~2,78AK9993~2,57P7106~10,22AJ1097 ~2,44X2573~3,84AH0154~2,33AC5885,89K1130,05C3357~2,79AC7371~2,29AK2181~30,54AJ3157,26M0483,48F5884 ~2,35X2609 ~2" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Kit&lt;/a&gt; &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EQUINOX Fog Machine with On/Off Remote, 400W&lt;/td&gt;
&lt;td&gt;EQUINOX&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-f4851" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3446663&amp;nsku=95Y2774 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('f4851'));" data-farnell="3446663" data-newark="95Y2774 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY Power Relay, SPST-NO, 5 VDC, 8 A, V23061, Through Hole, Non Latching&lt;/td&gt;
&lt;td&gt;SCHRACK - TE CONNECTIVITY&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-9b52f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2885658&amp;nsku=57AC7626&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('9b52f'));" data-farnell="2885658" data-newark="57AC7626" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plastic Enclosure, Multipurpose, Polypropylene (PP), 80 mm, 200 mm, 160 mm, IP65&lt;/td&gt;
&lt;td&gt;ETERNA&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4f802" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3374763&amp;nsku=78AK9993&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('4f802'));" data-farnell="3374763" data-newark="78AK9993" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 10MM&lt;/td&gt;
&lt;td&gt;VCC (VISUAL COMMUNICATIONS COMPANY)&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1bf09" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1712772&amp;nsku=57P7106&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('1bf09'));" data-farnell="1712772" data-newark="57P7106" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RASPBERRY-PI SBC, Raspberry Pi Pico, RP2040, ARM Cortex-M0+, 264kB RAM, 2MB Flash, Micro-USB&lt;/td&gt;
&lt;td&gt;RASPBERRY-PI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-388ee" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3643332&amp;nsku=22AJ1097 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('388ee'));" data-farnell="3643332" data-newark="22AJ1097 " data-comoverride="" data-cmpoverride="" data-cpc="SC17106" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WAGO Wire-To-Board Terminal Block, Black, 1 Ways, 20 AWG, 16 AWG, 1.5 mm&amp;sup2;, Push In&lt;/td&gt;
&lt;td&gt;WAGO&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-f3fe8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3235855&amp;nsku=44X2573&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('f3fe8'));" data-farnell="3235855" data-newark="44X2573" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MULTICOMP PRO Rocker Switch, IP65, On-None-Off, DPST, Non Illuminated, Panel Mount, Black&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d9ad8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3556340&amp;nsku=84AH0154&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('d9ad8'));" data-farnell="3556340" data-newark="84AH0154" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PULSE Medium Fog Fluid, 5 Litre&lt;/td&gt;
&lt;td&gt;PULSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b8c09" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3531522&amp;nsku=33AC5885&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b8c09'));" data-farnell="3531522" data-newark="33AC5885" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TEXAS INSTRUMENTS TRANSISTOR ARRAY, NPN, 2003, DIP16&lt;/td&gt;
&lt;td&gt;TEXAS INSTRUMENTS&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3ba6f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3009698&amp;nsku=89K1130&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('3ba6f'));" data-farnell="3009698" data-newark="89K1130" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ONSEMI Optocoupler, Transistor Output, 1 Channel, DIP, 6 Pins, 60 mA, 7.5 kV, 100 %&lt;/td&gt;
&lt;td&gt;ONSEMI&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b8cda" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1021351&amp;nsku=05C3357&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b8cda'));" data-farnell="1021351" data-newark="05C3357" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DFROBOT Add-On Board, Microwave Sensor, Gravity Series, Arduino, Digital Interface&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b3ef3" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946123&amp;nsku=79AC7371&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('b3ef3'));" data-farnell="2946123" data-newark="79AC7371" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED, RED, 3MM&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-e9a0c" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3780503&amp;nsku=29AK2181&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('e9a0c'));" data-farnell="3780503" data-newark="29AK2181" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Varistor, 275 V, 350 V, 14D Series, 710 V, Disc 14mm, Metal Oxide Varistor (MOV)&lt;/td&gt;
&lt;td&gt;YAGEO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-185d8" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3770785&amp;nsku=54AJ3157&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('185d8'));" data-farnell="3770785" data-newark="54AJ3157" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PTC Fuse&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-379e0" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1175831&amp;nsku=26M0483&amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('379e0'));" data-farnell="1175831" data-newark="26M0483" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TVS Diode 5v&lt;/td&gt;
&lt;td&gt;LITTELFUSE&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6294d" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1886342&amp;nsku=48F5884 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('6294d'));" data-farnell="1886342" data-newark="48F5884 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1N5817 1A 20V Schottky Rectifier Diode&lt;/td&gt;
&lt;td&gt;STMICROELECTRONICS&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-859c4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=9801197&amp;nsku=35X2609 &amp;COM=e14c-noscript&amp;CMP=e14c-noscript&amp;osetc=e14-noscript-tracking-loss" data-at-label="PRODUCT_POPUP_OPEN"class="e14-embedded e14_shopping-cart-far e14-button" onclick="event.preventDefault();e14.func.displayProduct(e14.meta.user.country, this, 'embedded-link', e14.func.getProductLinkJSON('859c4'));" data-farnell="9801197" data-newark="35X2609 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hcg5jqdg4"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Adafruit MiniBoost 5V @ 100mA Charge Pump AP3602A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spiders (1 large, 4 small)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resistors (various)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Battery Holder, 3 x C Type&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/4915/vcp-biography-workshopshed---andy-clark" data-e14adj="t"&gt;Andy&amp;#39;s Profile&lt;/a&gt; &amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin:0;"&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Electronics safety, Maker's guide, Technical dissection, halloween projects, Engineering insights, Smoke machine, circuit design, Opto-isolation, Electronics tutorials, Tech enthusiasts, Control circuit, reverse engineering, Electrical components, diy electronics, e14p_AC, friday_release, Hands-on learning&lt;/div&gt;
</description></item></channel></rss>