Tag Archives: littleBits Arduino

Creating an earthquake warning system with littleBits and PubNub


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.

Photo-Feb-21--6-01-56-PM

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.” large_filled_eewbasics

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.

This littleBits toilet seat alarm fixes a big household problem


littleBits will help you become a more thoughtful and courteous spouse. 


It has plagued relationships for ages. Roommates have split because of it. Marriages have been compromised. Now, there may finally be a simple solution to the perpetual problem of leaving the toilet seat up thanks to Tim Cox.

large_filled_toilet

The Maker admits that though he wants to be a better husband, he’s got a bad habit. Like a majority of men, Cox often forgets to be courteous to his spouse and fails to put the toilet seat down after use. So he did what any great husband would do: he designed an Arduino-powered alarm to shame him into doing it.

To bring this idea to life, the Maker used a handful of littleBits components including an Arduino (ATmega32U4), a light sensor, an MP3 player (ATmega168), a pressure sensor, a synth speaker and a power module. First, Cox uploaded the hit song “Rude” by Magic! onto an MP3 player SD card, which he felt was a proper tune to suit the mood of the situation. He then devised a code that would turn the Arduino into a NAND, and connected it all to a light and pressure sensor.

large_filled_IMG_1599

The circuit is then placed on top of the toilet with the pressure sensor propped up by the seat. Only thing left to remember is to crank up the volume, so that the offender learns his lesson. Sound like a project that would be useful in your home? We thought so. Hurry over to the official littleBits project page here.