Project Report
Project Report
Project Report
IN
ISO 9001:2008
Centre for Fire, Explosive and Environment Safety (CFEES)
Defence Research and Development Organization (DRDO)
ON
SUBMITTED BY:
SRISHTI JAIN
ANKIT SINHA
DIKSHIT JAIN
GAURAV TOMAR
CERTIFICATE
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,
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
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 :
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 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.
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
Vcc
VEE
Register
Select
Read/write
Enable
DB0
DB1
DB2
10
DB3
11
DB4
12
DB5
13
DB6
14
DB7
15
Led+
16
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.
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).
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.
or
Nano
w/
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.
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
16
No
26
[2]
[2]
External interrupts
24
USB Interface
No
USB Speed
No
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
OE
PD2
WR
PD3
BS1
PD4
XA0
PD5
XA1
PD6
PAGEL
PD7
BS2
PC2
DATA
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.
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
{
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
BIBLIOGRAPHY
www.instructables.com
www.electroschematics.com
www.arduino.cc
www.electronicdesign.com
Electronic devices and circuit theory
-by ROBERT BOYLESTAD & LOUIS NASHELSKY