MICROCONTROLLER BASED Dogan Ibrahim
RADIO TELEMETRY PROJECTS Radio Telemetry is the process of data communication using the radio waves, specifically with environmental sensors, or to control a device or a piece of hardware remotely. Typical applications include factory automation, robotics, medical, and environmental monitoring. The latter requires measuring various parameters including temperature, humidity, atmospheric pressure, pollution level, wind speed, and wind direction.
He is the author of over 60 technical books, published by international famous publishers, such as Wiley, Butterworth, and Newnes. In addition, he is the author of over 250 technical papers, published in journals, and presented in seminars and conferences.
Most radio telemetry applications are based on the Low Power Radio (LPR) or Short Distance Radio (SDR) technologies using the permitted un-licensed frequency bands, where transmit power and range are subject to legislation. Nearly all radio telemetry applications use some kind of processor to read, format, and transmit/receive the data. Because of their low cost and high processing power, microcontrollers or microprocessors are commonly used in most radio telemetry applications. This book is written for students, for practising engineers, and for hobbyists who want to learn more about radio telemetry applications and microcontroller programming using the PIC18F series of microcontrollers. The design of a radio telemetry based mini weather station is considered as an example system in the book where the developed system can measure temperature, humidity, atmospheric pressure, altitude, dew point, CO level, NO2 concentration, air quality level, wind direction, and wind speed — remotely.
DESIGNING A MINI WEATHER STATION MICROCONTROLLER BASED
RADIO TELEMETRY PROJECTS
● DOGAN IBRAHIM
Prof Dr Dogan Ibrahim is a Fellow of the Institution of Electrical Engineers.
μC BASED RADIO TELEMETRY PROJECTS
DESIGNING A MINI WEATHER STATION
ISBN 978-1-907920-40-0
DESIGN
www.elektor.com
LEARN
Elektor International Media BV
The book has been written with the assumption that the reader has a basic knowledge of digital logic design, and is able to write programs using at least one high-level programming language. Although not essential, knowledge of the C programming language will be useful, as well as familiarity with at least one member of the PIC series of microcontrollers (e.g. PIC16 or PIC18).
Dogan Ibrahim LEARN
DESIGN
SHARE
SHARE
LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHAR GN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHA
Table of Contents Table of Contents
Chapter 1 – Introduction to Radio Telemetry . . . . . . . . . . . . . . . . . . . . 13 1.1 Modern Radio Telemetry Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.2 Advantages of Radio Telemetry Systems . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.3 Disadvantages of Radio Telemetry Systems . . . . . . . . . . . . . . . . . . . . . . . 15 1.4 Mobile Radio Telemetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.4.1 Using a GPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4.2 Using a memory card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.4.3 Under the sea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.5 Radio Telemetry Equipment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 2 – PIC18F Microcontroller Family . . . . . . . . . . . . . . . . . . . . . 21 2.1 The PIC18F2455/2550/4455/4550 Family . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.1.1 Program Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.2 Data Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.1.3 The Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.4 The Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.5 The Clock Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.1.6 Watchdog Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.7 Parallel Input-Output (I/O) Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.8 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.9 Analog-to-Digital Converter (ADC) Module . . . . . . . . . . . . . . . . . . . . . 41 2.1.10 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 2.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Chapter 3 – StartUSB for PIC Development Board . . . . . . . . . . . . . . . . . 53 3.1 The StartUSB for PIC Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Chapter 4 – MikroC PRO for PIC Programming Language . . . . . . . . . . . . 57 4.1 Structure of a mikroC Pro for PIC Program . . . . . . . . . . . . . . . . . . . . . . . 57 4.1.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.1.2 Beginning and Ending of a Program . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.1.3 Terminating Program Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.1.4 White Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.1.5 Case Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.1.6 Variable Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.1.7 Variable Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.1.8 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.1.9 Escape Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 7
Microcontroller Based Radio Telemetry Projects 4.1.10 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.1.11 Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4.1.12 Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.1.13 Operators in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.1.14 Modifying The Flow of Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2 PIC Microcontroller Input-Output Port Programming . . . . . . . . . . . . . . . . 80 4.3 Functions and Libraries in mikroC Pro For PIC . . . . . . . . . . . . . . . . . . . . 81 4.3.1 MikroC Pro for PIC Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.3.2 Function Prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.3.3 Passing Arrays to Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.4 mikroC Pro For PIC Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . 87 4.5 mikroC Pro for PIC Library Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.5.1 EEPROM Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.5.2 Software UART Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.5.3 Hardware USART Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.4 Sound Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.5.5 ANSI C Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 4.5.6 Miscellaneous Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.6 mikroC Pro for PIC Integrated Development Environment . . . . . . . . . . . . . . 94 4.6.1 mikroC Pro for PIC IDE Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.6.2 Using the StartUSB for PIC Development Board . . . . . . . . . . . . . . . . . . 100 4.6.3 Program the StartUSB for PIC Microcontroller Development Board . . . . . . . 103 4.6.4 Using the Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 4.6.5 LCD Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 4.6.6 Other Useful Windows of the mikroC Pro for PIC Compiler . . . . . . . . . . . 110 4.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 4.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Chapter 5 – Radio Telemetry using Low Power Radio . . . . . . . . . . . . . . . 115 5.1 Low Power Radio (LPR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.2 Low Power Radio Communication Systems . . . . . . . . . . . . . . . . . . . . . . 116 5.2.1 Bluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5.2.2 Wi-Fi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5.2.3 ZigBee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 5.2.4 Basic RF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 5.3 The LPR Frequency Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 5.4 A Typical Radio Telemetry System . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.4.1 The Transmitting Side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.4.2 The Receiving Side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.5 The Radio Telemetry Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.5.1 The Antenna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.5.2 Path Loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5.5.3 Other Factors Affecting the Range . . . . . . . . . . . . . . . . . . . . . . . . . . 126 8
Table of Contents 5.6 Radiometrix Product Portfolio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.6.1 UHF/VHF Narrowband Transmitters/Receivers . . . . . . . . . . . . . . . . . . 127 5.6.2 Modem Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.7 Example Radio Telemetry Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 5.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Chapter 6 – Radio Telemetry Projects: Mini Weather Station . . . . . . . . . . 141 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10
Measuring Atmospheric Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Project - Measuring Temperature and Relative Humidity . . . . . . . . . . . . . . 147 Project - Estimating the Altitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Project - Estimating the Dew Point . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Project - Measuring the Solar UV Radiation . . . . . . . . . . . . . . . . . . . . . . 157 Project - Measuring the Nitrogen Dioxide Concentration . . . . . . . . . . . . . . 161 Project - Measuring the Air Quality Level . . . . . . . . . . . . . . . . . . . . . . . 167 Project - Measuring the Carbon Monoxide Concentration . . . . . . . . . . . . . 172 Project - Measuring the Wind Speed . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Project - Measuring the Wind Direction . . . . . . . . . . . . . . . . . . . . . . . 184
Chapter 7 – Using the Raspberry PI in Radio Telemetry . . . . . . . . . . . . . .189 7.1 Interfacing the Raspberry Pi to a Radio Telemetry Receiving Modem . . . . . . . 189 7.2 Disabling the Raspberry Pi Console Serial Port . . . . . . . . . . . . . . . . . . . . 190 7.3 Receiving Data through the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . 192 7.3.1 Using minicom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 7.3.2 Writing a Program to Read from the Serial Port . . . . . . . . . . . . . . . . . . 193
Chapter 8 – Radio Telemetry Based Complete Weather Station . . . . . . . . . 195 8.1 The Transmitter PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 8.2 The Receiver PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Chapter 9 – Storing The Weather Data On The Cloud . . . . . . . . . . . . . . .201 9.1 The Hardware Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 9.2 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 9.3 Using the Beebotte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 9.3.1 Installing the Beebotte API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 9.3.2 The Beebotte Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 9.3.3 Beebotte Raspberry Pi Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Appendix A. Transmit Side mikroC Pro PIC Complete Program . . . . . . . 211 Appendix B. Radio Telemetry Frequency Allocations . . . . . . . . . . . . . . 223 B.1 Frequency allocation for short range radio (or low power radio) . . . . . . . . . . 223
9
Microcontroller Based Radio Telemetry Projects Appendix C. Program Listings for Chapter 6 . . . . . . . . . . . . . . . . . . . 231 C.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9 C.10 C.11 C.12 C.13 C.14 C.15 C.16 C.17 C.18
Atmoshperic Pressure Listing - Receiving Side . . . . . . . . . . . . . . . . . . . . 232 Temperature and Relative Humidity Listing - Transmitting Side . . . . . . . . . 233 Temperature and Relative Humidity Listing - Receiving Side . . . . . . . . . . . . 236 Estimating Altitude Listing - Transmitting Side . . . . . . . . . . . . . . . . . . . 238 Estimating Altitude Listing - Receiving Side . . . . . . . . . . . . . . . . . . . . . 241 Measuring Solar UV Radiation - Transmitting Side . . . . . . . . . . . . . . . . . 243 Measuring Solar UV Radiation - Receiving Side . . . . . . . . . . . . . . . . . . . 245 Measuring the Nitrogen Dioxide Concentration - Transmitting Side . . . . . . . 247 Measuring the Nitrogen Dioxide Concentration - Receiving Side . . . . . . . . . 249 Measuring Air Quality Level - Transmitting Side . . . . . . . . . . . . . . . . . . 251 Measuring Air Quality Level - Receiving Side . . . . . . . . . . . . . . . . . . . . 253 Measuring Carbon Monoxide Concentration - Transmitting Side . . . . . . . . 255 Measuring Carbon Monoxide Concentration - Receiving Side . . . . . . . . . . 258 Measuring Wind Speed - Transmitting Side . . . . . . . . . . . . . . . . . . . . . 260 Measuring Wind Speed - Receiving Side . . . . . . . . . . . . . . . . . . . . . . . 262 Measuring the Wind Direction - Transmitting Side . . . . . . . . . . . . . . . . 264 Measuring the Wind Direction - Receiving Side . . . . . . . . . . . . . . . . . . 266
Appendix D. Weather.py Program Listing . . . . . . . . . . . . . . . . . . . . .269 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
10
Preface Preface Radio Telemetry is the process of data communication using the radio waves. It is used in many applications where it may be necessary to monitor or control a device or a piece of hardware remotely. Typical application areas of radio telemetry are in factory automation, robotics, medical applications, environmental monitoring and so on. In environmental monitoring it may be required to measure various environmental parameters, such as pollution level, wind speed, etc using a remote station and then send the results to a main station for processing. Most radio telemetry applications are based on the Low Power Radio (LPRA) or Short Distance Radio (SDR) techniques. In general, these applications use the unlicensed frequency bands, and communication range is rather limited to several kilometres or less. Nearly all radio telemetry applications use some kind of processor to read, format, and send/receive the data. Because of their low cost and high power, microcontrollers or microprocessors are commonly used in most radio telemetry applications. A microcontroller is a single chip microprocessor system which contains data and program memory, serial and parallel I/O, timers, external and internal interrupts, all integrated into a single chip that can be purchased for as little as $2.00. About 40% of microcontroller applications are in office automation, such as PCs, laser printers, fax machines, intelligent telephones, and so forth. About one-third of microcontrollers are found in consumer electronic goods. Products like CD players, hi-fi equipment, video games, washing machines, cookers and so on fall into this category. The communications market, automotive market, and the military share the rest of the application areas. This book is written for students, for practising engineers, and for hobbyists who want to learn more about radio telemetry applications and microcontroller programming using the PIC18F series of microcontrollers. The book has been written with the assumption that the reader has taken a course on digital logic design, and has been exposed to writing programs using at least one high-level programming language. Knowledge of the C programming language will be useful. Also, familiarity with at least one member of the PIC series of microcontrollers (e.g. PIC16 or PIC18) will be an advantage. The knowledge of assembly language programming is not required because all the projects in the book are based on using the C language. Chapter 1 presents an introduction to radio telemetry where the basic building blocks of radio telemetry systems are described. Chapter 2 provides a review of the PIC18F series of 8-bit mid-range microcontrollers. Various features of these microcontrollers are described in detail. Users who are not familiar with the PIC18F microcontroller architecture should find this chapter useful. Chapter 3 is about the StartUSB for PIC microcontroller development board. This is a small complete microcontroller development board with a PIC18F2550 microcontroller chip on board. This development board is used in all of the projects in this book.
11
Microcontroller Based Radio Telemetry Projects Chapter 4 discusses the basic features of the mikroC Pro for PIC programming language and the integrated development environment. Users who are not familiar with the C language should find this Chapter useful. Chapter 5 is about radio telemetry. The frequency spectrum of the unlicensed LPR radio telemetry devices are given, and the basic features of the Radiometrix radio telemetry devices are summarized. Chapter 6 gives various radio telemetry projects based on measuring the environmental and weather conditions. All the projects have two sides: the transmitting side, and the receiving side. Many tested and working projects are given in this Chapter. The following are given for each project: •
Project title
•
Project description
•
Project hardware
•
Project PDL
•
Complete project program listing
•
Full description of the program
•
Comments for future development (where necessary)
Chapter 7 is about using the Raspberry Pi computer at the receiving side of a radio telemetry system. Here, the interface of a receiver module to the Raspberry Pi is described. In addition, the software is also given. Chapter 8 gives the design of a complete weather monitoring system including the layout of a PCB. The complete program listing of this project is given in the Appendix. Finally, Chapter 9 shows how the measured data can be sent to the cloud so that it can be accessed through the internet from anywhere in the world and also using any type of device, such as iPhone, iPad, PC, etc. Dogan Ibrahim London, 2015
12
Chapter 1 | Introduction to Radio Telemetry
Chapter 1 – Introduction to Radio Telemetry
The word Telemetry is derived from the Greek where tele means remote, and metron means to measure. Radio Telemetry is the process of data communication where data is collected at remote or inaccessible locations and are transmitted to receiving stations for control or monitoring. Early telemetry dates back to the 19th century where wire was used to send the measured data. One of the early applications was in 1874 where French engineers built a system using sensors to measure the snow-depth and weather conditions on Mont Blanc. The measured data was transmitted in real-time to Paris for processing. Wireless telemetry applications were first used in 1930s in France where temperature and pressure measurements were converted and sent in Morse code. Early modern telemetry systems were developed in 1940s by the Soviet team working on space and missile systems. Telemetry has been used in weather balloons since 1920s for measuring and transmitting meteorological data. Other places where telemetry is commonly used are: oil and gas industry, space sciences, agriculture, motor racing, rockets, military intelligence, healthcare, retail, law enforcement, rockets, robotics, animal tracking, and so on.
1.1 Modern Radio Telemetry Systems As shown in Figure 1-1 on page 14, modern telemetry systems consist of two parts: the transmitting side (or station) and the receiving side (or station). At the transmitting side sensors are used to measure the physical parameter, such as the temperature, humidity and so on. The quantity to be measured can be analog or digital. In analog sensor measurements an analog-to-digital converter (ADC) is used to convert the sensor data into digital form. A processor is then used to read the measured variable. In microcontroller based radio telemetry applications the ADC of the microcontroller is usually used to read the analog variable. In addition to reading the sensor data the processor may also be required to convert the data into a meaningful form. This data is then transmitted using a radio telemetry transmitter module. This is usually a data transmitter that can be interfaced to a microcontroller. The transmitter module receives data in serial form from the microcontroller and transmits this data through its antenna. As we shall see in Chapter 5 there are many varieties of radio transmitter modules available. The choice of a radio transmitter module depends upon several parameters, such as the operating frequency, range, power supply requirements, power consumption, size, weight and so on. Most radio transmitter modules nowadays are small modules that can be mounted on a PCB and they consume tens of milliamperes of current. The transmitted RF power can range from 10mW to up to 500mW with a usable range of up to a few kilometres. The receiving side of a radio telemetry system consists of a receiving modem, a processor, and a storage/display device. The receiving modem is compatible with the transmitting modem and it operates at the same frequency and uses the same communications parameters (e.g. baud rate, data bits etc). 13
Microcontroller Based Radio Telemetry Projects Modems used in radio telemetry systems usually use the RS232 serial communications protocol. Here, data is sent and received in serial form where three wires are normally used: transmit, receive, and ground. Data is sent in frames where a frame usually consists of: Start bit 7 or 8 data bits Optional parity bit 1 or 2 Stop bits In many applications 8 data bits are used with no parity bit and one stop bit. Thus, a frame consists of 10 bits. The data rate is called the baud rate and it is the number of bits transmitted or received every second. Typical baud rates are 4800, 9600, 19200, 38400 and so on. For example, at 9600 baud rate with a frame size of 10 bits, we can transmit or receive 960 characters every second. The parity bit can be even or odd and is used for one bit error checking. In even parity applications the number of bits transmitted or received is even. Similarly, in odd parity applications the number of bits transmitted or received is odd. Currently, the radio telemetry transmitter and receiver modules are available with different protocols. Some of the popular protocols are: Wi-Fi, Bluetooth, ZigBee, and raw RF. Using a well known protocol has the advantage that the protocol has already been tested by the developers, and in addition most protocols include sophisticated error checking and correction algorithms. Perhaps the biggest disadvantage of using one of these protocols is that the range is rather limited. Raw RF has the advantage that the range can extend to over several kilometres, but there is no protocol for reliable and error free data transmission. The programmer can either choose an existing protocol, or the data can simply be sent in serial form as frames of bytes.
Figure 1-1 Radio telemetry system
14
Chapter 2 | PIC18F Microcontroller Family
Chapter 2 – PIC18F Microcontroller Family
PIC is a family of Harvard architecture microcontrollers (except the 32-bit devices) manufactured by Microchip Technology Inc. PIC microcontrollers are available in over 1000 models. Depending upon the data width used, we can classify these microcontrollers in three groups: 8-bit, 16-bit, and 32-bit microcontrollers. Figure 2-1 shows an overview of the PIC series of microcontrollers.
Figure 2-1 PIC microcontroller series PIC 10, 12, and 16 series are the low-end 8-bit microcontrollers. Although these are excellent general purpose microcontrollers, they have certain limitations. For example, the program and data memory capacities are limited, the stack is small, and the interrupt structure is rather primitive, all interrupt sources sharing the same interrupt vector. These microcontrollers also do not provide direct support for advanced peripheral interfaces such as USB, CAN bus, etc., and interfacing with such devices is not easy. The instruction set of these microcontrollers is also limited. For example, there are no multiplication or division instructions, and branching is rather simple, being a combination of skip and goto instructions. PIC18F series are medium-end 8-bit microcontrollers with medium-speed, higher pin count (18 to 100 pins), larger memories, and having over 80 instructions. These microcontrollers include various on-chip modules, such as CAN, USB, SPI, multiple USARTs, several timers, multiplier hardware, and clock speeds up to 40MHz. PIC18F microcontrollers offer costefficient solutions for general purpose applications written in C that use a real-time operating system (RTOS) and require a complex communication protocol stack. PIC18F devices provide flash program memory in sizes from 8 to 128Kbytes and data memory from 256 bytes to 4Kbytes, operating at a power supply range of 2.0V to 5.5V. PIC24 and dsPIC series are 16-bit high-speed microcontrollers with large memories and 21
Microcontroller Based Radio Telemetry Projects peripheral support, designed for time-critical applications where real-time processing is very important. These microcontrollers find applications in digital signal processing (DSP) and in high speed automatic digital control systems. The architectures of these 16-bit microcontrollers are different to the 8-bit microcontrollers as they are configured for high speed processing required in DSP applications, having fast multiplication and addition (or accumulation) modules (MAC). The new PIC32 microcontroller family are 32-bit processors with standard Von Neumann architecture, having large memories and peripheral support, offering very high speed of processing in highly precision applications. These microcontrollers are ideal candidates in medium speed DSP applications, such as digital filtering, digital audio processing and so on. One of the nice things about PIC microcontrollers is that they support easy migration across product families. For example, a project designed using a PIC16 series microcontroller can easily be upgraded to use a PIC18 series microcontroller. This is especially true if the development was carried out using a high-level language such as C, which is compatible across all the 8-bit families. The basic features of PIC18F series microcontrollers are:
22
•
77 instructions
•
PIC16 source code compatible
•
Program memory addressing up to 2Mbytes
•
Data memory addressing up to 4Kbytes
•
DC to 40MHz operation
•
8 x 8 hardware multiplier
•
Interrupt priority levels
•
16-bit-wide instructions, 8-bit-wide data path
•
Up to two or more 8-bit timers/counters
•
Up to three or more 16-bit timers/counters
•
Up to four external interrupts
•
High current (25mA) sink/source capability of each port pin
•
Up to five capture/compare/PWM modules
•
Master synchronous serial port module (SPI and I2C modes)
•
Up to two USART modules
•
Parallel slave port (PSP)
•
Fast 10-bit analog-to-digital converter
•
Programmable low-voltage detection (LVD) module
•
Power-on reset (POR), power-up-timer (PWRT), and oscillator start-up timer (OST)
Chapter 3 | StartUSB for PIC Development Board
Chapter 3 – StartUSB for PIC Development Board
In this Chapter we shall be looking at the details of the StartUSB for PIC development board. This PIC18F microcontroller based development board is used in all of the projects in this book.
3.1 The StartUSB for PIC Hardware The StartUSB for PIC is a small development board (see Figure 3-1). The board can either be used standalone or it can be soldered onto another board as a daughter board.
Figure 3-1 StartUSB for PIC development board The basic hardware features of this board are: •
PIC18F2550 microcontroller
•
Bootloader program
•
Mini USB port
•
Reset button
•
8MHz crystal
•
Jumper enabled 2 LEDs (RA1 and RB1)
•
Power LED
•
Proto board space
•
I/O port connectors
The StartUSB for PIC development board is shipped with a Bootloader loaded in the program memory of the PIC18F2550 microcontroller. The chip can be programmed from the PC with the help of this Bootloader program. Basically, the program is developed using the mikroC Pro for PIC IDE. After the program is compiled the generated HEX file is loaded to the PIC18F2550 microcontroller with the help of a Bootloader program running on the PC. 53
Chapter 4 | MikroC PRO for PIC Programming Language
Declaring a structure does not occupy any space in memory, but the compiler creates a template describing the names and types of the data objects or member elements that will eventually be stored within such a structure variable. It is only when variables of the same type as the structure are created then these variables occupy space in memory. We can declare variables of the same type as the structure by giving the name of the structure and the name of the variable. For example, two variables Me and You of type Person can be created by the statement:
struct Person Me, You;
Variables of type Person can also be created during the declaration of the structure as shown below: struct Person { unsigned char name[20]; unsigned char surname[20]; unsigned char nationality[20]; unsigned char age; } Me, You; We can assign values to members of a structure by specifying the name of the structure, followed by a dot (“.”), and the name of the member. In the following example, the age of structure variable Me is set to 25, and variable M is assigned to the value of age in structure variable You: Me.age = 25; M = You.age; Structure members can be initialized during the declaration of the structure. In the following example, the radius and height of structure Cylinder are initialized to 1.2 and 2.5 respectively: struct Cylinder { float radius; float height; } MyCylinder = {1.2, 2.5}; Values can also be set to members of a structure using pointers by defining the variable types as pointers. For example, if TheCylinder is defined as a pointer to structure Cylinder then we can write:
67
Microcontroller Based Radio Telemetry Projects struct Cylinder { float radius; float height; } *TheCylinder; TheCylinder -> radius = 1.2; TheCylinder -> height = 2.5; The size of a structure is the number of bytes contained within the structure. We can use the sizeof operator to get the size of a structure. Considering the above example,
sizeof(MyCylinder)
returns 8 since each float variable occupies 4 bytes in memory. Bit fields can be defined using structures. With bit fields we can assign identifiers to bits of a variable. For example, to identify bits 0, 1, 2 and 3 of a variable as LowNibble and to identify the remaining 4 bits as HighNibble we can write: struct { LowNibble : 4; HighNibble : 4; } MyVariable; We can then access the nibbles of variable MyVariable as: MyVariable.LowNibble = 12; MyVariable.HighNibble = 8; In C language we can use the typedef statements to create new types of variables. For example, a new structure data type named Reg can be created as follows: typedef struct { unsigned char name[20]; unsigned char surname[20]; unsigned age; } Reg; Variables of type Reg can then be created in exactly the same way as creating any other types of variables. In the following example, variables MyReg, Reg1 and Reg2 are created from data type Reg:
Reg MyReg, Reg1, Reg2;
The contents of one structure can be copied to another structure, provided that both structures have been derived from the same template. In the following example two structure variables P1 and P2 of same type have been created and P2 is copied to P1: 68
Chapter 5 | Radio Telemetry using Low Power Radio
Chapter 5 – Radio Telemetry using Low Power Radio 5.1 Low Power Radio (LPR)
Short Range Device (SRD), also known as Low Power Radio (LPR) are small limited power transmitting and receiving devices operated without the need for an end-user license. The range of such wireless devices is typically in the range of several hundreds of meters, although some more powerful ones can be used for over a few kilometres. LPR is used in many diverse applications where it may be required to send data from one place to another one without the need to use any wires. We can see LPR used in many embedded remote control and monitoring applications such as: •
Medical implants
•
Medical equipment
•
Home automation
•
Barcode scanners
•
Environmental data acquisition and control
•
Handheld terminals
•
Security and alarm systems
•
Animal tracking
•
RFID
In medical LPR applications an electronic device (e.g. a pace maker) is implanted under the skin. The status of this device can be monitored, or its configuration can be changed externally with the help of LPR devices without having to operate to have physical access to the device. The control and monitoring of most of the medical equipment (e.g. X-ray and Ultrasound machines) nowadays are done using LPR devices, where the operational status of the equipment is controlled and monitored remotely with the help of TX/RX pair. Although the Internet of Things (IoT) seems to have become very popular in home automation, the LPR devices are still used in home automation to control the operational state of various electrical domestic goods. Another very common application of LPR devices is in cordless (wireless) barcode scanners where the information read from a product is transferred to a computer. RFID is another area where the LPR devices are used. RFID is similar to barcodes but here the tag does not necessarily have to be within line of sight of the code. Perhaps one of the most common applications of LPR devices is in remote environmental data acquisition and control. The number of applications in this area is countless. For example, environmental data from remote weather stations can be transferred to central 115
Chapter 5 | Radio Telemetry using Low Power Radio
Figure 5-7 CXT2/CRT2 modules HMT2: The HMT2 transmitter (Figure 5-8 offers 500mW (27dBm) output in the UK 458MHZ band and is suitable in applications where existing range is not sufficient. This transmitter is usable over a distance of 5km. The supply voltage is 5V (350mA during transmit, < 5µA standby). The maximum data rate is 5kbps. 16 parallel/32 serial channels are provided.
Figure 5-8 HMT2 transmitter module LMT2 & LMR2: The LMT2 transmitter and LMR2 receiver (Figure 5-9) are 32 channel UHF modules with useful range of 1km. The transmitter is available at 10mW or 100mW with 3.1V (34mA) to 15V (90mA) supply voltage. The receiver operates at 4.1V to 15V at 20mA and has a sensitivity of -118dB.
Figure 5-9 LMT2/LMR2 modules LMT1 & LMR1: These are low-power multi-channel narrowband VHF transmitter and receiver modules (Figure 5-10 on page 130) with 1km usable range. The transmit power is adjustable 1mW to 100mW depending upon the supply voltage. The receiver sensitivity is -118dB.
129
Chapter 6 | Radio Telemetry Projects: Mini Weather Station
Chapter 6 – Radio Telemetry Projects: Mini Weather Station
In this chapter we will be looking at the design of PIC18 microcontroller based projects using radio telemetry devices. The transmitting side in these projects use the StartUSB for PIC development board with the PIC18F2550 microcontroller chip on-board with an 8MHz crystal. The receiving side uses the PIC18F45K22 microcontroller together with a 2x16 character text based LCD. Any PIC development board (e.g. the EasyPIC V7 from mikroElektronika, or any others, or even a breadboard) can be used in the receiving side. This chapter gives a number of weather based radio telemetry projects to measure the following environmental variables: •
Temperature
•
Humidity
•
Atmospheric pressure
•
Dew point
•
Wind speed
•
Wind direction
•
Carbon dioxide level
•
Air quality
•
Nitrogen dioxide level
•
Altitude
•
Ultraviolet radiation
The environmental variables are sensed using suitable sensors and the data read are sent to a receiving station using a pair of radio telemetry modules. At the receiving side the received data are displayed on an LCD. In the next chapter we will see how to combine all the sensors on a PCB and develop a complete program to read and send the values of these variables to a receiving station. Various examples of receiving stations will be given, such as displaying all of the received data on a PC screen in text form, or sending the data to a Raspberry Pi computer for display or storage. It is also shown in the next chapter how the weather data received on a Raspberry Pi computer can be sent to the Cloud so that it can be accessed from anywhere in the world at any time and using any kind of device, provided the device used can have internet access. The following are provided for each project in this section: •
Project title
•
Description of the project
•
Block diagram of the project (where necessary)
•
Circuit diagram and description of the hardware 141
Microcontroller Based Radio Telemetry Projects •
The Algorithm in PDL
•
Program listing (mikroC Pro for PIC)
•
Suggestions for further development (if applicable)
6.1 Measuring Atmospheric Pressure Project Description This project demonstrates how the atmospheric pressure can be measured and then sent to a remote station using radio telemetry modules. The received pressure is displayed on an LCD. Block Diagram The block diagram of the project is shown in Figure 6-1. In this project the transmitting side uses a StartUSB for PIC development board. The pressure is read from a MPX4115AP type atmospheric pressure sensor and is transmitted using a TXL2 type transmitting modem module. The receiving side uses a RXL2 type receiving modem and a PIC microcontroller to read and display the pressure on an LCD.
Figure 6-1 Block diagram of the project Circuit Diagram and Description of the Hardware The output of a barometric pressure sensor is available in inHg (inches mercury) or in hPa (mbar), or in both. Typical ranges are 16 to 32 inHg, or 550 to 1100 hPa. The SI derived unit of pressure is Pascal. 1 Pascal is equivalent to 0.01 mbar (1/1000th of a bar), or to 0.000295 inches of mercury, and 100 Pascals (a hectopascal) is equivalent to 1 millibar (mbar). inHg is not an SI unit and is still widely used in barometric weather reports and in aviation in some countries. It is defined as the pressure exerted by a column of mercury of 1 inch in height at 0ºC at the standard acceleration of gravity. Barometric pressure sensors are available in analog or in digital form. Analog sensor outputs are in millivolt, volt, or current, and the output is usually proportional to the measured pressure. These sensors usually operate with a power supply voltage of 5 to 10V. Digital sensors usually operate with either 3.6V or 5V and provide digital outputs in the form of standard RS232 serial data, or SPI, or I2C bus compatible outputs, or some form of proprietary digital output. In this project, the MPX4115AP analog output barometric pressure sensor chip is used. The MPX4115AP is designed to sense absolute air pressure in barometer or altimeter applications. This is an analog sensor operating with 5V power supply. 142
Microcontroller Based Radio Telemetry Projects
Figure 6-30 R S / RO against nitrogen dioxide concentration The circuit diagram of the project is shown in Figure 6-31. At the transmitting side, a 22K load resistor is used and the sensor output is connected to analog input AN3 (RA3) pin of the PIC18F2550 microcontroller.
Figure 6-31 Circuit diagram of the project For those readers who may not have the StartUSB for PIC development board, the circuit diagram showing connections of the PIC18F2550 microcontroller is shown in Figure 6-32 on page 165.
164
Chapter 6 | Radio Telemetry Projects: Mini Weather Station
Figure 6-32 Showing the PIC18F2550 connections The receiving side uses the PIC18F45K22 microcontroller operated with 8MHz. The RXL2 receiving modem, and an LCD are also used as in the previous projects. The Algorithm The steps to calculate the nitrogen dioxide concentration in ppm are as follows: •
Use equation (6.8) to calculate RS
•
Calculate RS / RO
•
Use equation (6.9) and (6.10) to calculate the nitrogen dioxide concentration
•
Transmit the calculated value
The typical value of Ro is specified as 2200 ohms, although it can vary between 800 ohms and 8000 ohms. Figure 6-33 shows operation of the transmitting side. The operation of the receiving side is shown in Figure 6-34 on page 166.
Figure 6-33 Operation of the transmitting side 165
Chapter 7 | Using the Raspberry PI in Radio Telemetry
Chapter 7 – Using the Raspberry PI in Radio Telemetry
The Raspberry Pi is a credit card sized computer costing around $35. This computer runs under the highly popular multiprocessing Linux operating system and among many other features it offers internet access to the users where the users can browse the internet, send and receive e-mails and so on. In addition, the computer can be programmed using the popular Python programming language. A general purpose input-output interface (GPIO) socket is provided to help users interface the computer to various external devices for real-time monitoring and control applications. The details of the Raspberry Pi computer are beyond the scope of this book. There are many technical books on the hardware and software of the Raspberry Pi computer and interested readers should refer to such books. In this Chapter we shall see how to use the Raspberry Pi computer to receive the data sent by the transmitting modules used in the projects in Chapter 6. The received data will be displayed on the monitor for simplicity (it is also possible to connect an LCD to the Raspberry Pi computer and display the data on the LCD). In order to use the Raspberry Pi computer to receive the transmitted data and then to display it we need to interface a radio telemetry receiving modem hardware to the Raspberry Pi and then to write a software (or use a software package) to receive and display the serial data.
7.1 Interfacing the Raspberry Pi to a Radio Telemetry Receiving Modem In this section we shall see how to interface the RXL2 radio telemetry receiving modem to the Raspberry Pi. The maximum logic HIGH voltage that can be applied to a Raspberry Pi GPIO input pin is specified as +3.3V. But, the logic HIGH level output of the RXL2 UART pin (pin 7) is +5V and as a result it is not possible to connect the RXL2 to a Raspberry Pi input port. The Raspberry Pi GPIO signals are terminated on a 26-way IDC connector. On this connector, the following pins are of interest to us for this project:
Pin 2: +5V output
Pin 10: UART input
Pin 6: GND
One way to interface the RXL2 modem to the Raspberry Pi is by using two resistors in the form of a potential divider to drop the RXL2 output voltage from +5V to +3.3V. This requires the use of two resistors: 2.2K and 3.3K as shown in Figure 7-1 on page 190. Then, the general block diagram of our overall radio telemetry system is shown in Figure 7-2 on page 190.
189
Chapter 8 | Radio Telemetry Based Complete Weather Station
Chapter 8 – Radio Telemetry Based Complete Weather Station
In Chapter 6 on page 141 we have developed various projects to measure various environmental parameters. In these projects the transmitting side measured the parameter and transmitted the data using a radio telemetry transmitter modem. The receiving displayed the data on an LCD. In this Chapter we will develop a complete weather station by combining all the sensors on a PCB and developing a complete program. Two PCBs are developed: the transmitter PCB and the receiver PCB.
8.1 The Transmitter PCB Figure 8-1 shows a picture of the transmitter PCB with all the components mounted on the PCB. The PCB uses the StartUSB for PIC microcontroller development board. The microcontroller board is programmed using the Bootloader as described in earlier chapters. The Radiometrix TXL2 transmitter modem is used in the design. The transmitter PCB is powered from the mini USB socket mounted on the StartUSB for PIC development board.
Figure 8-1 Picture of the completed transmitter board Figure 8-2 on page 196 shows the circuit diagram of the transmitter board. The PCB layout of the board is shown in Figure 8-3 on page 196 and Figure 8-4 on page 197.
195
Microcontroller Based Radio Telemetry Projects
Figure 8-2 Circuit diagram of the transmitter board
Figure 8-3 Top view of the PCB layout of the transmitter board
196
Chapter 9 | Storing The Weather Data On The Cloud
Chapter 9 – Storing The Weather Data On The Cloud
In some radio telemetry applications we may want to access the data in real-time from anywhere in the world and using any kind of device that has access to the Internet. In this Chapter we shall see how the data can be stored on an Internet cloud so that it can be accessed by any kind of device provided the device has access to the Internet. It is important to notice that the cloud data storage and data access methods described in this Chapter can be used for IoT (Internet Of Things) based projects as well.
9.1 The Hardware Setup The hardware setup in this Chapter consists of the transmitting board and the receiver board described in Chapter 8 on page 195. The transmitter board is powered from the mini USB port on the StartUSB for PIC development board by connecting it to the USB port of a PC or to a suitable mains adapter. The receiver board is mounted on the GPIO socket of a Raspberry Pi. Power to the receiver board is provided by the Raspberry Pi.
9.2 The Software In order to store the data on an Internet cloud, a program is developed on the Raspberry Pi that receives the transmitted data and sends it to the Internet cloud. Anyone with a device that can browse the Internet can access and see the data in text or in graphical form. There are several software packages available that help to store data on an Internet cloud. Some popular ones are Xively and Beebotte and so on. In this chapter we shall see how to develop a Python program on the Raspberry Pi using the Beebotte software package.
9.3 Using the Beebotte Beebotte is a cloud platform for storing and then providing access to real-time data. Beebotte software package offers the following features: •
Providing connection and real-time display of data from anywhere and anytime
•
Easy programming by the help of the API and tutorials provided by Beebotte
•
Availability of various widgets
•
Automatic display of stored data in real-time and in graphical form
201
Index Index Symbols 3DR 17 7-Segment Editor 111 8-Bit Mode 35 16-Bit Mode 37 .ASM file 103 .HEX file 103 .LST file 103
Beebotte 201 Large 202 Medium 202 Small 202 XS 202 Beebotte API 203 Beebotte Environment 204 BiM1 132 Bluetooth 14, 116 Bootloader 53, 104
A
C
Access Key 203
CAN 21, 23
ADC 13, 143 A/D Conversion 45 A/D converters 41 analog-to-digital converter 13 ANSI C Library Ctype Library 92 ANSI C Library Math Library 92 Stdlib Library 92 String Library 93 ARGOS 16 Array Pointers 65 Arrays 63 ASCII Chart 111 Auto Correct 98 B Barometric pressure sensors 142 Basic RF 118
case sensitive 59 Code Assistant 97 Code Template 97 Comments 57 Constants Character Constants 62 Enumarated Constants 63 Floating Point Constants 62 Integer Constants 62 String Constants 63 COR3 130 CTA88 18 CXT2 & CRT2 128 D Declaring a structure 67 digital signal processing 22 dipole antenna 18 dsPIC 21 271
MICROCONTROLLER BASED Dogan Ibrahim
RADIO TELEMETRY PROJECTS Radio Telemetry is the process of data communication using the radio waves, specifically with environmental sensors, or to control a device or a piece of hardware remotely. Typical applications include factory automation, robotics, medical, and environmental monitoring. The latter requires measuring various parameters including temperature, humidity, atmospheric pressure, pollution level, wind speed, and wind direction.
He is the author of over 60 technical books, published by international famous publishers, such as Wiley, Butterworth, and Newnes. In addition, he is the author of over 250 technical papers, published in journals, and presented in seminars and conferences.
Most radio telemetry applications are based on the Low Power Radio (LPR) or Short Distance Radio (SDR) technologies using the permitted un-licensed frequency bands, where transmit power and range are subject to legislation. Nearly all radio telemetry applications use some kind of processor to read, format, and transmit/receive the data. Because of their low cost and high processing power, microcontrollers or microprocessors are commonly used in most radio telemetry applications. This book is written for students, for practising engineers, and for hobbyists who want to learn more about radio telemetry applications and microcontroller programming using the PIC18F series of microcontrollers. The design of a radio telemetry based mini weather station is considered as an example system in the book where the developed system can measure temperature, humidity, atmospheric pressure, altitude, dew point, CO level, NO2 concentration, air quality level, wind direction, and wind speed — remotely.
DESIGNING A MINI WEATHER STATION MICROCONTROLLER BASED
RADIO TELEMETRY PROJECTS
● DOGAN IBRAHIM
Prof Dr Dogan Ibrahim is a Fellow of the Institution of Electrical Engineers.
μC BASED RADIO TELEMETRY PROJECTS
DESIGNING A MINI WEATHER STATION
ISBN 978-1-907920-40-0
DESIGN
www.elektor.com
LEARN
Elektor International Media BV
The book has been written with the assumption that the reader has a basic knowledge of digital logic design, and is able to write programs using at least one high-level programming language. Although not essential, knowledge of the C programming language will be useful, as well as familiarity with at least one member of the PIC series of microcontrollers (e.g. PIC16 or PIC18).
Dogan Ibrahim LEARN
DESIGN
SHARE
SHARE
LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHAR GN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHARE ● LEARN ● DESIGN ● SHA