AUTOMATIC LPG REFILL BOOKING
ABSTARCT
Booking for a LPG Cylinder Refill and getting it delivered in time is getting
easier. The new system is an Indian Oil initiative to introduce simpler ways for
customers to book for their Indane gas LPG refill. The system is provided and
maintained by Cellular Ltd. SMS (Short Message Service): This too is a 24 x 7
facility where Indane customers can send an SMS from their mobile phone to
register for the service and subsequently book for refills. • If the customer is using
SMS facility for the first time, then SMS IOC < STD Code + Distributor's T e l .
N u m b e r > <Consumer Number> to the unique Idea number for your city. For
example, in case the distributor's telephone number in Delhi is 26024289 and
consumer number is QX00827C, SMS shall be sent as follows: IOC 01126024289
QX00287C. For subsequent bookings, send SMS IOC to the same number. With a
view to provide better services to the customers and to reduce the scope for
irregularities, we have introduced the facility of refill booking through Short
Messaging Service (SMS).and also if an gas leakage is detected automatically
main supply will OFF in order to avoid fire accident.
1. INTRODUCTION
Pervasive computing (also known as ubiquitous computing) brings to light a
new genre of computing where in the comput-er completely pervades the life of
the user. Pervasive compu-ting applications promise seamless integration of
digital infra-structure with their interconnected devices and services into our
everyday lives . In India the supply of LPG through pipelines is not possible due
to shortage of LPG production . As technology being improved many gas agencies
or distributors have implemented IVRS these days although due to daily busy
schedules, cus-tomer finds very difficult to book new cylinder, and also it is very
dangerous when a LPG gas leakage occurs in any domes-tic usage, chemical
industry or in any other applications. This paper provides automatic booking of
LPG cylinder and to overcome the problem of LPG leakage.
IVRS system was borne from general complaints of consum-ers that landline
phones of their distributors were either busy or no one answered the call promptly.
With this system, a con-sumer can approach the gas agency by dialing a toll-free
(or non-free) number and later will have to follow the interactive directions.
Finally, the system will announce the customer number and confirms the customer
number and also confirms the refill of cylinder by pressing 1. Here with most
people who are illiterate find it difficult in handling call or unable to use the higher
end technology .
So our proposal is to complete-ly automate the process of refill booking
without human inter-vention that accordingly will help consumer against foul play.
Our system is also intended to help consumers to upgrade their safety standards,
act in accordance with statutory requirements on environmental commitments and
most impor-tantly the basic function being prevented by accidents and protect life
and property from disasters. The primary objective of our paper is to measure the
gas present in the cylinder when weight of the cylinder reached below the fixed
load, using the pervasive sensors . The gas retailer gets the order for a new cylinder
and the house owner (consumer) receives the message about the same and the
details about the booking proceedings. And the sec-ondary objective is to provide
any malfunction in gas system in order to prevent damage or explosion of LPG.
1.1 EMBEDDED SYSTEM
Embedded systems are controllers with on chip control which consist of
microcontrollers, input and output devices, memories etc. and it can be used for a
specific application. A small computer designed in a single chip is called single
chip microcomputer. A single chip microcomputer typically includes a
microprocessor, RAM, ROM, timer, interrupt and peripheral controller in a single
chip. This single chip microcomputer is also called as a microcontroller. These
microcontrollers are used for variety of applications where it replaced the
computer. The usage of this microcomputer for specific applications, in which the
microcontroller a part of application is called, embedded systems.
Computing systems are everywhere. It’s probably no surprise that millions
of computing systems are built every year destined for desktop computers
(Personal Computers, or PC’s), workstations, mainframes and servers. Thus an
embedded system is nearly any computing system other than a desktop, laptop, or
mainframe computer.
1.2 CHARACTERISTICS OF AN EMBEDDED SYSTEM
1.2.1 SINGLE-FUNCTIONED
An embedded system usually executes only one program, repeatedly. For
example, a pager is always a pager. In contrast, a desktop system executes a
variety of programs, like spreadsheets, word processors, and video games, with
new programs added frequently.
1.2.2 TIGHTLY CONSTRAINED
All computing systems have constraints on design metrics, but those on
embedded systems can be especially tight. A design metric is a measure of an
implementation’s features, such as cost, size, performance, and power. Embedded
systems often must cost just a few dollars, must be sized to fit on a single chip,
must perform fast enough to process data in real-time, and must consume
minimum power to extend battery life or prevent the necessity of a cooling fan.
1.2.3 REACTIVE AND REAL-TIME
Many embedded systems must continually react to changes in the system’s
environment, and must compute certain results in real time without delay. For
example, a car's cruise controller continually monitors and reacts to speed and
brake sensors. It must compute acceleration or decelerations amounts repeatedly
within a limited time; a delayed computation result could result in a failure to
maintain control of the car.
1.3. EMBEDDED PROCESSOR TECHNOLOGY
1.3.1 STANDARD GENERAL PURPOSE PROCESSORS (SGPP)
Standard general purpose processors (SGPP) are carefully designed
and offer a maximum of flexibility to the designer. Programming SGPPs can be
done in nearly every high-level language or assembly language and requires very
little knowledge of the system architecture. As SGPPs are manufactured to high
numbers, NRE is spread upon many units. Nevertheless SGPPs are more expensive
than other solutions like FPGAs or single purpose processors, when used in
products with a large number of selling units. These devices are produced to work
in a broad range of environments since those are not designed to be energy
efficient nor high-performance for specific applications.
Examples for standard general purpose processors are:
Motorola ARM
Atmel AVR
Microchip PIC
Intel Pentium-(I/II/III/IV)-Series
1.3.2. STANDARD SINGLE PURPOSE PROCESSORS (SSPP)
Standard single purpose processors, sometimes called peripherals, are ”off-
the-shelf” pre-designed processors, optimized for a single task, such as digital
signal processing, analog to digital conversion, timing, etc. SSPPs are
manufactured in high quantities, so NRE is spread upon many units. The total costs
per SSPP unit are lower than for custom single purpose processors.
1.3.3. CUSTOM SINGLE PURPOSE PROCESSORS (CSPP)
Custom single purpose processors are designed for a very specific task. This
implies less flexibility, longer time-to-market and high costs. On the other hand
CSPP can be designed to be very small, fast and power-efficient. Examples for
such CSPP are FPGAs or more general PLDs.
1.3.4. APPLICATION SPECIFIC INSTRUCTION-SET PROCESSORS
(ASIP)
ASIPs are basically standard general purpose processors which are extended
by domain-specific instructions. This allows domain-relevant tasks to be
performed highly optimized, while keeping the flexibility of general purpose
processors.
1.3.5. SPECIFIC DESIGN OF EMBEDDED SYSTEM PROCESSOR
When designing an embedded system, usually, the first step is to specify the
intended or required functionality. This is mostly done using natural language,
after the functionality is specified it is formalized in some sort of definition
language such as VHDL or Verilog. Subsequently the resulting design is converted
into hardware or software components which are then implemented.
1.4 IMPORTANCE
Radiation level measurement and monitoring of parameters like temperature,
gas etc., in nuclear power plants is a very important problem that imposes the
implementation of distributed surveillance systems. Usually these type of systems
use networks of sensors for detection. Besides the quality and sensibility of the
sensors, the connections to the monitoring system of large number of sensor raise
some difficulties when wires are used. The advantage of using these radio
technologies are the flexibility in topology implementation and reorganization of
the measurement systems as well as the possibility of realization of portable
devices connected to a measuring and monitoring system with in an area. Security
and accuracy are major concerns. So to overcome these issues the data should be
encrypted to provide security for secret data. In this paper we implement Tiny
Encryption Algorithm (TEA) at the either nodes.
1.5 CONCERNS OF SYSTEM
Three of the major concerns regarding the implementation of wireless
technologies in nuclear power and nuclear reactors include electromagnetic and
radio frequency interference (EMI/RFI), cyber security, and installation issues such
as the coverage of the wireless signal and integration with existing data networks.
Because of the continued evolution of wireless technology and the efforts of the
U.S. Nuclear Regulatory Commission (NRC) and similar governing entities to
maintain up-to-date requirements, the steps performed today to install a wireless
system into a plant may be inadequate five years from now.In nuclear power
plants, redundancy is an important aspect of defense against mishaps. Wireless
sensors provide an easy, cost-effective path to redundancy without compromising
safety. For example, a process parameter may be measured with both wired and
wireless sensors. The wired sensors can be designated as the primary element and
used all the time, and the wireless sensors can be designated as the back-up
element and used only when the wired sensor is unavailable. This has a number of
advantages.
BLOCK DIAGRAM
TRANSMITTER
RECEIVER
HARDWARE DESCRIPTION
5.1 POWER SUPPLY
5.1.1 CIRCUIT DIAGRAM
Fig 5.1.2Circuit Diagram of Power Supply
5.1.2 WORKING PRINCIPLE
The AC voltage, typically 220 rms, is connected to a transformer, which
steps that ac voltage down to the level of the desired DC output. A diode
rectifier then provides a full-wave rectified voltage that is initially filtered by a
simple capacitor filter to produce a dc voltage. This resulting dc voltage usually
has some ripple or ac voltage variation. A regulator circuit removes the ripples
and also remains the same dc value even if the input dc voltage varies, or the
load connected to the output dc voltage changes.
5.1.3 BLOCK DIAGRAM
Fig 5.1.3 Block Diagram of power supply
5.1.4 TRANSFORMER
The potential transformer will step down the power supply voltage (0-230V)
to (0-6V) level. Then the secondary of the potential transformer will be connected
to the precision rectifier, which is constructed with the help of op-amp. The
advantages of using precision rectifier are it will give peak voltage output as DC;
rest of the circuits will give only RMS output.
5.1.5 RECTIFIER
A rectifier is an electrical device that converts alternating current to direct
current or at least to current with only positive value, a process known as
rectification. Rectifiers are used as components of power supplies and as detectors
of radio signals.
5.1.6 BRIDGE RECTIFIER
When four diodes are connected as shown in the power supply circuit
diagram, is called Bridge rectifier. The input to the circuit is applied to the
diagonally opposite corners of the network, and the output is taken from the
remaining two corners.
LOAD IC
FILTERRECTIFIERTRANSFORMER
5.1.7 VOLTAGE REGULATORS
Voltage regulators comprise a class of widely used ICs. Regulator IC units
contain the circuitry for reference source, comparator amplifier, and overload
protection all in a single IC. IC units provide regulation of either a fixed positive
voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can
be selected for operation with load currents from hundreds of milli amperes to tens
of amperes, corresponding to power ratings form milli watts to ten watt. A fixed
three-terminal voltage regulator has an unregulated dc input voltage, V i, applied to
one input terminal, a regulated dc output voltage, Vo , from a second terminal,
with the third terminal connected to ground.
5.1 ATMEGA 8
5.1.1 CONCEPTS OF MICROCONTROLLER :
Microcontroller is a general purpose device, which integrates a number of the
components of a microprocessor system on to single chip. It has inbuilt CPU,
memory and peripherals to make it as a mini computer. A microcontroller
combines on to the same microchip:
The CPU core
Memory(both ROM and RAM)
Some parallel digital i/o
Micro controllers will combine other devices such as:
A timer module to allow the micro controller to perform tasks for certain
time periods.
A serial i/o port to allow data to flow between the controller and other
devices such as a PIC or another Microcontroller.
An ADC to allow the Micro controller to accept analogue input data for
processing.
Micro controllers are :
Smaller in size
Consumes less power
Inexpensive
Micro controller is a stand alone unit ,which can perform functions on its
own without any requirement for additional hardware like i/o ports and external
memory.
The heart of the microcontroller is the CPU core. In the past, this has traditionally
been based on a 8-bit microprocessor unit. For example Motorola uses a basic
6800 microprocessor core in their 6805/6808 microcontroller devices.
In the recent years, microcontrollers have been developed around
specifically designed CPU cores, for example the microchip PIC range of
microcontrollers.
5.1.2 MICROCONTROLLER ATmega8:
PIN DIAGRAM:
5.1.2.1 FEATURES:
High-performance, Low-power Atmel®AVR® 8-bit Microcontroller
• Advanced RISC Architecture
130 Powerful Instructions – Most Single-clock Cycle Execution
32 × 8 General Purpose Working Registers
Fully Static Operation
Up to 16MIPS Throughput at 16MHz
On-chip 2-cycle Multiplier
High Endurance Non-volatile Memory segments
8Kbytes of In-System Self-programmable Flash program memory
512Bytes EEPROM
1Kbyte Internal SRAM
Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
Data retention: 20 years at 85°C/100 years at 25°C(1)
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and
Capture
Mode
Real Time Counter with Separate Oscillator
Three PWM Channels
8-channel ADC in TQFP and QFN/MLF package
Eight Channels 10-bit Accuracy
6-channel ADC in PDIP package
Six Channels 10-bit Accuracy
Byte-oriented Two-wire Serial Interface
Programmable Serial USART
Master/Slave SPI Serial Interface
Programmable Watchdog Timer with Separate On-chip Oscillator
On-chip Analog Comparator
Special Microcontroller Features
Power-on Reset and Programmable Brown-out Detection
Internal Calibrated RC Oscillator
External and Internal Interrupt Sources
Five Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,
and
Standby
I/O and Packages
23 Programmable I/O Lines
28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF
Operating Voltages
2.7V - 5.5V (ATmega8L)
4.5V - 5.5V (ATmega8)
• Speed Grades
0 - 8MHz (ATmega8L)
0 - 16MHz (ATmega8)
5.1.2.2 PIN DESCRIPTIONS:
1.VCC Digital supply voltage.
2.GND Ground.
3. XTAL1/XTAL2/TOSC1/TOSC2
Port B (PB7..PB0)
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port B output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port B pins
that are externally pulled low will source current if the pull-up resistors are
activated. The Port B pins are tri-stated when a reset condition becomes
active,even if the clock is not running. Depending on the clock selection fuse
settings, PB6 can be used as input to the inverting Oscillator amplifier and input to
the internal clock operating circuit.Depending on the clock selection fuse settings,
PB7 can be used as output from the inverting Oscillator amplifier.If the Internal
Calibrated RC Oscillator is used as chip clock source, PB7..6 is used as
TOSC2..1input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is
set.
Port C (PC5..PC0)
Port C is an 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port C output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C pins
that are externally pulled low will source current if the pull-up resistors.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that
the electrical characteristics of PC6 differ from those of the other pins of Port C.If
the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level
on this pin for longer than the minimum pulse length will generate a Reset, even if
the clock is not running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD7..PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins
that are externally pulled low will source current if the pull-up resistors are
activated. The Port D pins are tri-stated when a reset condition becomes
active,even if the clock is not running.
RESET
Reset input. A low level on this pin for longer than the minimum pulse
length will generate a reset, even if the clock is not running. Shorter pulses are not
guaranteed to generate a reset.
5.1.2.3 ATmega8(L)
AVCC AVCC is the supply voltage pin for the A/D Converter, Port C (3..0),
and ADC (7..6). It should be externally connected to VCC, even if the ADC is not
used. If the ADC is used, it should be connected to VCC through a low-pass filter.
Note that Port C (5..4) use digital supply voltage, VCC.AREF AREF is the analog
reference pin for the A/D Converter.
5.1.2.4 ARCHITECTURAL OVER VIEW
5.3 LCD DISPLAY:
An LCD is a small low cost display. it is easy to interface with a micro-
controller because of an embedded controller (the black blob on the back of the
board). This controller is standard across many displays (hd 44780), which means
many micro-controllers have libraries that make displaying messages as easy as a
single line of code.
Fig 5.3 Schematic view of 16 x 2 LCD display
5.3.1 FEATURES:
5 x 8 dots with cursor
built-in controller (ks 0066 or equivalent)
+ 5v power supply (also available for + 3v)
1/16 duty cycle
b/l to be driven by pin 1, pin 2 or pin 15, pin 16 or a.k (led)
n.v. optional for + 3v power supply
5.3.2 ADDRESS CODE:
Fig 5.3.2 Address code for 16 x 2 LCD display
5.3.3 DETAILS OF 16 X 2 LCD DISPLAY:
Fig 5.3.3Pin details for 16 x 2 LCD display
5.4 KEY PAD (4X1 MATRIX)
This note describes an method of interfacing a matrix keyboard to EZ328
using minimum number of I/O ports. We use a 4x1 matrix keypad as an example.
It requires only five I/O ports. (In general, it takes n+1 ports to interface a nxn
matrix keyboard). It is a low cost solution. No TTL logic ICs are used. The
components mainly used in the interfacing circuitry include only diodes and
resistors which can greatly reduce the system cost and size of the product.
Fig.5.4., schematic view of 4x1 Keypad
Figure 5.4 shows a functional block diagram of the keyboard interface. As
seen in this diagram, there are two major parts.
• Interrupt & interfacing Circuity - generates interrupt to EZ328 when there is a
key pressed and provides connection to EZ328’s I/O ports
• Keyboard matrix - a 4x1 matrix keypad
The interrupt and interfacing circuit includes some diodes, resistors, pull-up
resistors and a NPN transistor.The transistor part is designed as an inverter for
generating interrupt signal to EZ328 when there is a key pressed. There are two
groups of diodes mainly for restricting signal flow in single direction so as to
enable this circuitry to identify the pressed key uniquely. One of these two groups
of diodes have been wired together to provide a “OR” function which in turn
allows any key pressed on each column of the keypad to signal the transistor part
for generating interrupt.
This solution demonstrates a simple mechanism to build a keyboard with
minimum I/O port used. In this application, we use a 4x4 matrix keypad as an
example. It requires only five I/O ports for interfacing. One of them is used for
generating the interrupt signal in the beginning and used as an I/O port for key
scanning operation afterwards. Detail of the method in scanning and identifying
the pressed key will be discussed in the section “SCAN KEYOperation”. It should
also be noted that in this design, EZ328 uses five ports for interfacing but only one
of them requires interrupt capability.
5.4.1 SCAN KEY OPERATION
Five ports are used for key scanning function in this system. One of them
(PD7) is used as the interrupt pin before a key is pressed. Before the key scanning
process starts, all of the I/O ports except the one with interrupt capability is
configured as output high. Then, when there is a key pressed, one of the columns
on the keypad changes state from low to high. As all the columns on the keypad
are wired together to form a “OR” logic to the base of the NPN transistor, it will
generate an active low interrupt signal to EZ328 and initiates the interrupt handler
to scan the pressed key.When the key scanning process begins, one of the five I/O
ports will be configured to output high while the other ports are configured to
input.
The states on all ports are then read and compared with the pattern recorded
in a predefined lookup table in order to locate which key is pressed. If the key is
not found, another port will be configured to output high instead and read the states
again. This process is repeated until all ports have been configured once to output
high or a key is found.Since the circuitry provides feedback paths, one of the input
port will change state from low to high by the output high port and the states
obtained can identify uniquely which key is being pressed.
5.5 ZIGBEE
5.5.1 UART
A universal asynchronous receiver/transmitter, abbreviated UART, is a
type of "asynchronous receiver/transmitter", a piece of computer hardware that
translates data between parallel and serial forms. UARTs are commonly used in
conjunction with communication standards such as EIA RS-232, RS-422 or RS-
485. The universal designation indicates that the data format and transmission
speeds are configurable and that the actual electric signaling levels and methods
(such as differential signaling etc.) typically are handled by a special driver circuit
external to the UART.
5.5.2 ZIGBEE
MIWI is a specification for a suite of high level communication protocols
using small, low-power digital radios based on the IEEE 802.15.4-2003 standard
for Low-Rate Wireless Personal Area Networks (LR-WPANs), such as wireless
light switches with lamps, electrical meters with in-home-displays, consumer
electronics equipment via short-range radio needing low rates of data transfer. The
technology defined by the MIWI specification is intended to be simpler and less
expensive than other WPANs, such as Bluetooth. MIWI is targeted at radio-
frequency (RF) applications that require a low data rate, long battery life, and
secure networking.
Fig.5.5.2 Schematic view of Zigbee
MIWI is a low-cost, low-power, wireless mesh networking standard. First,
the low cost allows the technology to be widely deployed in wireless control and
monitoring applications. Second, the low power-usage allows longer life with
smaller batteries. Third, the mesh networking provides high reliability and more
extensive range. It is not capable of powerline networking though other elements
of the OpenHAN standards suite promoted by openAMI and UtilityAMI deal
with communications co-extant with AC power outlets. In other words, MIWI is
intended not to support powerline networking but to interface with it at least for
smart metering and smart appliance purposes. Utilities, e.g. Penn Energy, have
declared the intent to require them to interoperate again via the openHAN
standards.
Typical application areas include
Home Entertainment and Control — Smart lighting, advanced temperature
control, safety and security, movies and music Wireless Sensor Networks —
Starting with individual sensors like Telosb/Tmote and Iris from Memsic.
5.5.3 DEVICE TYPES
There are three different types of MIWI devices:
MIWI coordinator (ZC):
The most capable device, the coordinator forms the root of the network
tree and might bridge to other networks. There is exactly one MIWI coordinator in
each network since it is the device that started the network originally. It is able to
store information about the network, including acting as the Trust Center &
repository for security keys.
MIWI End Device (ZED):
Contains just enough functionality to talk to the parent node (either the
coordinator or a router); it cannot relay data from other devices. This relationship
allows the node to be asleep a significant amount of the time thereby giving long
battery life. A ZED requires the least amount of memory, and therefore can be less
expensive to manufacture than a ZR or ZC.
5.5.3 SOFTWARE AND HARDWARE
The software is designed to be easy to develop on small, inexpensive
microprocessors. The radio design used by MIWI has been carefully optimized for
low cost in large scale production. It has few analog stages and uses digital circuits
wherever possible.Even though the radios themselves are inexpensive, the MIWI
Qualification Process involves a full validation of the requirements of the physical
layer. This amount of concern about the Physical Layer has multiple benefits, since
all radios derived from that semiconductor mask set would enjoy the same RF
characteristics. On the other hand, an uncertified physical layer that malfunctions
could cripple the battery lifespan of other devices on a MIWI network. Where
other protocols can mask poor sensitivity or other esoteric problems in a fade
compensation response, MIWI radios have very tight engineering constraints: they
are both power and bandwidth constrained. Thus, radios are tested to the ISO
17025 standard with guidance given by Clause 6 of the 802.15.4-2006 Standard.
Most vendors plan to integrate the radio and microcontroller onto a single chip
getting smaller devices.
Fig.5.5.3 Pin connection of Zigbee
5.5.4 ELECTRICAL CHARACTERSTICS:
Fig.5.5.4 Electrical characteristics of Zigbee
5.5.5 DEVICE OVERVIEW
The MRF24J40MA is a 2.4 GHz IEEE Std. 802.15.4™ compliant, surface
mount module with integrated crystal, internal voltage regulator, matching
circuitry and PCB antenna. The MRF24J40MA module operates in the non-
licensed 2.4 GHz frequency band and is FCC, IC and ETSI compliant. The
integrated module design frees the integrator from extensive RF and antenna
design, and regulatory compliance testing, allowing quicker time to market.
5.6 CIRCUIT DIAGRAM OF ZIGBEE
Fig 5.5.6 MRF24J40MA Block Diagram
Fig 5.5.7 Circuit Diagram
5.5.7 FEATURES:
2.4 GHz IEEE Std. 802.15.4™ RF Transceiver Module :
IEEE Std. 802.15.4™ Compliant RF Transceiver .
Supports MIWI®, MIWI™, MIWI™ P2P and
Proprietary Wireless Networking Protocols
Small Size: 0.7” x 1.1” (17.8 mm x 27.9 mm),
Surface Mountable
Integrated Crystal, Internal Voltage Regulator,
Matching Circuitry and PCB Antenna
Easy Integration into Final Product – Minimize
Product Development, Quicker Time to Market
Radio Regulation Certification for United States
(FCC), Canada (IC) and Europe (ETSI)
Compatible with Microchip Microcontroller
Families (PIC16F, PIC18F, PIC24F/H, dsPIC33 and PIC32)
Up to 400 ft. Range
Operating Voltage: 2.4-3.6V (3.3V typical)
Temperature Range: -40°C to +85°C Industrial
Simple, Four-Wire SPI Interface
Low-Current Consumption:
-RX mode: 19 mA (typical)
-TX mode: 23 mA (typical)
-Sleep: 2 µA (typical)
RF/Analog Features:
ISM Band 2.405-2.48 GHz Operation
Data Rate: 250 kbps
-94 dBm Typical Sensitivity with +5 dBm
Maximum Input Level
+0 dBm Typical Output Power with
36 dB TX Power Control Range
Integrated Low Phase Noise VCO, Frequency Synthesizer and PLL Loop
Filter .
Digital VCO and Filter Calibration .
Integrated RSSI ADC and I/Q DACs
Integrated LDO .
High Receiver and RSSI Dynamic Range .
MAC/Baseband Features:
Hardware CSMA-CA Mechanism, Automatic ACK Response and FCS
Check
Independent Beacon, Transmit and GTS FIFO
Supports all CCA modes and RSS/LQI
Automatic Packet Retransmit Capable
Hardware Security Engine (AES-128) with CTR, CCM and CBC-MAC
modes .
Supports Encryption and Decryption for MAC Sublayer and Upper Layer .
5.5.8 Applications
·2.4-GHz IEEE 802.15.4 systems
·RF4CE remote control systems (64-KB flash and higher)
·MIWI systems (256-KB flash)
·Home/Building automation
·Lighting systems
·Industrial control and monitoring
·Low-Power wireless sensor networks
·Consumer electronics
·Health care
GSM MODEM:
Model of gsm modem
• Sim300 - gsm/gprs engine.
• Works on frequencies egsm 900 mhz, dcs 1800 mhz and pcs 1900 mhz.
• Sim300 features gprs multi-slot class 10/ class 8 (optional) and supports the gprs coding
schemes.
Feautures of gsm kit:
This gsm modem is a highly flexible plug and play quad band gsm modem for direct and
as integration to rs232.
• Supports features like voice, data/fax, sms, gprs and integrated tcp/ip stack.
• Control via at commands.
• Use ac – dc power adaptor with following ratings · dc voltage : 12v /1a.
• Current consumption in normal operation 250ma, can rise up to 1amp while transmission.
Introduction:
This document describes the hardware interface of the simcom sim300 module that connects to
the specific application and the air interface. As sim300 can be integrated with a wide range of
applications, all functional components of sim300 are described in great detail. This document
can help you quickly understand sim300 interface specifications, electrical and mechanical
details. With the help of this document and other sim300 application notes, user guide, you can
use sim300 module to design and set-up mobile applications quickly
Product concept :
Designed for global market, sim300 is a tri-band gsm/gprs engine that works on frequencies
egsm 900 mhz, dcs 1800 mhz and pcs1900 mhz. Sim300 provides gprs multi-slot class 10
capability and support the gprs coding schemes cs-1, cs-2, cs-3 and cs-4.
With a tiny configuration of 40mm x 33mm x 2.85 mm , sim300 can fit almost all the space
requirement in your application, such as smart phone, pda phone and other mobile device.
The physical interface to the mobile application is made through a 60 pins board-to-board
connector, which provides all hardware interfaces between the module and customers’ boards
except the rf antenna interface.
The keypad and spi lcd interface will give you the flexibility to develop customized
applications.
Two serial ports can help you easily develop your applications.
Two audio channels include two microphones inputs and two speaker outputs. This can be
easily configured by at command.
Sim300 provide rf antenna interface with two alternatives: antenna connector and antenna pad.
The antenna connector is murata mm9329-2700. And customer’s antenna can be soldered to the
antenna pad. The sim300 is designed with power saving technique, the current consumption to
as low as 2.5ma in sleep mode. The sim300 is integrated with the tcp/ip protocol ,extended
tcp/ip at commands are developed for customers to use the tcp/ip protocol easily, which is very
useful for those data transfer applications.
Sim300 key features at a glance:
Application interface:
All hardware interfaces except rf interface that connects sim300 to the customers’ cellular
application platform is through a 60-pin 0.5mm pitch board-to-board connector. Sub-interfaces
included in this board-to-board connector are described in detail in following chapters:
• Power supply
• Dual serial interface
• Two analog audio interfaces
• Sim interface
Electrical and mechanical characteristics of the board-to-board connector are specified. There we
also order information for mating connectors.
Power supply:
The power supply of sim300 is from a single voltage source of vbat= 3.4v...4.5v. In some
case, the ripple in a transmit burst may cause voltage drops when current consumption rises to
typical peaks of 2a, so the power supply must be able to provide sufficient current up to 2a. For
the vbat input, a local bypass capacitor is recommended.
A capacitor (about 100μf, low esr) is recommended. Multi-layer ceramic chip (mlcc)
capacitors can provide the best combination of low esr and small size but may not be cost
effective. A lower cost choice may be a 100 μf tantalum capacitor (low esr) with a small (1 μf to
10μf) ceramic in parallel, which is illustrated as following figure. And the capacitors should put
as closer as possible to the sim300 vbat pins. The following figure is the recommended circuit.
The following figure is the vbat voltage ripple wave at the maximum power transmit phase, the
test condition is vbat=4.0v, vbat maximum output current =2a, ca=100 μf tantalum capacitor
(esr=0.7ω) and cb=4.7μf
Power supply pins on the board-to-board connector:
Eight vbat pins of the board-to-board connector are dedicated to connect the supply
voltage; four gnd pins are recommended for grounding. Backup can be used to back up the rtc.
Minimizing power losses:
Please pay special attention to the supply power when you are designing your
applications. Please make sure that the input voltage will never drops below 3.4v even in a
transmit burst during which the current consumption may rise up to 2a. If the power voltage
drops below 3.4v, the module may be switched off. Using the board-to-board connector will be
the best way to reduce the voltage drops. You should also take the resistance of the power supply
lines on the host board or of battery pack into account.
Monitoring power supply:
To monitor the supply voltage, you can use the “at+cbc” command which include three
parameters: voltage percent and voltage value (in mv). It returns the battery voltage 1-100
percent of capacity and actual value measured at vbat and gnd.
The voltage is continuously measured at intervals depending on the operating mode. The
displayed voltage (in mv) is averaged over the last measuring period before the at+cbc command
was executed.
Power up and power down scenarios Turn on sim300:
Sim300 can be turned on by various ways, which are described in following
• Via pwrkey pin: starts normal operating mode
• Via rtc interrupt: starts alarm modes
Turn on sim300 using the pwrkey pin (power on):
You can turn on the sim300 by driving the pwrkey to a low level voltage
For period time. The power on scenarios illustrate as following figure.
Turn on sim300 using the rtc (alarm mode):
Alarm mode is a power-on approach by using the rtc. The alert function of rtc makes the
sim300 wake up while the module is power off. In alarm mode, sim300 will not register to gsm
network and the software protocol stack is close. Thus the parts of at commands related with sim
card and protocol stack will not accessible, and the others can be used as well as in normal mode.
Use the at+calarm command to set the alarm time. The rtc remains the alarm time if sim300 was
power down by “at+cpowd=1” or by pwrkey pin. Once the alarm time expires and executed,
sim300 goes into the alarm mode. In this case, sim300 will send out an unsolicited result code
(urc):
Rdy alarm mode:
During alarm mode, using at+cfun command to query the status of software protocol
stack; it will return 0 which indicates that the protocol stack is closed. Then after 90s, sim300
will power down automatically. However, during alarm mode, if the software protocol is started
by at+cfun=1, 1 command, the process of automatic power down will not available. In alarm
mode, driving the pwrkey to a low level voltage for a period will cause sim300 to power down
Turn off sim300:
Following procedure can be used to turn off the sim300:
• Normal power down procedure: turn off sim300 using the pwrkey pin
• Normal power down procedure: turn off sim300 using at command
• Under-voltage automatic shutdown: takes effect if under-voltage is detected
• Over-temperature automatic shutdown: takes effect if over-temperature is detected
Turn off sim300 using the pwrkey pin (power down) :
You can turn off the sim300 by driving the pwrkey to a low level voltage for period time. The
power down scenarios illustrate as following figure. This procedure will let the module to log
off from the network and allow the software to enter into a secure state and save data before
completely disconnect the power supply. Before the completion of the switching off procedure
the module will send out result code:
Power down:
After this moment, no any at commands can be executed. Module enters the power down mode,
only the rtc is still active. Power down can also be indicated by vdd_ext pin, which is a low level
voltage in this mode.
Turn off sim300 using at command :
You can use an at command “at+cpowd=1” to turn off the module. This command will let the
module to log off from the network and allow the software to enter into a secure state and safe
data before completely disconnect the power supply.
Power down:
After this moment, no any at commands can be executed. Module enters the power down mode,
only the rtc is still active. Power down can also be indicated by vdd_ext pin, which is a low level
voltage in this mode
Under-voltage automatic shutdown:
Software will constantly monitors the voltage applied on the vbat, if the measured battery
voltage is no more than 3.5v, the following urc will be presented:
Power low warning:
If the measured battery voltage is no more than 3.4v, the following urc will be presented:
Power low down:
After this moment, no further more at commands can be executed. The module will log off from
network and enters power down mode, only the rtc is still active. Pow
Restart sim300 using the pwrkey pin :
You can restart sim300 by driving the pwrkey to a low level voltage for period time, same as
turn on sim300 using the pwrkey pin. Before restart the sim300, you need delay at least 500ms
from detecting the vdd_ext low level on. The restart scenarios illustrate as the following figure.
Power saving :
There are two methods to achieve sim300 module extreme low power. “at+cfun” is used to set
module into minimum functionality mode and /dtr hardware interface signal can be used to set
system to be sleep mode (or slow clocking mode).
Minimum functionality mode :
Minimum functionality mode reduces the functionality of the module to a minimum and, thus,
minimizes the current consumption to the lowest level. This mode is set with the “at+cfun”
command which provides the choice of the functionality levels <fun>=0,1,4
0: minimum functionality;
1: full functionality (default);
4: disable phone both transmit and receive rf circuits;
If sim300 has been set to minimum functionality by “at+cfun=0”, then the rf function and sim
card function will be closed, in this case, the serial ports is still accessible, but all at commands
need rf function or sim card function will not accessible. If sim300 has disable all rf function by
“at+cfun=4”, then rf function will be closed, the serial ports is still active in this case but all at
commands need rf function will not accessible. When sim300 is in minimum functionality or
has been disable all rf functionality by “at+cfun=4”, it can return to full functionality by
“at+cfun=1”.
Sleep mode (slow clocking mode) :
Through dtr signal control sim300 module to enter or exit the sleep mode in customer
applications. When dtr is in high level, at the same time there is no on air or audio activity is
required and no hardware interrupt (such as gpio interrupt or data on serial port), sim300 will
enter sleep mode automatically. In this mode, sim300 can still receive paging or sms from
network. In sleep mode, the serial port is not accessible.
Wake up sim300 from sleep mode :
When sim300 is sleep mode, the following method can wake up the module. Enable dtr pin to
wake up sim300; If dtr pin is pull down to a low level this signal will wake up sim300 from
power saving mode. The serial port will be active after dtr change to low level about 20m
Receive a voice or data call from network to wake up sim300;
Receive a sms from network to wake up sim300
Rtc alarm expired to wake up sim300;
Max232:
Pin diagram:
Pin diagram of max232
Features:
Meets or exceeds tia/eia-232-f and itu recommendation v.28
Operates from a single 5-v power supply with 1.0-_f charge-pump capacitors
Operates up to 120 kbit/s
Two drivers and two receivers.
±30-v input levels
Low supply current ( 8 ma typical)
Esd protection exceeds jesd 22
− 2000-v human-body model (a114-a)
Upgrade with improved esd (15-kv hbm) and 0.1-_f charge-pump capacitors is available
with the max202.
Description:
The max232 is a dual driver/receiver that includes a capacitive voltage generator to supply
tia/eia-232-f voltage levels from a single 5-v supply. Each receiver converts tia/eia-232-f inputs
to 5-v ttl/cmos levels. These receivers have a typical threshold of 1.3 v, a typical hysteresis of 0.5
v, and can accept ±30-v inputs. Each driver converts ttl/cmos input levels into tia/eia-232-f
levels. The driver, receiver, and
Voltage-generator functions are available as cells.
Logic circuit diagram:
Schematic diagram of max232 chip:
Figure 6 : Schematic diagram of max232
Test circuit:
Waveforms:
CHAPTER 6
SOFTWARE ANALYSIS
6.1 INTRODUCTION TO CODE VISION AVR
CodeVisionAVR is a C cross-compiler, Integrated Development
Environment and Automatic Program Generator designed for the Atmel AVR
family of microcontrollers. The program is a native 32bit application that runs
under the Windows 95, 98, NT 4, 2000 and XP operating systems. The C cross-
compiler implements nearly all the elements of the ANSI C language, as allowed
by the AVR architecture, with some features added to take advantage of specificity
of the AVR architecture and the embedded system needs. The compiled COFF
object files can be C source level debugged, with variable watching, using the
Atmel AVR Studio debugger.
The Integrated Development Environment (IDE) has built-in AVR Chip In-
System Programmer software that enables the automatical transfer of the program
to the microcontroller chip after successful compilation/assembly. The In-System
Programmer software is designed to work in conjunction with the Atmel STK500,
Kanda Systems STK200+/300, Dontronics DT006, Vogel Elektronik VTEC-ISP,
Futurlec JRAVR and MicroTronics' ATCPU/Mega2000 development boards. For
debugging embedded systems, which employ serial communication, the IDE has a
built-in Terminal. Besides the standard C libraries, the CodeVisionAVR C
compiler has dedicated libraries for:
• Alphanumeric LCD modules
• Philips I2C bus
• National Semiconductor LM75 Temperature Sensor
• Philips PCF8563, PCF8583, Dallas Semiconductor DS1302 and DS1307
Real Time Clocks
• Dallas Semiconductor 1 Wire protocol
• Dallas Semiconductor DS1820/DS18S20 Temperature Sensors
• Dallas Semiconductor DS1621 Thermometer/Thermostat
• Dallas Semiconductor DS2430 and DS2433 EEPROMs
• SPI
• Power management
• Delays
• Gray code conversion.
CodeVisionAVR also contains the CodeWizardAVR Automatic Program
Generator, that allows you to write, in a matter of minutes, all the code needed for
implementing the following functions:
• External memory access setup
• Chip reset source identification
• Input/Output Port initialization
• External Interrupts initialization
• Timers/Counters initialization
• Watchdog Timer initialization
• UART initialization and interrupt driven buffered serial communication
• Analog Comparator initialization
• ADC initialization
• SPI Interface initialization
• I2C Bus, LM75 Temperature Sensor, DS1621 Thermometer/Thermostat and
PCF8563, PCF8583,
• DS1302, DS1307 Real Time Clocks initialization
• 1 Wire Bus and DS1820/DS18S20 Temperature Sensors initialization
• LCD module initialization
CONCLUSION:
The product design prototype is constructed and when a Small amount of
LPG is brought near the system, the system sensor detects the leakage and sends
the SMS to housemates and activates the alarm and switches on the exhaust fan.
Also system prototype continuously monitors the LPG level of the cylinder and
books the cylinder automatically through SMS using GSM modem.
Top Related