XBee Accelerometer Demo Wireless Tilt Mouse Application. DIY (Do It Yourself) Project Rev 1.0 Mar/2011

Similar documents
Using Xbee in Serial Communication

AN588 ENERGY HARVESTING REFERENCE DESIGN USER S GUIDE. 1. Kit Contents. 2. Introduction. Figure 1. Energy Harvesting Sensor Node

RC2200DK Demonstration Kit User Manual

Building a Basic Communication Network using XBee DigiMesh. Keywords: XBee, Networking, Zigbee, Digimesh, Mesh, Python, Smart Home

Surveillance System Using Wireless Sensor Networks

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

ZigBee-2.4-DK 2.4 GHZ ZIGBEE DEVELOPMENT KIT USER S GUIDE. 1. Kit Contents. Figure GHz ZigBee Development Kit

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Tutorial for MPLAB Starter Kit for PIC18F

ADXL345-EP. 3-Axis, ±2 g/±4 g/±8 g/±16 g Digital Accelerometer. Enhanced Product FEATURES GENERAL DESCRIPTION ENHANCED PRODUCT FEATURES APPLICATIONS

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Bidirectional wireless communication using EmbedRF

GSM Interfacing Board

EDK 350 (868 MHz) EDK 350U (902 MHz) EnOcean Developer Kit

Wireless Communication With Arduino

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Small, Low Power, 3-Axis ±3 g Accelerometer ADXL335

GPS/GLONASS SiRFstarV Evaluation Kit EVA5100-A

If anything is damaged or missing, contact your dealer.

IEEE /ZigBee USB Dongle

AN4128 Application note

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

IEEE b/g/n WiFi Module. Product Specifications

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

TBS Dominator 5G8 Receiver

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

MASTER GUIDE (MAC) Gaming on the go is now possible.

RPLIDAR. Low Cost 360 degree 2D Laser Scanner (LIDAR) System Development Kit User Manual Rev.1

QSG105 GETTING STARTED WITH SILICON LABS WIRELESS NETWORKING SOFTWARE

Design Considerations for DVT and Manufacturing Test of Wireless Devices

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

Waspmote. Quickstart Guide

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

CB-OLP425 DEVELOPMENT KIT GETTING STARTED

TI ARM Lab 7 Accelerometers

How to read this guide

XBee USB Adapter Board (#32400)

Embedded Systems Design Course Applying the mbed microcontroller

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Web Site: Forums: forums.parallax.com Sales: Technical:

WASP User Manual. Revision: 1.6. (c) 2012 North Pole Engineering, Inc.

Security & Chip Card ICs SLE 44R35S / Mifare

RN-WIFLY-EVAL-UM. WiFly Evaluation Kit Roving Networks. All rights reserved. RN-WIFLY-EVAL-UM Version 1.32r 10/9/2012 USER MANUAL

Implementation of Wireless Gateway for Smart Home

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

Wireless Temperature

Keep it Simple Timing

Hardware Connections between Arduino and IMU Nori Wilkins Apr. 5, 2013

Designing VM2 Application Boards

Vibration Measurement of Wireless Sensor Nodes for Structural Health Monitoring

FB-500A User s Manual

Lab Experiment 1: The LPC 2148 Education Board

AVR115: Data Logging with Atmel File System on ATmega32U4. Microcontrollers. Application Note. 1 Introduction. Atmel

An internal gyroscope minimizes the influence of dynamic linear acceleration on slope sensor readings.

Product Datasheet P MHz RF Powerharvester Receiver

FT4232H Mini Module. USB Hi-Speed FT4232H Evaluation Module. Datasheet

M72. Quectel Cellular Engine. EVB User Guide M72_EVB_UGD_V1.0

IEEE b/g/n WiFi Module. Product Specifications

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

The Heartbeat behind Portable Medical Devices: Ultra-Low-Power Mixed-Signal Microcontrollers

Figure 1.Block diagram of inventory management system using Proximity sensors.

MANUAL FOR RX700 LR and NR

KTA-223 Arduino Compatible Relay Controller

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Bluetooth to Serial Adapter

Skyus 3G. Quick Start Guide Verizon

Instruction Manual. Monitor Software for Inclinometer V 3.5

Programmable set for Ethernet Modbus/TCP in IP67 TI-BL67-PG-EN-2

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

Tire pressure monitoring

WIRELESS INSTRUMENTATION TECHNOLOGY

Small, Low Power, 3-Axis ±3 g Accelerometer ADXL337

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Wireless Security Camera

Products Range Overview. Products Range Overview. The ZigBee Plug & Play wireless Network for Building and Industrial Applications

Intel architecture. Platform Basics. White Paper Todd Langley Systems Engineer/ Architect Intel Corporation. September 2010

RDF1. RF Receiver Decoder. Features. Applications. Description. Ordering Information. Part Number Description Packages available

USER GUIDE EDBG. Description

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

GETTING STARTED GUIDE

Voice Over Internet Protocol (VoIP) Configuration

ic-mq EVAL MQ1D EVALUATION BOARD DESCRIPTION

8-Port HDMI Switch USER MANUAL VS0801H

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

xpico Wi-Fi Embedded Device Server Evaluation Kit Quick Start Guide

AD9125-EBZ Quick Start Guide

Zigbee-Based Wireless Distance Measuring Sensor System

CYPRESS SEMICONDUCTOR CORPORATION Internal Correspondence. Frequently Asked Questions. Contents. TITLE: Cypress s WUSB-NX Solutions for HID NPI

MN3310 Evaluation Kit v1 User Guide

Lab 2 Sensor Modeling Introduction to the Wiimote and the Wiimote LABVIEW Interface

Microcontrollers and Sensors. Scott Gilliland - zeroping@gmail

Digital Photo Bank / Portable HDD Pan Ocean E350 User Manual

MN1010 Evaluation Kit v3 User Guide

Transcription:

XBee Accelerometer Demo Wireless Tilt Mouse Application DIY (Do It Yourself) Project Rev 1.0 Mar/2011 1. Introduction The present document shows step by step how to easily build an interesting pointing device: the wireless tilt mouse, that allows to control the mouse s cursor on the PC screen through the tilt of the board itself. The analog data from a 3-D accelerometer and from two push-buttons are acquired, converted and radio transmitted by an XBee module using the standard ZigBee protocol. On the receiver side there is another XBee module connected to the PC through an EasyUSB module, that allows both file storing and communication on the same interface and it s seen by the PC as a common mass storage device. In practice there is no need to install any application on the PC: the software that communicates with the XBee and emulates the mouse functions is resident inside the EasyUSB itself and it is automatically recognized by the PC as an USB drive. The accelerometer/transmitter board is powered by AA batteries. This project aims to be an open source hardware/software platform, which can be used for learning about getting accelerometer s data, configuring XBee modules and managing custom USB peripherals. All the hardware schematics and well commented software source codes are available on the attached project files. In order to design a fast and easy-to-build platform, only breakout boards and modular components are used. Specific skills like SMD soldering and embedded software programming are not necessary. 2. Design All the necessary materials can be purchased online from SparkFun Electronics. Following the links and in the attached documents there are plenty of useful information about each one of these components. XBee Explorer Regulated http://www.sparkfun.com/products/9132 XBee 1mW Chip Antenna http://www.sparkfun.com/products/8664 Triple Axis Accelerometer Breakout - ADXL335 http://www.sparkfun.com/products/9269 5V DC to DC Step Up - 2xAA http://www.sparkfun.com/products/8249 Breakout Board for USB Mini-B http://www.sparkfun.com/products/9966 EasyUSB http://www.sparkfun.com/products/10155 Mini Push Button Switch SMD http://www.sparkfun.com/products/8720 XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 1/10

2.1. Building Steps 2.1.1. Hardware Connections - Connect the boards: solder wires according to the hardware schematics and wiring diagrams. Note that XBee Chip Antenna modules should not be soldered: they fit into the XBee Explorer Regulated socket. Transmitter parts: 5V DC to DC Step Up Triple Axis Accelerometer Breakout - ADXL335 XBee Explorer Regulated and XBee 1mW Chip Antenna 2 Mini Push Buttons Receiver parts: Breakout Board for USB Mini-B EasyUSB XBee Explorer Regulated and XBee 1mW Chip Antenna 2.1.2. Transmitter Config - Put an XBEE module on the RECEIVER socket and plug the USB cable into the PC. Wait for the automatic installation of the device as a common USB mass storage device. - Copy the xbee_config.exe console into the USB device. Run xbee_config.exe console and press T to configure the XBEE module as TRANSMITTER. Press ESC to exit. - Take off the XBEE module from the RECEIVER socket and place it into the TRANSMITTER socket. 2.1.3. Receiver Config - Put the other XBEE module on the RECEIVER socket. Run xbee_config.exe console and press R to configure the XBEE module as RECEIVER. Press ESC to exit. - Copy the tiltmouse.exe program into the USB device. The wireless tilt mouse transmitter and receiver are done! In order to use it, just run the tiltmouse.exe console on the receiver and plug the batteries on the transmitter. The console, other than emulate the mouse s functions, also prints on the screen the data acquired from each accelerometer s axis and push buttons. XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 2/10

2.2. Schematics XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 3/10

2.2.1. Schematics references Comment Description Designator LibRef Quantity 5V DC-DC 5V DC to DC Step Up - 2xAA B1 5V DC-DC 1 USB MINI USB mini connector P1 USB MINI 1 SW-PB Push button S1, S2 SW-PB 2 XBee Regulated XBee Explorer Regulated Board U1, U3 XBee Regulated 2 ADXL335 Breakout Accelerometer Breakout Board U2 ADXL335 Breakout 1 EASY USB USB interface module U4 EASY USB 1 2.3. Wirings 2.3.1. Transmitter XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 4/10

2.3.2. Receiver 3. Components In this section the main components of the project will be described regarding their main features, functions and technical characteristics. For further information about operation modes, addressing, supported commands and other characteristics please refer to the available reference datasheets, applications notes and software development kits. 3.1. XBee Module The XBee modules were engineered to meet IEEE 802.15.4 standards and support the unique needs of low-cost, low-power wireless sensor networks. The modules require minimal power and provide reliable delivery of data between devices. The modules operate within the ISM 2.4 GHz frequency band. It was designed to mount into a receptacle (socket) and therefore does not require any soldering when mounting it to a board. The XBee modules interface to a host device through a logic-level asynchronous serial port. Through its serial port, the module can communicate with any logic and voltage compatible UART. They support ADC (Analog-to-digital conversion) and digital I/O line passing and some of their pins support multiple functions, therefore for basic functionalities it is not needed any additional microprocessor. XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 5/10

Here are listed the AT commands (also implemented in the xbee_config console application software) that should be sent in order to config the two XBee modules of the project: on the transmitter side, the XBee will also acquire the analog data from the accelerometer and push buttons and send them every 100ms; on the receiver side, the XBee will receive the data from the transmitter and send them to the EasyUSB module and then to the PC. Transmitter: Send the command sequence character to enter in XBee Command Mode: +++ Restore default parameters: ATRE Set transmitter destination address: ATDL = 0x1234 Set transmitter source address: ATMY = 0x5678 Set D0 as analog input: ATD0 = 2 Set D1 as analog input: ATD1 = 2 Set D2 as analog input: ATD2 = 2 Set D3 as digital input: ATD3 = 3 Set D4 as digital input: ATD4 = 3 Enable pull up on digital inputs D3 and D4: ATPR = 0x03 Set sample rate to 100ms: ATIR = 0x64 Write parameters to non-volatile memory: ATWR Receiver: Send the command sequence character to enter in XBee Command Mode: +++ Restore default parameters: ATRE Set receiver destination address: ATDL = 0x5678 Set receiver source address: ATMY = 0x1234 Set receiver input address: ATIA = 0x5678 Enable uart output: ATIU = 1 Set P0 in order to drive the RSSI LED according to signal strength: ATP0 = 1 Write parameters to non-volatile memory: ATWR Once the modules are configured and powered, every 100ms the transmitter will send to the receiver a packet with the following information: XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 6/10

Where the RF Data bytes have the following structure: 3.2. Accelerometer The ADXL335 is a small, thin, low power, complete 3-axis accelerometer with signal conditioned voltage outputs. The product measures acceleration with a minimum full-scale range of ±3 g. It can measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration. The user selects the bandwidth of the accelerometer using the CX, CY, and CZ capacitors at the XOUT, YOUT, and ZOUT pins. Bandwidths can be selected to suit the application, with a range of 0.5 Hz to 1600 Hz for the X and Y axes, and a range of 0.5 Hz to 550 Hz for the Z axis. The ADXL335 uses a single structure for sensing the X, Y, and Z axes. As a result, the three axes sense directions are highly orthogonal and have little cross-axis sensitivity. Mechanical misalignment of the sensor die to the package is the chief source of cross-axis sensitivity. XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 7/10

3.2. EasyUSB The EasyUSB is an embedded Universal Serial Bus interface with solid state memory and external asynchronous serial interface, designed to facilitate the file sharing and direct communication between host and device applications, therefore improving the end-user experience, reducing development costs and time to market. On the host side, in almost any computer or portable device, no driver or further installation procedure is needed as the USB Mass Storage Class implemented is widely supported by almost any operating system. On the device, the file system is accessible through a classical Universal Asynchronous Serial Interface. Eventually the software can be distributed inside the embedded memory, rendering it really plug-n-play and usable everywhere. Furthermore host computer and embedded controller can directly communicate over a dedicated serial link, built using an innovative technique, without implementing the Communication Device Class. In practice it can benefit from both interfaces, mass storage and communication, using only the simple and widespread Mass Storage Class, eliminating the need of problematic composite peripherals or expensive custom driver development and maintenance. HOST: The host recognizes the EasyUSB interface as a standard mass storage device when it s plugged in. No further user operation is needed. The UART interface is virtually direct accessed by the host through the library functions, detailed on the EasyUSB API documentation. External formatting is not supported. A software application that demonstrates all the library functions is available. DEVICE: The EasyUSB is easily controlled by embedded systems through the standard UART interface. When the VBUS is high (USB host is plugged) it outputs the message "Serial Bridge Mode" and acts as a bridge between the UART signals and the library read/write functions. When VBUS is low (USB host is unplugged), it outputs the message "File System Mode" and the embedded processor can access the file system. XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 8/10

4. Software The application software was developed on Codegear C++ Builder Integrated Development Environment. For further information refer to the commented source code. The algorithm that describes the working flow of the tiltmouse console application software is illustrated here: XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 9/10

5. References [1] XBee RF Modules Product Manual v1.xex, September 2009. [2] Analog Devices ADXL335 Datasheet Rev 0, January 2009. [3] EasyUSB Datasheet Preliminary Rev 0.3, November 2010. Contacts For technical questions, software, documentation and for information about producing, distributing, licensing, please contact the developer: Email: info@inventionslab.com Website: http://inventionslab.com Disclaimer The information in this document is believed to be accurate in all respects at the time of publication but is subject to change without notice. The developer assumes no responsibility for errors and omissions, and disclaims responsibility for any consequences resulting from the use of information included herein. Additionally, the developer assumes no responsibility for the functioning of not described features or parameters. The developer reserves the right to make changes without further notice. The developer makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does the developer assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Unless specifically provided otherwise, the products are not suitable for, and shall not be used in, automotive applications and are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. No freedom to use patents or other intellectual property rights is implied by the publication of this document. XBee Accelerometer Demo DIY (Do It Yourself Project) Rev 01 Mar/2011 10/10