<?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>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686</link><pubDate>Thu, 16 Oct 2025 10:41:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>e14sbhargav</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Current Revision posted to Documents by e14sbhargav on 10/16/2025 10:41:49 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh0"&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/lThNzvftBzE"&gt;https://youtu.be/lThNzvftBzE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh1" data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="238" data-end="695"&gt;More than 30 years ago, Mark was playing saxophone in a pop band. That experience exposed him to different cultures and creative environments, including people who viewed art in unconventional ways. One friend in particular was always experimenting with interactive pieces: a curtain that opened and closed when someone entered a room, a cigarette lighter that warned, &lt;em data-start="608" data-end="624"&gt;&amp;ldquo;Don&amp;rsquo;t do it!&amp;rdquo;&lt;/em&gt;, and even a glass that refilled itself each time someone took a sip.&lt;/p&gt;
&lt;p data-start="697" data-end="1022"&gt;Among all her ideas, there was one she never managed to realise. Long before &lt;em data-start="774" data-end="788"&gt;Harry Potter&lt;/em&gt; or affordable hobby electronics, she wanted a photo frame that whispered to anyone who walked by. The thought of a painting quietly saying &lt;em data-start="932" data-end="943"&gt;&amp;ldquo;psst...&amp;rdquo;&lt;/em&gt; to a passerby was both strange and amusing, a piece of art that felt alive.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;Mark recently remembered that idea while preparing for Halloween. He contacted his old friend, who was surprised but delighted that her concept was finally being built. As Mark put it, he was &amp;ldquo;more than happy to build that prototype&amp;rdquo;, a talking, motion-activated picture frame, as his next Halloween decoration.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;That old idea became the starting point for Mark&amp;rsquo;s project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;&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/0310.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a raised photo frame, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/61815.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 id="mcetoc_1j7m6q9vh2" data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="2445" data-end="2545"&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/5123.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/4527.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor and Frame&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for sensitivity, and one for timeout delay.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;p data-start="4254" data-end="4465"&gt;Mark purposely chose a raised frame, ensuring that they could use the hollow space between the picture and back to mount all of the electronics, highlighting the following points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find a nice spot in the photo where you can make a small circular hole to fit the PIR motion detector. It will work behind Plexiglas, real glass may reflect.&lt;/li&gt;
&lt;li&gt;Use hot glue to fixate all the components at the back of the frame.&lt;/li&gt;
&lt;li&gt;Connect the wires, according to the schematic.&lt;/li&gt;
&lt;li&gt;Program the ESP32 and upload the sound files.&lt;/li&gt;
&lt;li&gt;Connect&amp;nbsp;to power&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4254" data-end="4465"&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/IMG_5F00_1754-_2800_1_2900_.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed, exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a compact, reproducible Halloween project that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m6sanf6"&gt;Supporting Links and Files&lt;/h2&gt;
&lt;p&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/150584"&gt;Episode 686 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://dl.espressif.com/dl/package_esp32_index.json" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;ESP32 Support Library&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6rk305"&gt;Bill of Materials&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-e6350" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('e6350'));" data-farnell="4412365" data-newark="02AM8456" 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;ASX08808-TP-R, Exciter, 80Hz to 10.5kHz, 8 ohm, 103dBA, 20W, Round, Square Frame, Bare Mount&lt;/td&gt;
&lt;td&gt;PUI Audio&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-ae09e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('ae09e'));" data-farnell="4412365" data-newark="02AM8456" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Doit Devkit V1 ( other boards will work after adjusting the sketch)&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;tr&gt;
&lt;td&gt;Audio Board I2s with Max98357&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;tr&gt;
&lt;td&gt;Movement Detection module&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;tr&gt;
&lt;td&gt;wires&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;tr&gt;
&lt;td&gt;Photo Frame A3 to your liking&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;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;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY spooky decoration, PIR motion sensor project, arudino halloween build, talking picture frame, ESP32 Halloween project, Halloween electronics tutorial, Arduino ESP32 guide, motion activated photo frame, haunted painting DIY, DIY motion sensor audio, Halloween maker project, interactive art electronics, esp32 sound project, friday_release, MAX98357 audio board, motion triggered sound effects&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/8</link><pubDate>Thu, 16 Oct 2025 10:41:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 8 posted to Documents by cstanton on 10/16/2025 10:41:49 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh0"&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/lThNzvftBzE"&gt;https://youtu.be/lThNzvftBzE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh1" data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="238" data-end="695"&gt;More than 30 years ago, Mark was playing saxophone in a pop band. That experience exposed him to different cultures and creative environments, including people who viewed art in unconventional ways. One friend in particular was always experimenting with interactive pieces: a curtain that opened and closed when someone entered a room, a cigarette lighter that warned, &lt;em data-start="608" data-end="624"&gt;&amp;ldquo;Don&amp;rsquo;t do it!&amp;rdquo;&lt;/em&gt;, and even a glass that refilled itself each time someone took a sip.&lt;/p&gt;
&lt;p data-start="697" data-end="1022"&gt;Among all her ideas, there was one she never managed to realise. Long before &lt;em data-start="774" data-end="788"&gt;Harry Potter&lt;/em&gt; or affordable hobby electronics, she wanted a photo frame that whispered to anyone who walked by. The thought of a painting quietly saying &lt;em data-start="932" data-end="943"&gt;&amp;ldquo;psst...&amp;rdquo;&lt;/em&gt; to a passerby was both strange and amusing, a piece of art that felt alive.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;Mark recently remembered that idea while preparing for Halloween. He contacted his old friend, who was surprised but delighted that her concept was finally being built. As Mark put it, he was &amp;ldquo;more than happy to build that prototype&amp;rdquo;, a talking, motion-activated picture frame, as his next Halloween decoration.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;That old idea became the starting point for Mark&amp;rsquo;s project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;&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/0310.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a raised photo frame, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/61815.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 id="mcetoc_1j7m6q9vh2" data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="2445" data-end="2545"&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/5123.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/4527.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor and Frame&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for sensitivity, and one for timeout delay.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;p data-start="4254" data-end="4465"&gt;Mark purposely chose a raised frame, ensuring that they could use the hollow space between the picture and back to mount all of the electronics, highlighting the following points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find a nice spot in the photo where you can make a small circular hole to fit the PIR motion detector. It will work behind Plexiglas, real glass may reflect.&lt;/li&gt;
&lt;li&gt;Use hot glue to fixate all the components at the back of the frame.&lt;/li&gt;
&lt;li&gt;Connect the wires, according to the schematic.&lt;/li&gt;
&lt;li&gt;Program the ESP32 and upload the sound files.&lt;/li&gt;
&lt;li&gt;Connect&amp;nbsp;to power&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4254" data-end="4465"&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/IMG_5F00_1754-_2800_1_2900_.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed, exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a compact, reproducible Halloween project that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m6sanf6"&gt;Supporting Links and Files&lt;/h2&gt;
&lt;p&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/150584"&gt;Episode 686 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://dl.espressif.com/dl/package_esp32_index.json" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;ESP32 Support Library&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6rk305"&gt;Bill of Materials&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-159b4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('159b4'));" data-farnell="4412365" data-newark="02AM8456" 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;ASX08808-TP-R, Exciter, 80Hz to 10.5kHz, 8 ohm, 103dBA, 20W, Round, Square Frame, Bare Mount&lt;/td&gt;
&lt;td&gt;PUI Audio&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-cd370" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('cd370'));" data-farnell="4412365" data-newark="02AM8456" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Doit Devkit V1 ( other boards will work after adjusting the sketch)&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;tr&gt;
&lt;td&gt;Audio Board I2s with Max98357&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;tr&gt;
&lt;td&gt;Movement Detection module&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;tr&gt;
&lt;td&gt;wires&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;tr&gt;
&lt;td&gt;Photo Frame A3 to your liking&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;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;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY spooky decoration, PIR motion sensor project, arudino halloween build, talking picture frame, ESP32 Halloween project, Halloween electronics tutorial, Arduino ESP32 guide, motion activated photo frame, haunted painting DIY, DIY motion sensor audio, Halloween maker project, interactive art electronics, esp32 sound project, friday_release, MAX98357 audio board, motion triggered sound effects&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/7</link><pubDate>Thu, 16 Oct 2025 10:41:26 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 7 posted to Documents by cstanton on 10/16/2025 10:41:26 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh0"&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/lThNzvftBzE"&gt;https://youtu.be/lThNzvftBzE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh1" data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="238" data-end="695"&gt;More than 30 years ago, Mark was playing saxophone in a pop band. That experience exposed him to different cultures and creative environments, including people who viewed art in unconventional ways. One friend in particular was always experimenting with interactive pieces: a curtain that opened and closed when someone entered a room, a cigarette lighter that warned, &lt;em data-start="608" data-end="624"&gt;&amp;ldquo;Don&amp;rsquo;t do it!&amp;rdquo;&lt;/em&gt;, and even a glass that refilled itself each time someone took a sip.&lt;/p&gt;
&lt;p data-start="697" data-end="1022"&gt;Among all her ideas, there was one she never managed to realise. Long before &lt;em data-start="774" data-end="788"&gt;Harry Potter&lt;/em&gt; or affordable hobby electronics, she wanted a photo frame that whispered to anyone who walked by. The thought of a painting quietly saying &lt;em data-start="932" data-end="943"&gt;&amp;ldquo;psst...&amp;rdquo;&lt;/em&gt; to a passerby was both strange and amusing, a piece of art that felt alive.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;Mark recently remembered that idea while preparing for Halloween. He contacted his old friend, who was surprised but delighted that her concept was finally being built. As Mark put it, he was &amp;ldquo;more than happy to build that prototype&amp;rdquo;, a talking, motion-activated picture frame, as his next Halloween decoration.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;That old idea became the starting point for Mark&amp;rsquo;s project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;&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/0310.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a raised photo frame, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/61815.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 id="mcetoc_1j7m6q9vh2" data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="2445" data-end="2545"&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/5123.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/4527.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor and Frame&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for sensitivity, and one for timeout delay.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;p data-start="4254" data-end="4465"&gt;Mark purposely chose a raised frame, ensuring that they could use the hollow space between the picture and back to mount all of the electronics, highlighting the following points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find a nice spot in the photo where you can make a small circular hole to fit the PIR motion detector. It will work behind Plexiglas, real glass may reflect.&lt;/li&gt;
&lt;li&gt;Use hot glue to fixate all the components at the back of the frame.&lt;/li&gt;
&lt;li&gt;Connect the wires, according to the schematic.&lt;/li&gt;
&lt;li&gt;Program the ESP32 and upload the sound files.&lt;/li&gt;
&lt;li&gt;Connect&amp;nbsp;to power&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4254" data-end="4465"&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/IMG_5F00_1754-_2800_1_2900_.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed, exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a compact, reproducible Halloween project that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m6sanf6"&gt;Supporting Links and Files&lt;/h2&gt;
&lt;p&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/150584"&gt;Episode 686 Resources&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://dl.espressif.com/dl/package_esp32_index.json" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;ESP32 Support Library&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6rk305"&gt;Bill of Materials&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-951fe" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('951fe'));" data-farnell="4412365" data-newark="02AM8456" 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;ASX08808-TP-R, Exciter, 80Hz to 10.5kHz, 8 ohm, 103dBA, 20W, Round, Square Frame, Bare Mount&lt;/td&gt;
&lt;td&gt;PUI Audio&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-7d609" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('7d609'));" data-farnell="4412365" data-newark="02AM8456" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Doit Devkit V1 ( other boards will work after adjusting the sketch)&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;tr&gt;
&lt;td&gt;Audio Board I2s with Max98357&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;tr&gt;
&lt;td&gt;Movement Detection module&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;tr&gt;
&lt;td&gt;wires&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;tr&gt;
&lt;td&gt;Photo Frame A3 to your liking&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;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;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY spooky decoration, PIR motion sensor project, arudino halloween build, talking picture frame, ESP32 Halloween project, Halloween electronics tutorial, Arduino ESP32 guide, motion activated photo frame, haunted painting DIY, DIY motion sensor audio, Halloween maker project, interactive art electronics, esp32 sound project, MAX98357 audio board, motion triggered sound effects&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/6</link><pubDate>Thu, 16 Oct 2025 10:18:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 6 posted to Documents by cstanton on 10/16/2025 10:18:23 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh0"&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/lThNzvftBzE"&gt;https://youtu.be/lThNzvftBzE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh1" data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="238" data-end="695"&gt;More than 30 years ago, Mark was playing saxophone in a pop band. That experience exposed him to different cultures and creative environments, including people who viewed art in unconventional ways. One friend in particular was always experimenting with interactive pieces: a curtain that opened and closed when someone entered a room, a cigarette lighter that warned, &lt;em data-start="608" data-end="624"&gt;&amp;ldquo;Don&amp;rsquo;t do it!&amp;rdquo;&lt;/em&gt;, and even a glass that refilled itself each time someone took a sip.&lt;/p&gt;
&lt;p data-start="697" data-end="1022"&gt;Among all her ideas, there was one she never managed to realise. Long before &lt;em data-start="774" data-end="788"&gt;Harry Potter&lt;/em&gt; or affordable hobby electronics, she wanted a photo frame that whispered to anyone who walked by. The thought of a painting quietly saying &lt;em data-start="932" data-end="943"&gt;&amp;ldquo;psst...&amp;rdquo;&lt;/em&gt; to a passerby was both strange and amusing, a piece of art that felt alive.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;Mark recently remembered that idea while preparing for Halloween. He contacted his old friend, who was surprised but delighted that her concept was finally being built. As Mark put it, he was &amp;ldquo;more than happy to build that prototype&amp;rdquo;, a talking, motion-activated picture frame, as his next Halloween decoration.&lt;/p&gt;
&lt;p data-start="1024" data-end="1339"&gt;That old idea became the starting point for Mark&amp;rsquo;s project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;&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/0310.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a raised photo frame, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/61815.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 id="mcetoc_1j7m6q9vh2" data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="2445" data-end="2545"&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/5123.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&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/4527.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor and Frame&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for sensitivity, and one for timeout delay.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;p data-start="4254" data-end="4465"&gt;Mark purposely chose a raised frame, ensuring that they could use the hollow space between the picture and back to mount all of the electronics, highlighting the following points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Find a nice spot in the photo where you can make a small circular hole to fit the PIR motion detector. It will work behind Plexiglas, real glass may reflect.&lt;/li&gt;
&lt;li&gt;Use hot glue to fixate all the components at the back of the frame.&lt;/li&gt;
&lt;li&gt;Connect the wires, according to the schematic.&lt;/li&gt;
&lt;li&gt;Program the ESP32 and upload the sound files.&lt;/li&gt;
&lt;li&gt;Connect&amp;nbsp;to power&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="4254" data-end="4465"&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/IMG_5F00_1754-_2800_1_2900_.jpg" /&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed, exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a compact, reproducible Halloween project that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m6sanf6"&gt;Supporting Links and Files&lt;/h2&gt;
&lt;p&gt;-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://dl.espressif.com/dl/package_esp32_index.json" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;ESP32 Support Library&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6rk305"&gt;Bill of Materials&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-10fa0" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('10fa0'));" data-farnell="4412365" data-newark="02AM8456" 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;ASX08808-TP-R, Exciter, 80Hz to 10.5kHz, 8 ohm, 103dBA, 20W, Round, Square Frame, Bare Mount&lt;/td&gt;
&lt;td&gt;PUI Audio&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6ec9b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('6ec9b'));" data-farnell="4412365" data-newark="02AM8456" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Doit Devkit V1 ( other boards will work after adjusting the sketch)&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;tr&gt;
&lt;td&gt;Audio Board I2s with Max98357&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;tr&gt;
&lt;td&gt;Movement Detection module&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;tr&gt;
&lt;td&gt;wires&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;tr&gt;
&lt;td&gt;Photo Frame A3 to your liking&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;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;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/5</link><pubDate>Thu, 16 Oct 2025 09:53:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 5 posted to Documents by cstanton on 10/16/2025 9:53:44 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh0"&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://youtu.be/lThNzvftBzE"&gt;https://youtu.be/lThNzvftBzE&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6q9vh1" data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="34" data-end="416"&gt;More than 30 years ago, Mark remembered meeting someone fascinated by interactive art,&amp;nbsp; objects that reacted to people. She once imagined a photo frame that could whisper when someone walked by. &amp;ldquo;The scary idea of a photograph saying &lt;em data-start="268" data-end="279"&gt;&amp;lsquo;psst...&amp;rsquo;&lt;/em&gt;, calling someone as if it were alive,&amp;rdquo; Mark recalled. &amp;ldquo;Now, with Halloween closing in, I just remembered this person and her request.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;That old idea became the starting point for Mark&amp;rsquo;s project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a &lt;strong data-start="744" data-end="766"&gt;raised photo frame&lt;/strong&gt;, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 id="mcetoc_1j7m6q9vh2" data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for &lt;strong data-start="4046" data-end="4061"&gt;sensitivity&lt;/strong&gt;, and one for &lt;strong data-start="4075" data-end="4092"&gt;timeout delay&lt;/strong&gt;.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed &amp;mdash; exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a &lt;strong data-start="4989" data-end="5032"&gt;compact, reproducible Halloween project&lt;/strong&gt; that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m6sanf6"&gt;Supporting Links and Files&lt;/h2&gt;
&lt;p&gt;-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- &lt;a href="https://dl.espressif.com/dl/package_esp32_index.json" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;ESP32 Support Library&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m6rk305"&gt;Bill of Materials&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-3b02a" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('3b02a'));" data-farnell="4412365" data-newark="02AM8456" 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;ASX08808-TP-R, Exciter, 80Hz to 10.5kHz, 8 ohm, 103dBA, 20W, Round, Square Frame, Bare Mount&lt;/td&gt;
&lt;td&gt;PUI Audio&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4d381" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4412365&amp;nsku=02AM8456&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('4d381'));" data-farnell="4412365" data-newark="02AM8456" data-comoverride="" data-cmpoverride="" data-cpc="undefined" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 Doit Devkit V1 ( other boards will work after adjusting the sketch)&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;tr&gt;
&lt;td&gt;Audio Board I2s with Max98357&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;tr&gt;
&lt;td&gt;Movement Detection module&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;tr&gt;
&lt;td&gt;wires&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;tr&gt;
&lt;td&gt;Photo Frame A3 to your liking&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;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;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/4</link><pubDate>Thu, 16 Oct 2025 09:43:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 4 posted to Documents by cstanton on 10/16/2025 9:43:55 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&amp;lt;embed&amp;gt;&lt;/p&gt;
&lt;h2 data-start="0" data-end="32"&gt;The Old Forgotten Question&lt;/h2&gt;
&lt;p data-start="34" data-end="416"&gt;More than 30 years ago, Mark remembered meeting someone fascinated by interactive art,&amp;nbsp; objects that reacted to people. She once imagined a photo frame that could whisper when someone walked by. &amp;ldquo;The scary idea of a photograph saying &lt;em data-start="268" data-end="279"&gt;&amp;lsquo;psst...&amp;rsquo;&lt;/em&gt;, calling someone as if it were alive,&amp;rdquo; Mark recalled. &amp;ldquo;Now, with Halloween closing in, I just remembered this person and her request.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;That old idea became the starting point for Mark&amp;rsquo;s latest &lt;em data-start="476" data-end="496"&gt;element14 Presents&lt;/em&gt; project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a &lt;strong data-start="744" data-end="766"&gt;raised photo frame&lt;/strong&gt;, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe
&lt;p data-start="1918" data-end="1935"&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for &lt;strong data-start="4046" data-end="4061"&gt;sensitivity&lt;/strong&gt;, and one for &lt;strong data-start="4075" data-end="4092"&gt;timeout delay&lt;/strong&gt;.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed &amp;mdash; exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a &lt;strong data-start="4989" data-end="5032"&gt;compact, reproducible Halloween project&lt;/strong&gt; that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Supporting Links and Files&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/3</link><pubDate>Thu, 16 Oct 2025 09:37:36 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 3 posted to Documents by cstanton on 10/16/2025 9:37:36 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;h2&gt;Watch the Project&lt;/h2&gt;
&lt;p&gt;&amp;lt;embed&amp;gt;&lt;/p&gt;
&lt;h2 data-start="0" data-end="32"&gt;&lt;strong data-start="0" data-end="30"&gt;The Old Forgotten Question&lt;/strong&gt;&lt;/h2&gt;
&lt;p data-start="34" data-end="416"&gt;More than 30 years ago, Mark remembered meeting someone fascinated by interactive art,&amp;nbsp; objects that reacted to people. She once imagined a photo frame that could whisper when someone walked by. &amp;ldquo;The scary idea of a photograph saying &lt;em data-start="268" data-end="279"&gt;&amp;lsquo;psst...&amp;rsquo;&lt;/em&gt;, calling someone as if it were alive,&amp;rdquo; Mark recalled. &amp;ldquo;Now, with Halloween closing in, I just remembered this person and her request.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;That old idea became the starting point for Mark&amp;rsquo;s latest &lt;em data-start="476" data-end="496"&gt;element14 Presents&lt;/em&gt; project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h2&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a &lt;strong data-start="744" data-end="766"&gt;raised photo frame&lt;/strong&gt;, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the ESP32, audio board, motion sensor, and speaker exciter were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h2&gt;
&lt;h3 data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;Large photoframe
&lt;p data-start="1918" data-end="1935"&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;Scary photo, or whatever photo you think is best for your taste&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;ESP32 Doit Devkit V1&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;Speaker or Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h2&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor&lt;/h2&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for &lt;strong data-start="4046" data-end="4061"&gt;sensitivity&lt;/strong&gt;, and one for &lt;strong data-start="4075" data-end="4092"&gt;timeout delay&lt;/strong&gt;.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;h2 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h2&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed &amp;mdash; exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a &lt;strong data-start="4989" data-end="5032"&gt;compact, reproducible Halloween project&lt;/strong&gt; that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Supporting Links and Files&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/2</link><pubDate>Thu, 16 Oct 2025 09:24:09 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 2 posted to Documents by cstanton on 10/16/2025 9:24:09 AM&lt;br /&gt;
&lt;p&gt;Mark builds a motion-activated &amp;ldquo;haunted painting&amp;rdquo; using an ESP32, a MAX98357 I&amp;sup2;S audio board, and a PIR motion sensor to make a framed photo whisper or talk when someone walks by. The project is simple to wire, fits neatly inside a photo frame, and can be customised for Halloween, cosplay, or even pranks. Mark walks through the full build, from cutting the frame and soldering components to programming the ESP32 in Arduino, so you can easily recreate it. Perfect for anyone wanting to mix art, electronics, and a bit of Halloween mischief.&lt;/p&gt;
&lt;p&gt;Watch the Project&lt;/p&gt;
&lt;p&gt;&amp;lt;embed&amp;gt;&lt;/p&gt;
&lt;p data-start="0" data-end="32"&gt;&lt;strong data-start="0" data-end="30"&gt;The Old Forgotten Question&lt;/strong&gt;&lt;/p&gt;
&lt;p data-start="34" data-end="416"&gt;More than 30 years ago, Mark remembered meeting someone fascinated by interactive art,&amp;nbsp; objects that reacted to people. She once imagined a photo frame that could whisper when someone walked by. &amp;ldquo;The scary idea of a photograph saying &lt;em data-start="268" data-end="279"&gt;&amp;lsquo;psst...&amp;rsquo;&lt;/em&gt;, calling someone as if it were alive,&amp;rdquo; Mark recalled. &amp;ldquo;Now, with Halloween closing in, I just remembered this person and her request.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="418" data-end="675"&gt;That old idea became the starting point for Mark&amp;rsquo;s latest &lt;em data-start="476" data-end="496"&gt;element14 Presents&lt;/em&gt; project, a motion-activated &amp;ldquo;haunted painting&amp;rdquo; that uses an ESP32, MAX98357 I&amp;sup2;S audio board, and PIR motion sensor to trigger eerie sounds when motion is detected.&lt;/p&gt;
&lt;h3 id="mcetoc_1j7m59e270" data-start="682" data-end="717"&gt;Building the Haunted Painting&lt;/h3&gt;
&lt;p data-start="719" data-end="794"&gt;Mark began by choosing a &lt;strong data-start="744" data-end="766"&gt;raised photo frame&lt;/strong&gt;, explaining in the video:&lt;/p&gt;
&lt;blockquote data-start="795" data-end="913"&gt;
&lt;p data-start="797" data-end="913"&gt;&amp;ldquo;I picked a raised frame. That way, I can use the hollow space between picture and back to mount all electronics.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="915" data-end="1123"&gt;He used a printed image of a clown &amp;mdash; &amp;ldquo;you can use any painting,&amp;rdquo; he added &amp;mdash; and made a small circular hole for the PIR sensor. It can detect motion through Plexiglas, but he wasn&amp;rsquo;t sure about glass, saying,&lt;/p&gt;
&lt;blockquote data-start="1124" data-end="1232"&gt;
&lt;p data-start="1126" data-end="1232"&gt;&amp;ldquo;It will work behind Plexiglas but I&amp;rsquo;m not sure that it will also work behind real glass. I didn&amp;rsquo;t try.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="1234" data-end="1611"&gt;Behind the frame, the &lt;strong data-start="1256" data-end="1265"&gt;ESP32&lt;/strong&gt;, &lt;strong data-start="1267" data-end="1282"&gt;audio board&lt;/strong&gt;, &lt;strong data-start="1284" data-end="1301"&gt;motion sensor&lt;/strong&gt;, and &lt;strong data-start="1307" data-end="1326"&gt;speaker exciter&lt;/strong&gt; were glued in place. The exciter turned the backboard of the frame into the speaker itself &amp;mdash; a compact way to produce sound without visible components. &amp;ldquo;So the whole back wall will become part of the speaker,&amp;rdquo; he noted, ensuring that nothing would spoil the illusion from the front.&lt;/p&gt;
&lt;p data-start="1613" data-end="1738"&gt;All wiring was done directly rather than on a PCB. Mark pointed out that it was quicker and sufficient for the small build:&lt;/p&gt;
&lt;blockquote data-start="1739" data-end="1861"&gt;
&lt;p data-start="1741" data-end="1861"&gt;&amp;ldquo;With only a few wires, I will not even bother to make a PCB. I&amp;rsquo;ll just wire it directly and put it inside the frame.&amp;rdquo;&lt;/p&gt;
&lt;p data-start="1741" data-end="1861"&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="mcetoc_1j7m59e271" data-start="1868" data-end="1891"&gt;Hardware Overview&lt;/h3&gt;
&lt;p data-start="1893" data-end="1915"&gt;&lt;strong data-start="1893" data-end="1913"&gt;Components used:&lt;/strong&gt;&lt;/p&gt;
&lt;ul data-start="1916" data-end="2036"&gt;
&lt;li data-start="1916" data-end="1935"&gt;
&lt;p data-start="1918" data-end="1935"&gt;ESP32 Devkit V1&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1936" data-end="1964"&gt;
&lt;p data-start="1938" data-end="1964"&gt;MAX98357 I&amp;sup2;S Audio Board&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1965" data-end="1986"&gt;
&lt;p data-start="1967" data-end="1986"&gt;PIR Motion Sensor&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="1987" data-end="2006"&gt;
&lt;p data-start="1989" data-end="2006"&gt;Speaker Exciter&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="2007" data-end="2036"&gt;
&lt;p data-start="2009" data-end="2036"&gt;Hot glue and jumper wires&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="2038" data-end="2256"&gt;The motion sensor outputs a high signal when detecting movement, triggering the ESP32 to play one of several stored sound files such as &lt;em data-start="2174" data-end="2187"&gt;&amp;ldquo;laugh.mp3&amp;rdquo;&lt;/em&gt; or &lt;em data-start="2191" data-end="2203"&gt;&amp;ldquo;pst.mp3.&amp;rdquo;&lt;/em&gt; The MAX98357 handles the I&amp;sup2;S digital audio output.&lt;/p&gt;
&lt;p data-start="2258" data-end="2297"&gt;Mark wired the ESP32 pins as follows:&lt;/p&gt;
&lt;div class="_tableContainer_1rjym_1"&gt;
&lt;div class="group _tableWrapper_1rjym_13 flex w-fit flex-col-reverse"&gt;
&lt;table class="w-fit min-w-(--thread-content-width)" data-start="2299" data-end="2443"&gt;
&lt;thead data-start="2299" data-end="2320"&gt;
&lt;tr data-start="2299" data-end="2320"&gt;
&lt;th data-start="2299" data-end="2311" data-col-size="sm"&gt;Component&lt;/th&gt;
&lt;th data-start="2311" data-end="2320" data-col-size="sm"&gt;Pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody data-start="2344" data-end="2443"&gt;
&lt;tr data-start="2344" data-end="2368"&gt;
&lt;td data-start="2344" data-end="2355" data-col-size="sm"&gt;I&amp;sup2;S DOUT&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2355" data-end="2368"&gt;GPIO 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2369" data-end="2393"&gt;
&lt;td data-start="2369" data-end="2380" data-col-size="sm"&gt;I&amp;sup2;S BCLK&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2380" data-end="2393"&gt;GPIO 19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2394" data-end="2417"&gt;
&lt;td data-start="2394" data-end="2404" data-col-size="sm"&gt;I&amp;sup2;S LRC&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2404" data-end="2417"&gt;GPIO 21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr data-start="2418" data-end="2443"&gt;
&lt;td data-start="2418" data-end="2431" data-col-size="sm"&gt;PIR Sensor&lt;/td&gt;
&lt;td data-col-size="sm" data-start="2431" data-end="2443"&gt;GPIO 5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="2445" data-end="2545"&gt;He emphasised simplicity: &amp;ldquo;It&amp;rsquo;s really quick and dirty,&amp;rdquo; he said. &amp;ldquo;It fits the theme: Halloween.&amp;rdquo;&lt;/p&gt;
&lt;h3 id="mcetoc_1j7m59e272" data-start="2552" data-end="2575"&gt;Software and Code&lt;/h3&gt;
&lt;p data-start="2577" data-end="2791"&gt;Programming was done in the Arduino IDE (version 1.x), since version 2.x removes the SPIFFS upload tool needed to transfer audio files. &amp;ldquo;Make sure you&amp;rsquo;re using version one and not version two,&amp;rdquo; Mark reminded.&lt;/p&gt;
&lt;p data-start="2793" data-end="2988"&gt;The core of the program initialises the ESP32, mounts SPIFFS storage, and plays a default sound at boot. It then continuously checks the PIR sensor and triggers random audio clips on detection.&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;Below is an excerpt from the project&amp;rsquo;s main sketch:&lt;/p&gt;
&lt;p data-start="2990" data-end="3043"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define I2S_DOUT 18
#define I2S_BCLK 19
#define I2S_LRC 21
#define IR_DET_PIN 5
boolean playflag = 0;
char *filelist[] = {&amp;quot;laugh.mp3&amp;quot;, &amp;quot;pst.mp3&amp;quot;, &amp;quot;comming.mp3&amp;quot;, &amp;quot;hh.mp3&amp;quot;, &amp;quot;hungry.mp3&amp;quot;};

void loop() {
  audio.loop();
  if (digitalRead(IR_DET_PIN) == 1) {
    if (playflag == 0) {
      int randNumber = random(0, 5);
      playflag = 1;
      if (!audio.connecttoFS(SPIFFS, filelist[randNumber])) {
        playflag = 0;
      }
    }
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="3545" data-end="3741"&gt;Each time the motion sensor triggers, one of five preloaded MP3s plays through the I&amp;sup2;S audio board. The &lt;code data-start="3649" data-end="3666"&gt;audio_eof_mp3()&lt;/code&gt; routine resets the play flag, allowing new sounds on the next detection.&lt;/p&gt;
&lt;blockquote data-start="3743" data-end="3936"&gt;
&lt;p data-start="3745" data-end="3936"&gt;&amp;ldquo;It looks at pin five to see if there is movement,&amp;rdquo; Mark said in the video. &amp;ldquo;If there is a high level on pin five, then it will start playing an audio file if it&amp;rsquo;s not already playing one.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="mcetoc_1j7m5afja3" data-start="3943" data-end="3976"&gt;Adjusting the Motion Sensor&lt;/h3&gt;
&lt;p data-start="3978" data-end="4095"&gt;The PIR sensor used includes two potentiometers for tuning: one for &lt;strong data-start="4046" data-end="4061"&gt;sensitivity&lt;/strong&gt;, and one for &lt;strong data-start="4075" data-end="4092"&gt;timeout delay&lt;/strong&gt;.&lt;/p&gt;
&lt;p data-start="4097" data-end="4114"&gt;Mark explained:&lt;/p&gt;
&lt;blockquote data-start="4115" data-end="4252"&gt;
&lt;p data-start="4117" data-end="4252"&gt;&amp;ldquo;If you have too many triggers of sound, you might want to take it down a bit. Or if you want more triggers, you kick it up a notch.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4254" data-end="4465"&gt;The timeout delay prevents constant retriggering. &amp;ldquo;You can say, &amp;lsquo;I don&amp;rsquo;t want to activate this more than once every minute or half an hour,&amp;rsquo;&amp;rdquo; he said, noting that users can fine-tune it depending on placement.&lt;/p&gt;
&lt;h3 id="mcetoc_1j7m5algh4" data-start="4472" data-end="4492"&gt;Final Assembly&lt;/h3&gt;
&lt;p data-start="4494" data-end="4598"&gt;Once glued and wired, the frame&amp;rsquo;s front appeared unchanged, aside from a barely visible motion sensor:&lt;/p&gt;
&lt;blockquote data-start="4599" data-end="4788"&gt;
&lt;p data-start="4601" data-end="4788"&gt;&amp;ldquo;All you see here is a little sensor,&amp;rdquo; Mark said, flipping the frame over. &amp;ldquo;If you want to do it perfectly, you could put the sensor somewhere in the painting so it becomes part of it.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p data-start="4790" data-end="4971"&gt;After programming, testing, and uploading sound files, Mark powered it up. As someone walked by, the painting whispered, buzzed, and laughed &amp;mdash; exactly as imagined decades earlier.&lt;/p&gt;
&lt;p data-start="4973" data-end="5104"&gt;The result is a &lt;strong data-start="4989" data-end="5032"&gt;compact, reproducible Halloween project&lt;/strong&gt; that combines basic electronics, creative design, and some nostalgia.&lt;/p&gt;
&lt;p data-start="5106" data-end="5126"&gt;As Mark concluded:&lt;/p&gt;
&lt;blockquote data-start="5127" data-end="5165" data-is-last-node="" data-is-only-node=""&gt;
&lt;p data-start="5129" data-end="5165" data-is-last-node=""&gt;&amp;ldquo;Have fun scaring your neighbors.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Creepy Motion-Activated Painting You Can Build Yourself -- Episode 686</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686/revision/1</link><pubDate>Thu, 16 Oct 2025 09:17:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:37489da8-9ccf-4afa-a695-cc4a3812acaf</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71988/creepy-motion-activated-painting-you-can-build-yourself----episode-686#comments</comments><description>Revision 1 posted to Documents by cstanton on 10/16/2025 9:17:00 AM&lt;br /&gt;
&lt;p&gt;text&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>