Earthquake Detector using Arduino :- Circuit Diagram, working and circuit description with result and software code including library file of Earth Quake Detector
They say, ‘Prevention is better than cure’. This statement goes perfect with the events whose probability of occurrence is highly possible. Earthquake is one of such disaster that comes as an evil fate and sweeps away precious human lives and civilization, it is that unpredictable phenomenon whose occurrence cannot be avoided, but at least we can take measures to minimize the adverse effect of its consequences. In doing so, recent technology play a vital role. A similar circuit is presented here which acts an earthquake indicator and prevents further damage. Arduino and a highly-sensitive ADXL335 accelerometer are used to accomplish our goals.
ADXL335 works like a critical sensor in detecting vibrations and predict earthquake. The device “Earthquake Detector using Arduino” can sense vibrations and knocks along the three physical dimensions or axes, which make it more sensitive. Once it identifies vibration, it is applied with acceleration and ADXL335 produces an analogue voltage equivalent to acceleration imposed on it by the vibration. The device “Earthquake Detector using Arduino” supplies three outputs along three axes- X-, Y- and Z- axes. These output pins are connected to ADC pins of Arduino Uno. For any acceleration production or vibrations detected, analog outputs are produced by the accelerometer and then the ADC detects it.
In the arduino uno, voltage levels are compared. In cases of earthquake, where the movement is excessive enough to cross a value beyond defined threshold value and create a large impact, some preventive actions are followed. Firstly, a LED glows and a buzzer alarm sounds high enough to alert all the people about the scenario and relay energises. Out of these three devices, LED and buzzer fit perfectly for earthquake indication at home where as relay is a must for industrial applications. Relay is wired to a PLC to ensure safe interlocking of any operating machinery part and furnace control to shut them down to avoid accidents due to earthquake. To implement this concept, threshold adjustment buttons are fitted next to machines to initiate necessary task when needed. LCD works as an informer by displaying the threshold adjustments information. It adds next pile to flexibility of the project.
Circuit and working of Earthquake Detector Using Arduino
The construction of the project “Earthquake Detector using Arduino” is so simple, that it looks like assembling of few common electronics components. The fact that the project “Earthquake Detector using Arduino” uses Arduino Uno, which is itself a complete circuit, makes this project easier to implement. The arduino board and ADXL335 accelerometer module are interfaced (connected across CON2) properly. The ADC inputs of the accelerometer are connected to arduino pins in the given pattern: X-axis to A0, Y-axis to A1 and Z-axis to A2. In order to externally adjust the threshold value for vibration detection, we have added two extra pushbuttons to the circuit. These buttons are connected across 5V supply and then connected to the interrupt pins 2 and 3 of arduino uno, which are further grounded through resistors R2 and R1. For displaying the information, a 16Ã—2 LCD (LCD1) is employed. The LCD is set in 4-wired mode with its default state enabled (i.e. backlight and contrast pin). Both the components; LED and buzzer connected across CON4 needs switching and for this transistor T2 (BC548) is connected at the pin 5 terminal of Arduino. There are cases when we need to de-energise the relay (RL1) when alarms are triggered during industrial PLC interfacing for safety interlocks. And, so an extra transistor (BC548) T1 is connected across pin 10. All arduino pins from 6-9 and 11-12 are configured for LCD control operations and data lines. Under steady conditions, when the supply is continuously fed to the circuit, the status of accelerometer is monitored at every instant and then each value is stored in Arduino internal EEPROM regardless of its orientation.
To use 10-bit ADC, different header file is tagged along for programming in the code. Since the ADC is 10-bit, special header file has been provided with the code. Stability is a must in the project “Earthquake Detector using Arduino” to ensure precise reading and therefore approximately five-second delay is fixed so that all voltage levels and the system could maintain a stable state before initial values are read and collected. These values are gathered around the three respective axes of the accelerometer, which are then fed to the arduino. The microcontroller fixed in the arduino board accepts those readings and then store it in the EEPROM as stated earlier. The threshold value of reading is also stored in the same location i.e. EEPROM which makes it easy to fetch data for comparison. In this project, the default threshold value is set to 25.
LCD performs information displaying function. Since it illustrates multiple data, its working can be sectioned into three distinct categories: initializing mode, monitoring mode and indicating mode which are further discussed in points below:
- Initializing mode: Multiple parameters are to be considered in this project ie. Temperature, soil moisture etc. All considered parameters are initialized in this mode. It is shown in fig. 3
- Monitoring mode: In this mode, values of the parameters are continuously monitored at every interval and the fixed threshold value is displayed on the second row of LCD foe comparison.
- Indicating mode: This is the main part where the values are continuously read and then the necessary comparison is done in between the standard threshold set in the EEPROM and field values read by the accelerometer. If variations are observed in the values under comparison i.e. stored value by the accelerometer is either greater (along the positive side) or less (along negative side) than the preset threshold, the alarm is triggered. And, the relay gets de-energized. The program code also supports the negative values in all three axes along with the positive values.
As we can see, push buttons also serve as interrupts being connected to pin 2 and 3 of arduino so that necessary sensitivity adjustments can be made to increase or decrease threshold values by pressing those buttons. Being earthquake based project, 10-15 value is claimed to be optimum threshold value here. By setting this value up to 5 to 8, we can modify this project to be used in detection of knocks and vibrations.
The project “Earthquake Detector using Arduino” is highly sensitive and so it must be carefully fabricated. We can also set this project within a protective hard enclosure and then fix it in any place of the industry or home. Further the project “Earthquake Detector using Arduino” can also be operated in terms of acceleration. Firstly, determine resultant acceleration by using formula of square root of X2+Y2+Z2, where X, Y and Z are corresponding co-ordinates outputs obtained from ADXL335. Now, compare the result calculated with the preset threshold. And, the same process follows on-wards. If desired, user can use the same project to perform this change and evaluate the differences in using two methods.
Software:- Click Here to Download Software
PARTS LIST OF EARTHQUAKE DETECTOR USING ARDUINO
|Resistor (all ¼-watt, ± 5% Carbon)|
|R1, R2 = 10 KΩ
R3, R6 = 1 KΩ
R4, R5 = 330 Ω
VR1 = 10 KΩ
T1, T2 = BC548
|SW1, SW2 = Push-to-On Switch
PZ1 = Buzzer
LCD1 = 16*2 LCD
RL1 = 5V 1C/O Relay
LED1 = Any color LED