Features
- Digital tilt and orientation detection
- Steel ball switch design safer than mercury based sensors
- Produces a stable 0 or 1 digital output
- Built in pull up resistor for direct microcontroller connection
- Low cost and reliable operation
- High durability and long service life
- Easy to interface with Arduino and other microcontrollers
Principle of Operation
Inside the sensor, a conductive ball moves freely within a tube. Two conductive terminals are placed at one end of the tube. When the ball touches both terminals, the circuit is closed and the output becomes active. When the sensor is tilted, the ball moves away and the circuit opens. This simple mechanical principle allows reliable digital orientation detection.
Pinout
- VCC Power supply input 3.3V or 5V
- GND Ground connection
- OUT Digital output signal high or low
Applications
- Robotics orientation detection
- Vehicle and automotive systems
- Direction and movement sensing
- Security and alarm triggers
- Educational electronics projects
Arduino Test Code
int ledPin = 12;
int sensorPin = 4;
int sensorValue;
int lastTiltState = HIGH;
long lastDebounceTime = 0;
long debounceDelay = 50;
void setup() {
pinMode(sensorPin, INPUT);
digitalWrite(sensorPin, HIGH);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = digitalRead(sensorPin);
if (sensorValue == lastTiltState) {
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) > debounceDelay) {
lastTiltState = sensorValue;
}
digitalWrite(ledPin, lastTiltState);
Serial.println(sensorValue);
delay(500);
}
Technical Details
- Operating angle 30 to 90 degrees from horizontal
- Maximum voltage 5V
- Maximum current 30mA
- Insulation resistance greater than 10 mega ohm
- Dimensions approximately 2.4 x 1.5 x 0.9 cm
Features
- Digital tilt and orientation detection
- Steel ball switch design safer than mercury based sensors
- Produces a stable 0 or 1 digital output
- Built in pull up resistor for direct microcontroller connection
- Low cost and reliable operation
- High durability and long service life
- Easy to interface with Arduino and other microcontrollers
Principle of Operation
Inside the sensor, a conductive ball moves freely within a tube. Two conductive terminals are placed at one end of the tube. When the ball touches both terminals, the circuit is closed and the output becomes active. When the sensor is tilted, the ball moves away and the circuit opens. This simple mechanical principle allows reliable digital orientation detection.
Pinout
- VCC Power supply input 3.3V or 5V
- GND Ground connection
- OUT Digital output signal high or low
Applications
- Robotics orientation detection
- Vehicle and automotive systems
- Direction and movement sensing
- Security and alarm triggers
- Educational electronics projects
Arduino Test Code
int ledPin = 12;
int sensorPin = 4;
int sensorValue;
int lastTiltState = HIGH;
long lastDebounceTime = 0;
long debounceDelay = 50;
void setup() {
pinMode(sensorPin, INPUT);
digitalWrite(sensorPin, HIGH);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = digitalRead(sensorPin);
if (sensorValue == lastTiltState) {
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) > debounceDelay) {
lastTiltState = sensorValue;
}
digitalWrite(ledPin, lastTiltState);
Serial.println(sensorValue);
delay(500);
}
Technical Details
- Operating angle 30 to 90 degrees from horizontal
- Maximum voltage 5V
- Maximum current 30mA
- Insulation resistance greater than 10 mega ohm
- Dimensions approximately 2.4 x 1.5 x 0.9 cm