The digital shake sensor is used to detect hand shaking which is only sensitive to unidirectional hand movements. The spring-type vibration switch is used to output a low-level pulse when the user shakes once in the specified direction and the on-board indicator flashes at the same time. Digital shake sensors can be used in applications where we need to switch on lights by just shaking your hand or shaking a Light Stick. Here we will be using Digital shake sensor v1.0 by DFROBOT.

Specifications

  • Input Voltage (VCC): 3.3V~5.0V
  • Switch Life Span: Over 200,000 times
  • Interface: Gravity 3P Digital
  • Unidirection sensitive
  • Strong anti-shock interference

Overview

The user need to  hold the module just like the logo on the module, and shake it in the direction of the arrow indicated on-board (from +Y to Y-). This will generate an effective low-level interrupt pulse on the “D” pin and a bright flash on the indicator will ON. Shakes or vibrations in other directions like the X or Z do not produce an effective interrupt pulse.

LabelNameDescription
+VCCPower VCC(3.3~5.5V)
GNDPower GND
DDigitalDigital output (high-level when stationary, low-level pulse when shaken)
PWRPowerPower indicator (red), turned on when power up
ONONShake triggered indicator (blue)

Components Required

  • ARIES v2 Microcontroller
  • Digital shake sensor
  • Jumper wires
  • Resistor -> 10 KOhm

Note: All of the following boards can be used for this project

Circuit Diagram

Digital shake senor Connection Diagram
Digital Shake SensorARIES V2 board
+3.3V
GND
DGPIO-0
Connection pins of Digital shake sensor Module & ARIES v2.0 Board

Now, for powering up the ARIES v2 board via the USB port of a Laptop/Desktop/PC and burning the code into the ARIES v2 board, we have to use a micro USB type B to USB type A cable. The cable should be connected to UART-0 port of the ARIES v2 board, and the Laptop/Desktop/PC should be preinstalled with Arduino IDE and VEGA ARIES boards of latest version.

Procedure

Open Arduino IDE

Go to Tools -> Board -> VEGA Processor ARIES Boards -> Select ARIES v2

Go to Tools -> Programmer -> Select VEGA XMODEM

Connect the ARIES v2 board to PC

Go to Tools -> Port -> Select the appropriate port

ARIES board selection from Tool Menu

Open File -> Examples -> Examples for ARIES v2 -> GPIO -> Open digitalShakeSensor example

After opening the example code Compile and Upload the code 

Output

Once you’ve completed the code, upload it to your ARIES v2.0 board using the Arduino IDE. Wait until the program is uploaded. After completing the uploading the program will start to execute. In the direction indicated by the arrow on-board, every time the module is shaken, the built-in LED on ARIES Board will toggle.

Demonstration

Shake sensor output demo

By mydhily

Leave a Reply

Your email address will not be published. Required fields are marked *