<?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>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692</link><pubDate>Thu, 27 Nov 2025 15:27:57 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Current Revision posted to Documents by cstanton on 11/27/2025 3:27:57 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl160" data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this video, Milos went for a run! Before he did that though, he decided he wanted to try making his own heart rate tracker for running using an AD8232 ECG module and a XIAO ESP32 C3 microcontroller. The device sends the heart rate data to a phone over BLE and is recognized as a heart rate tracker by all fitness apps like Strava!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/CroppedFinishedProject.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2uok860"&gt;&lt;span&gt;Idea and Plan&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;For a little while now Milos has gotten into running and he likes to keep track of his heart rate while he does that. He started off by using a smartwatch that has a built in PPG sensor, but later switched over to a chest strap with a heart rate sensor that measures electrical activity. He got curious to how hard it would be to make his own, and this is what he tries tackling in this video. He decided to make his device compatible with the chest strap that most other running tracker use as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/1300.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To begin his work on this project, Milos decided to start off by selecting an AFE (Analog Front End) IC and go from there. He decided on using the AD8232 since it&amp;rsquo;s a popular IC because of the ECG module and because he already used in a previous project in his Open Cardiography Signal Measuring Device:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The initial plan was for him to design a PCB using this IC, a Raspberry Pi Pico and a bunch of other things he wanted to try out like wireless charging and a microSD card slot, but in the end the ECG section on the PCB didn&amp;rsquo;t work. He tried resoldering multiple times and doing any modifications that came to his mind, but in the end, the signal he would get from the board just wasn&amp;rsquo;t good enough. At that point, he knew he had to do a full redesign of the PCB but decided to first try making a fully DIY version using small modules so he can test out the software side. Because of this, he decided to go with the AD8232 module and a XIAO ESP32 C3 MCU. Both are small, and the XIAO board provides really good BLE capabilities which is what he needed to send the data to the phone. Besides these two modules, the only other things that are needed are a battery, a switch and a small boost converter to increase the battery voltage to 5V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/0804.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Before putting the chest strap and going for a run, the hard part of the project had to be completed, the software. This includes first getting the data acquistion working properly and then trying to implement an algorithm to calculate the heart rate from the ECG signal. Below are pictures of the captured ECG signal using the modules described above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251571288v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251577971v3.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pdveu1"&gt;&lt;span&gt;Pan Tompkins&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;The Pan Tompkins algorithm is one of the most significant and widely used methods for ECG signal processing. It originates from a paper titled &amp;ldquo;A Real-Time QRS Detection Algorithm&amp;rdquo; that was published by Jiapu Pan and Willis J. Tompkins in 1985. The full paper can be viewed for free on the following link:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://community.element14.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-81/PanTompkins.pdf"&gt;community.element14.com/.../PanTompkins.pdf&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because of the significance of this algorithm and paper, and the fact that it&amp;rsquo;s still a widely used method even though it has been 40 years since the paper was published, Milos decided to implement it in his project. This was by far the most challenging part of the project because he wanted to go step by step to get a good understanding of how the algorithm works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251633379v4.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the video, he goes into a lot of detail first explaining on a drawing the whole process of the algorithm and then shows the implementation that he has written in Python in Google Colaboratory. For more details, check the full video. The final results from his PT integration can be seen in the two figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To convert the whole algorithm from Python to C++ so he could use it on his ESP32 board, he decided to try using Cursor AI for the first time, which turned out to be a pretty good experience, since he managed to generate code by feeding it his PanTompkins Python script and the ESP codes for sampling the data and sending the data over BLE. While there were mistakes initially, they were relatively easy to fix!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251652559v5.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251659916v6.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pg4pa2"&gt;&lt;span&gt;Results&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;While the results looked promising on a really clean signal, it was now time for Milos to test it out on a run. He went for an easy 5K in his neighborhood wearing the device he made as well as he smartwatch as a control device (even though the smartwatch itself isn&amp;rsquo;t that super accurate as Milos notes in the video). To analyze the data, he recorded his run using Strava, which is one of the more popular fitness tracking apps. Strava initially recoreded the run using the ESP32 heart rate running tracker, but also records another parallel session that gets later added to strava because of a third party app to which the smartwatch is connected. In that way, Milos double recoreded the same activity with the only difference being the heart rate sensor. This was perfect for actually comparing the results, and if you go to your activity in Strava using a browser, you can actually download the whole activity as a FIT file and analyze it further using Python! Here is the heart rate data from his smart watch and the ESP32 Heart rate tracker.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251682027v7.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251688876v8.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While there are some similarities when you look at the signal, it is clear that they don&amp;rsquo;t match up properly. This is even more evident if we put both signals on the same graph. You can see that the ESP32 Heart rate tracker followed the smart watch pretty good in the beginning and in some sections, but in others, the readings were just off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251702189v9.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If we zoom in on certain segments, we can see that there are times when we can say both devices were essentially showing the same heart rate (within some amount of tolerance of course), while at other times, there really wasn&amp;rsquo;t much correlation between the two signals. Both cases can be seen in the figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251715614v10.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251721510v11.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since not even the smartwatch can be fully trusted and since Milos couldn&amp;rsquo;t see the raw data, he couldn&amp;rsquo;t determine the exact point where the algorithm was failing, or whether this was just to the input signal being too noisy. To determine that, he said he would need to make a device with proper data logging capabilities and with an AFE IC that could accomplish this task better than the AD8232 using two electrodes. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Milos is still happy with the results he got, the Pan Tompkins algorithm worked on the signals he put it through and the device was recognized without any issues by the fintess tracking apps. His next goal is to redesign a PCB with a different AFE IC and also add a microSD card slot for data logging so he could properly analyze the data. These are all plans for the V2 of this project, if you have any other ideas that you would like him to add to the heart rate fitness tracker, leave them in the comments below and you might see them pop in the next video!&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2p74ao0" data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/150791"&gt;Episode 692 Support Files&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidlja"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-e8986" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379,2946130,2845501&amp;nsku=61AK2694,79AC7377,50AC9540&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('e8986'));" data-farnell="4060379,2946130,2845501" data-newark="61AK2694,79AC7377,50AC9540" 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;XIAO ESP32C3 - 113991054&lt;/td&gt;
&lt;td&gt;SEEED STUDIO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-ffc6f" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379&amp;nsku=61AK2694&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('ffc6f'));" data-farnell="4060379" data-newark="61AK2694" 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;AD8232 ECG Module - SEN0213&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-6cff6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946130&amp;nsku=79AC7377&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('6cff6'));" data-farnell="2946130" data-newark="79AC7377" 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;White PLA - MC002554&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-1187a" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2845501&amp;nsku=50AC9540&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('1187a'));" data-farnell="2845501" data-newark="50AC9540" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidljb"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wires&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snap Buttons&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heart Monitor Chest Strap&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1S LION/LIPO Cell&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tiny Boost Converter&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;h3 id="mcetoc_1jb2nidljc"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/11</link><pubDate>Thu, 27 Nov 2025 15:20:42 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 11 posted to Documents by cstanton on 11/27/2025 3:20:42 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl160" data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this video, Milos went for a run! Before he did that though, he decided he wanted to try making his own heart rate tracker for running using an AD8232 ECG module and a XIAO ESP32 C3 microcontroller. The device sends the heart rate data to a phone over BLE and is recognized as a heart rate tracker by all fitness apps like Strava!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/CroppedFinishedProject.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Idea and Plan&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;For a little while now Milos has gotten into running and he likes to keep track of his heart rate while he does that. He started off by using a smartwatch that has a built in PPG sensor, but later switched over to a chest strap with a heart rate sensor that measures electrical activity. He got curious to how hard it would be to make his own, and this is what he tries tackling in this video. He decided to make his device compatible with the chest strap that most other running tracker use as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/1300.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To begin his work on this project, Milos decided to start off by selecting an AFE (Analog Front End) IC and go from there. He decided on using the AD8232 since it&amp;rsquo;s a popular IC because of the ECG module and because he already used in a previous project in his Open Cardiography Signal Measuring Device:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The initial plan was for him to design a PCB using this IC, a Raspberry Pi Pico and a bunch of other things he wanted to try out like wireless charging and a microSD card slot, but in the end the ECG section on the PCB didn&amp;rsquo;t work. He tried resoldering multiple times and doing any modifications that came to his mind, but in the end, the signal he would get from the board just wasn&amp;rsquo;t good enough. At that point, he knew he had to do a full redesign of the PCB but decided to first try making a fully DIY version using small modules so he can test out the software side. Because of this, he decided to go with the AD8232 module and a XIAO ESP32 C3 MCU. Both are small, and the XIAO board provides really good BLE capabilities which is what he needed to send the data to the phone. Besides these two modules, the only other things that are needed are a battery, a switch and a small boost converter to increase the battery voltage to 5V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/0804.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Before putting the chest strap and going for a run, the hard part of the project had to be completed, the software. This includes first getting the data acquistion working properly and then trying to implement an algorithm to calculate the heart rate from the ECG signal. Below are pictures of the captured ECG signal using the modules described above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251571288v2.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251577971v3.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pdveu1"&gt;&lt;span&gt;Pan Tompkins&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;The Pan Tompkins algorithm is one of the most significant and widely used methods for ECG signal processing. It originates from a paper titled &amp;ldquo;A Real-Time QRS Detection Algorithm&amp;rdquo; that was published by Jiapu Pan and Willis J. Tompkins in 1985. The full paper can be viewed for free on the following link:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because of the significance of this algorithm and paper, and the fact that it&amp;rsquo;s still a widely used method even though it has been 40 years since the paper was published, Milos decided to implement it in his project. This was by far the most challenging part of the project because he wanted to go step by step to get a good understanding of how the algorithm works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251633379v4.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the video, he goes into a lot of detail first explaining on a drawing the whole process of the algorithm and then shows the implementation that he has written in Python in Google Colaboratory. For more details, check the full video. The final results from his PT integration can be seen in the two figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To convert the whole algorithm from Python to C++ so he could use it on his ESP32 board, he decided to try using Cursor AI for the first time, which turned out to be a pretty good experience, since he managed to generate code by feeding it his PanTompkins Python script and the ESP codes for sampling the data and sending the data over BLE. While there were mistakes initially, they were relatively easy to fix!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251652559v5.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251659916v6.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pg4pa2"&gt;&lt;span&gt;Results&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;While the results looked promising on a really clean signal, it was now time for Milos to test it out on a run. He went for an easy 5K in his neighborhood wearing the device he made as well as he smartwatch as a control device (even though the smartwatch itself isn&amp;rsquo;t that super accurate as Milos notes in the video). To analyze the data, he recorded his run using Strava, which is one of the more popular fitness tracking apps. Strava initially recoreded the run using the ESP32 heart rate running tracker, but also records another parallel session that gets later added to strava because of a third party app to which the smartwatch is connected. In that way, Milos double recoreded the same activity with the only difference being the heart rate sensor. This was perfect for actually comparing the results, and if you go to your activity in Strava using a browser, you can actually download the whole activity as a FIT file and analyze it further using Python! Here is the heart rate data from his smart watch and the ESP32 Heart rate tracker.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251682027v7.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251688876v8.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While there are some similarities when you look at the signal, it is clear that they don&amp;rsquo;t match up properly. This is even more evident if we put both signals on the same graph. You can see that the ESP32 Heart rate tracker followed the smart watch pretty good in the beginning and in some sections, but in others, the readings were just off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251702189v9.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If we zoom in on certain segments, we can see that there are times when we can say both devices were essentially showing the same heart rate (within some amount of tolerance of course), while at other times, there really wasn&amp;rsquo;t much correlation between the two signals. Both cases can be seen in the figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251715614v10.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251721510v11.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since not even the smartwatch can be fully trusted and since Milos couldn&amp;rsquo;t see the raw data, he couldn&amp;rsquo;t determine the exact point where the algorithm was failing, or whether this was just to the input signal being too noisy. To determine that, he said he would need to make a device with proper data logging capabilities and with an AFE IC that could accomplish this task better than the AD8232 using two electrodes. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Milos is still happy with the results he got, the Pan Tompkins algorithm worked on the signals he put it through and the device was recognized without any issues by the fintess tracking apps. His next goal is to redesign a PCB with a different AFE IC and also add a microSD card slot for data logging so he could properly analyze the data. These are all plans for the V2 of this project, if you have any other ideas that you would like him to add to the heart rate fitness tracker, leave them in the comments below and you might see them pop in the next video!&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2p74ao0" data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/m/files/150791"&gt;Episode 692 Support Files&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidlja"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-04449" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379,2946130,2845501&amp;nsku=61AK2694,79AC7377,50AC9540&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('04449'));" data-farnell="4060379,2946130,2845501" data-newark="61AK2694,79AC7377,50AC9540" 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;XIAO ESP32C3 - 113991054&lt;/td&gt;
&lt;td&gt;SEEED STUDIO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-9e508" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379&amp;nsku=61AK2694&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('9e508'));" data-farnell="4060379" data-newark="61AK2694" 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;AD8232 ECG Module - SEN0213&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2c5c6" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946130&amp;nsku=79AC7377&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('2c5c6'));" data-farnell="2946130" data-newark="79AC7377" 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;White PLA - MC002554&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-c2413" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2845501&amp;nsku=50AC9540&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('c2413'));" data-farnell="2845501" data-newark="50AC9540" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidljb"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wires&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snap Buttons&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heart Monitor Chest Strap&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1S LION/LIPO Cell&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tiny Boost Converter&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;h3 id="mcetoc_1jb2nidljc"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/9</link><pubDate>Thu, 27 Nov 2025 13:55:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 9 posted to Documents by cstanton on 11/27/2025 1:55:50 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl160" data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this video, Milos went for a run! Before he did that though, he decided he wanted to try making his own heart rate tracker for running using an AD8232 ECG module and a XIAO ESP32 C3 microcontroller. The device sends the heart rate data to a phone over BLE and is recognized as a heart rate tracker by all fitness apps like Strava!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/CroppedFinishedProject.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Idea and Plan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For a little while now Milos has gotten into running and he likes to keep track of his heart rate while he does that. He started off by using a smartwatch that has a built in PPG sensor, but later switched over to a chest strap with a heart rate sensor that measures electrical activity. He got curious to how hard it would be to make his own, and this is what he tries tackling in this video. He decided to make his device compatible with the chest strap that most other running tracker use as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/1300.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To begin his work on this project, Milos decided to start off by selecting an AFE (Analog Front End) IC and go from there. He decided on using the AD8232 since it&amp;rsquo;s a popular IC because of the ECG module and because he already used in a previous project in his Open Cardiography Signal Measuring Device:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The initial plan was for him to design a PCB using this IC, a Raspberry Pi Pico and a bunch of other things he wanted to try out like wireless charging and a microSD card slot, but in the end the ECG section on the PCB didn&amp;rsquo;t work. He tried resoldering multiple times and doing any modifications that came to his mind, but in the end, the signal he would get from the board just wasn&amp;rsquo;t good enough. At that point, he knew he had to do a full redesign of the PCB but decided to first try making a fully DIY version using small modules so he can test out the software side. Because of this, he decided to go with the AD8232 module and a XIAO ESP32 C3 MCU. Both are small, and the XIAO board provides really good BLE capabilities which is what he needed to send the data to the phone. Besides these two modules, the only other things that are needed are a battery, a switch and a small boost converter to increase the battery voltage to 5V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/0804.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Before putting the chest strap and going for a run, the hard part of the project had to be completed, the software. This includes first getting the data acquistion working properly and then trying to implement an algorithm to calculate the heart rate from the ECG signal. Below are pictures of the captured ECG signal using the modules described above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251571288v2.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251577971v3.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pdveu1"&gt;&lt;span&gt;Pan Tompkins&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;The Pan Tompkins algorithm is one of the most significant and widely used methods for ECG signal processing. It originates from a paper titled &amp;ldquo;A Real-Time QRS Detection Algorithm&amp;rdquo; that was published by Jiapu Pan and Willis J. Tompkins in 1985. The full paper can be viewed for free on the following link:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because of the significance of this algorithm and paper, and the fact that it&amp;rsquo;s still a widely used method even though it has been 40 years since the paper was published, Milos decided to implement it in his project. This was by far the most challenging part of the project because he wanted to go step by step to get a good understanding of how the algorithm works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251633379v4.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the video, he goes into a lot of detail first explaining on a drawing the whole process of the algorithm and then shows the implementation that he has written in Python in Google Colaboratory. For more details, check the full video. The final results from his PT integration can be seen in the two figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To convert the whole algorithm from Python to C++ so he could use it on his ESP32 board, he decided to try using Cursor AI for the first time, which turned out to be a pretty good experience, since he managed to generate code by feeding it his PanTompkins Python script and the ESP codes for sampling the data and sending the data over BLE. While there were mistakes initially, they were relatively easy to fix!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251652559v5.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251659916v6.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pg4pa2"&gt;&lt;span&gt;Results&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;While the results looked promising on a really clean signal, it was now time for Milos to test it out on a run. He went for an easy 5K in his neighborhood wearing the device he made as well as he smartwatch as a control device (even though the smartwatch itself isn&amp;rsquo;t that super accurate as Milos notes in the video). To analyze the data, he recorded his run using Strava, which is one of the more popular fitness tracking apps. Strava initially recoreded the run using the ESP32 heart rate running tracker, but also records another parallel session that gets later added to strava because of a third party app to which the smartwatch is connected. In that way, Milos double recoreded the same activity with the only difference being the heart rate sensor. This was perfect for actually comparing the results, and if you go to your activity in Strava using a browser, you can actually download the whole activity as a FIT file and analyze it further using Python! Here is the heart rate data from his smart watch and the ESP32 Heart rate tracker.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251682027v7.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251688876v8.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While there are some similarities when you look at the signal, it is clear that they don&amp;rsquo;t match up properly. This is even more evident if we put both signals on the same graph. You can see that the ESP32 Heart rate tracker followed the smart watch pretty good in the beginning and in some sections, but in others, the readings were just off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251702189v9.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If we zoom in on certain segments, we can see that there are times when we can say both devices were essentially showing the same heart rate (within some amount of tolerance of course), while at other times, there really wasn&amp;rsquo;t much correlation between the two signals. Both cases can be seen in the figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251715614v10.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-04-35/pastedimage1764251721510v11.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since not even the smartwatch can be fully trusted and since Milos couldn&amp;rsquo;t see the raw data, he couldn&amp;rsquo;t determine the exact point where the algorithm was failing, or whether this was just to the input signal being too noisy. To determine that, he said he would need to make a device with proper data logging capabilities and with an AFE IC that could accomplish this task better than the AD8232 using two electrodes. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Milos is still happy with the results he got, the Pan Tompkins algorithm worked on the signals he put it through and the device was recognized without any issues by the fintess tracking apps. His next goal is to redesign a PCB with a different AFE IC and also add a microSD card slot for data logging so he could properly analyze the data. These are all plans for the V2 of this project, if you have any other ideas that you would like him to add to the heart rate fitness tracker, leave them in the comments below and you might see them pop in the next video!&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2p74ao0" data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidlja"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-b1d4b" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379,2946130,2845501&amp;nsku=61AK2694,79AC7377,50AC9540&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('b1d4b'));" data-farnell="4060379,2946130,2845501" data-newark="61AK2694,79AC7377,50AC9540" 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;XIAO ESP32C3 - 113991054&lt;/td&gt;
&lt;td&gt;SEEED STUDIO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-2a64a" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379&amp;nsku=61AK2694&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('2a64a'));" data-farnell="4060379" data-newark="61AK2694" 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;AD8232 ECG Module - SEN0213&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4922e" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946130&amp;nsku=79AC7377&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('4922e'));" data-farnell="2946130" data-newark="79AC7377" 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;White PLA - MC002554&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-c46b2" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2845501&amp;nsku=50AC9540&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('c46b2'));" data-farnell="2845501" data-newark="50AC9540" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidljb"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wires&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snap Buttons&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heart Monitor Chest Strap&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1S LION/LIPO Cell&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tiny Boost Converter&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;h3 id="mcetoc_1jb2nidljc"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/10</link><pubDate>Thu, 27 Nov 2025 13:55:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>vivekvelusamy</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 10 posted to Documents by vivekvelusamy on 11/27/2025 1:55:50 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl160" data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this video, Milos went for a run! Before he did that though, he decided he wanted to try making his own heart rate tracker for running using an AD8232 ECG module and a XIAO ESP32 C3 microcontroller. The device sends the heart rate data to a phone over BLE and is recognized as a heart rate tracker by all fitness apps like Strava!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/CroppedFinishedProject.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Idea and Plan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For a little while now Milos has gotten into running and he likes to keep track of his heart rate while he does that. He started off by using a smartwatch that has a built in PPG sensor, but later switched over to a chest strap with a heart rate sensor that measures electrical activity. He got curious to how hard it would be to make his own, and this is what he tries tackling in this video. He decided to make his device compatible with the chest strap that most other running tracker use as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/1300.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To begin his work on this project, Milos decided to start off by selecting an AFE (Analog Front End) IC and go from there. He decided on using the AD8232 since it&amp;rsquo;s a popular IC because of the ECG module and because he already used in a previous project in his Open Cardiography Signal Measuring Device:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;a href="https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71947/building-an-open-source-blood-pressure-heart-signal-monitor----episode-674"&gt;Building an Open Source Blood Pressure &amp;amp; Heart Signal Monitor -- Episode 674&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The initial plan was for him to design a PCB using this IC, a Raspberry Pi Pico and a bunch of other things he wanted to try out like wireless charging and a microSD card slot, but in the end the ECG section on the PCB didn&amp;rsquo;t work. He tried resoldering multiple times and doing any modifications that came to his mind, but in the end, the signal he would get from the board just wasn&amp;rsquo;t good enough. At that point, he knew he had to do a full redesign of the PCB but decided to first try making a fully DIY version using small modules so he can test out the software side. Because of this, he decided to go with the AD8232 module and a XIAO ESP32 C3 MCU. Both are small, and the XIAO board provides really good BLE capabilities which is what he needed to send the data to the phone. Besides these two modules, the only other things that are needed are a battery, a switch and a small boost converter to increase the battery voltage to 5V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;"  src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/0804.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Before putting the chest strap and going for a run, the hard part of the project had to be completed, the software. This includes first getting the data acquistion working properly and then trying to implement an algorithm to calculate the heart rate from the ECG signal. Below are pictures of the captured ECG signal using the modules described above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251571288v2.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251577971v3.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pdveu1"&gt;&lt;span&gt;Pan Tompkins&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;The Pan Tompkins algorithm is one of the most significant and widely used methods for ECG signal processing. It originates from a paper titled &amp;ldquo;A Real-Time QRS Detection Algorithm&amp;rdquo; that was published by Jiapu Pan and Willis J. Tompkins in 1985. The full paper can be viewed for free on the following link:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://www.robots.ox.ac.uk/~gari/teaching/cdt/A3/readings/ECG/Pan+Tompkins.pdf&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because of the significance of this algorithm and paper, and the fact that it&amp;rsquo;s still a widely used method even though it has been 40 years since the paper was published, Milos decided to implement it in his project. This was by far the most challenging part of the project because he wanted to go step by step to get a good understanding of how the algorithm works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251633379v4.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the video, he goes into a lot of detail first explaining on a drawing the whole process of the algorithm and then shows the implementation that he has written in Python in Google Colaboratory. For more details, check the full video. The final results from his PT integration can be seen in the two figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To convert the whole algorithm from Python to C++ so he could use it on his ESP32 board, he decided to try using Cursor AI for the first time, which turned out to be a pretty good experience, since he managed to generate code by feeding it his PanTompkins Python script and the ESP codes for sampling the data and sending the data over BLE. While there were mistakes initially, they were relatively easy to fix!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251652559v5.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251659916v6.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2pg4pa2"&gt;&lt;span&gt;Results&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;While the results looked promising on a really clean signal, it was now time for Milos to test it out on a run. He went for an easy 5K in his neighborhood wearing the device he made as well as he smartwatch as a control device (even though the smartwatch itself isn&amp;rsquo;t that super accurate as Milos notes in the video). To analyze the data, he recorded his run using Strava, which is one of the more popular fitness tracking apps. Strava initially recoreded the run using the ESP32 heart rate running tracker, but also records another parallel session that gets later added to strava because of a third party app to which the smartwatch is connected. In that way, Milos double recoreded the same activity with the only difference being the heart rate sensor. This was perfect for actually comparing the results, and if you go to your activity in Strava using a browser, you can actually download the whole activity as a FIT file and analyze it further using Python! Here is the heart rate data from his smart watch and the ESP32 Heart rate tracker.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251682027v7.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251688876v8.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While there are some similarities when you look at the signal, it is clear that they don&amp;rsquo;t match up properly. This is even more evident if we put both signals on the same graph. You can see that the ESP32 Heart rate tracker followed the smart watch pretty good in the beginning and in some sections, but in others, the readings were just off.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251702189v9.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If we zoom in on certain segments, we can see that there are times when we can say both devices were essentially showing the same heart rate (within some amount of tolerance of course), while at other times, there really wasn&amp;rsquo;t much correlation between the two signals. Both cases can be seen in the figures below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251715614v10.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img loading="lazy" alt="image" style="max-height:360px;max-width:640px;" src="/resized-image/__size/1280x720/__key/communityserver-wikis-components-files/00-00-00-03-81/pastedimage1764251721510v11.png"  /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since not even the smartwatch can be fully trusted and since Milos couldn&amp;rsquo;t see the raw data, he couldn&amp;rsquo;t determine the exact point where the algorithm was failing, or whether this was just to the input signal being too noisy. To determine that, he said he would need to make a device with proper data logging capabilities and with an AFE IC that could accomplish this task better than the AD8232 using two electrodes. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Milos is still happy with the results he got, the Pan Tompkins algorithm worked on the signals he put it through and the device was recognized without any issues by the fintess tracking apps. His next goal is to redesign a PCB with a different AFE IC and also add a microSD card slot for data logging so he could properly analyze the data. These are all plans for the V2 of this project, if you have any other ideas that you would like him to add to the heart rate fitness tracker, leave them in the comments below and you might see them pop in the next video!&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2p74ao0" data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidlja"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-9f1c7" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379,2946130,2845501&amp;nsku=61AK2694,79AC7377,50AC9540&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('9f1c7'));" data-farnell="4060379,2946130,2845501" data-newark="61AK2694,79AC7377,50AC9540" 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;XIAO ESP32C3 - 113991054&lt;/td&gt;
&lt;td&gt;SEEED STUDIO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-d8f94" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379&amp;nsku=61AK2694&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('d8f94'));" data-farnell="4060379" data-newark="61AK2694" 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;AD8232 ECG Module - SEN0213&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-b7020" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946130&amp;nsku=79AC7377&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('b7020'));" data-farnell="2946130" data-newark="79AC7377" 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;White PLA - MC002554&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-4a696" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2845501&amp;nsku=50AC9540&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('4a696'));" data-farnell="2845501" data-newark="50AC9540" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidljb"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wires&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snap Buttons&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heart Monitor Chest Strap&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1S LION/LIPO Cell&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tiny Boost Converter&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;h3 id="mcetoc_1jb2nidljc"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/8</link><pubDate>Thu, 27 Nov 2025 13:21:02 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 8 posted to Documents by cstanton on 11/27/2025 1:21:02 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl160" data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;He also adds:&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl161" data-start="1400" data-end="1412"&gt;Project Idea&lt;/h2&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl162" data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/h2&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl163" data-start="3688" data-end="3702"&gt;Hardware Build&lt;/h2&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl164" data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/h2&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl165" data-start="5121" data-end="5134"&gt;Data Analysis&lt;/h2&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2mdl166" data-start="5807" data-end="5818"&gt;Future Work&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidlja"&gt;Bill of Materials&lt;/h2&gt;
&lt;table class="e14-product-bom-main"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;th&gt;&lt;a id="e14-product-link-e2956" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379,2946130,2845501&amp;nsku=61AK2694,79AC7377,50AC9540&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('e2956'));" data-farnell="4060379,2946130,2845501" data-newark="61AK2694,79AC7377,50AC9540" 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;XIAO ESP32C3 - 113991054&lt;/td&gt;
&lt;td&gt;SEEED STUDIO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-3ccdc" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=4060379&amp;nsku=61AK2694&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('3ccdc'));" data-farnell="4060379" data-newark="61AK2694" 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;AD8232 ECG Module - SEN0213&lt;/td&gt;
&lt;td&gt;DFROBOT&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-36cd2" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2946130&amp;nsku=79AC7377&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('36cd2'));" data-farnell="2946130" data-newark="79AC7377" 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;White PLA - MC002554&lt;/td&gt;
&lt;td&gt;MULTICOMP PRO&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a id="e14-product-link-66562" data-at-areainteracted="rte-content" data-at-type="click" data-at-link-type="button" href="https://referral.element14.com/OrderCodeView?fsku=2845501&amp;nsku=50AC9540&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('66562'));" data-farnell="2845501" data-newark="50AC9540" data-comoverride="" data-cmpoverride="" data-cpc="" data-avnetemea="" data-avnetema="" data-avnetasia="" &gt;Buy Now&lt;/a&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="xs-hide"&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2 id="mcetoc_1jb2nidljb"&gt;Additional Parts&lt;/h2&gt;
&lt;table class="e14-product-bom-additional"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Product Name&lt;/th&gt;
&lt;th&gt;Manufacturer&lt;/th&gt;
&lt;th&gt;Quantity&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wires&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snap Buttons&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heart Monitor Chest Strap&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1S LION/LIPO Cell&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tiny Boost Converter&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;h3 id="mcetoc_1jb2nidljc"&gt;&lt;/h3&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/7</link><pubDate>Thu, 27 Nov 2025 12:57:35 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 7 posted to Documents by cstanton on 11/27/2025 12:57:35 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;strong&gt;Please note&lt;/strong&gt;:&amp;nbsp;Due to the nature of this project, it does involve placing electrodes onto the skin. The design of this project is intended with opto-isolation to prevent problems involving electricity and voltage levels,&amp;nbsp;if you choose to recreate this project, you do so at your own risk and with the understanding that you&amp;#39;re expected to have appropriate training and be a sufficiently &amp;#39;competent&amp;#39; person. This project is also not presented with any health or medical certifications and as such is &amp;#39;proof of concept&amp;#39; and not expected to be used in any official capacity as a medical device.&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;He also adds:&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;&amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;h2 data-start="1400" data-end="1412"&gt;Project Idea&lt;/h2&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;h2 data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/h2&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;h2 data-start="3688" data-end="3702"&gt;Hardware Build&lt;/h2&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;h2 data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/h2&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;h2 data-start="5121" data-end="5134"&gt;Data Analysis&lt;/h2&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;h2 data-start="5807" data-end="5818"&gt;Future Work&lt;/h2&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Supporting Files and Links&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;-&amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/6</link><pubDate>Thu, 27 Nov 2025 12:50:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 6 posted to Documents by cstanton on 11/27/2025 12:50:25 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Join Milos as he puts together an open source heart rate monitor built around an ECG front end and an ESP32 C3, then takes it out for a run to see how it performs next to his everyday fitness gear. He walks through the signal processing, the BLE connection to his phone and the real world results from a full workout. It is a hands on build that shows what works, what drifts and what he plans to improve in the next version.&lt;/p&gt;
&lt;h2 data-start="447" data-end="956"&gt;Time to Get Running!&lt;/h2&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;br data-start="871" data-end="874" /&gt; He also adds:&lt;br data-start="887" data-end="890" /&gt; &amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;p data-start="1400" data-end="1412"&gt;Project Idea&lt;/p&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;p data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/p&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;p data-start="3688" data-end="3702"&gt;Hardware Build&lt;/p&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;p data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/p&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;p data-start="5121" data-end="5134"&gt;Data Analysis&lt;/p&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;p data-start="5807" data-end="5818"&gt;Future Work&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: DIY wearable tech, microcontroller project, wearable electronics, BLE heart rate sensor, fitness data anlysis, running tracker, custom fitness tracker, heart rate detection, ECG heart rate tracker, ESP32 C3 project, ECG signal processing, AD8232 ECG module, friday_release, ECG monitoring, DIY chest strap, Pan Tompkins algorithm&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/5</link><pubDate>Thu, 27 Nov 2025 12:37:51 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 5 posted to Documents by cstanton on 11/27/2025 12:37:51 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;br data-start="871" data-end="874" /&gt; He also adds:&lt;br data-start="887" data-end="890" /&gt; &amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;p data-start="1400" data-end="1412"&gt;Project Idea&lt;/p&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;p data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/p&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;p data-start="3688" data-end="3702"&gt;Hardware Build&lt;/p&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;p data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/p&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;p data-start="5121" data-end="5134"&gt;Data Analysis&lt;/p&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;p data-start="5807" data-end="5818"&gt;Future Work&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/4</link><pubDate>Thu, 27 Nov 2025 12:08:59 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 4 posted to Documents by cstanton on 11/27/2025 12:08:59 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;&lt;a href="https://youtu.be/Z1Dts_NHXyQ"&gt;https://youtu.be/Z1Dts_NHXyQ&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;br data-start="871" data-end="874" /&gt; He also adds:&lt;br data-start="887" data-end="890" /&gt; &amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;p data-start="1400" data-end="1412"&gt;Project Idea&lt;/p&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;p data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/p&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;p data-start="3688" data-end="3702"&gt;Hardware Build&lt;/p&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;p data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/p&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;p data-start="5121" data-end="5134"&gt;Data Analysis&lt;/p&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;p data-start="5807" data-end="5818"&gt;Future Work&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor Tracker -- Episode 692</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/3</link><pubDate>Wed, 26 Nov 2025 16:26:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 3 posted to Documents by cstanton on 11/26/2025 4:26:25 PM&lt;br /&gt;
&lt;p data-start="447" data-end="956"&gt;Milos set out to build his own heart rate tracker for running by combining an AD8232 ECG module with a XIAO ESP32 C3. His goal was to create a device that streams heart rate data to a phone over BLE and appears to fitness apps like Strava as a standard heart rate sensor. In his words at the start of the video, he says:&lt;br data-start="767" data-end="770" /&gt; &amp;quot;Today we&amp;#39;re going to go for a run. But before we do that we&amp;#39;re going to measure some heart signals.&amp;quot;&lt;br data-start="871" data-end="874" /&gt; He also adds:&lt;br data-start="887" data-end="890" /&gt; &amp;quot;We&amp;#39;re going to make our own chest strap for recording our pulse.&amp;quot;&lt;/p&gt;
&lt;p data-start="958" data-end="1150"&gt;This project includes attaching electrodes to the body, and as Milos notes, this must be done with care. Proper isolation between the PC and the microcontroller is required during development.&lt;/p&gt;
&lt;p data-start="1152" data-end="1398"&gt;Milos places significant attention on the well known Pan Tompkins algorithm for ECG signal processing, walking through its stages in detail throughout the video. The full process and demonstration appear in the episode linked on the project page.&lt;/p&gt;
&lt;p data-start="1400" data-end="1412"&gt;Project Idea&lt;/p&gt;
&lt;p data-start="1414" data-end="1861"&gt;Milos has been running for some time and follows his heart rate during workouts. He has used a smartwatch with an optical PPG sensor and later switched to an electrical chest strap. Curiosity around how difficult it would be to build his own chest strap prompted the project. As he explains early on:&lt;br data-start="1714" data-end="1717" /&gt; &amp;quot;For this video my idea is to show you how we can actually make our own strap sensor that connects to your phone just like a commercial device.&amp;quot;&lt;/p&gt;
&lt;p data-start="1863" data-end="2306"&gt;To begin, Milos chose an analog front end. He picked the AD8232 because of its popularity and prior use in one of his earlier projects. His first plan involved building a custom PCB with the AD8232, a Raspberry Pi Pico, wireless charging support and a microSD card. However, the ECG portion of the PCB never provided a clean signal. Multiple attempts at rework did not resolve the issue, so Milos pivoted to a fully DIY approach using modules.&lt;/p&gt;
&lt;p data-start="2308" data-end="2633"&gt;For the working prototype, Milos used the AD8232 module and the XIAO ESP32 C3 module. Both are compact and the ESP32 provides strong BLE capabilities. Power comes from a small lithium cell, an inline switch and a boost converter to generate a five volt rail before regulation down to the microcontroller and analog front end.&lt;/p&gt;
&lt;p data-start="2635" data-end="2667"&gt;Software Development and Testing&lt;/p&gt;
&lt;p data-start="2669" data-end="2974"&gt;Before any field testing, Milos needed reliable signal acquisition and a functional heart rate algorithm. He captured clean ECG segments and inspected them in Python. In the video he shows the raw data and remarks:&lt;br data-start="2883" data-end="2886" /&gt; &amp;quot;We can see that the data actually looks really nice. We can see the whole QRS complex.&amp;quot;&lt;/p&gt;
&lt;p data-start="2976" data-end="3426"&gt;Once the signal quality was confirmed, he moved into implementing the Pan Tompkins algorithm. Milos breaks down the stages clearly on camera: bandpass filtering, derivative filtering, squaring, moving window integration and peak detection.&lt;br data-start="3215" data-end="3218" /&gt; He says:&lt;br data-start="3226" data-end="3229" /&gt; &amp;quot;First of all, let&amp;#39;s see how the logic behind it, how it all works. Then we are going to program it in Python. And then we are going to transfer that code to our MCU so we can run it in real time.&amp;quot;&lt;/p&gt;
&lt;p data-start="3428" data-end="3686"&gt;After validating the algorithm in Python, Milos converted it into C++ for the ESP32. Instead of a manual rewrite, he experimented with using Cursor AI to translate and merge the code. It required corrections, but ultimately produced a working implementation.&lt;/p&gt;
&lt;p data-start="3688" data-end="3702"&gt;Hardware Build&lt;/p&gt;
&lt;p data-start="3704" data-end="4157"&gt;Once the software reached a usable state, Milos turned to assembling the device. The electronics were kept simple. The ESP32 module, the AD8232 module, a small lithium battery, a boost converter, a switch and a charging connector were placed into a compact 3D printed enclosure.&lt;br data-start="3982" data-end="3985" /&gt; The three electrode connections were routed out to attach to a chest strap. As Milos notes in the assembly clip, the design could be made much smaller in a future PCB pass.&lt;/p&gt;
&lt;p data-start="4159" data-end="4183"&gt;Running Test and Results&lt;/p&gt;
&lt;p data-start="4185" data-end="4570"&gt;With the device assembled, Milos went for a five kilometer run and tested the homemade tracker alongside his smartwatch. Strava recorded two data sources so that both datasets could be compared afterward. In the middle of the run he comments:&lt;br data-start="4427" data-end="4430" /&gt; &amp;quot;Compared to my watch, which is at 131, the heart rate is showing around 130. There are some oscillations, but we&amp;#39;ll talk about that later.&amp;quot;&lt;/p&gt;
&lt;p data-start="4572" data-end="4895"&gt;The device performed best during steady heart rate periods. When the heart rate changed quickly, the algorithm struggled to keep up. As Milos observed:&lt;br data-start="4723" data-end="4726" /&gt; &amp;quot;When I&amp;#39;m keeping the pulse kind of steady for an extended period, they actually match up. But as soon as I try doing some major changes, this thing just can&amp;#39;t keep up.&amp;quot;&lt;/p&gt;
&lt;p data-start="4897" data-end="5119"&gt;He later points out that the watch is not perfect either, and that without access to raw smartwatch data it is difficult to isolate whether discrepancies were due to noise, electrode placement issues or algorithm behavior.&lt;/p&gt;
&lt;p data-start="5121" data-end="5134"&gt;Data Analysis&lt;/p&gt;
&lt;p data-start="5136" data-end="5485"&gt;After the run, Milos downloaded the FIT files from Strava and analyzed them in Python. The beginning of the activity showed good agreement between the two devices, but deviations of about twenty beats per minute appeared later in the run. He highlights this shift in the video and notes that some segments show close correlation while others do not.&lt;/p&gt;
&lt;p data-start="5487" data-end="5805"&gt;Certain parts of the algorithm likely need adjustment and the lack of proper data logging limits the ability to diagnose issues precisely. Milos explains:&lt;br data-start="5641" data-end="5644" /&gt; &amp;quot;To properly develop this, I need proper data logging to see whether we had some issue in the actual readings or whether this was just a pure algorithm problem.&amp;quot;&lt;/p&gt;
&lt;p data-start="5807" data-end="5818"&gt;Future Work&lt;/p&gt;
&lt;p data-start="5820" data-end="6130"&gt;Milos plans to design a new PCB with a different analog front end optimized for two electrode use and to include microSD storage for detailed data logging. This will allow more thorough analysis and help refine the algorithm. He invites viewers to offer suggestions for features to include in the next version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor / Tracker</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/2</link><pubDate>Wed, 26 Nov 2025 16:15:31 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 2 posted to Documents by cstanton on 11/26/2025 4:15:31 PM&lt;br /&gt;
&lt;p&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Build Your own ESP32 Fitness Heart Rate Monitor Tracker</title><link>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692/revision/1</link><pubDate>Wed, 26 Nov 2025 16:15:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:02590068-72bb-4b3c-b4f9-691846f7d255</guid><dc:creator>cstanton</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/project-videos/w/documents/71995/build-your-own-esp32-fitness-heart-rate-monitor-tracker----episode-692#comments</comments><description>Revision 1 posted to Documents by cstanton on 11/26/2025 4:15:13 PM&lt;br /&gt;
&lt;p&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>