Clear all

Building a Motor vibration sensor

4 Posts
1 Users
Topic starter

There are alot of components to doing this

Update: This learning esp32 and arduino IDE has been going along for a while. I add to this specific post because I actually want to develop this concept to a completed product. A product that can be duplicated for your needs, things like recording vibrations on a bearing or motor, so you have data to refer to and trend. Yes this can be purchased outright for arounf 1000 bucks but then again there is no learning involved. 

The objective is to configure a program called vibration toolbox and provide data to this to figure out how to trend a component. My specific use is on a small motor test stand for drones to gather data on different parts and props. The test stand has this capability in a limited form, it also using an accelerometer chip but it's designed into the fixture and I want to be able to move the sensor around. 


This is putting together the concept of a motor vibration sensor and data logger. The need comes from wanting to get vibration reading from the outboard locations of a flying drone. The idea is to have a unit that can attach to the drone strut close to the motor propeller combination.

There are a few commercial units, issues like to heavy, or to big pose problems plus with most there are propritary softwre apps that have to be purchased, by the time your done setting up several hundreds are spent.

If we can determine the right sensor, use a arduino nano and a data logger this might work.

a look at some alternate sensors other than an accelerometer here


The research resulted in a slim unit using affordable components and minor soldering

I found 2 examples of builds, the first one we will call vib1 and the second vib2

vib1 uses a nice produced datalogger board that attaches to the nano, looked promising but so far the IDE will not compile the sketch


vib2 we are using this build instruction

This topic was modified 9 months ago 3 times by admin
This topic was modified 1 month ago by admin
4 Answers
Topic starter
Arduino Nano Pin Description

This post was modified 1 month ago 2 times by admin
Topic starter
Research info and posts gathered along the way
Can i use this with other microcontrollers like stm32f4. also it is mentioned to connect cs to pin 10 on arudino so what actually is pin 10?
Contrary to what others have said, "CS" is "Chip Select", and you can technically use any Arduino pin except for your three SPI pins. I personally like to use the SS pin, since it's almost always immediately adjacent to the three standard SPI pins (MOSI, MISO, and SCLK)... and I never control a MicroSD card from a slave Arduino.

Also contrary to what others have said, this board is not an SDI to SPI converter. [Micro]SD cards natively communicate in either format. This board does perform level shifting, however, which makes it rational to use the included card slot with 5V microcontrollers with little risk of destroying the card (many cards won't tolerate a 5V power supply).

Finally... depending upon your coding ability, you can use this card slot with any 5V microcontroller or microprocessor, with or without hardware SPI support, provided that you're willing to bit-bang the SPI. It isn't difficult. 

First that pin/signal designation is likely incorrect. The signal should be “CS” which stands for “chip/slave” selection mode. The Arduino pin 10 is a simply a GPIO connection, in this case one supporting PWM — which is likely not important for the given application. You could probably change this to another equivalent…  
This card is basically an SDI to SPI converter. SD cards works natively with 4 data bits (SDI port) but in some cases, and for different reasons, SD cards needs to be connected to an SPI port.

SPI port uses MOSI (Master Out - Slave In) data wire, MISO (Master In - Slave Out) data wire, SPICLCK Clock wire from the Master to the Slave and CS (Chip Select) from the Master to the Slave.
Arduino Board is the Master and the SD board is the Slave.
This board can be connected to any SoC or Microcontroller with standard SPI interface.

Can i use these with other spi slaves connected?
Yes, you can have multiple devices use the SPI bus. They will each need to be connected to their own CS pin, however.

I believe you can - I did some searching around on Adafruit's webpage, thinking I recalled seeing a tutorial showing an SPI bus setup with multiple slave units. However, after much searching, I realized it was on SparkFun's webpage. Type "spi multiple devices" into Google and the SparkFun article is the first hit. This article shows one master with multiple slave units. Each slave shares the SCK, MOSI, and MISO lines, which each CS (chip select) line goes to a different pin on the master. 
This post was modified 1 month ago 2 times by admin
Topic starter

Making alot of progress learning the ins and outs of Arduino IDE, and with their newer versions that actually work, moves things along and also illuminates pitfalls and mistakes. Because the hobby is pretty inexpensive and with amazon selling chinas copies its easy to get alot of garbage devices. As a policy I stay away from china made, one because they suck and two because they are the enemy of the US. I'm sure there are some real good people in the CCP but I dont support them and would prefer to help US development. US made is alot better it's just 3 times the cost BUT, the stuff works and the tech support is in English. 

Therse or data loggers I have purchased and none work. Yes the software see's them but writing and retreving data is a no go. The long one is the worst, no info what so ever, one is Adafruit, one DFROBOT, I had high hopes for the DFROBOT one but it also doesn't include all the necessary information to get it functional. 


The new plan is to ditch the Datalogger and try to setup a sensor to an esp32 wiFi


Not there yet!



This post was modified 1 month ago by admin
Topic starter

What is Gravity?DFRobot Gravity Series is a high quality open-source, modular, plug and play electronics toolkit for everyone to create anything easily. With powerful expansion shields,various professional functional modules with standard interfaces and clear documentations, Gravity Series allows users of any skill level to easily connect and mix to realize ideas or develop projects.


The Gravity Flexible Piezo Film Vibration Sensor is an Arduino compatible piezo film vibration sensor. It is made up of flexible piezo film and converter board. The sensor is able to detect vibration, flexibility, impact and touch.

The film is a flexible component comprising a 28 µm thick piezoelectric PVDF polymer film with screen-printed Ag-ink electrodes, laminated to a 0.125 mm polyester substrate, and fitted with two crimped contacts. As the piezo film is displaced from the mechanical neutral axis and bending creates very high strain within the piezo polymer, high voltages (about ±90V) are generated. When the assembly is deflected by direct contact, the device acts as a flexible "switch", and the generated output is sufficient to trigger MOSFET or CMOS stages directly.

The module uses universal Gravity 3Pin interface that is easy to plug and play. It comes with Digital and Analog two output signals, which is  suitable for all kinds of different applications. The piezo vibration sensor is not only able to detect strong shocks, but also to detect slight vibrations. There is an on-board sensitivity adjustment potentiometer, you can adjust it to increase/decrease the output threshold value.

This post was modified 1 month ago 3 times by admin

©2023 LocalAd


We're not around right now. But you can send us an email and we'll get back to you, asap.


Log in with your credentials


Forgot your details?

Create Account