
01Basic Understanding
Model:HS-S31PName:Touch SensorSeries:SensorDescription:This module is designed specifically for detecting mechanical collisions or vibrations. It features a built-in elastic triggering mechanism and signal processing circuit, which can convert physical collision forces into recognizable digital signals (high/low level). It accurately responds to instantaneous impacts or continuous vibrations, making it a core detection component for obstacle avoidance and status monitoring in devices.Usage Scenarios:Robot obstacle avoidance (e.g., automatically stopping and steering when a small vehicle collides); Security systems (e.g., triggering alarms when doors or windows are struck); Interactive toys (e.g., switching game modes after a collision, such as lighting up after a block car collision); Industrial equipment monitoring (e.g., detecting collisions of parts on an assembly line to prevent jams); Accessibility aids (e.g., alert sounds when a wheelchair collides with obstacles); Aligns with AI education in primary and secondary schools by building “collision avoidance robots” and “smart alarm devices” to help students understand signal conversion and triggering logic, in accordance with the “Guidelines for Artificial Intelligence General Education in Primary and Secondary Schools (2025 Edition)”.Interdisciplinary Integration:Physics, Mathematics, Labor, Information TechnologyEthical Education:The false triggering of the collision sensor (e.g., wind causing door/window vibration alarms) may disrupt others’ lives, necessitating a discussion on the need for “sensitivity calibration”; Continuous monitoring of collisions in security scenarios may infringe on others’ spatial privacy, requiring clear boundaries for detection range and purpose; Over-reliance on collision triggers in children’s toys may reduce active exploration behavior, necessitating a balance between technological interaction and independent creation; Insufficient durability of sensors leading to frequent replacements raises the significance of “material environmental friendliness” in reducing electronic waste; Collision data recording in industrial detection may involve production secrets, necessitating regulations on data storage and access permissions.
02Technical Parameters
Working Principle::
The module features a built-in elastic contact structure and signal shaping circuit. Under normal conditions, the contacts are open (output high level); when subjected to mechanical collisions or vibrations, the elastic mechanism triggers the contacts to close (output low level), and after circuit shaping, a stable digital signal is output; it includes anti-jitter processing to filter out minor vibration interference (sensitivity can be adjusted via an external resistor).
Parameter Analysis:
G(GND): Power input negative/ground
V(VCC):Power input positive/voltage
S(Signal):Signal output interface
Detection Type: Instantaneous collision, continuous vibrationTrigger Force: 50-500g (can be adjusted by changing the spring tension)Response Time: ≤10msRecovery Time: ≤50ms (reset time after collision)Operating Temperature: -20℃~70℃Interface Type: PH2.0-3P terminal (compatible with Dupont wire)03Code Example
The connection pin is D3.
04Safety Measures
1.Power off before wiring, confirm VCC (3.3V-5V) and GND polarity; reverse connection may burn the signal processing chip;
2. Avoid excessive collisions (e.g., impact force greater than 1000g), which may cause permanent deformation of the elastic mechanism;
3. Ensure the module is securely fixed during installation to avoid mis-triggering due to self-vibration;
4. In humid environments (e.g., kitchens, bathrooms), a moisture-proof casing is required to prevent contact oxidation and rust;
5. During debugging, avoid signal conflicts from multiple collision sensors (can be distinguished by different pins);
6. Do not poke the triggering mechanism with sharp objects, as this may damage the elastic components;
7. When not in use for a long time, place the sensor in a non-vibrating environment to avoid spring fatigue.
05Extensions
Students can try the following:
1. Combine the collision sensor with a motor driver module to create an “obstacle avoidance car” [when the car collides with an obstacle, the sensor triggers the motor to reverse for steering];2. Link with HS-F07P active buzzer to design a “smart locker”, triggering a buzzer prompt “closed” when the cabinet door collides and closes;3. Build a “earthquake warning demonstration device” to simulate vibration detection using the collision sensor, understanding the application of mechanical signals in safety monitoring.
Arduino Sensors: HS-S01A Infrared SensorArduino Sensors: HS-S02P Infrared Sensor (Obstacle Avoidance)Arduino Sensors: HS-S03P Ultraviolet SensorArduino Sensors: HS-S05P Sound SensorArduino Sensors: HS-F07P Active BuzzerArduino Sensors: HS-S08P Flame SensorArduino Sensors: HS-S09LB Raindrop SensorArduino Sensors: HS-S09PC Soil Moisture Sensor
Arduino Sensors: HS-S10P Mist Sensor
Arduino Sensors: HS-S11-L Gas Sensor
Arduino Sensors: HS-S20P Ambient Light Sensor
Arduino Sensors: HS-S21P Tilt SensorArduino Sensors: HS-S22P Grayscale SensorArduino Sensors: HS-S23P Infrared Receiver ModuleArduino Sensors: HS-S24P Digital Temperature SensorArduino Sensors: HS-S26A Temperature and Humidity SensorArduino Sensors: HS-S28P Potentiometer
Arduino Sensors: HS-S29P Infrared Transmitter Module
Arduino Sensors: HS-S30P Clock Module
— Previous Recommendations —




