Maker replicates California’s earthquake warning and monitoring system using littleBits, Ruby and PubNub.
In the wake of the tragic 2011 Tōhoku earthquake and tsunami, Anmol Agrawal decided to create a mini earthquake warning and monitoring system using littleBits, Ruby and PubNub.
As the the Maker notes, this DIY solution — which also happens to be among the latest entries in this year’s Hackaday Prize — could be be employed to detect both earthquakes and tsunami in prone areas.
“My initial approach was to get some data through online resource like meteorological survey websites, as they are the ones with access to all the sensors, devices, machines, seismographs etc. to keep track of earthquake activities. I planned on getting that data continously and running the logic continously like if earthquake is more than 5.3 richter scale, send the warning,” Agrawal writes.
He decided to take this one step further by creating a system specifically for India. This was accomplished by acquiring the data of seismic activity for the country, which was completed by crawling the India Meteorological Department’s earthquake report every 10-20 seconds.
The Maker adds, “Although that is a very inefficient method but I still wrote the script. I got it working but then I thought, is the data updated on the page in real-time or after couple of hours? If the earthquake comes somewhere at 6pm and it’s getting updated on the site at 8pm, then that data is of no use.”
After some research, Agrawal came across the earthquake early warning system currently in use in California, and decided to replicate it with an Arduino littleBits module (ATmega32U4), Ruby and PubNub. He employed a littleBits pressure sensor to create the earthquake effect based on the strength of his finger’s touch and a bright LED to serve as the warning signal. The data is continuously measured, streamed and sent to PubNub using a dashboard created with Freeboard.io.
“To give an idea of how fast this system is, in recent the Nepal Earthquake, it would have given a three-five minute early warning to Kathmandu and surrounding cities as epicenter was only 70-140km away from them,” he concludes.
Interested? You can read up on the Maker’s entire build here.