Difference between revisions of "Tilt Sensor"
Katherine.d (talk | contribs) (→Module specifications) |
Katherine.d (talk | contribs) (→Characteristics) |
||
Line 43: | Line 43: | ||
|- | |- | ||
! align="center" style="width:200px" |Model | ! align="center" style="width:200px" |Model | ||
− | ! align="center" style="width: | + | ! align="center" style="width:150px" |Voltage |
− | ! align="center" style="width: | + | ! align="center" style="width:150px" |Current |
! align="center" style="width:200px" |Conduction Time | ! align="center" style="width:200px" |Conduction Time | ||
! align="center" style="width:200px" |Path Resistance | ! align="center" style="width:200px" |Path Resistance | ||
Line 51: | Line 51: | ||
|- | |- | ||
| align="center" style="width:200px" |SW-460D | | align="center" style="width:200px" |SW-460D | ||
− | | align="center" style="width: | + | | align="center" style="width:150px" |12V |
− | | align="center" style="width: | + | | align="center" style="width:150px" |5mA |
| align="center" style="width:200px" |20mS | | align="center" style="width:200px" |20mS | ||
| align="center" style="width:200px" |>10M omh | | align="center" style="width:200px" |>10M omh |
Revision as of 10:01, 6 December 2012
Contents
Overview
Based on the SW-460D ball switch digital module, the use of steel ball characteristics, through the action of gravity that ball to low rolling, thus making the switch closed or disconnect, so also can be used as a simple angle sensor use.
Ball switch digital input module, and arduino special sensor expansion board combination, will be able to realize the very interesting interactive works, than using mercury switch more safety.
Specifications
Specificaitons of Quality
- Working voltage: 3.3/5V DC
- Interface types: Digital interface
- 2.54mm general interface
- Module conduction angle:2~5°
Module specifications
Items | Min |
---|---|
PCB Size | 2.5cm*2.7cm |
Interface | 2.54mm pitch pin header |
IO structure | IN, NC, VCC, GND |
VCC | 3/5V |
Tilt Sensor PCB
Characteristics
Model | Voltage | Current | Conduction Time | Path Resistance | Open Circuit Resistance | Resistance To Temperature |
---|---|---|---|---|---|---|
SW-460D | 12V | 5mA | 20mS | >10M omh | 10M omh | 100°C |
Schematic
Programming
The program below uses the tilt sensor to control the LED.
Sample code:
<syntaxhighlight lang="c">
int ledPin = 13; // Connect LED to pin 13 int switcher = 3; // Connect Tilt sensor to Pin3
void setup() {
pinMode(ledPin, OUTPUT); // Set digital pin 13 to output mode pinMode(switcher, INPUT); // Set digital pin 3 to input mode
} void loop() {
if(digitalRead(switcher)==HIGH) //Read sensor value { digitalWrite(ledPin, HIGH); // Turn on LED when the sensor is tilted } else { digitalWrite(ledPin, LOW); // Turn off LED when the sensor is not triggered }
}
</syntaxhighlight>