element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Experimenting with Vibration Sensors
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Vibration Sensors
  • More
  • Cancel
Experimenting with Vibration Sensors
Blog Vibration Sensor and Exercising - Basic Experiments - Blog #2
  • Blog
  • Forum
  • Documents
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: yosoufe
  • Date Created: 24 Dec 2020 10:15 AM Date Created
  • Views 143 views
  • Likes 3 likes
  • Comments 0 comments
Related
Recommended

Vibration Sensor and Exercising - Basic Experiments - Blog #2

yosoufe
yosoufe
24 Dec 2020

  • Hardware
  • Some Basic Sensor Tests
    • Measuring Sound
    • Measuring Heart Beat
  • Nucleo Board
  • Next Steps
  • Related Links

Hi, According to plan, I did some basic work to learn more about the Nucleo board and the STM32 Platforms and some basic tests with the sensor. Here we go.

 

Hardware

I bought bunch of parts listed in previous blog. From those the followings were come really handy.

  • SM03B-SRSS-TB(LF)(SN)
  • Adafruit FPC Stick - 20 Pin 0.5mm/1.0mm Pitch Adapter

This is how my setup looks like now.

{gallery:width=960,height=750,autoplay=false} My Hardware Setup
My Prototyping Setup
Close-up of the SMD Adapter board
My good old USB oscilloscope that I bought back in Iran about 7 years ago.

Some Basic Sensor Tests

First I used the Nucleo board only as a 3.3V power supply, just to power up the sensor. I used the oscilloscope to do some measurements.

 

Measuring Sound

I could generate constant-frequency sound using a Tone Generator website and plot the FFT of the signal using the oscilloscope while I was pushing the sensor on top of desktop PC's speaker by hand.The oscilloscope's software can only run on a Windows machine so I plugged the oscilloscope to an old Windows 7 laptop and used NoMachine remote desktop software to take a picture of the screen. So in the below images, the bottom half of the image is showing the Oscilloscope software via NoMachine and the top section shows the Tone Generator website.

{gallery:width=960,height=750,autoplay=false} Sound and the Sensor
1.143kHz
78 Hz
187 Hz

 

Measuring Heart Beat

Just for fun I tried to measure my heart beat with the sensor. I could not get a good measurement while holding the senor on my wrist. But holding it on my neck could make a good signal. Hear is my heart beat, raw and FFT.So it measures something around 1.090 Hz which is 1.09 * 60 = 65.4 beats per minute. I do not know how accurate it is.

{gallery:width=960,height=600,autoplay=false} My Heart Beat

Heart Beat Raw Signal

Heart Beat FFT

 

 

 

Nucleo Board

Ok. Let's do some measurement on the Nucleo board. I used the STM32CubeIDE for programming the Nucleo board. There is bunch of examples for ADC on NUCLEO-H743ZI which also ran on the NUCLEO-H743ZI2. I used mostly the example called ADC_DMA_Transfer as reference. It basically uses DMA and ADC to writes the conversion results in an array in circular manner.It reads the analoge signal from pin PA6 with 16-bit resolution. The current state of the code can be found here on github on this specific commit. I have not used git for eclipse-based projects before so I do not know yet how much transferable the repo is to a new location or machine.

 

Here is a visualization of measurement in real-time using the STM32CubeMonitor. It shows the ADC readings in a 16-bit value from tapping directly on sensor and tapping beside of it on the table.

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

This  should plot only one measurement in 4096. It is interesting to see that there is a time gap after each tapping till the measurement comes back to zero (or Vcc/2). This was not visible to me when I was using oscilloscope.

 

Next Steps

  • I would like to use the CMSIS library to calculate the FFT on the nucleo board itself and also grab a better understanding of FFT.
  • Send the raw data or the FFT to PC for Analysis
  • The rest should be the same as the plan in the first blog.

 

 

Related Links

Previous Blog:

  1. Vibration Sensor and Exercising - Introduction - Blog #1
  2. My Progress: Experimenting with Vibration Sensors

Other Resources:

  • Tone Generator
  • NoMachine Remote Desktop Application
  • STM32CubeIDE
  • My Workspace on Github
  • STM32CubeIDE
  • STM32CubeMonitor
  • OBS for Video Recording
Anonymous
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube