<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[(SOLVED) Help Needed: Keys KY-031 Knock Sensor Module connection to M5Stack Core]]></title><description><![CDATA[<p dir="auto">I'm trying to connect this module to my M5Stack Core.</p>
<p dir="auto">Description<br />
KY-031 knock sensor module. A vibration sensor that sends a signal when a knock/tap is detected.</p>
<p dir="auto">Compatible with Arduino, ESP8266, ESP32, Teensy, Raspberry Pi, and other popular platforms.</p>
<p dir="auto">KY-031 Knock Sensor Module<br />
KY-031 Specifications<br />
This module consists of a 10 kΩ resistor and a spring-based sensor that sends a high signal when a vibration is detected.</p>
<p dir="auto">Operating Voltage	3.3V to 5V<br />
Output Type	Digital<br />
KY-031 Connection Diagram<br />
Connect the module's Power line (middle) and the ground (-) to +5 and GND respectively. Connect signal (S) to pin 3 on the Arduino.</p>
<p dir="auto">KY-031	Arduino<br />
S	Pin 3<br />
middle	+5V<br />
-GND</p>
<p dir="auto">On the Arduino it uses Pin 3. What Pin should I use on the M5Stack?</p>
<p dir="auto">Thanks in advance,</p>
<p dir="auto">WW</p>
<p dir="auto"><img src="/assets/uploads/files/1616438643853-6919f579-2ad8-43bd-b018-dbc56d9a0eb3-image.png" alt="0_1616438642207_6919f579-2ad8-43bd-b018-dbc56d9a0eb3-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/topic/3112/solved-help-needed-keys-ky-031-knock-sensor-module-connection-to-m5stack-core</link><generator>RSS for Node</generator><lastBuildDate>Wed, 06 May 2026 05:07:19 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3112.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Mar 2021 18:45:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to (SOLVED) Help Needed: Keys KY-031 Knock Sensor Module connection to M5Stack Core on Tue, 23 Mar 2021 02:09:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> So I figured it out:</p>
<p dir="auto">On that particular module I connected it as follows:</p>
<p dir="auto">Left pin on module labeled 'S' to 5v on the righthand side of M5Stack (red wire)<br />
Center pin on module (not labeled) to GND on the righthand side of M5Stack (yellow wire)<br />
Right pin on module labeled '--' to pin 2 on the righthand side of the M5Stack (orange wire)<br />
After you compile and upload the app tap the module to see the "Tap" message.</p>
<p dir="auto"><img src="/assets/uploads/files/1616464979939-c969263d-aea7-40dc-8845-895ffbeb7a4f-image.png" alt="0_1616464971817_c969263d-aea7-40dc-8845-895ffbeb7a4f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1616465047318-a4780b78-a6db-44a4-8d72-6b3eccdfd416-image.png" alt="0_1616465037306_a4780b78-a6db-44a4-8d72-6b3eccdfd416-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/13191</link><guid isPermaLink="true">https://community.m5stack.com/post/13191</guid><dc:creator><![CDATA[wwhite]]></dc:creator><pubDate>Tue, 23 Mar 2021 02:09:09 GMT</pubDate></item><item><title><![CDATA[Reply to (SOLVED) Help Needed: Keys KY-031 Knock Sensor Module connection to M5Stack Core on Tue, 23 Mar 2021 00:11:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wwhite" aria-label="Profile: wwhite">@<bdi>wwhite</bdi></a></p>
<p dir="auto">Since it's not an M5Stack product, did you verify it on an Arduino (Uno or other device) to see it working? Also, you might want to post your code to get more assistance.</p>
<p dir="auto">That sensor looks like a basic digital low/high sensor. I have never used it, but I have been successful using pin 5 with a different digital sensor.  Try pin 5 or pin 2.</p>
]]></description><link>https://community.m5stack.com/post/13190</link><guid isPermaLink="true">https://community.m5stack.com/post/13190</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Tue, 23 Mar 2021 00:11:21 GMT</pubDate></item><item><title><![CDATA[Reply to (SOLVED) Help Needed: Keys KY-031 Knock Sensor Module connection to M5Stack Core on Mon, 22 Mar 2021 23:44:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/world101" aria-label="Profile: world101">@<bdi>world101</bdi></a> I just tried pin 3 and didn't have any luck. I'm using a Core Black.</p>
]]></description><link>https://community.m5stack.com/post/13189</link><guid isPermaLink="true">https://community.m5stack.com/post/13189</guid><dc:creator><![CDATA[wwhite]]></dc:creator><pubDate>Mon, 22 Mar 2021 23:44:50 GMT</pubDate></item><item><title><![CDATA[Reply to (SOLVED) Help Needed: Keys KY-031 Knock Sensor Module connection to M5Stack Core on Mon, 22 Mar 2021 23:19:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wwhite" aria-label="Profile: wwhite">@<bdi>wwhite</bdi></a></p>
<p dir="auto">Assuming you have the Core Black or Grey, did you try pin 3?</p>
<p dir="auto"><a href="https://arduinomodules.info/ky-031-knock-sensor-module/" target="_blank" rel="noopener noreferrer nofollow ugc">https://arduinomodules.info/ky-031-knock-sensor-module/</a></p>
]]></description><link>https://community.m5stack.com/post/13187</link><guid isPermaLink="true">https://community.m5stack.com/post/13187</guid><dc:creator><![CDATA[world101]]></dc:creator><pubDate>Mon, 22 Mar 2021 23:19:38 GMT</pubDate></item></channel></rss>