{"id":5060,"date":"2026-12-02T08:29:10","date_gmt":"2026-12-02T16:29:10","guid":{"rendered":"https:\/\/www.donluc.com\/?p=5060"},"modified":"2026-12-02T08:29:10","modified_gmt":"2026-12-02T16:29:10","slug":"project-28-sensors-emg-sensor-by-oymotion-mk33","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=5060","title":{"rendered":"Project #28 \u2013 Sensors \u2013 EMG Sensor by OYMotion \u2013 Mk33"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-5060-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #EMG #Sensors #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01a.jpg\" alt=\"EMG Sensor by OYMotion \" width=\"720\" height=\"605\" class=\"alignnone size-full wp-image-5062\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01a-300x252.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01b.jpg\" alt=\"EMG Sensor by OYMotion \" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-5063\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01b-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01c.jpg\" alt=\"EMG Sensor by OYMotion \" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-5064\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/12\/DL2611Mk01c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Gravity: Analog EMG Sensor by OYMotion<\/strong><\/p>\n<p>This analog surface EMG sensor uses reusable metal dry electrodes and integrated filtering with 1000x amplification of signals within \u00b11.5 mVolt. The transmitter operates from 3.3~5.5 Volt and provides a 0~3.0 Volt analog signal with a 1.5 Volt reference.<\/p>\n<p>This Gravity analog EMG sensor by DFRobot and OYMotion turns surface muscle activity into an input for interactive projects. Reusable metal dry electrodes collect surface electromyography signals without conductive gel, while integrated amplification and filtering prepare the small signals for reading by Arduino or another suitable analog-input controller. The 0~3.0 Volt output supports muscle-activity waveform experiments and software-based interaction, from contraction-triggered robot commands to wearable effects. The kit includes the electrode board, wrist belt, electrode cable and signal transmitter, providing the core sensing hardware for a muscle-controlled prototype. This EMG sensor is intended for non-medical projects.<\/p>\n<p><strong>DL2610Mk01<\/strong><\/p>\n<p>1 x DFRobot FireBeetle 2 ESP32-E<br \/>\n1 x Adafruit SSD1306<br \/>\n1 x Gravity: IO Shield for FireBeetle 2<br \/>\n1 x Gravity: Analog EMG Sensor by OYMotion<br \/>\n1 x Gravity: Analog Slide Position Potentiometer<br \/>\n1 x Lithium Ion Battery &#8211; 1000mAh<br \/>\n1 x USB 3.0 to Type-C Cable<\/p>\n<p><strong>DL2611Mk01p<\/strong><\/p>\n<p><strong>DL2611Mk01p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/****** Don Luc Electronics \u00a9 ******\r\nSoftware Version Information\r\nProject #28 \u2013 Sensors \u2013 EMG Sensor by OYMotion \u2013 Mk33\r\n28-33\r\nDL2611Mk01p.ino\r\nDL2611Mk01\r\n1 x DFRobot FireBeetle 2 ESP32-E\r\n1 x Adafruit SSD1306\r\n1 x Gravity: IO Shield for FireBeetle 2\r\n1 x Gravity: Analog EMG Sensor by OYMotion\r\n1 x Gravity: Analog Slide Position (Potentiometer)\r\n1 x Lithium Ion Battery - 1000mAh\r\n1 x USB 3.0 to Type-C Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ Wire\r\n#include &lt;Wire.h&gt;\r\n\/\/ Adafruit SSD1306\r\n#include &lt;Adafruit_SSD1306.h&gt;\r\n\/\/ Arduino\r\n#include &quot;Arduino.h&quot;\r\n\/\/ EMG Filters\r\n#include &quot;EMGFilters.h&quot;\r\n\r\n\/\/ TIMING DEBUG\r\n#define TIMING_DEBUG 0\r\n\r\n\/\/ iEMG A0\r\n#define iEMG A0\r\n\r\n\/\/ EMG Filters\r\nEMGFilters myFilter;\r\n\r\n\/\/ Discrete filters must works with fixed sample frequence\r\n\/\/ our EMG filter only support &quot;SAMPLE_FREQ_500HZ&quot; or &quot;SAMPLE_FREQ_1000HZ&quot;\r\n\/\/ other sampleRate inputs will bypass all the EMG_FILTER\r\nint sampleRate = SAMPLE_FREQ_1000HZ;\r\n\r\n\/\/ For countries where power transmission is at 50 Hz - &quot;NOTCH_FREQ_50HZ&quot;\r\n\/\/ For countries where power transmission is at 60 Hz - &quot;NOTCH_FREQ_60HZ&quot;\r\n\/\/ Our emg filter only support 50Hz and 60Hz input\r\n\/\/ Other inputs will bypass all the EMG_FILTER\r\nint humFreq = NOTCH_FREQ_60HZ;\r\n\r\n\/\/ Calibration:\r\n\/\/ put on the sensors, and release your muscles;\r\n\/\/ wait a few seconds, and select the max value as the threshold;\r\n\/\/ any value under threshold will be set to zero\r\n\/\/ static int Threshold = 0;\r\nint Threshold = 0;\r\n\r\n\/\/ Time Stamp\r\nunsigned long timeStamp;\r\n\/\/ Time Budget\r\nunsigned long timeBudget;\r\n\r\n\/\/ Envelope\r\nint envlope;\r\n\r\n\/\/ Slide Position (Potentiometer)\r\nint iSP = A1;\r\nint iSPVal;\r\n\r\n\/\/ Adafruit SSD1306\r\n#define SCREEN_WIDTH 128\r\n#define SCREEN_HEIGHT 64\r\n#define OLED_RESET -1\r\nAdafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &amp;Wire, OLED_RESET);\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;28-33&quot;;\r\n\r\nvoid loop() {\r\n  \r\n  \/\/ isEMG\r\n  isEMG();\r\n  \r\n  \/\/ isDisplay EMG\r\n  isDisplayEMG();\r\n\r\n  \/\/ Delay\r\n  delay(1000);\r\n\r\n}\r\n<\/pre>\n<p><strong>getDisplay.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Adafruit SSD1306\r\n\/\/ isDisplayUID\r\nvoid isDisplayUID(){\r\n\r\n    \/\/ Intentar ambas direcciones\r\n  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {\r\n    \/\/Serial.println(&quot;Error con 0x3C, probando 0x3D...&quot;);\r\n    if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) {\r\n      \/\/Serial.println(&quot;Error OLED en ambas direcciones&quot;);\r\n      return;\r\n    }\r\n  }\r\n  \r\n  \/\/ Clear Display\r\n  display.clearDisplay();\r\n  display.setTextSize(1);\r\n  display.setTextColor(SSD1306_WHITE);\r\n  \/\/ Don Luc Electronics\r\n  display.setCursor(0,0);\r\n  display.println(&quot;Don Luc Electronics&quot;);\r\n  \/\/ Motor Drive\r\n  display.setCursor(0,20);\r\n  display.print(&quot;DL2611Mk01&quot;);\r\n \/\/ Version\r\n  display.setCursor(0,20);\r\n  display.print(&quot;Version&quot;);\r\n  display.setCursor(0,40);\r\n  display.print( sver );\r\n  \/\/ Display\r\n  display.display();\r\n\r\n}\r\n\/\/ isDisplay EMG\r\nvoid isDisplayEMG(){\r\n\r\n  \/\/ Clear Display\r\n  display.clearDisplay();\r\n  display.setTextSize(1);\r\n  display.setTextColor(SSD1306_WHITE);\r\n  \/\/ Don Luc Electronics\r\n  display.setCursor(0,0);\r\n  display.println(&quot;Don Luc Electronics&quot;);\r\n  \/\/ \r\n  display.setCursor(0,20);\r\n  \/\/ Envelope\r\n  display.print(&quot;Envelope&quot;);\r\n  \/\/ Envelope\r\n  display.setCursor(0,40);\r\n  display.print( envlope );\r\n  \/\/ Display\r\n  display.display();\r\n\r\n}\r\n<\/pre>\n<p><strong>getEMG.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ EMG\r\n\/\/ isEMG\r\nvoid isEMG(){\r\n\r\n  \/\/ In order to make sure the ADC sample frequence on arduino,\r\n  \/\/ the time cost should be measured each loop\r\n  timeStamp = micros();\r\n\r\n  \/\/ Slide Position (Potentiometer)\r\n  iSPVal = analogRead( iSP );\r\n  \/\/ Mapping Function\r\n  iSPVal = map(iSPVal, 0, 4095, 0, 255); \r\n  \/\/ Threshold\r\n  Threshold = iSPVal;\r\n\r\n  \/\/ Value\r\n  int Value = analogRead(iEMG);\r\n\r\n  \/\/ Filter Processing\r\n  int DataAfterFilter = myFilter.update(Value);\r\n\r\n  \/\/ Envelope\r\n  envlope = sq(DataAfterFilter);\r\n\r\n    \/\/ Any value under threshold will be set to zero\r\n    envlope = (envlope &gt; Threshold) ? envlope : 0;\r\n\r\n    \/\/ Time Stamp\r\n    timeStamp = micros() - timeStamp;\r\n\r\n    \/\/ TIMING DEBUG\r\n    if (TIMING_DEBUG) {\r\n        \r\n        Serial.print(&quot;Read Data: &quot;); Serial.println(Value);\r\n        Serial.print(&quot;Filtered Data: &quot;);Serial.println(DataAfterFilter);\r\n        Serial.print(&quot;Squared Data: &quot;);\r\n        Serial.println(envlope);\r\n        Serial.print(&quot;Filters cost time: &quot;); Serial.println(timeStamp);\r\n        \/\/ The filter cost average around 520 us\r\n\r\n    }\r\n\r\n    \/\/ If less than timeBudget, then you still have (timeBudget - timeStamp) to\r\n    \/\/ do your work\r\n    delayMicroseconds(1000);\r\n    \/\/ If more than timeBudget, the sample rate need to reduce to\r\n    \/\/ SAMPLE_FREQ_500HZ\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n  \r\n  \/\/ Serial\r\n  Serial.begin(115200);\r\n  \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Wire\r\n  Wire.begin();\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ EMG Filters\r\n  myFilter.init(sampleRate, humFreq, true, true, true);\r\n\r\n  \/\/ Setup for time cost measure\r\n  \/\/ Using micros()\r\n  timeBudget = 1e6 \/ sampleRate;\r\n  \/\/ Micros will overflow and auto return to zero every 70 minutes\r\n  \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Adafruit SSD1306 - UID\r\n  \/\/ Don Luc Electronics\r\n  \/\/ Version\r\n  isDisplayUID();\r\n  \r\n  \/\/ Delay\r\n  delay( 5000 );\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank, Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #EMG #Sensors #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Gravity: Analog EMG Sensor by OYMotion This analog surface EMG sensor uses reusable metal dry electrodes and integrated filtering with 1000x amplification of signals within \u00b11.5 mVolt. The transmitter operates from 3.3~5.5 Volt and provides a &#8230; <a title=\"Project #28 \u2013 Sensors \u2013 EMG Sensor by OYMotion \u2013 Mk33\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=5060\" aria-label=\"Read more about Project #28 \u2013 Sensors \u2013 EMG Sensor by OYMotion \u2013 Mk33\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[294,47,50,49,317,38,59,115,287,58,82,10],"tags":[86,6,92,102,4,320,87,19,445,444,83,85,24,9,84,27,88,33,34,108],"class_list":["post-5060","post","type-post","status-publish","format-standard","hentry","category-sensors","category-adafruit","category-arduino","category-consultant","category-dfrobot","category-digitalelectronics","category-fritzing","category-e-mentor","category-program","category-arduino-programming","category-program-esp32","category-projects","tag-adafruit","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfrobot","tag-display","tag-electronics","tag-emg-sensor","tag-emg-sensor-by-oymotion","tag-esp32","tag-fritzing","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-rht03-humidity-and-temperature-sensor","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/5060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5060"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/5060\/revisions"}],"predecessor-version":[{"id":5065,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/5060\/revisions\/5065"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}