{"id":14686,"date":"2016-06-24T11:00:14","date_gmt":"2016-06-24T18:00:14","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=14686"},"modified":"2021-06-16T14:09:08","modified_gmt":"2021-06-16T21:09:08","slug":"diy-exercise-box-to-measure-landing-quality","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/diy-exercise-box-to-measure-landing-quality\/","title":{"rendered":"DIY Exercise Box to Measure Landing Quality"},"content":{"rendered":"<p>I&#8217;ve always liked <a href=\"https:\/\/en.wikipedia.org\/wiki\/Shock_wave\">shock waves<\/a>. Explosions. Earthquakes. And I have always wondered what kind of effect <em>I&#8217;ve<\/em> had, just walking around on the world around me.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15009 alignleft\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Shock-Waves-1977-390x600.jpg\" alt=\"Shock-Waves-1977\" width=\"227\" height=\"349\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Shock-Waves-1977-390x600.jpg 390w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Shock-Waves-1977.jpg 491w\" sizes=\"auto, (max-width: 227px) 100vw, 227px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15010 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot-600x419.png\" alt=\"Pressure_plot\" width=\"354\" height=\"247\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot-600x419.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot-768x537.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot-1024x716.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot-800x559.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pressure_plot.png 1169w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/p>\n<p style=\"text-align: center;\">I mean&#8230;Because ocean zombies and shock waves are totally related<\/p>\n<p>I also like using my Fitbit because it quantifies my movements and work-outs. Then I thought, WAIT&#8230; what about a way to quantify one of my favorite exercises &#8211; jumping.<\/p>\n<p>Now I know what you may be thinking, jumping isn&#8217;t related\u00a0much to shock waves and exploding things. It may not seem like it on such a small scale when us humans do it, but we still manage to make an impact.<\/p>\n<p>I intended to explore this interaction. Using the Pmod<a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2<\/a>, the chipKIT\u00a0<a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32<\/a>, and\u00a0<a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW<\/a>, I combined my interests and made a simple exercise box that measures the quality of your landing, the time in-between each jump and the force of each landing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-14697 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/box-jump.jpg\" alt=\"box-jump\" width=\"314\" height=\"314\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/box-jump.jpg 400w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/box-jump-150x150.jpg 150w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/box-jump-300x300.jpg 300w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/p>\n<p style=\"text-align: center;\">Essentially, something like this, but with electronics and&#8230;science!<\/p>\n<p>Before I made the decision to use the <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2<\/a>, I first tried out a simple tilt sensor, but it didn\u2019t have the sensitivity I was looking for.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14692 alignleft\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/chipKIT_WF32_box_600__41128.1449784384.500.659.png\" alt=\"chipKIT_WF32_box_600__41128.1449784384.500.659\" width=\"231\" height=\"231\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/chipKIT_WF32_box_600__41128.1449784384.500.659.png 500w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/chipKIT_WF32_box_600__41128.1449784384.500.659-150x150.png 150w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/chipKIT_WF32_box_600__41128.1449784384.500.659-300x300.png 300w\" sizes=\"auto, (max-width: 231px) 100vw, 231px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14693 alignleft\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pmod_ACL2_top_600__48210.1449270032.1280.1280.png\" alt=\"Pmod_ACL2_top_600__48210.1449270032.1280.1280\" width=\"209\" height=\"209\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pmod_ACL2_top_600__48210.1449270032.1280.1280.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pmod_ACL2_top_600__48210.1449270032.1280.1280-150x150.png 150w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/Pmod_ACL2_top_600__48210.1449270032.1280.1280-300x300.png 300w\" sizes=\"auto, (max-width: 209px) 100vw, 209px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Thus, armed only with my dream and the entire Digilent office of support and resources, I ventured into the world of <a href=\"https:\/\/digilent.com\/shop\/pmod-peripheral-modules\/\">Pmods<\/a>. This was my first time ever using any sort of <a href=\"https:\/\/digilent.com\/shop\/pmod-expansion-modules\/pmod-boards\/\">Pmod<\/a>, <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer<\/a> and\/or tilt sensor. Ever. So I was pretty excited to learn and troubleshoot my way through the project.<\/p>\n<p>I used a simple storage box I grabbed from home to start testing. First, I made sure the <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer<\/a> was wired to the <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32<\/a> correctly (pictured below). There is an example in the <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW<\/a> example finder that is named<em> PmodACL2,<\/em> and this will walk you through how to get started taking data with your <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14691 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o-600x450.jpg\" alt=\"13410751_10208171837486504_556460139_o\" width=\"343\" height=\"257\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13410751_10208171837486504_556460139_o.jpg 1334w\" sizes=\"auto, (max-width: 343px) 100vw, 343px\" \/><\/p>\n<p>The Pmod<a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2<\/a> has 6 input ports \u2013 chip select (CS), master out slave in (MOSI), master in slave out (MISO), serial clock (SCLK), ground, and high voltage. The <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32 <\/a>has corresponding input ports \u2013 pin #10 corresponds to CS, #11 MOSI, #12 MISO, and pin #13 corresponds to the SCLK. The <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">Pmod <\/a>uses 3.3V to connect it to the digital output of the 3.3V on the board, along with the ground port. Check out our <a href=\"https:\/\/digilent.com\/reference\/_media\/pmod:pmod:pmodACL2_rm.pdf\">ACL2 data sheet<\/a> for a diagram and further information.<\/p>\n<p>I used a small <a href=\"https:\/\/digilent.com\/shop\/solderless-breadboard-kit-small\/\">solder-free breadboard<\/a> to try my best to keep the wires semi-organized. If you decide to include a second <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer<\/a>, then the breadboard will be even more important.<\/p>\n<p>The <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW <\/a>example program requires you to input the Serial Port, SPI channel, and CS channel in order to communicate with your <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32<\/a>. The serial port is wherever your <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32<\/a> is plugged in to your computer \u2013 select something like &#8220;COM3&#8221; (though your number might be different depending on where you have it plugged into your computer).<\/p>\n<p>The SPI channel should always be set to 0. Our Chip Select channel should be 10 \u2013 that\u2019s where the CS from our <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer <\/a>is plugged into (pin #10) on our board. Keep the resolution at 2g for now, and keep the output data rate at 100 Hz.<\/p>\n<p>The <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer <\/a>should be all ready to go at this point. Run the <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW <\/a>example\u00a0VI and (carefully) wave your <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer <\/a>around. You\u2019ll see three separate waveforms \u2013 x, y, and z. I did some editing of the <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2 <\/a>example program, so don&#8217;t worry if yours doesn&#8217;t look exactly like what is pictured below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14689 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp-600x306.png\" alt=\"ACL2__boxp\" width=\"600\" height=\"306\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp-600x306.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp-768x392.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp-1024x523.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp-800x408.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxp.png 1246w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Notice how the data is pretty noisy? There are a few ways to filter that out. I merged the Pmod<a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2 <\/a>code with the filtering code and made a few changes, and that code is right here. The reason I decided to use two different while loops \u2013 one for data acquisition and one for calculations and filtering &#8211; is because they can run on separate cores of your processor (and in turn the filter works way faster), rather than the same one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-14690 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd-600x194.png\" alt=\"ACL2__boxd\" width=\"600\" height=\"194\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd-600x194.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd-768x248.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd-1024x331.png 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd-800x259.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/ACL2__boxd.png 1704w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>A different representation of the raw data is in the graph on the top and the filtered data is graphed at the bottom. The biggest thing is that you can adjust how the <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer <\/a>data is filtered. Changing the values of the low frequency cut off, Gusse filter rate, number of data points averaged and the low pass filter order make a big difference on how much noise is filtered out.<\/p>\n<p>For this project, I wanted to filter out the steps of people walking around the office. This <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">accelerometer <\/a>is pretty sensitive so calibration is important to making sure you aren\u2019t grabbing and reading data that isn\u2019t related to the event you\u2019re trying to look at. Make sure to play with it \u2013 adjust a value or two and run the program. Find the &#8220;sweet spot&#8221; with the smallest amount of noise while keeping a fair amount of detail in your Waveforms from the jump itself. The low frequency cut off might be the most crucial of these settings. You don\u2019t want to cut off too much, but just enough to keep ambient noise from overwhelming the raw data.<\/p>\n<p>To filter out footsteps and co-workers jokingly jumping, I have my low frequency cut off at 7 Hz, the low pass filter order set to 0, Gusse filter rate at 54 Hz,\u00a0and I\u2019m averaging over 4 data points. This does pretty well without sacrificing too much of our raw jump data.<\/p>\n<p>I slowed the loop rate on the graphs to around 20 Hz in order to make it easier to read while the program is running by adding a timer into the data acquisition while loop; you may or may not want to keep it there.<\/p>\n<p>As a sort of draft of our \u201cseismic\u201d box, I\u2019d say this worked fairly well. I found some electrical tape and taped the <a href=\"https:\/\/digilent.com\/shop\/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers\/\">WF32 <\/a>to the side of my storage box, and taped the <a href=\"https:\/\/digilent.com\/shop\/pmodacl2-3-axis-mems-accelerometer\/\">ACL2 <\/a>to the removable top. Click run on the <a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW <\/a>program and start measuring your jumps! Check out my full<a href=\"http:\/\/www.instructables.com\/id\/Seismometer-Exercise-Box\/\"> Instructable here!<\/a><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-14694 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-600x450.jpg\" alt=\"13383905_10208171924168671_1166056870_o\" width=\"337\" height=\"253\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-600x450.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-768x576.jpg 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-1024x768.jpg 1024w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-800x600.jpg 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1-1200x900-cropped.jpg 1200w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1.jpg 1334w\" sizes=\"auto, (max-width: 337px) 100vw, 337px\" \/><\/p>\n<p>And stay tuned for updates on the project! Also feel free to let us know in the comments below, when was the last time you were inspired by science to make something cool?<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-14686 jlk' data-task='like' data-post_id='14686' data-nonce='1cb2a57891' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-14686 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-14686 jlk' data-task='unlike' data-post_id='14686' data-nonce='1cb2a57891' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-14686 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-14686 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Ella takes the jump into the world of Pmods with some homemade exercise equipment!<\/p>\n","protected":false},"author":41,"featured_media":14694,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[38,4327,1561],"tags":[],"ppma_author":[4492],"class_list":["post-14686","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expansion-modules","category-projects","category-applications"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/06\/13383905_10208171924168671_1166056870_o-1.jpg","authors":[{"term_id":4492,"user_id":41,"is_guest":0,"slug":"erickerson","display_name":"Ella Rickerson","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/6fe955cc73725d3ad87e297d094c41be82c3845c2a4488842c1a74a78ca36b60?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/14686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=14686"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/14686\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/14694"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=14686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=14686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=14686"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=14686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}