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
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Build an Accelerometer with a Raspberry Pi and a DAQ HAT
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: alexwonglik1
  • Date Created: 15 Mar 2022 12:47 PM Date Created
  • Views 805 views
  • Likes 4 likes
  • Comments 0 comments
Related
Recommended
  • daq hat
  • raspberry
  • accelerometer
  • raspberry pi
  • digilent
  • mcc
  • daq
  • mcc 172
  • hat

Build an Accelerometer with a Raspberry Pi and a DAQ HAT

alexwonglik1
alexwonglik1
15 Mar 2022

This project shows how to build an acceleration measurement system using a Raspberry Pi single-board computer together with an integrated electronics piezoelectric (IEPE) accelerometer sensor connected to a MCC 172 DAQ HAT (Hardware Attached at Top) board. IEPE sensors can measure acceleration, pressure, or force. They contain built-in independence conversion electronic, which converts the signal from the piezo sensor to a low-impedance voltage signal.


The project uses the model 805 accelerometer 500G IEPE T05-3 (data sheet) from TE connectivity to sense accelerations, vibrations, or mechanical shocks. Its output connects to the channel 0 of a MCC 172 IEPE measurement DAQ HAT from Measurement Computing Corporation (MCC), which is mounted on top of a Raspberry Pi.


The MCC 172 has two input channels for sound and vibration measurements with IEPE sensors. It features one 24-bit A/D per channel with a maximum sampling rate of 51.2 kSPS per channel. The 805-0500 device is a 3-pin IEPE low-cost accelerometer well suited for embedded applications using TO-5 header. It has a dynamic range of ±500g and a bandwidth of up to 12kHz.


The Raspberry Pi should have a working copy Raspbian OS installed. The project also requires the GIT version control system, the Python standard library, and the MCC DAQ HAT library from MCC.

Setting Up Software and Hardware

First, we set up the library for the HAT, following the instructions outline in the readme.md file in the library’s GIT repository. For other tasks, or more information, visit the MCC DAQ HAT Library documentation. Next, we need to download the files main.py and daqhats_utils.py from Digilent’s website and place them in the project’s folder. For this project, we mount the accelerometer on a breadboard and connect the outputs of the device to the channel 0 screw terminals on the MCC 172.
Inside the main.py script, we read the conversion result from the board, check for any overruns, and increment the number of samples read. Finally, we display the last samples on the screen, and calculate and show the RMS (Root Mean Square) voltages. The function will also write all results into a log file. Once done, the loop starts over.

Figure 1: Connecting the accelerometer to the MCC 172

Running the Project

Having everything in place, we launch the script. It displays some board information, creates the log file, and finally displays the raw values and the RMS voltages.

Figure 2: Terminal Display

Figure 3: Contents of the log file

You can get all the project details and the source code on Digilent’s blog.

  • Sign in to reply
element14 Community

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 © 2023 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