Está en la página 1de 35

DISSERTATION OF TRAINING

IN

ISO 9001:2008
Centre for Fire, Explosive and Environment Safety (CFEES)
Defence Research and Development Organization (DRDO)
ON

MEASUREMENT OF VELOCITY OF SHOCK WAVES

SUBMITTED BY:
SRISHTI JAIN
ANKIT SINHA
DIKSHIT JAIN
GAURAV TOMAR

CERTIFICATE

This is to certify that Srishti Jain, Ankit Sinha, Dikshit


Jain and Gaurav Tomar,

have undergone 8 weeks

training at Centre for Fire, Explosive and Environment


safety (CFEES), Defence Research and Development
Organization (DRDO), New Delhi. They worked on
Measurement of velocity of shock waves under the
supervision of Ms. Meeta Baghel, Scientist D. They
have been hard working and dedicated throughout their
training.

(Ms. Meeta Baghel)


Scientist D
ESRG

ACKNOWLEDGEMENT
It is a great pleasure to acknowledge many individuals, each of whose valuable
guidance and support was always there during the training period.
At the outset and primarily, we express our gratitude to Dr. Harbans Lal, Head,
ESRG , Centre for Fire, Explosive and Environment Safety (CFEES) organization

of (DRDO), Ministry of Defence who was kind enough to approve our training in
the organization. We are indebted to Ms. Meeta Baghel, Scientist D, whose help,
stimulating suggestion and encouragement helped us throughout our work . Under
her competent mentorship and affectionate encouragement only we have been able
to proceed with our assignment. She not only has spared time for us from her busy
schedule but also boosted our morale. Her kind of behavior is a constant source of
great inspiration.
We are extremely thankful to staff of CFEES, DRDO for their constant support and
help in every possible way to make our training a successful experience.

Organization profile
A. Introduction
Defence research and development organization (DRDO) is an agency of republic
of India, responsible for the development of defence technologies for use by
military, head quarter in New Delhi. It was formed in 1958 by the merger of the
Technical Development Establishment and the Directorate of Technical
Development and Production with the Defence Science Organization.
DRDO has a network of 52 laboratories, which are deeply engaged in developing
defence technologies covering various fields like aeronautics, armaments,
electronic and computer sciences, human resource development, life sciences,

materials, missiles, combat vehicles development and naval research and


development. The organization includes more than 5,000 scientists and about
25,000 other scientific, technical and supporting personnel.
B. Centre for Fire, Explosive and Environment Safety (CFEES)
CFEES is an Indian Defence laboratory of the DRDO, located in Timarpur, Delhi.
Its main function is the development of technologies and products in the area of
fire, explosive and environment safety. CFEES is organized under the armaments
Directorate of DRDO.

CONTENTS
Page no.
1) Abstract 6
2) Components used..7
3) About arduino .17
4) Code...31
5) Circuit ....34
6) Block Diagram35
7) Flow Chart..36
8) Conclusion & Future Works..37
9) Challenges Faced...38
10)
Bibliography.39

ABSTRACT
This project aims at detection of shock waves (shock velocity) produced during a blast
which is an important parameter in indicating the capacity of an explosive to cause
damage.
The project uses a prototype , where piezoelectric sensors are used to detect the shock
waves which have been provided artificially.
The project has been developed using an arduino platform, which is an open source
hardware.

COMPONENTS USED
1) ARDUINO UNO

An Arduino board historically consists of an Atmel 8-, 16- or 32-bit AVR microcontroller (although
since 2015 other makers' microcontrollers have been used) with complementary components that
facilitate programming and incorporation into other circuits. An important aspect of the Arduino is its
standard connectors, which let users connect the CPU board to a variety of interchangeable add-on
modules termed shields. Some shields communicate with the Arduino board directly over various
pins, but many shields are individually addressable via an IC serial busso many shields can be
stacked and used in parallel. Before 2015, Official Arduinos had used the Atmel megaAVR series of
chips, specifically the ATmega8, ATmega168, ATmega328, ATmega1280, and ATmega2560. In
2015, units by other producers were added. A handful of other processors have also been used by
Arduino compatible devices. Most boards include a 5 V linear regulator and a 16 MHz crystal
oscillator (or ceramic resonator in some variants), although some designs such as the LilyPad run at
8 MHz and dispense with the onboard voltage regulator due to specific form-factor restrictions. An
Arduino's microcontroller is also pre-programmed with a boot loader that simplifies uploading of
programs to the on-chip flash memory, compared with other devices that typically need an external
programmer. This makes using an Arduino more straightforward by allowing the use of an ordinary
computer as the programmer. Currently, optiboot bootloader is the default bootloader installed on
Arduino UNO.
At a conceptual level, when using the Arduino integrated development environment, all boards are
programmed over a serial connection. Its implementation varies with the hardware version. Some
serial Arduino boards contain a level shifter circuit to convert between RS-232logic levels and
transistortransistor logic (TTL) level signals. Current Arduino boards are programmed via Universal
Serial Bus (USB), implemented using USB-to-serial adapter chips such as the FTDI FT232. Some
boards, such as later-model Uno boards, substitute the FTDI chip with a separate AVR chip
containing USB-to-serial firmware, which is reprogrammable via its own ICSP header. Other
variants, such as the Arduino Mini and the unofficial Boarduino, use a detachable USB-to-serial
adapter board or cable,Bluetooth or other methods, when used with traditional microcontroller tools
instead of the Arduino IDE, standard AVR in-system programming (ISP) programming is used.

Technical specs
Microcontroller

ATmega328P

Operating Voltage

5V

Input Voltage

7-12V

(recommended)
Input Voltage
(limit)

6-20V

Digital I/O Pins

14 (of which 6 provide


PWM output)

PWM Digital I/O


Pins

Analog Input Pins

DC Current per
I/O Pin

20 mA

DC Current for
3.3V Pin

50 mA

Flash Memory

32 KB (ATmega328P)
of which 0.5 KB used
by bootloader

SRAM

2 KB (ATmega328P)

EEPROM

1 KB (ATmega328P)

Clock Speed

16 MHz

Length

68.6 mm

Width

53.4 mm

Weight

25 g

Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),digitalWrite(),
and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive 20 mA as
recommended operating condition and has an internal pull-up resistor (disconnected by default) of 20-50k
ohm. A maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid permanent
damage to the microcontroller.
In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising
or falling edge, or a change in value. See the attachInterrupt() function for details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI
library.

LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when
the pin is LOW, it's off.

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analogReference() function.
There are a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields
which block the one on the board.

ATmega328P/ATmega168

Pin Mapping :

2) PIEZO ELECTRIC SENSORS

The analog sensors that are used to measure the amount of pressure applied to a sensor are called
as analog pressure sensors. Pressure sensor will produce an analog output signal that is

proportional to the amount of applied pressure. These pressure sensors are used for different types
of applications such as piezoelectric plates or piezoelectric sensors that are used for the generation
of electric charge. These piezoelectric sensors are one type of pressure sensors that can produce
an analog output voltage signal proportional to the pressure applied to the piezoelectric sensor.
Piezoelectric transducer is a measuring device that converts electrical pulses into mechanical
vibrations and vice versa. Piezoelectric quartz crystal and piezoelectric effect are the two things
needed to understand about the piezoelectric transducers.

Piezoelectric Quartz Crystal:


A quartz crystal is a piezoelectric material. It can generate the voltage when some mechanical stress
is applied upon the crystal. The piezoelectric crystal bends in different directions at different values
of frequencies. This is called mode of vibration. For achieving different vibration modes, the crystal
can be made in different shapes.

Piezoelectric Effect:
Piezoelectric effect is the generation of electric charge in certain crystals and ceramics due to
applied mechanical stress on them. The rate of generation of electric charge is proportional to the
force applied on it. The piezoelectric effect works in reverse order also such that when voltage is
applied to piezoelectric material it can generate some mechanical energy.
The piezoelectric transducers can be used in micro phones because of their high sensitivity where
they are converting sound pressure into voltage. They can be used in accelerometers, motion
detectors, and can be used as ultrasound detectors and generators. Ultrasound propagation is not
effected in material by its transparency.

Application:
The piezoelectric transducers can be used both as actuators and sensors. Sensor turns mechanical
force into electrical voltage pulses and actuator converts voltage pulses into mechanical vibrations.
Piezoelectric sensors can detect imbalances of rotating machine parts. They can be used in
ultrasonic level measurement and measurement of flow rate applications. Apart from the vibrations
for detecting imbalances, they can be used for measuring ultrasonic levels and flow rates.

3) 4X4 MATRIX KEYBOARD

A keypad is a set of buttons arranged in a block or "pad" which usually bear digits, symbols and usually a
complete set of alphabetical letters. If it mostly contains numbers then it can also be called a numeric
keypad. Keypads are found on many alphanumeric keyboards and on other devices such as calculators,
push-button telephones, combination locks, and digital door locks, which require mainly numeric input.
The 4*4 matrix keypad usually is used as input in a project. It has 16 keys in total, which means the same
input values.
The SunFouner 4*4 Matrix Keypad Module is a matrix non- encoded keypad consisting of 16 keys in
parallel. The keys of each row and column are connected through the pins outside pin Y1-Y4 as labeled
beside control the rows, when X1-X4, the columns.
The matrix is controlled by a microcontroller. For the above 16-button 4x4 matrix, 8 pins of the micro
controller will be used. The first 4 pins will be OUTPUTS and will be connected to the COLUMN wires,
while the other 4 pins will be INPUTS and will be connected to the ROW wires. The OUTPUTS of the
microcontroller will NOT all have power at the same time. The outputs will go high one by one in cycle.
This happens many times per second. During this time, it will also monitor the inputs for a signal. As long
as all inputs are LOW (with a pull down resistor or with internal uC pull-down resistors), the uC will take
no action. When the output C of the microcontroller becomes HIGH, the signal arrives also at the input of
the microcontroller, through the pressed button. The uC monitors the 4 inputs and detects that when the
specific output (C) is high, there is a HIGH signal at the specified input .

4) 16 2 LCD DISPLAY

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications.
A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits.. The
reasons being: LCDs are economical; easily programmable; have no limitation of displaying special
characters.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction
given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position,
controlling display etc. The data register stores the data to be displayed on the LCD. The data is the
ASCII value of the character to be displayed on the LCD.

Pin Description:

Pin
No

Function

Name

Ground (0V)

Ground

Supply voltage; 5V (4.7V 5.3V)

Vcc

Contrast adjustment; through a variable resistor

VEE

Selects command register when low; and data

Register

register when high

Select

Low to write to the register; High to read from the


register

Read/write

Sends data to data pins when a high to low pulse is


given

Enable

8-bit data pins

DB0

DB1

DB2

10

DB3

11

DB4

12

DB5

13

DB6

14

DB7

15

Backlight VCC (5V)

Led+

16

Backlight Ground (0V)

Led-

5) 10 k Ohm Potentiometer
6) 1 M Ohm resistor

ABOUT ARDUINO

1.1 Introduction
Arduino is an open-source computer hardware and software company, project and user
community that designs and manufactures microcontroller-based kits for building digital
devices and interactive objects that can sense and control objects in the physical world.
The project is based on microcontroller board designs, manufactured by several
vendors, using various microcontrollers. These systems provide sets of digital and
analog I/O pins that can be interfaced to various expansion boards ("shields") and other
circuits. The boards feature serial communications interfaces, including USB on some
models, for loading programs from personal computers. For programming the
microcontrollers, the Arduino project provides an integrated development environment
(IDE) based on the Processing project, which includes support for the C and C+
+programming languages.

1.2 Arduino Mega 2560


The Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital
input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4
UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power
jack, an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a ACto-DC adapter or battery to get started.
The Mega 2560 board can be programmed with the Arduino Software (IDE).
The power pins are as follows:
- Vin. The input voltage to the board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
- 5V. This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 - 12V), the
USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the

5V or 3.3V pins bypasses the regulator, and can damage your board. We don't
advise it.
- 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
- GND. Ground pins.
- IOREF. This pin on the board provides the voltage reference with which
the microcontroller operates. A properly configured shield can read the IOREF pin
voltage and select the appropriate power source or enable voltage translators on
the outputs for working with the 5V or 3.3V.
The ATmega2560 has 256 KB of flash memory for storing code (of which 8 KB is used
for the bootloader), 8 KB of SRAM and 4 KB of EEPROM (which can be read and
written with the EEPROM library).

1.3 Arduino IDE


The open-source Arduino Software (IDE) makes it easy to write code and upload it to
the board. It runs on Windows, Mac OS X as well as Linux. The environment is written
in Java and based on processing and other open-source software.

This software can be used with any Arduino Board.

To communicate using the Arduino, Serial Communication has been used.


Serial.begin() command in the Arduino IDE Sets the data rate in bits per second (baud)
for serial data transmission. For communicating with the computer, use one of these
rates: 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or
115200.
Serial.println() Prints data to the serial port as human-readable ASCII text. This
command can take many forms. Numbers are printed using an ASCII character for each
digit. Floats are similarly printed as ASCII digits, defaulting to two decimal places. Bytes
are sent as a single character. Characters and strings are sent as is.
The Baud Rate (transmission rate for serial data transmission) used in the above code,
is
9600
bps
(bits
per
second).
However the default Baud rate for The HC-05 module (mentioned later in the report) is
38600 bps.
We have used the character A (ASCII code, 65 {Dec}
operations in the Canary Android mobile Application.

or 41 {Hex} to trigger the

When the switch in the Arduino circuit is switched On, the circuit between Vcc and the
input 7 on the Arduino board, is open circuited, hence the input 7 receives a LOW.
Using IF statement, this condition is recognized and the bit character, A is serially
transmitted to the HC-05 Bluetooth module (Explained later) which transmits it to the
mobile application, thus triggering the SOS/Emergency operation.

1.5 Bootloader
What's a bootloader?
Microcontrollers are usually programmed through a programmer unless you have a
piece of firmware in your microcontroller that allows installing new firmware using an
external programmer. This is called a bootloader.

Versions of the bootloader


There are different versions of the bootloader - both in order to work on different
hardware and because it has changed over time.
The current bootloaders (i.e. the ones included in Arduino 0009) are almost identical for
the Diecimila and NG (with ATmega168). They both run at 19200 baud and take up 2
KB of flash memory on the ATmega168. The only differences is the time the bootloader
waits for a new program to arrive and the number of times it flashes the pin 13 LED
when it starts. Because of the automatic reset on the Diecimila, its bootloader needs
only wait a very short amount of time (less than a second) - to save time, it also flashes
the pin 13 LED only once. The NG bootloader waits about 6-8 seconds and flashes the
LED three times.
The bootloader that actually shipped on the Arduino NG is slightly different. It enables
the internal pullup resistor on pin 6, and doesn't enable the internal pullup on the RX
pin. Nor does it timeout upon receiving invalid data, so if you send data to it immediately
after it resets, your sketch will never start.
The Arduino BT bootloader does some initial configuration of the bluetooth module.
The ATmega8 bootloader only takes up 1 KB of flash. It does not timeout when it
receives invalid data, you need to make sure that no data is sent to the board during the
6-8 seconds when the bootloader is running.
Some ancient versions of the bootloader run at 9600 baud (instead of 19200). In order
to successfully upload sketches to boards with this bootloader, you'll need to change the
serial.download_rate in your preferences file to 9600.
Third parties have also worked on the bootloader. This page is link to some other
bootloader development

How does it work?


The "Burn Bootloader" commands in the Arduino environment use an open-source tool,
avrdude. There are four steps: unlocking the bootloader section of the chip, setting the
the fuses on the chip, uploading the bootloader code to the chip, and locking the
bootloader section of the chip. These are controlled by a number of preferences in the
Arduino preferences file.

Burning the Bootloader


If you have a new ATmega328 (or ATmega168), you'll need to
burn the bootloader onto it. You can do this using an Arduino
board as an in-system program (ISP). If the microcontroller
already has the bootloader on it (e.g. because you took it out of
an Arduino board or ordered an already-bootloaded ATmega),
you can skip this section.

To burn the bootloader, follow these steps:


1. Upload the ArduinoISP sketch onto your Arduino
board. (You'll need to select the board and serial port
from the Tools menu that correspond to your board.)
2. Wire up the Arduino board and microcontroller as
shown in the diagram to the right.
3. Select "Arduino Duemilanove

or

Nano

w/

ATmega328" from the Tools > Board menu. (Or


"ATmega328 on a breadboard (8 MHz internal clock)" if
using the minimal configuration described below.)
4. Run Tools > Burn Bootloader > w/ Arduino as ISP.
You should only need to burn the bootloader once. After you've
done so, you can remove the jumper wires connected to pins
10, 11, 12, and 13 of the Arduino board.

Uploading Using an Arduino Board


Once your ATmega328p has the Arduino bootloader on it, you can upload programs to it using
the USB-to-serial convertor (FTDI chip) on an Arduino board. To do, you remove the

microcontroller from the Arduino board so the FTDI chip can talk to the microcontroller
on the breadboard instead. The diagram at shows how to connect the RX and TX lines
from the Arduino board to the ATmega on the breadboard. To program the
microcontroller, select "Arduino Duemilanove or Nano w/ ATmega328" from the the
Tools > Board menu (or "ATmega328 on a breadboard (8 MHzinternal clock)" if you're
using the minimal configuration described below). Then upload as usual.

Getting Rid of the Arduino Board


Once you've programmed the ATmega on the breadboard, you can eliminate the
Arduino. To do so, you'll need to provide an alternative power supply for the
microcontroller. See the standalone Arduino on a breadboard tutorial for details.

ATmega328
The ATmega328 is a single chip microcontroller created by Atmel in the megaAVR
family.

2.1 Specifications
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory
with read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O
lines, 32 general purpose working registers, three flexible timer/counters with compare

modes, internal and external interrupts, serial programmable USART, a byte-oriented 2wire serial interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels in
TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator,
and five software selectable power saving modes. The device operates between 1.8-5.5
volts. The device achieves throughput approaching 1 MIPS per MHz.

Key Parameters

Parameter

Value

CPU type

8-bit AVR

Performance

20 MIPS at 20 MHz

Flash memory

32 kB

SRAM

2 kB

EEPROM

1 kB

Pin count

28-pin PDIP, MLF, 32-pin TQFP, MLF

Maximum operating frequency 20 MHz

Number of touch channels

16

Hardware QTouch Acquisition

No

Maximum I/O pins

26

[2]

[2]

External interrupts

24

USB Interface

No

USB Speed

No

2.2 Pinout of ATmega328 in 28-PDIP

2.3 Programming
Reliability qualification shows that the projected data retention failure rate is much less
than 1 PPM over 20 years at 85 C or 100 years at 25 C.

Programming
signal

Pin Name

I/O

Function

RDY/BSY

PD1

High means the MCU is ready for a new


command, otherwise busy.

OE

PD2

Output Enable (Active low)

WR

PD3

Write Pulse (Active low)

BS1

PD4

Byte Select 1 (0 = Low byte, 1 = High byte)

XA0

PD5

XTAL Action bit 0

XA1

PD6

XTAL Action bit 1

PAGEL

PD7

Program memory and EEPROM Data Page Load

BS2

PC2

Byte Select 2 (0 = Low byte, 1 = 2nd High


byte)

DATA

PC[1:0]:PB[5:0 I/O Bi-directional data bus (Output when OE is low)


]

Programming mode is entered when PAGEL (PD7), XA1 (PD6), XA0 (PD5), BS1 (PD4)
is set to zero. RESET pin to 0V and V CC to 0V. VCC is set to 4.5 - 5.5V. Wait 60 s, and
RESET is set to 11.5 - 12.5 V. Wait more than 310 s.Set XA1:XA0:BS1:DATA = 100
1000 0000, pulse XTAL1 for at least 150 ns, pulse WR to zero. This starts the Chip
Erase. Wait until RDY/BSY (PD1) goes high. XA1:XA0:BS1:DATA = 100 0001 0000,
XTAL1 pulse, pulse WR to zero. This is the Flash write command.

Symbol Pins I/O

Description

MOSI

PB3

Serial data in

MISO

PB4

Serial Data
out

SCK

PB5

Serial Clock

Serial data to the MCU is clocked on the rising edge and data from the MCU is clocked
on the falling edge. Power is applied to V CC while RESET and SCK are set to zero. Wait
for at least 20 ms and then the Programming Enable serial instruction 0xAC, 0x53,
0x00, 0x00 is sent to the MOSI pin. The second byte (0x53) will be echoed back by the
MCU.

2.4 Applications
As of 2013 the ATmega328 is commonly used in many projects and autonomous
systems where a simple, low-powered, low-cost micro-controller is needed. Perhaps the
most common implementation of this chip is on the popular Arduino development
platform, namely the Arduino Uno and Arduino Nano models.

CODE
#include <Keypad.h>
#include <LiquidCrystal.h>
#define threshold 50 // threshold value to decide weather the detected value will be displayed or
not.
int piezoPin1 = A0;// the positive pin of piezo element 1 is connected to analog pin 0
int piezoPin2 = A1;// the positive pin of piezo element 2 is connected to analog pin 1
int sensorReading1 = 0; // variable to store the value read from the sensor pin
int sensorReading2 = 0; // variable to store the value read from the sensor pin
const byte ROWS = 4; // Four rows
const byte COLS = 3; // Three columns
// Define the Keymap
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'#','0','*'}
};
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = { 16, 17, 18, 19 };
// Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = { 8, 9, 10 };
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Create the Keypad
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup()
{
Serial.begin(9600);
lcd.begin(16, 2);
lcd.clear();
}
long Readvalue()
{
lcd.print("Distance=");
long a=0;
int val;
char key = kpd.getKey();
do
{

if(key) // Check for a valid key.


{
if(key=='1')
val=1;
if(key=='2')
val=2;
if(key=='3')
val=3;
if(key=='4')
val=4;
if(key=='5')
val=5;
if(key=='6')
val=6;
if(key=='7')
val=7;
if(key=='8')
val=8;
if(key=='9')
val=9;
if(key=='0')
val=0;
a=a*10+val;
lcd.print(key);
delay(500);
key = kpd.getKey();
}
}while(key!='#');
Serial.print(a);
return(a);
}
void loop()
{
long a;
a=Readvalue();
long time1,time2,t;
float s;
while(1)
{
sensorReading1 = analogRead(piezoPin1);// If the sensor reading is greater than the threshold
if (sensorReading1 >= threshold)
{
time1=millis();

while(sensorReading2=analogRead(piezoPin2)<=threshold);
time2=millis();
t=time2-time1;
t=t*1000;
s=a/t;
lcd.setCursor(0, 1);
lcd.print("Speed=");
lcd.write(s);
delay(1000);
}
}
}

CIRCUIT

BLOCK DIAGRAM

FLOW CHART

CONCLUSION & FUTURE WORKS


CONCLUSION:

This product has been implemented as cheap, easy and


speedy method for directly measuring the velocity of shock produced
during the blasting which is an important parameter to indicate
capacity of blast to cause damage.
This project can be used within a range of 1 km from blasting
site.
The project aims to measure shock velocity in air specifically,
but can also be used for measuring velocity in some other medium
just the changing the assembly of pressure sensors.
FUTURE WORKS:
Project can be modified to increase the range.
More than 2 pressure sensors can be used.
Other blasting parameters such a acceleration, temperature etc
can also be determined.

CHALLENGES OF THE PROJECT


1. First challenge that was encountered during the initialization of this project was that
signal coming from the pressure sensor could be noise rather than the original signal;
therefore for preventing noise we had to make some arrangement .
To meet this challenge we decided to use 1megaohm resistor in parallel with the
pressure sensor which will eliminate the noise signal.
2. The major bottleneck was keypad. We required 4*3 matrix keypad for our project. To
fulfill this purpose we replaced 2 keypads. The first one that wegot was simply arubber
keypad which did not have any electrical connection. Finally we got a 4*4 matrix keypad
in which we have used only 7 pins.
3. The contrast adjustment of lcd was also a need of the project for clear display.

We used 10k potentiometer to meet this requirement.

BIBLIOGRAPHY
www.instructables.com
www.electroschematics.com
www.arduino.cc
www.electronicdesign.com
Electronic devices and circuit theory
-by ROBERT BOYLESTAD & LOUIS NASHELSKY