Building Wireless Sensor Networks Using Arduino
eBook - ePub

Building Wireless Sensor Networks Using Arduino

Matthijs Kooijman

Partager le livre
  1. 192 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Building Wireless Sensor Networks Using Arduino

Matthijs Kooijman

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Leverage the powerful Arduino and XBee platforms to monitor and control your surroundings

About This Book

  • Build your own low-power, wireless network using ready-made Arduino and XBee hardware
  • Create a complex project using the Arduino prototyping platform
  • A guide that explains the concepts and builds upon them with the help of examples to form projects

Who This Book Is For

This book is targeted at embedded system developers and hobbyists who have some working knowledge of Arduino and who wish to extend their projects using wireless connectivity.

What You Will Learn

  • Interact with XBee boards using the XCTU program on Windows, OS X, or Linux
  • Make your Arduino boards communicate wirelessly, using XBee modules in the advanced API mode
  • Centrally collect and store measured sensor data, in the cloud or your own database
  • Connect the coordinator Arduino to the Internet and send data to web services
  • Control your environment automatically, based on sensor input from your network
  • Interact with off-the-shelf ZigBee Home Automation devices
  • Make your devices battery-powered and let them sleep to get months or even years of battery life

In Detail

Arduino has been established as the de facto standard microcontroller programming platform, being used for one-off do-it-yourself projects as well as prototypes for actual products. By providing a myriad of libraries, the Arduino community has made it very easy to interact with pretty much any piece of hardware out there. XBee offers a great range of low-power wireless solutions that are easy to work with, by taking all of the complexity of wireless (mesh) networking out of your hands and letting you focus on what to send without worrying about the how. Building wireless sensor networks is cost-effective as well as efficient as it will be done with Arduino support.

The book starts with a brief introduction to various wireless protocols, concepts, and the XBee hardware that enables their use. Then the book expands to explain the Arduino boards to you, letting them read and send sensor data, collect that data centrally, and then even control your home from the Internet. Moving further more advanced topics such as interacting through the standard Zigbee Home Automation protocol, or making your application power-efficient are covered. By the end of the book, you will have all the tools needed to build complete, real-world solutions.

Style and approach

A hands-on guide, featuring a single home automation project that can be built as described or with endless variations. Every step is illustrated with complete examples and screenshots, allowing you to build the examples swiftly.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Building Wireless Sensor Networks Using Arduino est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Building Wireless Sensor Networks Using Arduino par Matthijs Kooijman en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Open Source Programming. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2015
ISBN
9781784395582

Building Wireless Sensor Networks Using Arduino


Table of Contents

Building Wireless Sensor Networks Using Arduino
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
eBooks, discount offers, and more
Questions
1. A World without Wires
XBee radio hardware
XBee product families
Versions and variants
Official XBee documentation
Your first transmission
Using the SparkFun XBee Explorer USB
Getting and running XCTU
Updating the firmware
Failed firmware updates
Configuration
Talking to the XBee module
Receiving data
Uploading the sketch
Connecting the XBee
Receiving data
Switching to API mode
First module in API mode
Sending data
Second module in API mode
Starting and joining a network
Module addressing
Network scanning and remote configuration
The Commissioning button and LEDs
Making your network secure
Distributing the network key
Trust center link key
Trust center terminology differences
Selecting encryption keys
Setting up your secure network
Disabling network joining
Other XBee families
Configuration values
Summary
2. Collecting Sensor Data
Hardware setup
Serial on XBee
Handshaking signals
Voltage levels
Serial on a computer
Serial on Arduino
XBee shields
Other shields
Software setup
Example sketches
Variable types
PROGMEM and F() strings
Pointers
Serial port setup
The xbee-arduino library
Creating the sketch
Sending and receiving data
Sending data
The ZBTxRequest objects
Creating the sketch
Blocking and polling
Running the sketch
Callbacks
Callback types
Callback limitations
Receiving data
The ZBRxResponse objects
Creating the sketch
Collecting sensor data
Reading a DHT22 sensor
Handling packets using binary.h
Building and sending a packet
Constructing a packet using binary.h
Creating the sketch
Receiving and parsing a packet
Parsing a packet using binary.h
Creating the sketch
Troubleshooting
Communication with the XBee module is not working
Modules are not joining the network
Modules cannot talk to each other
Summary
3. Storing and Visualizing Your Data
Storing your data in the cloud
Introducing Beebotte
Channels and resources
Security
Access protocols
Sending your data to Beebotte
Preparing Beebotte
Connecting your Arduino to the Internet
Writing the sketch
Visualizing your data
Accessing your data
Keeping your data locally
Sending data over the serial port
Receiving data over the serial port
Summary
4. Controlling the World
Controlling your heating and/or cooling system
Replacing the thermostat
Controlling mains power
Hairdryer – an alternative
Control systems
Adding setpoint control
Subscribing to events
Reading events
Remembering sensor readings
Thermostat controller
Controlling a relay
Controlling off-the-shelf ZigBee devices
ZigBee profiles, endpoints, and clusters
ZigBee public profiles
Selecting a ZigBee device
Talking to a ZigBee on/off device
Joining the network
Factory reset in case of problems
Discovering services
The ZBExplicitTxRequest objects
Sending a message
The ZBExplicitRxResponse objects
Receiving messages
Receiving on/off command responses
More ZigBee features
Summary
5. Standalone XBee Operation
Creating a window sensor
Connecting things
Powering the module
Connecting the window sensor
I/O pin naming
Configuring the XBee module
Remotely sampling the pins
Querying the pin state
Automatically sending the sample data
The configuration values
Receiving the samples on the coordinator
The ZBRxIoSampleResponse objects
Receiving the I/O samples
Creating a standalone relay
Connecting things
Configuring the XBee module
Remotely toggling an output pin
Summary
6. Battery Power and Sleeping
Battery power
Lithium-ion and lithium polymer batteries
Regulators
Saving power
Power saving techniques
Knowing what to optimize and when to stop
XBee power-saving
The XBee sleep modes
Configuring the network
The sleeping window sensor
Battery power
Power usage
Arduino power-saving
The XBee configuration
Hardware
Powering the Arduino
Hardware connections
Putting the Arduino to sleep
Sleep modes
Waking up
Creating the sketch
Power usage
Summary
Index

Building Wireless Sensor Networks Using Arduino

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2015
Production reference: 1121015
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-558-2
www.packtpub.com

Credits

Author
Matthijs Kooijman
Reviewers
Anvirup Basu
Roberto Gallea
Vincent Gijsen
Randy Schur
Fangzhou Xia
Commissioning Editor
Nadeem Bagban
Acquisition Editor
Sonali Vernekar
Content Development Editor
Shali Deeraj
Technical Editor
Danish Shaikh
Copy Editor
Tasneem Fatehi
Project Coordinator
Kinjal Bari
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Abhinash Sahu
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Layout Coordinator
Conidon Miranda

About the Author

Matthijs Kooijman is an independent embedded software developer who is firmly connected with the maker movement through a local fab lab and his work on the Arduino project. Since his youth, Matthijs has been interested in making things; for example, he built his first television remote control before the age of 10 (using a piece of rope to pull on the volume slider, not a solution that he would choose today).
Matthijs has a firm belief in the merits of open source software and enjoys contributing to the software that he uses—both by coding and helping out other users. His work experience is broad—ranging from Web development to Linux driver hacking, from tech support to various forms of wireless networking, but almost always related to open source software in some way.

About the Reviewers

Anvirup Basu is currently a student pursuing his B.Tech in electronics and communication engineering from the Siliguri Institute of Technology. Besides academics, he is actively involved in robotics, IoT, and mobile application development. Since the first year, he has been involved with Microsoft as a Mic...

Table des matiĂšres