University of California professor Joshua Bloom has created a device capable of detecting earthquakes, and it only cost him $110 to make.

The alarm was able to give a 5-second warning for the Napa earthquake that took place last month in the Bay Area of California on Aug. 24th, according to Discovery News. The device works by converting early warning signals into loud audio alerts.

The invention is able to detect these disasters by connecting to ShakeAlert, a system that university partners and the United States Geological Survey (USGS) are currently working on. The system measures P-wave vibrations that move fast and take place before the S-wave, which is slower and more destructive, in order to find tremors that are about to happen. ShakeAlert was able to give people in the Bay Area a 10-second warning for the Napa quake.

The components of Bloom's alarm include a Raspberry Pi single-board computer, a wired speaker, a mini Wi-Fi adaptor and an SD card, all placed inside a cardboard potato chip box from Gregiore, a restaurant in Berkeley, Gizmodo reported.

With the success of the inexpensive invention, Bloom hopes to persuade the state to provide financial support for his earthquake alarm.

"Knowing it's cheap to make will get the public excited and hopefully get the legislature to fund it," Bloom said.

Those interested in trying out the alarm can look at step-by-step directions for the device on Bloom's blog.