Digital Shock Sensor Shipping

/ Comments off

Lesson 4 Shock Switch

Find great deals on eBay for shock detector. Shop with confidence. Risco ShockTec Digital Shock Detector. Genuine Directed 500T Motion Detector Shock Sensor.

Introduction

A shock switch (as shown below), also vibration switch, spring switch or shock sensor, is an electronic switch which senses vibration amplitude and transfers the signals to circuit device thus switching on the circuit. It composes of conductive vibration spring, switch, trigger pin, packaging agent and so on.

Components

- 1 * SunFounder Uno board

- 1 * USB data cable

- 1 * Shock switch module

- Jumper wires


Experimental Principle

The shock switch works like this: the conductive vibration spring and trigger pin are precisely placed in the switch and fixed by adhesive. Normally, the spring and the trigger pin are separated. Once the sensor detects shock, the spring will vibrate and contact with the trigger pin, thus conducting and generating trigger signals.


With the LED attached to pin 13 already, connect the shock switch to digital pin 8. When the shock switch induces shock signals, the LED will light up.


Experimental Procedures

Step 1: Build the circuit

Shock Switch Module SunFounder Uno

S ---------------------------------------- D8

- --------------------------------------- GND

+ ---------------------------------------- 5V


Step 2: Program (Please refer to the example code in LEARN -> Get Tutorial on our website)

Step 3: Compile

Step 4: Upload the sketch to SunFounder Uno


Digital

Now, shake the switch module and you will see the LED attached to pin 13 on the SunFounder Uno board light up.


C Code

const int vibswPin = 8; //the Vibration Switch attach to
const int ledPin = 13; //the led attach to
int val = 0; //initialize the variable val as 0
/******************************************/
void setup()
{
pinMode(vibswPin,INPUT); //initialize vibration switch as an input
pinMode(ledPin,OUTPUT); //initialize ledPin switch as an output
}
/*******************************************/
void loop()
{
val = digitalRead(vibswPin); //read the value from vibration switch
if(val HIGH) //without vibration signal
{
digitalWrite(ledPin,LOW); //turn off the led
}
else
{
digitalWrite(ledPin,HIGH); //turn on the led
}
}
/*********************************************/


Copyright © 2012 - 2016 SunFounder. All Rights Reserved.

Previous chapter:Lesson 3 Dual-color Common-Cathode LED

Next chapter: Lesson 5 Knock Sensor

SunFounder
Feb 02 2016 at 08:34 am
Shock sensor alarm
© Developed by CommerceLab

Digital Shock Sensor Shipping Box

Specifications for Casio Tactical G Shock Rangeman Triple Sensor Watch:

Shock Sensor Alarm

Atomic Timekeeping Signal:US WWVB, UK MSF, Germany DCF77, Japan JJY40/JJY60, China BPC
Frequency:US 60kHz, UK 60kHz, Germany 77.5kHz, Japan 40/60kHz, China BPC 68.5kHz
Altimeter measuring range:-700 to 10,000 m (-2,300 to 32,800 ft)
Altimeter measuring unit:1 m (5ft)
Altimeter manual memory measurements:up to 40 records (shared storage with date/time, bearing, and barometric pressure/temperature records)
Historical Altitude Values:High altitude, Low altitude, cumulative ascent, cumulative decent
Others:Reference altitude setting, Altitude differential, Altitude auto reading interval (0'05 or 2'00)
Digital compass measuring range:0 to 359 degrees
Digital compass measuring unit:1 degree
Bearing memory:up to 40 records (shared storage with date/time, bearing, and barometric pressure/temperature records)
Barometer display range:260 to 1,100 hPa (7.65 to 32.45 inHg)
Barometer display unit:1 hPa (0.05 inHg)
Manual memory measurements:up to 40 records (shared storage with date/time, bearing, and barometric pressure/temperature records)
Thermometer display range:-10 to 60 C (14 to 140 F)
Thermometer display unit:0.1 C (0.2 F)
Stopwatch measuring capacity:99
Stopwatch measuring modes:Elapsed time, lap time, split time
Countdown timer measuring unit:1 second
Countdown range:24 hours
Countdown start time setting range:1 minute to 24 hour (1-minute increments and 1-hour increments)
Memory capacity:up to 40 records (shared storage with date/time, bearing, and barometric pressure/temperature records)
Accuracy:± 15 seconds per month (with no signal calibration)
Approx. battery life:7 months on full charge (without further exposure to light)
Storage Battery:Solar Rechargeable Battery
Module:3410
Size of case:GW9400 55.2 x 53.5 x 18.2mm / GW9400NV 55.2 x 53.5 x 18.2mm
Total weight:93g