How Earthquakes Occur
Earthquakes originate from tectonic plate movement along fault lines. When accumulated stress exceeds the point that the material can withstand, energy is released as seismic waves. In Thailand, high-risk provinces include Chiang Rai, Chiang Mai, Mae Hong Son, Tak, and Kanchanaburi due to their proximity to multiple active fault lines that remain in motion.
The Difference Between P-Waves and S-Waves
There are two primary types of seismic waves relevant to warning systems. P-waves (Primary Waves) travel faster and are longitudinal waves that move efficiently through rock and soil. Their destructive power is relatively low. S-waves (Secondary Waves) travel slower but are transverse waves with far greater shaking force -- they are the primary cause of building collapse. The time gap between when P-waves arrive and when S-waves follow is the window that warning systems exploit.
Types of Earthquake Sensors
Accelerometers measure acceleration across three axes -- X, Y, and Z -- detecting changes in movement velocity. They are well-suited for detecting vibrations at levels that affect buildings. Geophones work similarly to geological survey equipment, detecting ground vibration with high sensitivity, and are commonly used in large monitoring stations. MEMS (Micro-Electro-Mechanical Systems) technology integrates microscale mechanical components with electronic circuits on a single chip. Small, lightweight, affordable, and highly accurate, MEMS sensors are popular in both DIY setups and commercial systems like HappySmart.
Detection and Alert Process
When the sensor detects vibration, data is processed immediately. The system analyzes the amplitude, frequency, and waveform of the signal to distinguish a real earthquake from ordinary vibrations such as passing trucks or nearby construction. If the signal exceeds the defined threshold, it is sent to the alert module, which distributes information via MQTT to Home Assistant or Node-RED, via Firebase to the Cloud system, and via Push Notification to the user's smartphone. Home Assistant or Node-RED then executes the configured Automation -- closing gas valves, activating emergency lighting, and forwarding alerts to family members.
Keeping Sensors Ready
Check sensor status every 3 to 6 months through the HappySmart app. Test the system monthly by gently tapping the sensor to confirm signal transmission. Inspect the backup battery and replace when it falls below 20%. Regularly update Home Assistant and ESPHome Firmware via OTA to receive accuracy improvements and new features.
What Technology Does HappySmart Use?
HappySmart uses industrial-grade MEMS sensors with higher accuracy than standard consumer chips. The system is Home Assistant ready straight out of the box, supports real-time Cloud alerts, and the team tests every system before delivery to confirm correct operation. After-sales service provides ongoing support following installation.
