You are on page 1of 4

Circuit Cellar, the Magazine for Computer Applications.

Reprinted
by permission. For subscription information, call (860) 875-2199, or
www.circuitcellar.com. Entire contents copyright ©2005 Circuit
Cellar Inc. All rights reserved.

FEATURE ARTICLE by Mitchell Levinn

Water Pressure Sensor


ZigBee-Based NozzleMon Aids Firefighters
CONTEST WINNER

Delivering water through a fire hose is harder than it looks. NozzleMon, a ZigBee-based water
pressure sensor, enables pump operators to safely deliver water at appropriate pressures.

I magine you’re a firefighter and a call


has come in for a structure fire blazing
pump operator has an extremely diffi-
cult and stressful job. Ensuring that the
tive motion of the nozzle at the end of
a water hose. The system then relays
through an unoccupied two-story home. water supply is available and delivered the information back to the person in
The chief has already arrived on the at the correct pressure to operate nozzles charge of the water supply. In this article
scene and has requested two teams, one is difficult. Why? A pump operator can I’ll explain how I built the system and
for ventilation and one to form a nozzle see only the output pressure from the developed the software to support it.
team for a hand line to attack the fire pump; he can’t see the actual delivered
through the front door. As the driver of water pressure at the nozzle. There may SYSTEM OVERVIEW
the first arriving engine, you’re also the be tools and burning structure between In the NozzleMon system, a
pump operator, supporting the first-in the firefighters with the nozzle and the Freescale ZigBee family evaluation
nozzle team. After you park the truck, pump panel, so the pump operator might board, the 13192-EVB, serves as the con-
you put the pump in gear and watch 250′ not be able to see the nozzle being used. troller in the pump panel unit (PPU) to
of preconnected hose line play out of the Using various heuristics, experience, receive and display the nozzle’s data. An
hose bed as the nozzle team, tools and and guesswork, the pump operator MC13192 sensor application reference
nozzle in hand, rushes toward the front must set the output pressure so that design (SARD) board serves as the nozzle
door as smoke and flames escape through the proper nozzle pressure is available unit (NU) processor that manages the
the first-floor windows. The ventilation at the end of the hose line. Factors sensors near the nozzle.
team then radios in that they have venti- like the length and diameter of a hose, Pressure sensing is performed by an
lated the structure. The nozzle team sig- a hose’s elevation in a structure, and MPXH6400A integrated silicon pres-
nals that it’s ready. You charge the line the kinks and perturbations of a hose sure sensor, which I used to replace
and they disappear into the building. may result in water pressure at the the MPXM2010GS on the breakaway
In such a scenario, you’d probably nozzle being radically different from board from the 2004 Freescale Wireless
welcome the fact that you’re the what was intended. Incorrect pressure Design Challenge. Position sensing is
pump operator. After all, it sounds may result in reduced nozzle function- achieved with the x- and y-axis
like the easiest task, right? Actually, ality at best and insufficient water (MMA6261Q) and z-axis (MMA1260D)
taking nothing away from all those delivery at worst. Sometimes even the accelerometers on the SARD board.
other people on the fire scene, the correct pressure can be a problem. A Even after substituting the MPXH6400A
fully charged hand line can be difficult for the MPXM201GS, a mechanical
to handle. Controlling a hose line with transducer was required to scale down
up to 200 psi of water in a hot, smoky, the pressure and isolate the water
dark environment while you’re wearing
heavy gear can be problematic. It’s easy
to slip and lose control of the hand line,
which, if fully charged and open, tends
to flail about dangerously. And again,
the pump operator may not even realize
Photo 1—The three pieces of the nozzle unit include that there is a problem at the other end
the SARD board, the MPXH6400A pressure sensor on Photo 2—The nozzle unit is the black box on the right.The
of the hose. The NozzleMon can help!
the right, and the battery. The external connection port brass nipple contains the plunger assembly that reduces the
is attached to the pressure sensor with heat-shrink tub- The NozzleMon system monitors pressure and isolates the water side from the pressure sen-
ing to make a sturdy airtight connection. both the nozzle pressure and the rela- sor.The gauge gathers data for the calibration look-up table.

20 Issue 184 November 2005 CIRCUIT CELLAR® www.circuitcellar.com


pressure up to 58 psi of air (not water).
Thus, the external connection port
can’t be directly attached to the fire
hose stream, which is a stream of
water at up to 200 psi.
The tubing leading from the
MPXH6400A sensor to the external port
was cut to fit and then heated and
shrunk in place, forming an airtight,
Photo 3—Starting at the upper left and working clockwise,
the components include an On/Off switch, the cross-con- stable connection to the external port.
nect board, the battery (all three on the top), the evaluation All of the posts supporting the boards Photo 4—The front of the pump panel unit includes a
board on the bottom, the red push button, and the red and battery inside the box were epoxied display, a red LED, a power switch, and a button for set-
LED on the left. The LCD assembly is in the middle. in place rather than screwed through the ting the pressure.
box. With the lid sealed in place, the
from the transducer. external port is the only entrance to the This was built with off-the-shelf parts
The PPU includes a 2 × 24 LCD for box. This isolates the nozzle unit from the local hardware store, so precise
displaying pressure readings and mes- from the firefighting environment. calculations involving the spring
sages. It also has an ultra-bright red Output from the MPXH6400A sensor constants, air volumes, and other key
LED for indicating problems, a large is connected to a free A/D port (AD3) parameters weren’t available in advance.
push button for indicating a set pres- on the MC9S08GT60. A 5-V power Instead, a gauge I placed on the high-
sure (SP), and a toggle switch for turn- source supplies it, so the output volt- pressure input to the chamber enabled
ing on the power. age can exceed the input limit (VDD = me to create a look-up table to perform
The PPU continuously polls the noz- 3 V) on the processor. But the input the mapping from output readings to
zle for data, updating its displays with pressure is limited to less than half the actual nozzle pressure. Photo 2
every successful reception. The LCD the device range, so a voltage divider shows the completed assembly.
normally displays the latest (instanta- isn’t needed to protect the A/D input. Photo 3 shows the inside of the
neous) pressure reading on the first line Plumbing was needed to step the pump panel unit. The off-the-shelf
and the average of the previous 16 read- pressure down and isolate the water LCD assembly has a 4-bit data path
ings on the second line. If the red but- stream from the pressure sensor. I and 3-bit control path from the proces-
ton is pressed, the current average tapped into a hose coupling and point- sor. In addition to those seven lines,
pressure becomes the set pressure. If ed a brass elbow upstream to give the LED and push button switch each
the average pressure is more than 10 psi access to the water stream. From there take one I/O bit from the processor,
above or below the set pressure, a the stream enters a brass nipple where using nine of the 10 bits brought out
“Pressure out of range” message appears a plunger assembly keeps the water on to J107 on the evaluation board. All
on the first line of the LCD and the red one side while being supported by a 10 lines from J107 as well as all 14 bits
LED illuminates. These error indications spring on the other. The plunger com- from the LCD assembly are brought
will remain until the average returns to presses the air in the spring chamber via ribbon cables to a connectorized
the set pressure range or the red button is while the spring counters the pressure, cross-connect board where connecting
pressed again to clear the set pressure. providing the reduction to the working wires and resistors are placed. Power
Other messages that may appear on pressure range. and ground lines are also distributed
the first line include “No on the cross-connect board.
signal from nozzle!” and Power is derived from the
“Nozzle out of control!” Freescale breakaway power
Each message is also Nozzle unit (NU) board supplied with a 9-V
accompanied by the illumi- battery.
MMA6261Q MMA1260D
nation of the red LED. The x- and y-axis z-axis Photo 4 shows the front
NozzleMon doesn’t have Accelerometer Accelerometer of the pump panel unit.
Pump panel unit (PPU)
audible output because the Working pump operators typi-
SARD Red LED
environments that pump 13192-EVB cally wear gloves and aren’t
Red push button
operators find themselves 4 inclined to deal with small
in are usually noisy. MPXH6400A LCD controls, so I chose the front
Pressure sensor
panel interface for its sim-
HARDWARE SPECIFICS plicity and ease of operation.
Air pressure from hose line
The system’s design is sim- water pressure transducer The power switch is a large
ple (see Figure 1). Let’s first toggle. The large pressure
examine the nozzle unit (see set button is easy to push.
Figure 1—With all the communication network interface complexity managed on the EVB
Photo 1). The MPXH6400A and SARD boards, the system design is simple. The PPU is easy to use. The NU can The bright red LED is visi-
sensor reads the absolute easily manage other sensors to provide even more information to the pump operator. ble even in daylight.

www.circuitcellar.com CIRCUIT CELLAR® Issue 184 November 2005 21


SOFTWARE DEVELOPMENT Listing 1—Read the ADC channel for the pressure and use the look-up table to adjust for calibration.
The software for this project is
based on the lighting demonstration ATD1PE=0x8b; // Enable desired ADC channels (AD3 for pressure,
software that comes with Freescale’s // AD0, AD1, AD7 for x,y,z)
ATD1C=0xE0; // Set prescale to 4-, 8-bit conversion
SMAC package. The pump panel
unit’s code simply sends out a polling ATD1SC = 0x03; // Read pressure
message for the nozzle unit to respond while ((ATD1SC & 0x80) != 0x80){}
and then waits for a response or a pressure = ATD1RH;
// Adjust pressure with calibration data
timeout. The only possible responses
pressure = lut[pressure-81]; // Offset to zero - then index into
from the nozzle unit are either a noz- // calibration table
zle pressure to report or a “nozzle out
of control” message, which is encoded
as a nozzle pressure of 255 psi (an oth- flag that the nozzle is out of control. with electronics. Incorporating the pres-
erwise impossible reading). The pressure value returned is derived sure reduction/water isolation in the
Managing the front panel switches from using the actual reading from the body of the nozzle would be easy, and,
and displays is a straightforward sensor to index into a look-up table of of course, the local pressure gauge and
process, especially because the LCD values that was collected during the external plumbing would be eliminated.
assembly contains a Hitachi device’s calibration (using the pressure Integrating electronics in the nozzle
HD44780U controller that’s compati- gauge mounted on the brass nipple). body would enable even more func-
ble with the routines included in the Listing 1 shows the code to read the tionality. You could implement a han-
LCD interface in the SMAC package. pressure sensor and index into the dle grasp indicator with a Freescale
More sophisticated communication and look-up table. Keeping the response MC33794 e-field imaging IC. This
display management will be required payload to a single byte reduces the would help determine if the nozzle is
with multiple nozzles to monitor. required bandwidth and pump panel out of control. For example, if the
Multiple nozzles can be accommo- unit’s computational requirements. accelerometers indicate rapid motion
dated in the same software structure and there is nothing gripping the han-
by polling to see how many nozzles FUTURE MODIFICATIONS dle, that’s a pretty good indication of a
are enabled and adjusting the front The design I’ve described in this loss of control. With nozzle-mounted
panel to display the pressure and state article is truly a prototype—more of a electronics, other operational parameters
of the nozzles. Polling each of the noz- proof-of-concept than a ready-for-pro- could be sent back to the pump panel
zles enables the pump panel unit to duction model. Although the firefight- unit such as the position of the valve
control the flow of the data and man- ers who have seen the NozzleMon and the selection of the stream type.
age the available bandwidth as opposed work have been enthusiastic about To increase the radio’s distance and
to having the nozzle units broadcast using it, it isn’t ready yet for real sce- improve reliability in hazardous envi-
continuously. This should keep enough narios. It wouldn’t be practical to ronments, you can use an inexpensive
bandwidth available for other 802.15.4 enter a burning structure with a hunk hose-coupling repeater. Typical fire hoses
applications to be used on the fire scene. of plumbing and a plastic box hanging are 50′ long. Incorporating a ZigBee
The only computations performed from your nozzle. And although using router node in the female hose cou-
by the pump panel unit are the cur- only the on-board antennas on the plings would ensure that the next net-
rent average pressure and the status of SARD and evaluation board gives fine work node would be no more than 50′
the set pressure warning. The average reception over a modest distance away. Leveraging ZigBee’s self-organ-
pressure is the sum of the last 16 valid under good conditions, a real fire izing network topology (with the
readings right-shifted four places. The scene may involve significant dis- pump panel unit as the ZigBee coordi-
set pressure is determined by storing tances and suboptimal conditions. nator and the nozzle units as reduced
the current average when you depress To be practical, the nozzle unit has function devices) makes for a fast,
the red button. After it’s set, the cur- to be incorporated in the nozzle itself. flexible, and reliable fire scene network.
rent average is compared with the The handle of most fire nozzles is a With repeaters already scattered
stored pressure upon each valid pres- solid stem just waiting to be stuffed around the fire scene, other ZigBee
sure reading. If the current average is devices could be developed to leverage
more than 10 psi above or below the Nozzle the network infrastructure. ZigBee
set pressure, the LED lights up and a devices could monitor things such as
message appears. NU = ZigBee the performance of a self-contained
end device
The nozzle unit code is also simple. ZigBee router breathing apparatus (SCBA—an air
It waits for a polling request from the PPU = ZigBee pack), a firefighter’s health (e.g., blood
coordinator
pump panel unit and takes readings pressure, temperature, and respiration
Figure 2—Inexpensive ZigBee routers at the hose cou-
from its sensors when a request is rate), and fire conditions (e.g., temper-
plings ensure good connectivity between the pump
received. The response is a single byte panel unit and the nozzle unit (and other devices that ature and air composition). It even
that’s either the current pressure or a may be developed and used to fight fires). may be possible to incorporate pres-

22 Issue 184 November 2005 CIRCUIT CELLAR® www.circuitcellar.com


sure sensors in the hose-coupling for its support and encouragement as go to ftp://ftp.circuitcellar.com/pub/
devices, allowing for the immediate I worked on this project. Circuit_Cellar/2005/184.
determination of the location of a
Mitchell Levinn is an electrical engi-
hose line problem within 50′. Having
neering consultant who specializes in SOURCES
live data from inside the fire scene
embedded controllers and custom 2 × 24 LCD (LCD-107)
would be a powerful tool for making
designs. He also serves as a volunteer All Electronics (distributor)
tactical firefighting decisions. And,
firefighter and emergency medical www.allelectronics.com
most importantly, it would make the
technician in his community. You may
fire environment safer for firefighters. 13192-EVB, MC13192 SARD board,
contact Mitchell at cc@levinn.com.
Figure 2 shows how the ZigBee devices MMA6261Q and MMA1260D
would be placed around the fire scene. accelerometers, and MPXH6400A sensor
Power management is another thing PROJECT FILES Freescale Semiconductor
needing modification to prepare the To download the code and schematics, www.freescale.com
design for real-world scenarios. One of
the original design goals was to have
the NozzleMon function transparently
for the interior firefighter. A firefighter
shouldn’t have to go through extra steps
to enable the NozzleMon’s functionality.
He should be able to use the nozzle
(and other equipment) just as before.
In order to avoid having a power-on
switch that must be activated manually,
a pressure-activated switch would be
used to conserve battery power when
the system isn’t in use. This would
ensure power is applied when the noz-
zle is active. Having the nozzle unit and
the intermediate routers power on auto-
matically when the hose line is charged
to at least a few pounds per square inch
would satisfy the transparency require-
ment and conserve battery power.

INTEGRATION
The ZigBee platform coupled with
the wide array of Freescale transducers
is an effective system that will bring
much-needed automation and data
collection capabilities to the fire
scene. Ever more sophisticated fire-
fighting devices and equipment (from
nozzles to trucks to chemical fire sup-
pressants) are continually being put
into service, but it’s difficult to inte-
grate the new technologies with the
existing apparatus and, more impor-
tantly, people.
Being able to provide real-time oper-
ating data with systems like the
NozzleMon will make firefighters
safer and more effective. It will also
enable the efficient use of firefighting
technologies. I

Author’s note: Special thanks to the


Hoag’s Corners Volunteer Fire
Company of East Nassau, New York,

www.circuitcellar.com CIRCUIT CELLAR® Issue 184 November 2005 23

You might also like