This shock IOT sensor uses a SW-18015P switch to detect shocks, vibrations and impacts. It can be used to build a simple LED circuit which lights up when an impact is detected.
The switch primarily consists of a terminal that forms a center post and a second terminal that is a spring that surrounds the center post. When a sufficient force is transferred to the switch, the terminal consisting of the spring moves and shorts both terminals together momentarily.
Generally the switch should be located as close as possible to the area being monitored. Otherwise, the vibration may be dampened by other structural components in your project. Conversely, if you find that the switch is too sensitive for your application try moving the switch further away from the area of interest to decrease sensitivity.