Introduction: Wireless Vibration Data Logger Controlled Via Google Assistant

About: I am a science and technology enthusiast. I believe sharing our knowledge and experience will make the world a better place.

INTRODUCTION: This project is a simple low-cost wireless vibration data logger expected to monitor the health condition of bridges and other structures subjected to vibrations below 200hz. Local MQTT broker is created using a laptop with ubuntu 18.0.4 operating system which is connected via the created data logger publishing vibration data from an accelerometer sensor to a topic on the broker. The result obtained from the data logger was verified using theoretical calculations from a steel beam and it conforms with the first natural frequency of the beam. The device could also be instructed to start logging data via a button pressed or using a google voice assistant. Node-red was used for creating a chart display from the incoming sensor data.

Supplies

  • esp32 devkit
  • MMA8452Q 3-axis accelerometer
  • led
  • 560 ohm resistor
  • breadboard
  • laptop
  • jumper wires

Step 1: CONNECTING THE COMPONENT

  1. connect the esp32 gnd with the gnd of the accelerometer
  2. esp32 3.3v with the 3.3v of the accelerometer
  3. esp32 gpio pin D21-SDA with the SDA of the accelerometer
  4. esp32 gpio pin D22-SCL with the SCL of the accelerometer
  5. esp32 gnd with the cathode of the led using 560 ohms resistor. the resistor should not be less than 230 ohms and the anode of the led can be connected to the 3.3v of the esp32

Step 2: SETTING UP THE MQTT SERVER

The MQTT server was setup locally in a low-cost laptop running windows10. ubuntu 18.0.4 was downloaded from Microsoft store and was used for downloading and installing mosquito broker with node-red. A video showing taking vibrations measurement of a sewing machine and publishing the data to a topic in the MQTT server and visualization is achieved using node-red and blynk app on an android

Step 3: SOURCE CODE