shake sensor notes

Viewed 123 times

Currently I’m trying to do a project using rpi 3b+ with 801s vibration sensor using this tutorial https://github.com/Shmoopty/rpi-appliance-monitor#notification-settings

I’m beginner with rpi and python so I’m having a problem to send/keep the data into firebase. I have been looking for tutorial and code for using sensor to send the sensor data to firebase but nothing that suitable for my project. If there any solution for this problem would be a big help for me. Thank you.

  • 1
    Ah, let me see. You tutorial is a complicated smart phone app project, getting vibration sensing module, and put it in a database. The project can be divided into two parts: (1) How to get sensor data, (2) How to store and access info in database. For part (1) You need to decide to get analog or digital data. If you want analog data, you need a ADC, analog to digital converter. You can easily find Arduino sample programs. The references are: / to continue, … – tlfong01 Oct 19 ’19 at 14:56
  • (1) AliExpress Vibration Sensor Module 801S Vibration Analog Output Sensitivity LM393 – US$2.1 fr.aliexpress.com/item/32808658968.html (2) 801S Vibration Sensor Module (SE040) User Manual – IduIno produktinfo.conrad.com/datenblaetter/1400000-1499999/… – tlfong01 Oct 19 ’19 at 14:57
  • @tlfong01 Ohh i see. I just want to send a simple data whether the machine is started or not. So i just want to know how i can send the data to firebase? I know it is sound complicated but do i need just simply install firebase and add POST to the script inside of rpi? I’m sorry for asking too much questions – QQila Oct 20 ’19 at 3:42
  • Hi @QQila, it is good to give a big picture, then zoom into details where you might expect problems. I prefer you ask as many SHORT questions as possible, as long as they are related. As I used to say, you first look at the big elephant, and then eat it, bite by bite. In your case, you might have altogether 20 or more short questions, eg: (Q1) How can Rpi3B+ read 801 sensor data? (Q2) How to store read data into an python array? (3) How to store array data to a log/text file? … (Q20) How to use smart phone to get the organized, statistical info charts, etc, in the cloud database? … – tlfong01 Oct 20 ’19 at 3:53
  • And often we look at the first and last step. First step is how to start, Last step is actually the goal, which is sort of project user requirements and functional specifications. You might also have user constraints such as eg, (1) I have only 3 weeks to finish my project, and my supervisor insists to use 801, (2) My school’s FireBase is already working, I just need to use the API’s to talk to it, … Just brainstorming, you might like to comment and make counter suggestions, … – tlfong01 Oct 20 ’19 at 4:07

3 Answers


If you are working with a sensor there are two major options: 1. You have to handle it through I2C 2. You have to read the analog or digital signal from that sensor(basically Vcc,Out,GND)

What ever you do if you are going to use this on Raspberry GPIO then you must maintain a voltage of 3.3V on each pin. Otherwise the board will burn. Maybe this answer will help you understand things better.



When you have solved the firedatabae you will meet another.

The URL you refere to have a serious error.

The “801s vibration sensor” have one digital output that is triggered depending on the level of vibrations. Not suitable for meassurements but well suited for infication/alarm.

The outher output is a analoge level the indicate the level of vibrations, but the challange is that Raspberry Pi doesn’t have a A/D (Analog to Digital) converter so you need a external A/D that can solve this.




How can Rpi3B+ read the output of the 801s vibration sensor?

/ to continue, …



vibration sensor

/ to continue, …


(1) Rpi Vibrating Appliance (eg, clothes dryers and garage door openers) Monitor (801 Vibration Sensor, WiFi, MQTT, Telegram) GiktHub – Shmoopty 2017mar

(2) AliExpress Vibration Sensor Module 801S Vibration Analog Output Sensitivity LM393 – US$2.1

(3) 801S Vibration Sensor Module (SE040) User Manual – IduIno

(4) Shock Sensor S801 Spec – electroninvest

(5) Using a push button with Raspberry Pi GPIO (event based) Published by Soren 2018feb08

(6) How to Interface a Push Button with Raspberry Pi? – Ravi 2018feb

(7) Two Ways to Add a Button to Your Raspberry Pi Project (GPIO.Zero, Thonny Python, Beginner’s YouTube tutorial)

(8) Rpi: The Unofficial Tutorial – Christian Cawley 207jan28

(9) BeeLee/Gaoxin Vibrating Detection Sensor sw-18015/20p datasheet

(10) Digital Vibration Sensor – RoboBase/AlsRobot*

/ to continue, …


Appendix A – Test Setup


Appendix B – Digital Vibration Sensor – RoboBase/AlsRobot

Product Overview

to detect weak vibration signals.

used for flex, touch, vibration and shock measurements.

a simple resistor get voltage down to ADC levels.

for impact sensing or a flexible switch.

high sensitivity at low frequencies.

useful for detecting vibration and “tap” inputs from user.

Product Specifications

  1. working Voltage:3.5V — 5.5V
  2. signal Type:digital
  3. weight:3g
  4. PinoutS:Signal Input



/ to continue, …

End of Answer


  • Nice illustrations and excellent references, but where is the answer itself? – Bex Oct 20 ’19 at 8:25
  • @Bex, Ah, my “excellent” references LEAD to “excellent” answers. I usually don’t give answers DIRECTLY. I HELP them to HELP themselves to answer. In case the OP follows my references, does hie “homework” (I have given him two weeks time), and gets stuck, I will give more hints. And if the OP finally gives me a answer, I usually say some bad words that his is not a good answer, and would damage my reputation, balh, balh, balh, … and must be improved. My 3 references lead to 4 types of answers. One of which is not just an excellent, but a SUPER answer. – tlfong01 Oct 20 ’19 at 8:51
  • 1
    That’s terrific but please do not continue to use answers as scratch pads please.en.wikipedia.org/wiki/Broken_windows_theory – goldilocks Oct 20 ’19 at 14:00

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: