Wireless Driver Cabin Display for Trailers
A
Report
ON
WIRELESS DRIVER CABIN DISPLAY
FOR TRAILERS USING ZIGBEE
By
Name of the Students ID No.
Kartik Gandhi 2008A3PS150P Anupam Maurya 2007B2A3499P
AT
Ingersoll Rand Engineering & Technology Centre, Bangalore
A Practice School-II Station of
Wireless Driver Cabin Display for Trailers using ZigBee
BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
(December, 2011)
Wireless Driver Cabin Display for Trailers using ZigBee
A
Report
ON
WIRELESS DRIVER CABIN DISPLAY
FOR TRAILERS USING ZIGBEE
By
Name of the Students ID No.
Kartik Gandhi 2008A3PS150P Anupam Maurya 2007B2A3499P
Prepared in partial fulfillment of the course
BITS C412/BITS C413 - Practice School II
AT
Ingersoll Rand Engineering & Technology Centre, Bangalore
A Practice School-II Station of
BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
Wireless Driver Cabin Display for Trailers using ZigBee
(December, 2011)
ii
Wireless Driver Cabin Display for Trailers using ZigBee
ACKNOWLEDGEMENTS
We are grateful to Mr. K.S Ravichandran, Head – Advance Engineering Division India and Mr. Naveen Sankeshwar, Engineering Leader-Global controls & Enterprise Services, Bangalore for giving us this opportunity to work at Ingersoll Rand Engineering and Technology Centre, Bangalore. We are also extremely thankful to Mr. Nagaraj C.L. (Senior Software engineer – Enterprise Services) and Mr. Rishi (Technology Lead – Enterprise Services) for guiding and mentoring us. We had invaluable contribution from Mr. Rohit Acharya (Senior Software Engineer-Enterprise Services) who was directly involved in the project development. Mr. Raghu M.B. (Software Engineer-Enterprise Services) was instrumental with his constant guidance and support. We would like to extend our heartiest thanks to the entire Climate Solutions team for their warmth and for making us feel an integral part of the Ingersoll Rand, Bangalore family within no time
We are also grateful to Prof. G. Sundar, Deputy Director-cum-Dean (Practice School Division) for finding us eligible to enroll for the Practice School Program and for giving us the opportunity to work at Ingersoll Rand, Bangalore.
We are also thankful to Prof. Niranjan Swain, Dean, Practice School Division.
We also wish to express our deepest gratitude to Mr. Madhukar M.V. our Faculty-in-charge, who taught us everything about the program as well as for encouraging us to work our level best and make this program a success.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE PILANI (RAJASTHAN)
Practice School Division
Station: Ingersoll Rand Engineering & Technology Centre Centre: Bangalore
Duration: 5.5 months
Date of Start: July 4, 2011
Date of Submission: December 5, 2011
Title of the Project: Wireless Driver’s Cabin Display using ZigBee
Student ID Student Name Student Discipline
2007B2A3499P Anupam Maurya B.E.(Hons.) Electrical & Electronics and M.Sc. Chemistry
2008A3PS150P Kartik Gandhi B.E. (Hons.) Electrical & Electronics
Name & Designation Mr. Nagaraj CL, Senior Software Engineer – Enterprise of the Expert: Service
Mr. Rishi, Tech Lead-Enterprise Service
PS Faculty: Mr Madhukar M.V.
Key Words: ThermoKing, BeeKit , ZigBee, UART, DATAPAC protocol
Project Area: Embedded Systems
Abstract: The ThermoKing, cold refrigeration trucks and trailers, a product of Ingersoll
Rand, has a controller in the trailer unit which is interfaced with many sensors receives
temperature and alarm information. The alarms are indicated through the status light
which a driver sees it in his rear view mirror and has to stop the vehicle and get down to
clear the alarm. This is inconvenient during rains, snow and storms and also time
consuming. To avoid this we intend to display the temperature and alarm notifications
in Driver’s cabin on an existing HMI called TSD currently employed in all ThermoKing
trucks and trailers. Temperature can be set and Alarms cleared by pressing buttons on
TSD. This we propose to do wirelessly using ZigBee wireless 802.15.4 standard.
Signature of Student Signature of PS Faculty
ii
Wireless Driver Cabin Display for Trailers using ZigBee
Signature of Student DateBIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE
PILANI (RAJASTHAN)
PRACTICE SCHOOL DIVISION
Response Option Sheet
Station: Ingersoll Rand Engineering & Technology Centre Center: Bangalore
ID No. & Name(s): Anupam Maurya – 2007B2A3499P Kartik Gandhi – 2007A3PS150P Title of the Project: Wireless Driver’s Cabin Display for Trailers using ZigBee
Usefulness of the project to the on-campus courses of study in various disciplines. Project should be scrutinized keeping in view the following response options. Write Course No. and Course Name against the option under which the project comes.
Code No. Response Option Course No.(s) & Name1. A new course can be designed out of this
project.N.A.
2. The project can help modification of the course content of some of the existing Courses
N.A.
3. The project can be used directly in some of the existing Compulsory Discipline Courses (CDC)/ Discipline Courses Other than Compulsory (DCOC)/ Emerging Area (EA), etc. Courses
Applicable. EA
4. The project can be used in preparatory courses like Analysis and Application Oriented Courses (AAOC)/ Engineering Science (ES)/ Technical Art (TA) and Core Courses.
N.A.
5. This project cannot come under any of the above mentioned options as it relates to the professional work of the host organization.
Applicable
_________________ ________________ Signature of Student Signature of Faculty
_________________ Date: Signature of Student
_________________
ii
Wireless Driver Cabin Display for Trailers using ZigBee
Signature of StudentDate:
ii
Wireless Driver Cabin Display for Trailers using ZigBee
TABLE OF CONTENTS
S.No ContentsPage No.
1. INTRODUCTION 2
2. ABOUT ZIGBEE 4
2.1 Application 4
2.2 Basic Software Architecture 5
2.3 Reliability Measures offered by ZigBee 7
2.4 Security Measures offered by ZigBee 8
3. PRESENT TECHNOLOGY 9
4. PROJECT DESCRIPTION 10
4.1 UART Communication 10
4.2 Over the Air Communication 11
5. HARDWARE AND SOFTWARE TOOLS USED 12
5.1 Hardware 12
5.1.1 Freescale ZigBee Network Node: 13
5.1.2 Freescale ZigBee Sensor Node: 13
5.1.3 Freescale ZigBee Low Power Node: 14
5.2 Software 14
6. CONCLUSION 15
ii
Wireless Driver Cabin Display for Trailers using ZigBee
7. FUTURE IMPROVEMENT IN THE PROJECT 16
8. REFERENCES 17
ii
Wireless Driver Cabin Display for Trailers using ZigBee
1. INTRODUCTION
The objective of the project is ‘To set up a Wireless In-cabin display for the Trailer’s
Driver using ZigBee, to display Trailer’s Temperature and Alarm Notification.’
A brief about ZigBee, ZigBee is a specification for a suite of high level communication
protocols using small, low-power digital radios based on an IEEE 802 standard for
personal area networks. The technology defined by the ZigBee specification is intended
to be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee is
targeted at radio-frequency (RF) applications that require a low data rate, long battery
life, and secure networking. ZigBee has a defined rate of 250 kbps best suited for
periodic or intermittent data or a single signal transmission from a sensor or input
device. The name ZigBee refers to the waggle dance of honey bees after their return to
the beehive.
ZigBee operates in the industrial, scientific and medical (ISM) radio bands; 868 MHz in
Europe, 915 MHz in the USA and Australia, and 2.4 GHz in most jurisdictions worldwide.
Data transmission rates vary from 20 to 250 kilobits/second.
The ZigBee network layer natively supports both star and tree typical networks, and
generic mesh networks. Every network must have one coordinator device, tasked with
its creation, the control of its parameters and basic maintenance. Within star networks,
the coordinator must be the central node. Both trees and meshes allow the use of ZigBee
routers to extend communication at the network level.
About the project, The Trailer units equipped with the Transport Temperature Control
Systems manufactured by Thermo King Corporation have a Human Machine Interface
(HMI) placed within them. This HMI is used to display many parameters of the
Refrigeration system. This project will wirelessly extend the Display of the Current
Trailer’s Temperature from the Controller in the Trailer to the Display in Driver’s Cabin.
Apart from this, refrigerator is also monitored continuously and if there is any abnormal
behaviour then this is intimated through displaying alarms. This wireless system will
intimate the type of alarm occurred. Which can be then cleared by the driver through
his TSD by pressing buttons. The Alarms will be cleared individually. We will also
provide the capability to set the Set Point temperature from the TSD. The value entered
ii
Wireless Driver Cabin Display for Trailers using ZigBee
through TSD will be relayed down to Controller through ZigBee framework and set by
the controller.
An important parameter in HVAC systems is the Return Air temperature. This
parameter can’t be changed by the user. It can only be read. We will display the this
important parameter on the TSD.
The advantages of this feature would be:
Unfavourable weather conditions such as Heavy Rain, Snowfall, Storms will not
prevent the driver from assessing the Alarm status, thereby increasing the
Driver’s comfort
The driver will be intimated of the Alarm in the cabin itself and hence can carry
out rectification steps quickly.
Driver will no longer be disturbed as he will not have to look out for the Status
Light which starts blinking when an alarm occurs.
Wired communication between the In-cabin HMI and Trailer’s Controller can be
avoided using wireless ZigBee Communication.
This added feature will be add on the services provided and will increase user
interaction with the system. The project makes use of the prevalent technology
already in place and hence the original setup need not be modified.
Also the many more functionalities can be added in a similar manner which will
make the system more complete.
Figure1: A Block Diagram of Product implemented on Thermo King Trailer
ii
Wireless Driver Cabin Display for Trailers using ZigBee
1.1 Business benefits
• No similar technology exists in the market.
• This feature can be implemented both in trucks and trailers
• No new product or protocol needs to be created for the implementation.
• Apart from that the feature will add value for customers and hence benefit the
business.
1.2 Why the final concept was selected over others?
ZigBee is a new technology
• Simple to implement,
• Less expensive
• Low power requirements over Bluetooth and WiFi
• Various Profiles for Home Automation, Health Care, Smart Energy have been
created in ZigBee but there is no dedicated profile for transportation/
automobiles.
• By slightly modification in the profiles, a custom profile can be easily created.
This saves a lot of ground work.
1.3 Project Validation and Status
Checked for handling the errors that might occur due to wrong UART
transmission.
• Over the air messages have been checked by Freescale Sniffer and were found to
be complying ZigBee protocol.
• The system involves interfacing ZigBee modules to TSD and Trailer Controller.
• The interface to TSD has be successfully implemented and thoroughly checked
for proper functioning.
• The system, however, has not been validated on an actual trailer and driver
cabin.
• The main limitation in implementing on trailer & driver cabin is interference
from the metal walls between them.
The product as defined in the scope is ready for implementation. It is
successfully able to display and control few parameters.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
2. ABOUT ZIGBEE
ZigBee is a worldwide open standard for wireless radio networks in the monitoring and
control fields. The standard was developed by the ZigBee Alliance (an association of
international companies) to meet the following principal needs:
low cost
ultra-low power consumption
use of unlicensed radio bands
cheap and easy installation
flexible and extendable networks
integrated intelligence for network set-up and message routing
Some of the above requirements are related - for example, the need for extremely low
power consumption is motivated by the use of battery-powered nodes which can be
installed cheaply and easily, without any power cabling, in difficult locations.
2.1 Application
Application areas that are suitable for ZigBee networks are likely to have the following
characteristics or requirements:
low data rates (less than 250kbps)
nodes which are idle (not transmitting/receiving) for long periods
node locations where cables would be difficult or expensive to install
a need to modify the network (add, remove or move nodes) while in service
The following are typical application areas in which ZigBee provides a low-cost solution
(this is not an exhaustive list):
Commercial Building and Home Automation: Electronic control within a
building or home can be implemented through wireless networks - example
ii
Wireless Driver Cabin Display for Trailers using ZigBee
applications are HVAC (heating, ventilation and air-conditioning), lighting,
curtains/blinds, doors, locks and home entertainment systems.
Security: Another important application within commercial buildings and the
home is security – both intruder and fire detection.
Healthcare: This field employs sensors and diagnostic devices that can be
networked by means of a wireless network. Applications include monitoring
during healthcare programs such as fitness training, in addition to medical
applications such as patient monitoring.
Vehicle Monitoring: Vehicles usually contain many sensors and diagnostic
devices, and provide ideal applications for wireless networks. A prime example
is the use of pressure sensors in tyres, which cannot be connected by cables.
Agriculture: Wireless networks can help farmers monitor land and
environmental conditions in order to optimize their crop yields. Such networks
may require wide geographical coverage, but ZigBee addresses this issue by
offering network topologies that allow the relaying of messages from node to
node across the network.
2.2 Basic Software Architecture
ZigBee offers high-level functionality concerned with network structure, message
routing and security. This functionality is provided by the ZigBee software layer.
Figure 2: ZigBee Software Architecture
ii
Wireless Driver Cabin Display for Trailers using ZigBee
This layer sits above another layer concerned with low-level network operation such as
addressing and message transmission/reception – this is referred to as the
Physical/Data Link level. The application is the highest level software, sitting above the
ZigBee layer.
The Physical/Data Link level is based on the IEEE 802.15.4 wireless network standard,
described below.
IEEE 802.15.4 Foundation
As indicated above, the ZigBee software sits on top of the Physical/Data Link level,
which is provided by the IEEE 802.15.4 standard. This standard brings many of the
fundamental principles of ZigBee networks, including:
Ultra-low power consumption
Use of unlicensed radio bands
Easy installation
Low cost
ZigBee builds on the IEEE 802.15.4 functionality by adding capabilities for more flexible
network topologies, intelligent message routing and enhanced security measures.
The Physical/Data Link level comprises two IEEE 802.15.4 layers:
MAC (Media Access Control) sub-layer – Layer concerned with the interface to
the physical transmission medium (radio, in this case). It exchanges data bits
with this medium, as well as exchanging data bits with the layer above.
PHY (Physical) layer – Layer responsible for addressing i) for outgoing data it
determines where the data is going; ii) for incoming data it determines where
the data has come from. It is also responsible for assembling data packets or
frames to be transmitted and for decomposing received frames.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
The Network Layer handles addressing and routing by invoking actions in the MAC
layer. Its tasks include:
Starting the network
Accessing the Network Address
Adding devices to and removing them from the network
Routing messages to their intended destinations
Applying security to outgoing messages
Implementing route discovery in Mesh Topologies and storing routing table
implementation
The ZDO Management Plane
This plane spans the APS and NWK, and allows the ZDO to communicate with these
layers when performing its internal tasks. It also allows the ZDO to deal with requests
from applications for network access and security functions using ZDP messages.
Application Support Sub-layer (APS)
The APS is responsible for communication with the relevant application for example,
when a message arrives to illuminate LED, the APS layer relays this information to the
responsible application using the endpoint information in the message. The message is
passed through the Service Access Point which exists between the APS layer and each
application (endpoint).
Application Objects
Up to 240 application are supported on a single ZigBee node. Each application object is
an endpoint and is numbered between 1 and 240. The ZigBee Device Objects (ZDO) has
number of initialization and communication roles.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
2.3 Reliability Measures offered by ZigBee
ZigBee offers a range of techniques to ensure reliable communications. These are
described below.
Listen Before Send
The transmission scheme used in ZigBee avoids transmitting data when there is activity
on the chosen channel – this is known as Carrier Sense, Multiple Access with Collision
Avoidance (CSMA-CA).
Put simply, this means that before beginning a transmission, a node listens on the
channel to check whether it is clear. If activity is detected on the channel, the node
delays the transmission for a random amount of time and listens again. If the channel is
now clear, the transmission can begin, otherwise the delay-and-listen cycle is repeated.
Acknowledgements
An acknowledgement mechanism is built into ZigBee to ensure that messages reach
their destinations.
When a message arrives at its destination, the receiving device sends an
acknowledgement to say the message has been received. If the sending device does not
receive an acknowledgement within a certain time interval, it resends the original
message (it can resend the message several times until the message has been
acknowledged).
Alternative Routes
In a Mesh topology, the network has built-in intelligence to ensure that messages reach
their destinations. If the default route to the destination node is down, due to a failed
ii
Wireless Driver Cabin Display for Trailers using ZigBee
intermediate node or link, the network can “discover” and implement alternative routes
for message delivery.
2.4 Security Measures offered by ZigBee
ZigBee networks are highly secure. They incorporate measures to prevent intrusion
from potentially hostile parties and from neighboring ZigBee networks. To this end, a
“Security Toolbox” is included with ZigBee, offering the following features:
AES-based Encryption
A very high-security, key-based encryption system is used to prevent external agents
from interpreting ZigBee network data. Data is encrypted at the source and decrypted at
the destination using the same key - only devices with the correct key can decrypt the
encrypted data.
A 128-bit encryption system is employed based on the AES (Advanced Encryption
Standard) algorithm.
Message Timeout
This feature allows timed-out messages to be rejected, preventing message replay
attacks on the network.
A frame counter is added to a message, which helps a device determine how old a
received message is - the appended value is compared with a value stored in the device
(which is the frame counter value of the last message received). This value only
indicates the order of messages and does not contain time/date information. This
allows protection against replay attacks in which old messages are later re-sent to a
device.
An example of a replay attack would be a malicious individual recording the open
command for a garage door opener, and then later replaying it to gain entry to the
property.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
Access Control Lists
A provision of the underlying IEEE 802.15.4 standard is that a node is able to select the
other network nodes with which it is prepared to communicate. This is achieved using
an Access Control List (ACL), maintained in the device, which contains the MAC
addresses of nodes with which communication is allowed.
The source node of an incoming message is compared against this list, and the result is
passed to the higher layers which decide whether to accept or reject the message.
However, note that if messages are not encrypted, the alleged source of a message could
be falsified.
3. PRESENT TECHNOLOGY
At present the HMI on the Trailer displays the temperature of the Trailer. It also allows
changing the Set Temperature. In order to check the Trailer Temperature, the driver has
to see the Trailer HMI. In case any alarm occurs, the Trailer controller will display a
status light along with HMI displaying the alarm. Driver of the truck will recognize the
same by seeing this in the Rear View mirror. The driver needs to stop the vehicle and
need to walk to the end of the trailer to check HMI. And only after browsing through the
screens of HMI, he can recognize which alarm has occurred, the priority and the severity
of the Alarm decide the actions required. This entire process is inefficient as it
consumes time and can be inconvenient during rains and snowfall.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
4. PROJECT DESCRIPTION
The project involves 2 protocols of communication
UART Communication – to communicate to Trailer Microcontroller and to send
information to Truck Standard Display
Over the Air Transmission – to send the information from one ZigBee device to the
other ZigBee device
4.1 UART Communication
UART stands for Universal Asynchronous Receiver and Transmitter which translates data
between parallel and serial forms. UART is usually used in conjunction with
communication standards like RS232, RS422 or RS485.
The Universal Asynchronous Receiver/Transmitter (UART) takes bytes of data and
transmits the individual bits in a sequential fashion. At the destination, a second UART
re-assembles the bits into complete bytes. Each UART contains a shift register which is
the fundamental method of conversion between serial and parallel forms. Serial
transmission of digital information (bits) through a single wire or other medium is
much more cost effective than parallel transmission through multiple wires.
In our project we have two ZigBee devices; one in the trailer and the other in Driver’s
cabin. These devices talk to the Controller in Trailer and TSD (Truck Standard Display)
in Driver cabin through UART.
The commands are wrapped in DATAPAC protocol and it is in this format they are
received and issued to get the response from the Controller and TSD. TSD is
programmed to understand this protocol. The commands sent from TSD are processed
in the Cabin ZigBee Device and decoded to understand which command has been
issued. Upon completion of this step the ZigBee Device then sends over the air messages
or requests at 25O kbps which is received by the trailer ZigBee Device.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
In the trailer ZigBee Device a 13 second timer updates Alarms and Return Air
temperature in two respective variables. These variables are accessed and the value in
them is sent over the air when a request is acknowledged from Cabin ZigBee device by
trailer ZigBee device.
In the case of Clear Individual Alarms and set Set Point temperature alarm and Set Point
value is sent over the air along with a request. Upon successful acknowledgement by
Trailer ZigBee device the Alarm is cleared or the Set point temperature is set to the
specified value in the TSD.
4.1.1 UART communication on controller side:
The controller board is SR3 board and it has a serial port employing RS232 standard.
The ZigBee device has UART pins through which can receive data. The ZigBee board
works on CMOS logic 3.3V and RS232 standard generated voltages between -12V to
12V. In order to handshake these two standards we employ an IC called MAX3232
which converts CMOS logic to RS232 standard.
Once this interface is ready when the ZigBee device sends the commands in DATAPAC
protocol (standard employed in SR3 board and TSD (Cabin HMI) ) at the default baud
rate of 1200 the controller will reply back with information as requested by the specific
command sent from ZigBee device. This information is then processed and sent over the
Figure3: MAX 3232 IC
ii
Wireless Driver Cabin Display for Trailers using ZigBee
air to the ZigBee device in the Driver Cabin. The two commands used are GDT (Global
Data Table) read and Alarm Queue read.
4.1.2 UART communication on TSD side
The ZigBee device in cabin now has the temperature and Alarm information which
when requested by the TSD is sent to the TSD through UART. For this purpose the TSD
sends the commands to ZigBee device and it is programmed such that it can reply back
with the data it now has packaged in DATAPAC format for TSD to understand and
display for the Driver to view.
So far we are using SR3 communicator tool, a user interface tool which simulates TSD.
Here we use UART integrated virtual com port for communication between PC and
ZigBee device.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
4.1.3 UART Messages and Commands
DATAPAC commands used in the Cabin & Trailer Device
For Reading Temperature: Return Air Temperature: 0x16, 0x16, 0x56, 0x01, 0xBD, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x51
Return Air Temperature Read Response: 0x16, 0x16, 0xD6, 0x01, 0xBD, Value low, Value high, 0x84, 0x31, 0x50, 0x52, 0x52, 0x41, 0x20, 0x00, 0x00, 0x00, CRC, CRC
For Reading Alarms Queue: 0x16, 0x16, 0x41, 0x01, 0x00, 0x00, 0x00, 0x3D, 0xF3
Alarm Read Response: 0x16, 0x16, 0xC1, 0x01, 0x00, 0x0D, 0x00, 0x04, 0x0D, 0x0A, 0xFF, 0x84, 0x01, 0x5C, 0x00, 0x81, 0x01, 0x2A, 0xFF, 0x81, 0x05, 0x25, 0xFF, 0x84, 0x05, 0x05, 0xFF, 0x82, 0x01, 0x03, 0x00, 0x82, 0x41, 0x04, 0x00, 0x82, 0x41, 0xCB, 0x00, 0x82, 0x41, 0xCC, 0x00, 0x82, 0x41, 0x0C, 0x00, 0x84, 0x01, 0x02, 0x00, 0x82, 0x01, 0x06, 0xFF, 0x84, 0x01, 0x34, 0x00 , 0x82, 0x11, 0xD0, 0x30
For Writing Temperature GDT:
Set Point Temperature: 0x16, 0x16, 0x36, 0x07, 0x02, value lo, value hi, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, CRC, CRC
Set Point Temperature Write Response: 0x16, 0x16, 0xB6, 0x07, 0x02, value low, value high, 0x4C, 0x3B, 0x53, 0x45, 0x54, 0x50, 0x54, 0x01, 0x00, 0x00, CRC, CRC
LEGEND
Commands Send by TSD to ZigBee device (or Controller)
Response Send by ZigBee device (or Controller) to TSD
CRC Bytes
ii
Wireless Driver Cabin Display for Trailers using ZigBee
For Clearing Alarms:
0x16, 0x16, 0x52, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xC0, 0xF9
Clear Alarm Response: 0x16, 0x16, 0xD2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x98, 0xE1
4.2 Over the Air Transmission
The data obtained from the Micro Controller follows DATAPAC protocol which has its
own header, footer, payload and other auxiliary information. So in order to send the
required parameters i.e. Temperature and Alarm, they need to be extracted from the
data response obtained from the Microcontroller. So the ZigBee device interfaced to
Micro Controller extracts the necessary data and stores it in a buffer in its memory.
In order to successfully communicate to the other ZigBee device, this device has to
follow the ZigBee protocol and transmit the data Over the Air. The ZigBee protocol has
its own various Headers, Footer and Payload information. It becomes the task of the
device to formulate a command, which follows the protocol, uses the data obtained
earlier as a payload, and appends required Header information. This command is
encrypted and transmitted over the air.
The other ZigBee device sitting in the Driver Cabin always senses for information from
the air medium. So as soon as it receives information that follows ZigBee protocol, it
stores the command in its buffer. Then it processes (decrypts) the command to extract
the payload and store the information in its memory. This information becomes
Payload for the command that will be sent to the Truck Standard Display, which again
follows the DATAPAC protocol.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
Over the Air Messages
Read Return Air
61 88 30 11 11 00 00 6F 79 48 00 00 00 6F 79 0A 15 00 08 02 04 04 01 08 B8 00 53 00 04 00 00 00
Read Return Air response
61 88 BA 11 11 6F 79 00 00 48 00 6F 79 00 00 0A 14 00 08 02 04 04 01 08 1E 18 53 01 04 00 00 29 00 F0 00 00
Write Set Point
61 88 88 11 11 00 00 6F 79 48 00 00 00 6F 79 0A 16 00 08 02 04 04 01 08 7E 00 52 02 05 00 29 04 12 00 00
Write Set Point Response
61 88 97 11 11 6F 79 00 00 48 00 6F 79 00 00 0A 16 00 08 02 04 04 01 08 7C 18 52 04 00 04 12 00 00
Read Alarm
61 88 0B 11 11 00 00 6F 79 48 00 00 00 6F 79 0A 11 00 08 00 00 04 01 08 11 10 00 00 13 00 00 00
LEGEND:
MAC Header NWK Header
APS Header ZCL Header
ZCL Payload MAC Footer
ii
Wireless Driver Cabin Display for Trailers using ZigBee
Read Alarm Response
61 88 94 11 11 6F 79 00 00 48 00 6F 79 00 00 0A 13 00 08 00 00 04 01 08 C1 18 00 01 13 00 00 20 16 16 C1 01 00 0D 00 04 0D 0A FF 84 01 05 FF 82 01 03 00 82 41 04 00 82 41 CB 00 82 41 CC 00 82 41 5C 00 81 01 2A FF 81 05 0C 00 84 01 25 FF 84 05 02 00 82 01 06 FF 84 01 34 00 82 11 D0 30 00 00
Clear Alarm
61 88 88 11 11 00 00 6F 79 48 00 00 00 6F 79 0A 16 00 08 02 04 04 01 08 7E 10 00 02 13 00 00 00 00 00
ii
Wireless Driver Cabin Display for Trailers using ZigBee
4.3 Project Software Architecture
The design of the embedded software code in the project can be understood from the
FFD (Functional Flow Diagram) and User Case Diagram.
FFD
ii
Wireless Driver Cabin Display for Trailers using ZigBee
User Case Diagram
ii
Wireless Driver Cabin Display for Trailers using ZigBee
4.4 Description of the Set Up
In the current set up there are two ZigBee devices one in the Driver’s Cabin and other in Trailer. Let us name the ZigBee device in Cabin as Device 1 and the ZigBee device in the trailer as Device 2.
Device 1 is interfaced with the TSD and Device 2 with SR2 or SR3 controller board in Trailer. The SR2/ SR3 board is interfaced with various sensors through which various parameters like Return Air temperature, Set Point temperature, Discharge Air temperature; Alarms etc. are relayed and controlled.
We aim to display Return Air temperature and Alarm queue raised on TSD. Any number of alarms can be raised. The current POC is designed to handle 0 to 15 Alarms. We also control the Set Point temperature from the TSD and enable the TSD to clear individual alarms.
As mentioned previously the commands and replies from the Controller are in the DATAPAC protocol format.
Device 1 in Cabin is the router and Device 2 in Trailer is the coordinator. As soon as the two devices are turned on the Device 2 forms a network and Device 1 joins it. Then the Device 1 then sends a binding request to the coordinator which it acknowledges back and thus the two devices get bonded to each other and are ready for over the air communication.
Device 1 is interfaced with TSD through UART pins. After 10 seconds the TSD is programmed to issue one command after another. The commands are for reading the Return Air temperature, Write Set Point temperature and read Alarms Queue. Hence each command is sent after 30 sec cycle. The Set Point is set in the TSD through button press. Return Air cannot be changed and hence is only read commands for it are generated from TSD.
Whenever a command is issued the ZigBee Device 1 processes it and based on the Byte 3 of the sequence it determines which command is issued. This part is handled through the IR_ReadCommandFromTSD function in the Cabin ZigBee device. Based on Byte 3 now various functions are called which are IR_ReadTemperatureRequest, IR_ReadAlarmRequest and IR_WriteAttribute as shown in the Functional Flow Diagram.
These functions then send over the air request for read or write parameters which is then received and acknowledged by the Device 1 in the trailer. In case of Return Air temperature read and Alarm Queue Read just a request is generated, different for both. On reception of this request on the other end, the value/status of the Return Air temperature or Alarms is read respectively from the two variables on Device 2. Variable for Return Air temperature is a 16 bit unsigned integer and for Alarms Queue is an array of size 64. The value/information in them is then sent over the air to Device 1 in Cabin which are then displayed on the TSD as soon they are received along with the success acknowledgement.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
The two variables are updated by through a 20 Second timer which generates commands in the DATAPAC format to read the Return Air temperature and Alarms Queue from the Controller ( SR2/SR3).
In the Set Point write the value fed in the TSD through button press is sent over the air to Device 2 to be written through the controller. Similar is the case with individual Alarm Clear.
Figure4: Freescale MC1322x Network Node
ii
Wireless Driver Cabin Display for Trailers using ZigBee
5. HARDWARE AND SOFTWARE TOOLS USED
We have used the following hardware in our project.
5.1 Hardware
Freescale ZigBee Network Node based on ARM7 TDI processor with MC1322V
Micro Controller Unit (MCU)
Freescale ZigBee Sensor Node based on ARM7 TDI processor with MC1322V
MCU
Freescale ZigBee Low Power Node based on ARM7 TDI processor with MC1322V
MCU
CEL developed ZigBee Evaluation Board based on ARM 7 processor employing
MC13324V controller.
MAX3232 CMOS logic to RS232 converter
IAR JLink POD
SR3 Microcontroller installed in ThermoKing Trailer
Oscilloscope
Description of ZigBee Evaluation Boards:
5.1.1 Freescale ZigBee Network Node: It has the capability to
be all the possible three types of node
viz: Coordinator, Router and End
Device. The 1322x Network Node (NN)
is an IEEE 802.15.4 compliant
evaluation board based on the
Freescale MC1322x device. The heart of
the 1322x Network Node is Freescale’s
MC1322x 99-pin LGA Platform-in-
Package (PiP) solution that can be used
ii
Wireless Driver Cabin Display for Trailers using ZigBee
for wireless applications ranging from simple proprietary point-to-point connectivity to
complete ZigBee mesh networking. The MC1322x is designed to provide a highly
integrated, total solution, with premier processing capabilities and very low power
consumption. The 1322x Network Node provides a platform to evaluate the MC1322x
device, develop software and applications, and demonstrate IEEE 802.15.4 and ZigBee
networking capabilities. The Network Node surrounds the core device with capabilities
that provide a complete 802.15.4 radio, user interface, debugging capabilities,
connection to personal computers (PCs) and other devices, and portability.
5.1.2 Freescale ZigBee Sensor Node:
The 1322x Sensor Node is an IEEE 802.15.4 compliant evaluation board based on the
Freescale MC1322X device. The heart of the 1322x Sensor Node is Freescale’s MC1322x
99-pin LGA Platform-in-Package (PiP)
solution that can be used for wireless
applications ranging from simple
proprietary point-to-point connectivity to
complete ZigBee mesh networking. The
MC1322x is designed to provide a highly
integrated, total solution, with premier
processing capabilities and very low power consumption. The 1322x Sensor Node
provides a platform to evaluate the MC1322x device, develop software and applications,
and demonstrate IEEE 802.15.4 and ZigBee networking capabilities. The Sensor Node
surrounds the core device with capabilities that provide a complete 802.15.4 radio, user
interface, debugging capabilities, connection to personal computers (PCs) and other
devices, sensors, and portability.
5.1.3 Freescale ZigBee Network Node:
The 1322x-LPN is an IEEE 802.15.4 compliant wireless node based on the Freescale
MC1322x device. The heart of the 1322x-LPN
is Freescale’s MC1322x 99-pin LGA Platform-
in-Package (PiP) solution that can be used for
wireless applications ranging from simple
proprietary point-to-point connectivity to
ii
Wireless Driver Cabin Display for Trailers using ZigBee
complete ZigBee mesh networking. The MC1322x is designed to provide a highly
integrated, total solution, with premier processing capabilities and very low power
consumption. The 1322x-LPN provides a platform to evaluate the MC1322x device,
develop software and applications, demonstrate IEEE 802.15.4 and ZigBee networking
capabilities and implement low power operation. The small form factor illustrates a
small footprint, 2-layer printed circuit board (PCB) layout with integrated printed-wire
F-antenna. The LPB provides a GPIO connector to interface with application devices, a
separate second unbuffered UART connector, and a full JTAG debug port connector.
5.2 Softwares Used
Freescale Beekit Graphical User Interface
IAR Embedded Workbench 5.0 IDE
SR2/SR3 communicator UI
Docklight
ii
Wireless Driver Cabin Display for Trailers using ZigBee
6. CONCLUSION
So far we have achieved the primary objective to display the temperature and alarm
notification. The trailer device generates temperature and alarm parameters internally.
It passes the parameters over the air. The Cabin device receives the parameters, frames
the parameters as per the DATAPAC protocol. It sends it to Truck Standard Display via
UART.
From here on, we’ll be working on
• To interface the Trailer device to the Trailer Microcontroller, receive the data via
UART
• Besides just displaying the parameters in the driver cabin, this wireless
technology can also be used to allow the driver to control these parameters from
the Cabin itself. With this feature, the driver will not only be able to see the alarm
but can clear the alarm as well.
• This project using ZigBee devices can be used to allow the driver to control the
refrigerator parameters and other parameters like air discharge rate, air inflow
rate, pressure, humidity, pre-sets etc. from his cabin.
• Existing system in trucks can be made wireless too giving them all the
advantages of a wireless system.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
7. FUTURE IMPROVEMENT IN THE PROJECT
In the proposed project, the ZigBee network established will only transmit Current
Temperature and Alarms from Trailer Controller to the TSD. The same concept can be
extended to transmitting other necessary parameters to the Driver Cabin like air
discharge rate, air inflow rate, pressure, humidity, presets etc.
Also existing system in trucks can be made wireless too giving them all the advantages
of a wireless system.
ii
Wireless Driver Cabin Display for Trailers using ZigBee
8. REFERENCES
The following are the references we used for the report.
1. The Freescale website and Technical Support
2. ZigBee Alliance Documents
3. ZigBee Specification 2007
4. BeeStack Application Development Guide for ZigBee 2007
5. BeeStack Software Reference Manual for ZigBee 2007
6. Reference Manuals for Development Boards
7. Freescale Wireless Connectivity Toolkit User’s Guide
8. Freescale Platform Reference Manual for ZigBee 2007