NEW CONCEPTUAL WIRELESS DEVICE FOR INDUSTRIAL AND GENERAL PURPOSE AUTOMATION APPLICATIONS This thesis was submitted to the department of Electronics and Telecommunication Engineering of the University of Moratuwa in partial fulfillment of the requirements for the degree of Master of Science in Electronics & Automation By Jenitalal Reshantha Tharanga Conrad B.Sc. Eng. (Electronics & Telecommunication) Supervisor Dr. Ajith Pasqual Department of Electronics and Telecommunication Engineering University of Moratuwa Sri Lanka 2009 93918 Abstract Industrial Automation has greatly improved the industrial processes, efficiency and productivity during the past few decades. Programmable Logic Controllers (PLC) and Microcontrollers are playing a major role in industrial automation. Interconnectivity among machines and processes is a key factor in providing high production rates and also minimizes the need of having buffer stocks in the middle of the production lines. At present there are several world-wide accepted industrial communication standards for wired networks. High installation costs, high failure rates of connectors, difficulty in troubleshooting connectors, time wastage and cost when rearranging factory floors are the main issues that industries face with wired networks. The solution to overcome the above is Wireless Networks. Wireless Networks hold the potential to help industry to use energy and materials more efficiently, lower production costs, and increase productivity. Although wireless technology has taken a major leap forward with the boom in wireless personal communications, applications to industrial sensor systems are still at the cradle stage. There are some.wireless products entering in to the industrial applications which focus more on transmitting large amount of data and almost all of them are application specific. The objective of this research project IS to come-up with a wireless communication device that can be bought off the shelf and configured by the user himself by -simply downloading readymade binaries to suit the application. The fundamental feature of the device is its ability to configure according to the sensor output. Hence the user need not to select the device based on the sensor type. A prototype was developed for the research activities and was successfully tested in two different industrial environments. Firstly it was used monitor the status of 64 knitting machines from an office area, which eliminate the need of wiring 64 machines across the factory floor to a display board in a nearby office. This provided the freedom to re-arrange machines in any order and to move the display board anywhere in the office area without bothering about Wires. Secondly the prototype was tested on a plastic injection molding machine to eliminate wires between machine sensors and the PLC. Use of wireless sensors eliminate the issues with wire connector such as loose connections, short circuits and there by greatly reducing the machine downtime. The following pages describe in detail the above two scenarios and how the prototype is designed and developed to eventually meet the above mentioned objectives and achieve a single device that matches with any type of sensor and capable of transmitting the sensor data in a user defined format. D e c l a r a t i o n T h e v \ o r k s u b m i t t e d i n t h i s d i s s e r t a t i o n i s t h e r e s u l t o f m y o w n i n v e s t i g a t i o n . e x c e p t w h e r e o t h e r w i s e s t a t e d . I t h a s n o t a l r e a d y b e e n a c c e p t e d f o r a n y d e g r e e . a n d i s a l s o n o t b e i n g c o n c u r r e n t l y s u b m i t t e d f o r a n y o t h e r d e g r e e . i R t t J ' . . . . . . . . . . . . 0 0 0 0 ? 0 / ~ };;~.~~.7. 0 0 0 D a t e I e n d o r s e t h e d e c l a r a t i o n b y t h e c a n d i d a t e , ~ \\ \ ~\ • • • • • • • • • • • • • • • 0 • • • D r . A . q i - ~· \ ~: . . \ ? . . ~.~5 . . . . . . . . . . . . D a t e T a b l e o f C o n t e n t s D e c l a r a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 i \ b s t r a c t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i v D e d i c a t i o n · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · V I A c k n o w l e d g e m e n t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . \ " 1 1 L i s t o f F i g u r e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v n 1 L i s t o f T a b l e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x 1 I n t r o d u c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 . 1 L i t e r a t u r e S u r v e y " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ) 1 . 2 S c o p e o f R e s e a r c h P r o j e c t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 C o n c e p t & D e f i n i t i o n o f S p e c i f i c a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 . 1 C o n c e p t o f S m a r T x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 . 2 D e f i n i t i o n o f S p e c i f i c a t i o n s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 2 . 2 . 1 I n p u t S t a g e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0 2 . 2 . 2 T r a n s f e r F u n c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 ' ) ' ) " - · - · - ' O u t p u t S t a g e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 2 . 3 N e t v v o r k T o p o l o g y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 2 . 4 P r o t o c o l D e f i n i t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5 2 . 4 . 1 O S I 7 L a y e r M o d e l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5 2 . 4 . 2 T r a n s m i t t e r & R e c e i v e r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 7 2 . 4 . 3 P a c k e t f o r m a t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 2 . 5 T r a n s m i s s i o n & E r r o r C o n t r o l l i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 2 . 5 . 1 C l o c k P u l s e & H e a d e r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 2 . 5 . 2 P a c k e t D e t e c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0 3 D e v e l o p m e n t o f H a r d w a r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 3 . 1 D e v e l o p m e n t o f H a r d w a r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 3 . 1 . 1 I n p u t I n t e r f a c e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 3 . 1 . 2 B a s e S t a t i o n I n t e r f a c e · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2 2 3 . 1 . 3 M i c r o c o n t r o l l e r S e l e c t i o n ' ) " ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - - ' 3 . 2 D e v e l o p m e n t o f F i r m w a r e ;~ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . _ ) 3 . 2 . 1 P r o g r a m m i n g P r o c e d u r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 5 3 . 2 . 2 C o n f i g u r a t i o n I n f o r m a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 7 " I " - ' · - · - ' M i c r o c o n t r o l l e r P r o g r a m m i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 7 1 1 - - 4 D e v e l o p m e n t o f S o f t , v a r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 9 4 . 1 S o f t w a r e D e v e l o p m e n t - O p e r a t i o n a l M o d e . . . . . . . . . . . . . . . . . . . . . 2 9 4 . 2 S o f t w a r e D e v e l o p m e n t - C o n f i g u r a t i o n M o d u l e . . . . . . . . . . . . . . . . . . . . . 3 0 5 R e s u l t s & D i s c u s s i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 5 . 1 T e s t C a s e # 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 5 . 2 T e s t C a s e # 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 7 6 C o n c l u s i o n & F u t u r e W o r k s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 A R e f e r e n c e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5 1 1 1 A c l \ . n o w l e d g e m e n t T h i s r e s e a r c h p r o j e c t w o u l d h a v e n o t b e e n r e a l i z e d w i t h o u t t h e c o n t r i b u t i o n o f f o l l o \ v i n g w o n d e r f u l p e o p l e . I \ V i s h t o e x p r e s s m y h e a r t f e l t g r a t i t u d e t o D r . C h u l a n t h a K u l a s e k e r e f o r t h e e n c o u r a g e m e n t a n d s u p p o r t g i v e n t o m a k e t h i s a s u c c e s s . Y o u \ v e r e t h e g u i d a n c e w h i c h h e l p e d m e t o a l i g n m y a t t i t u d e i n t h e r i g h t d i r e c t i o n . I ' m g r e a t l y h o n o u r e d t o h a v e D r . A j i t h P a s q u a ! a s t h e s u p e r v i s o r . T h e t h o u g h t s a n d i d e a s t h a t y o u s h a r e d o p e n e d o u r m i n d s t o t h i n k b e y o n d b o u n d a r i e s . l t i s s i m p l y n o t p o s s i b l e t o c o m p l e t e t h i s p r o j e c t i f y o u w e r e n ' t t h e r e t o g u i d e . l w o u l d l i k e t o t h a n k a l l t h e l e c t u r e r s w h o s p e n t t h e i r v a l u a b l e t i m e a n d e f f o r t t o t e a c h u s d u r i n g t h i s M . S c . p r o g r a m a n d f o r s h o w i n g u s t h e w a y f o r w a r d . I s i n c e r e l y e x p r e s s m y g r a t e f u l n e s s t o t h e T e c h n i c a l D i r e c t o r a t E M C A C o m b i n e P v t L t d . M r . C o l l i n P e r e r a a n d t h e P r o d u c t i o n M a n a g e r a t T o r r o i d I n t e r n a t i o n a l P v t L t d . M r . J a l a k a W i c k r a m a s i n g h e f o r a l l o w i n g m e t o t e s t t h e S m a r T x a t t h e i r f a c t o r i e s . f i n a l l y I s p e c i a l l y t h a n k m y f a m i l y m e m b e r s f o r c o p i n g u p w i t h m e a n d e n c o u r a g i n g m e i n e v e r y p o s s i b l e w a y t o s u c c e s s f u l l y c o m p l e t e t h i s p r o j e c t . V I I L i s t o f F i g u r e s F i g u r e 1 . 1 ~Eliminate w i r e s f r o m s e n s o r s t o P L C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 F i g u r e 1 . 2 ~Monitor S t a t u s o f 6 4 M a c h i n e s F i g u r e 1 . 3 ~Honeywell- S T T 1 7 0 S m a r t T e m p ' " \ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 F i g u r e 1 . 4 ~ O M N E X T r u s t e d W i r e l e s s - O n e W a y S y s t e m . . . . . . . . . . . . . . . . . 4 F i g u r e 1 . 5 ~ E L P R O T e c h n o l o g i e s - E L P R O 5 0 5 U - K W i r e l e s s I / 0 . . . . . . . 5 F i g u r e 1 . 6 ~ P h e o n i x C o n t a c t - W i r e l e s s I n t e r f a c e . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 F i g u r e 2 . 1 ~ W i r e l e s s C o m m u n i c a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 F i g u r e 2 . 2 ~Proportional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I I F i g u r e 2 . 3 ~ I n v e r s e l y P r o p o r t i o n a l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 F i g u r e 2 . 4 ~Log t o L i n e a r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 F i g u r e 2 . 5 ~Linear t o L o g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 f i g u r e 2 . 6 ~High S e n s i t i v i t y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 F i g u r e 2 . 7 ~Analog t o T T L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 F i g u r e 2 . 8 ~Network T o p o l o g y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 F i g u r e 2 . 9 ~ O S I 7 L a y e r M o d e l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 6 F i g u r e 2 . 1 0 ~Packet F o r m a t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 F i g u r e 2 . 1 1 ~Normal C l o c k P u l s e T r a i n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9 F i g u r e 2 . 1 2 ~Modified C l o c k P u l s e T r a i n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9 F i g u r e 2 . 1 3 ~Invalid P a c k e t D e t e c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0 F i g u r e 3 . 1 ~Resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 F i g u r e 3 . 2 ~ S v ; i t c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 F i g u r e 3 . 3 ~Analog V o l t a g e F i g u r e 3 . 4 ~Digital V o l t a g e F i g u r e 3 . 5 ~Sensor C o n n e c t o r F i g u r e 3 . 6 ~ 1 2 C A d a p t e r F i g u r e 3 . 7 ~ S m a r T x C i r c u i t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2 2 ' ) ' ) · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · - - ) " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~-' · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2 4 f i g u r e 3 . 8 ~Base S t a t i o n C i r c u i t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4 F i g u r e 3 . 9 ~ S m a r T x C i r c u i t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 5 F i g u r e 3 . 1 0 ~Reading S m a r T x C o n f i g u r a t i o n F i g u r e 3 . 1 1 ~ W r i t i n g S m a r T x C o n f i g u r a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 6 ! 6 • • • • • • • • • • • • • • 0 • • • • • • • • • • • 0 . . . . . . . . . . F i g u r e 3 . 1 2 ~ C o n f i g B y t e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 7 f i g u r e 3 . 1 3 ~EEPROM M e m o r y M a p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 8 V l l l F i g u r e 4 . 1 - O p e r a t i o n a l M o d e S c r e e n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 9 f < i g u r e 4 . 2 - C o n f i g u r a t i o n M o d u l e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1 F i g u r e 4 . 3 - C o m m u n i c a t i n g w i t h S m a r T x D e v i c e . . . . . . . . . . . . . . . . . . . . . . . 3 2 F i g u r e 5 . 1 - L i n e a r E n c o d e r O u t p u t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 F i g u r e 5 . 2 - R e s i s t i v e L i n e a r C o n t r o l l e r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 F i g u r e 5 . 3 - L i n e a r C o n t r o l l e r C h a r a c t e r i s t i c s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 F i g u r e 5 . 4 - E n c o d e r & L i n e a r C o n t r o l l e r C h a r a c t e r i s t i c s . . . . . . . . . . . . . . . . . . . 3 6 F i g u r e 5 . 5 - S m a r T x T r a n s f e r F u n c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 6 F i g u r e 5 . 6 - S m a r T x O u t p u t v s D i s p l a c e m e n t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 7 F i g u r e 5 . 7 - C o l o u r B a t h T e m p e r a t u r e C o n t r o l l i n g C i r c u i t r y . . . . . . . . . . . . . . 3 8 F i g u r e 5 . 8 - T h e r m o c o u p l e T y p e s a n d C h a r a c t e r i s t i c s . . . . . . . . . . . . . . . . . . . . . . . 3 9 F i g u r e 5 . 9 - W i r e l e s s S o l u t i o n u s i n g S m a r T x . . . · · · · · · · · . . . . . . . . . · · · · · · · · · · · · 3 9 F i g u r e 5 . 1 0 - S m a r T x T r a n s f e r F u n c t i o n , O u t p u t = I n p u t . . . . . . . . . . . . . . . . . . . . . . 4 0 F i g u r e 5 . 1 1 - S m a r T x O u t p u t v s T e m p e r a t u r e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 0 F i g u r e 5 . 1 2 - S m a r T x O u t p u t - O r i g i n a l a n d M o d i f i e d . . . . . . . . . . . . . . . . . . . . 4 1 I X L i s t o f T a b l e s T a b l e 2 0 1 - S e n s o r T y p e s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 . . 1 0 T a b l e 2 0 2 - C o m p a r i s o n o f S t a n d a r d P r o t o c o l s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 T a b l e 2 0 3 - E r r o r P r o b a b i l i t y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 9 T a b l e 5 0 1 - E n c o d e r & L i n e r C o n t r o l l e r V a l u e s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 6 T a b l e 5 0 2 - S m a r T x T r a n s f e r F u n c t i o n 0 0 0 0 0 0 0 0 0 0 0 0 o o 0 0 0 0 0 0 0 0 0 0 o o O O O O O O O O O O O O 3 7 X