<?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>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636</link><pubDate>Mon, 22 Jan 2024 17:01:21 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Current Revision posted to Documents by tariq.ahmad on 1/22/2024 5:01:21 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/m/files/148719" data-e14adj="t"&gt;Download CAD Files, Code, and Schematics!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-7f6fb" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('7f6fb'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-140c6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('140c6'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-193d5" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('193d5'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6be6f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('6be6f'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2bc78" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('2bc78'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b9628" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('b9628'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="background:#ffffff;border:1px solid #dadada;margin:0;padding:14px 16px 16px 18px;vertical-align:top;"&gt;
&lt;div style="display:inline-block;float:left;padding:0px 25px 8px 0px;"&gt;&lt;a href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;&lt;img loading="lazy" alt="element14 presents" src="/e14/assets/legacy/2018/e14PresentsJune818.png" width="180px" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;/div&gt;
&lt;div style="display:inline-block;vertical-align:top;width:70%;"&gt;&lt;br /&gt;
&lt;p style="margin:0;"&gt;&lt;span&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/" data-e14adj="t"&gt;element14 presents&lt;/a&gt;&lt;/span&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/vcp-program/w/documents/3692/vcp-biography-clem" data-e14adj="t"&gt;About Clem&lt;/a&gt;&amp;nbsp; &lt;strong&gt;|&lt;/strong&gt;&amp;nbsp; &lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/project-videos/" data-e14adj="t"&gt;Project Videos&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/5</link><pubDate>Thu, 04 Jan 2024 15:53:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 5 posted to Documents by tariq.ahmad on 1/4/2024 3:53:58 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/m/files/148719" data-e14adj="t"&gt;Download CAD Files, Code, and Schematics!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-85fde" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('85fde'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-dba64" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('dba64'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3f5ec" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('3f5ec'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-efe82" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('efe82'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4eaaa" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('4eaaa'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b9dbd" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('b9dbd'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&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: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/6</link><pubDate>Thu, 04 Jan 2024 15:53:58 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>pchan</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 6 posted to Documents by pchan on 1/4/2024 3:53:58 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/m/files/148719" data-e14adj="t"&gt;Download CAD Files, Code, and Schematics!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-4f4c3" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('4f4c3'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-f0fd9" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('f0fd9'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-791ab" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('791ab'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-5ad0b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('5ad0b'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-14075" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('14075'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-56349" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('56349'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&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: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/4</link><pubDate>Thu, 04 Jan 2024 15:48:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>jordanrjohnson</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 4 posted to Documents by jordanrjohnson on 1/4/2024 3:48:10 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/m/files/148719" data-e14adj="t"&gt;Download CAD Files, Code, and Schematics!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-50fda" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('50fda'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-287f4" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('287f4'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-74d70" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('74d70'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2f90a" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('2f90a'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-ee686" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('ee686'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2bf92" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('2bf92'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&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: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/3</link><pubDate>Thu, 04 Jan 2024 15:46:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 3 posted to Documents by tariq.ahmad on 1/4/2024 3:46:28 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextDeletionMarker TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun TrackChangeTextDeletion SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="/challenges-projects/element14-presents/m/files/148719" data-e14adj="t"&gt;Download CAD Files, Code, and Schematics!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-097ae" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('097ae'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3b361" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('3b361'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b2802" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('b2802'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-be160" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('be160'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-30d9f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('30d9f'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6db4c" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('6db4c'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&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: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/2</link><pubDate>Thu, 04 Jan 2024 15:42:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 2 posted to Documents by tariq.ahmad on 1/4/2024 3:42:45 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextDeletionMarker TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun TrackChangeTextDeletion SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_01_5F00_54_5F00_18.Still002.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_22_5F00_01.Still003.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_40_5F00_09.Still004.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_05_5F00_50_5F00_12.Still005.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-04-35/Episode-636-_2D00_-Mouse_5F00_V1.00_5F00_14_5F00_48_5F00_18.Still006.bmp" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahesr73"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Downloads and Links:&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Download CAD Files, Code, and Schematics!&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://actascientific.com/ASOR/pdf/ASOR-02-0063.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Paper about the challenge of tracking lateral movement with IMU&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="mcetoc_1hjahjh9e4"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bonus Video:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://players.brightcove.net/1362235890001/default_default/index.html?videoId=6344269492112"&gt;players.brightcove.net/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1hjahc3ar1"&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Bill of Material:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&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;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-1ef29" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742,3483011,1269406,2524076,1332158&amp;nsku=37T8113,76AH4815,1269406,02AH5567 ,34M7499&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('1ef29'));" data-farnell="1864742,3483011,1269406,2524076,1332158" data-newark="37T8113,76AH4815,1269406,02AH5567 ,34M7499" 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;TDK INVENSENSE MPU-6050&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4a774" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1864742&amp;nsku=37T8113&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('4a774'));" data-farnell="1864742" data-newark="37T8113" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DIODES INC. AP9101CK-AHTRG1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-7d874" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=3483011&amp;nsku=76AH4815&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('7d874'));" data-farnell="3483011" data-newark="76AH4815" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;STMICROELECTRONICS USBLC6-2SC6&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-89c76" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1269406&amp;nsku=1269406&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('89c76'));" data-farnell="1269406" data-newark="1269406" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MOLEX 105450-0101&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-dc5b1" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2524076&amp;nsku=02AH5567 &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('dc5b1'));" data-farnell="2524076" data-newark="02AH5567 " data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MICROCHIP MCP73831T-2ACI/OT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-31869" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=1332158&amp;nsku=34M7499&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('31869'));" data-farnell="1332158" data-newark="34M7499" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="mcetoc_1hjahd0452"&gt;Additional Parts:&lt;/h2&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Case made with MAYER MAKES Engineering Resin https://lectronz.com/products/mayer-makes-engineering-resin-extreme-strength-1kg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE CODE : &amp;bdquo;ELEMENT14&amp;ldquo; for a 10% Discount for Element14 community members.&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: Arduino Mouse Project, Bluetooth Air Mouse, Inertial Measurement Unit Mouse, Mouse Design, Electronic DIY Innovation, MPU6050 Mouse, Logitech BT83 Inspired Mouse, Maker Electronics, DIY Mouse Project, 3D Air Mouse Design, Open Source Electronics, IMU Sensor Innovation, Trackpoint Inspired Mouse, PCB Design for Mouse, Motion Sensor Mouse, friday_release, e14p_CMM&lt;/div&gt;
</description></item><item><title>Creating an IMU based 3D Mouse with an ESP32-S3 -- Episode-636</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636/revision/1</link><pubDate>Thu, 04 Jan 2024 15:18:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:54e1cca5-5822-4832-b398-709b51428d34</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/28384/creating-an-imu-based-3d-mouse-with-an-esp32-s3----episode-636#comments</comments><description>Revision 1 posted to Documents by tariq.ahmad on 1/4/2024 3:18:18 PM&lt;br /&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;Clem, driven by curiosity and the age-old wisdom of &amp;quot;you &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;won&amp;rsquo;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; know &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;until&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; you tr&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;y&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextDeletionMarker TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun TrackChangeTextDeletion SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="TrackChangeTextInsertion TrackedChange SCXW9097839 BCX0"&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun SCXW9097839 BCX0" lang="EN-GB" data-contrast="auto"&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; embarked on a quest to create a mouse with a motion sensor, or more precisely, an inertial measurement unit (IMU). Wondering why major manufacturers &lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt;hadn&amp;#39;t&lt;/span&gt;&lt;span class="NormalTextRun SCXW9097839 BCX0"&gt; explored this avenue, he pondered the potential of leveraging IMUs, given the success of smartphones and game controllers in spatial movement tracking.&lt;/span&gt;&lt;/span&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Watch the Video:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;&lt;a href="https://www.youtube.com/watch?v=JaCi-V2e2kA&amp;amp;feature=youtu.be"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Equipped with an MPU6050 MEMS accelerometer, an ESP32S3 for Bluetooth connectivity, and a reliable battery charging circuit, Clem jumped into the design process. Drawing inspiration from a classic Logitech BT83 mouse, Clem meticulously crafted a board in KiCad to fit a familiar mouse-shaped shell. In fact, the project came to mind when the BT83 he&amp;rsquo;d been using for the past two decades started misbehaving, a problem caused by a worn-out cable, which was easily fixed in an afternoon.&amp;nbsp; After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050!&amp;nbsp; However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After receiving the PCB from Aisler, Clem quickly soldered all the SMD parts to the board and proceeded to check if the MPU6050 was recognized over I2C. The unit successfully booted and after flashing a modified I2C_detect example, revealed that a device was detected at address 0x68, the expected default ID of the MPU6050! However, the success was short-lived; checking readout examples showed that the IMU was only recording zeroes. Investigation with other libraries and raw sensor stat reports pointed to the culprit being most likely not a software error, but a damaged sensor. After consulting online makers, Clem pinpointed the culprit&amp;mdash;a likely impact during the ultrasonic cleaning process, damaging the delicate MEMS device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;Undeterred, Clem replaced the damaged chip with a new one from Farnell. Taking a cautious approach, he opted for a sensitive PCB cleaning method, utilizing a toothbrush dipped in Isopropanol. Yet, the challenges didn&amp;#39;t end there; Clem still faced the formidable task of deriving lateral motion from angular velocity, acceleration, and gyroscopic movement.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;The next hurdle came in form of complex mathematics. In theory, deriving lateral motion from angular velocity and acceleration, as well as gyroscoping movement, can be done by recording a range of values over time and using a not-so-simple formula to analyze the changes. The formulas involve integrals of integrals, with a side-effect of yielding extremely big numbers that crashes the MCU.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After scouring the web for solutions, Clem discovered that while possible, the practical approach involved using two superior IMUs or offloading data processing to a desktop PC&amp;mdash;beyond the scope of his project. This underscored why major manufacturers steer clear of relying on IMUs for mouse tracking; it&amp;#39;s intricate, calculation-intensive, and less accurate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="EOP SCXW9097839 BCX0"&gt;After a quick chat with fellow host Katie, Clem pivoted to a new design inspired by the trackpoint on IBM/Lenovo laptops. He took advantage of the MPU6050_light library for Arduino to design a circular red mouse with two buttons, highlighting the ease of building a 3D air mouse compared to the challenges of creating a &amp;quot;simple&amp;quot; mouse with an IMU. Clem&amp;#39;s journey showcased the complexities and unexpected turns that innovation often entails.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>