Skip to the content
PCBKitNew board
2 layers13 × 12.7 mmADcmXL3021 adapter, the printed circuit board in 3D

ADcmXL3021 adapter

jolau/VibrationDAQ8

Data Acquisition (DAQ) of the Analog Devices ADcmXL3021 vibration sensor.

Size
13 × 12.7 mm
Copper layers
2
Thickness
0.8 mm
Parts
5
Nets
14
Pads
34
Tracks, vias
75, 6
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
6 Jul 2020
Updated
28 Aug 2022

Overview

ADcmXL3021 adapter is an open-source printed circuit board by jolau, from the jolau/VibrationDAQ repository on GitHub, published under the MPL-2.0 licence. It is a 2-layer board of 13 × 12.7 mm with 5 parts on 14 nets, routed with 75 tracks and 6 vias.

It is built around the DF12(3.0)-14DP-0.5V(86). Its parts include 3 connectors and 2 capacitors. It belongs with the interfaces and adapters boards of this library.

Main components

1

README

README.md

VibrationDAQ

Data Acquisition (DAQ) of the Analog Devices ADcmXL3021 vibration sensor. The VibrationDAQ was developed as part of an internship at Wingtra by Jonas Lauener.

For any technical questions, please open an issue: https://github.com/jolau/VibrationDAQ/issues/new/choose

Copyright (c) 2020, Jonas Lauener & Wingtra AG
License: MPL 2.0

VibrationDAQ

Hardware

  • Raspberry Pi
  • Analog Devices ADcmXL3021 vibration sensor capabilities
    • Corrected data sheet
    • Sensor orientation:
      Sensor Orientation
    • Mass: 13 g
    • Frequencies up to 110 kHz
    • ±50 g measurement range
    • MFFT mode: Spectral analysis through internal FFT
      MFFT datapath
      • 2048 bins per axis with user configurable bin sizes from 0.42 Hz to 53.7 Hz
      • Windowing options: rectangular, Hanning, flat top
    • MTC mode: Time domain capture
      MTC datapath
      • 4096 samples per axis
  • Features a status LED

Pinout Raspberry Pi

pinout rpi

pinpin
RST 113
BSY 11516RST 2
3V31718BSY 2
MOSI1920EMPTY
MISO2122SYNC
SCLK2324CE 1
GND2526CE 2

The vibration sensor only works on the main SPI pins (SPI0) of the Raspberry Pi - the other SPI ports don't support SPI mode 3.

Custom adapter board

The pins of the ADcmXL3021 vibration sensor can be accessed by using a custom adapter board. The PCB was created by using the software KiCad: KiCad project files
adapter board

Installation

In case you want to setup your own VibrationDAQ on a Raspberry Pi:

  1. Install yaml-cpp (as described below)
  2. Clone this repo.
  3. cd VibrationDAQ
  4. mkdir build & cd build
  5. cmake ..
  6. sudo make install

Make sure that you have enabled SPI.

You can use it now with vibration_daq_app [full path to config.yaml].

Installation of yaml-cpp
  1. wget https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.6.3.tar.gz
  2. tar -xvf yaml-cpp-0.6.3.tar.gz
  3. cd yaml-cpp-yaml-cpp-0.6.3/
  4. mkdir build
  5. cd build
  6. cmake .. -DYAML_BUILD_SHARED_LIBS=ON
  7. sudo make install

Enable/Disable auto-start

  1. Edit config.yaml path in vibration_daq.service file to own needs
  2. sudo systemctl enable [full path to vibration_daq.service file]
    This automatically links the service and enables it. Replace enable with disable to disable service.

Dependencies

Many thanks to the authors of the following libraries:

Usage

Workflow

  1. Connect to the Raspberry Pi and adapt the ~/Documents/config.yaml to your requirements. Make sure that auto-start is enabled. If it's the first time you use it, test it by running it manually: vibration_daq_app [full path to config.yaml]
  2. Mount the vibration sensor with the double sided tape 3M™ Adhesive Transfer Tape 950. This shouldn't distort the vibration too much.
  3. Do your measurement.
  4. Download the collected data over SFTP. I recommend to also download the used config file.
  5. Open a vibration CSV file in Google Sheets.
    • For FFT measurement:
      • Hide the first two data points as these have usually very high magnitude and don't give meaningful information
      • Plot the data using a column chart.

Status led

If the status led is enabled in config, it will glow when running:

  • Constant glow: data acquisition is running normally
  • Blink: measurement completed, saving data to a new csv file

Config file

Short primer on the syntax of yaml: https://learnxinyminutes.com/docs/yaml/

Decimation Filter

Setting the right decimation_factor is crucial for getting meaningful data. Choose it according to the maximum vibration frequency you're expecting. Of course, the decimation factor also affects the predefined FIR filters i.e. with a FACTOR_64, the LOW_PASS_10kHz is actually a 156 Hz low pass filter.

decimation_factorEffective Sample Rate, fS (SPS)Effective FFT Bin Size, f_MIN (Hz)Effective Maximum FFT Frequency, f_MAX (Hz)
FACTOR_122000053.71094110000
FACTOR_211000026.8554755000
FACTOR_45500013.4277327500
FACTOR_8275006.71386713750
FACTOR_16137503.3569346875
FACTOR_3268751.6784673437.5
FACTOR_643437.50.8392331718.75
FACTOR_1281718.750.419617859.375

Spectral average count

The spectral_avg_count determines the number of FFT records that the ADcmXL3021 averages when generating the final FFT result. Up to 255 records. Good for getting FFT measurements over longer time periods.

Calculate measurement duration

FFT

4096 samples / (220'000 sample rate / decimation_factor) * spectral_avg_count = record time [s]

Example with FACTOR_64 and 255 spectral averages:

4096 samples / (220000 sample rate / 64) * 255 = 303.84 seconds = 5.06 minutes

MTC

4096 samples / (220'000 sample rate / decimation_factor) = record time [s]

Example config with explanation

yaml
storage_directory: "/home/pi/Documents/"
recordings_count: 2 #number of recurring measurements, infinite if == 0 
external_trigger: false # false: triggering over SPI; 
                        # true: triggering over dedicated pin, useful for triggering multiple sensor at exact same time (connect them to same pin)
external_trigger_pin: 4 # only read if external_trigger == true
status_led: true # enable/disable status led, blinks everytime a vibration file is written
status_led_pin: 21  # only read if status_led == true
sensors:
  - name: sensor1 #will be used for logging and filenames
    busy_pin: 22 #BCM pin number
    reset_pin: 27 #BCM pin number
    spi_path: "/dev/spidev0.0"
    recording_mode: MFFT # MTC and MFFT supported
    MFFT_config: &mfftConfig #only read if recording_mode == MFFT
      decimation_factor: FACTOR_2 #supported: [FACTOR_1 = 0, FACTOR_2 = 1, FACTOR_4 = 2, FACTOR_8 = 3, FACTOR_16 = 4, FACTOR_32 = 5, FACTOR_64 = 6, FACTOR_128 = 7]
      fir_filter: CUSTOM #supported: [NO_FILTER, LOW_PASS_1kHz, LOW_PASS_5kHz, LOW_PASS_10kHz, HIGH_PASS_1kHz, HIGH_PASS_5kHz, HIGH_PASS_10kHz, CUSTOM]
      custom_filter_taps: [6, 21, 53, 107, 193, 316, 480, 686, 930, 1203, 1490, 1774, 2034, 2251, 2407, 2489, 2489, 2407, 2251, 2034, 1774, 1490, 1203, 930, 686, 480, 316, 193, 107, 53, 21, 6]
      spectral_avg_count: 2 # value between 1-255
      window_setting: HANNING #supported: [RECTANGULAR, HANNING, FLAT_TOP]
    MTC_config: #only read if recording_mode == MTC
        decimation_factor: FACTOR_2
        fir_filter: CUSTOM
        custom_filter_taps: [6, 21, 53, 107, 193, 316, 480, 686, 930, 1203, 1490, 1774, 2034, 2251, 2407, 2489, 2489, 2407, 2251, 2034, 1774, 1490, 1203, 930, 686, 480, 316, 193, 107, 53, 21, 6]
  - name: sensor2

Example data

The following data was collected on a self-made vibration bench. The bench consists of an unbalanced mass attached to an electrical motor.

Parts

5
QtyValueFootprintReferences
110UF 25VCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC1
11UF 25VCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC2
1Aux Pin HeaderConnector_PinHeader_1.27mm:PinHeader_1x03_P1.27mm_VerticalJ3
1DF12(3.0)-14DP-0.5V(86)Connector_Hirose:Hirose_DF12(3.0)-14DP-0.5V(86)J1
1Pin HeaderConnector_PinHeader_1.27mm:PinHeader_1x09_P1.27mm_VerticalJ2

Questions

How big is the ADcmXL3021 adapter PCB?

It measures 13 × 12.7 mm and has 2 copper layers, 0.8 mm thick.

What parts does the ADcmXL3021 adapter use?

5 parts, built around the DF12(3.0)-14DP-0.5V(86). The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ADcmXL3021 adapter KiCad files?

From the jolau/VibrationDAQ repository on GitHub, at the commit this page was made from: the board is ADcmXL3021_adapter/ADcmXL3021_adapter.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the ADcmXL3021 adapter design in my own project?

Its repository publishes it under the MPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers98 × 27 mmXy limit, the printed circuit board in 3D

    Xy limit

    opulo-inc/lumenpnp

    The LumenPnP is an open source pick and place machine.

    5 parts3.7k
  • 2 layers21 × 33 mm24g2usb pico2w, the printed circuit board in 3D

    24g2usb pico2w

    joypad-ai/joypad-os

    Universal controller firmware for building adapters, dongles, and custom controllers.

    5 parts1.7kApache-2.0
  • 2 layers53.2 × 59.6 mmA10 OLinuXino Lime Rev B SHIELD TEMPLATE, the printed circuit board in 3D

    A10 OLinuXino Lime Rev B SHIELD TEMPLATE

    OLIMEX/OLINUXINO

    OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C

    5 parts1.5k
  • 2 layers30 × 11 mmMain control board servo tester, the printed circuit board in 3D

    Main control board servo tester

    jamro/tiny-engineer

    A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

    5 parts1.1k
  • 2 layers78.8 × 35.3 mmKiCadTest, the printed circuit board in 3D

    KiCadTest

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    5 parts915
  • 2 layers50 × 23 mmMiniCircuits LTCC, the printed circuit board in 3D

    MiniCircuits LTCC

    VanceVagell/kv4p-ht

    Open source handheld ham radio project KV4P-HT

    5 parts828GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 light sensor, the printed circuit board in 3D

    L0 light sensor

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    5 parts546MIT