433MHz UHF ASK Data Transmitter and Receiver

Similar documents
VirtualWire. Copyright (C) Mike McCauley. 1.0 Introduction. 2.0 Overview

IR Communication a learn.sparkfun.com tutorial

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

Using Xbee in Serial Communication

Technical Data Sheet UM-005. UM005-doc In reference to UM005-c-01.04

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

MeshBee Open Source ZigBee RF Module CookBook

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

Single channel data transceiver module WIZ2-434

Serial Communications

Lab Experiment 1: The LPC 2148 Education Board

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

INTRODUCTION: ABSTRACT:

The Programming Interface

Design and Implementation of Home Monitoring System Using RF Technology

PICAXE RF CONNECT KIT (AXE213)

Process Control and Automation using Modbus Protocol

Part Number Description Packages available

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

Bluetooth for device discovery. Networking Guide

Lab 6 Introduction to Serial and Wireless Communication

Guangzhou HC Information Technology Co., Ltd. Product Data Sheet

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Design And Implementation Of Bank Locker Security System Based On Fingerprint Sensing Circuit And RFID Reader

MXL5007T TUNER RADIO

MANUAL FOR RX700 LR and NR

INTRODUCTION TO SERIAL ARM

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

PM1122 INT DIGITAL INTERFACE REMOTE

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Hand Gestures Remote Controlled Robotic Arm

WIRELESS MAGNETIC CONTACT

Managing High-Speed Clocks

Surveillance System Using Wireless Sensor Networks

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

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

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

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

DS1307 Real Time Clock Breakout Board Kit

Work with Arduino Hardware

RS-422/485 Multiport Serial PCI Card. RS-422/485 Multiport Serial PCI Card Installation Guide

Basic Pulse Width Modulation

DS1307ZN. 64 x 8 Serial Real-Time Clock

Tire pressure monitoring

Objectives. Lecture 4. How do computers communicate? How do computers communicate? Local asynchronous communication. How do computers communicate?

Home Security System for Automatic Doors

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Rayson. Bluetooth Module

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

Web Streamed SDR s in Service at GB2RHQ Hack Green Bunker

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

LDG Electronics External Meter Serial Communications Protocol Specification

[WIR-1186] 865MHz-869MHz Wireless Module(version 3.0) (3.3V)

DS1621 Digital Thermometer and Thermostat

Features. Applications. Transmitter. Receiver. General Description MINIATURE MODULE. QM MODULATION OPTIMAL RANGE 1000m

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Current Loop Application Note 1495

FLYPORT Wi-Fi G

MCB3101 (Class I) WiRobot Serial Bluetooth Wireless Module User Manual

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

DECT Module UM-9802 Datasheet

USER MANUAL V5.0 ST100

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

PCM Encoding and Decoding:

R10 22k. R9 10k PICAXE-08M RXD. Sample Program: main: high 4 pause 1000 low 4 pause 1000 goto main R7 330 D7 LED-RED.

Serial Communications

Electronic Brick of Current Sensor

Using the Teridian 73M2901CE in 4-Wire and Leased Line Applications

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

What is Easy-Radio? Devices Covered. Frequency Hopping Transceiver. Where x00 denotes frequency of operation. E.g. 400 = 433MHz

Arduino DUE + DAC MCP4922 (SPI)

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Ultrasonic Distance Measurement Module

C4DI Arduino tutorial 4 Things beginning with the letter i

Bluetooth to Serial Adapter

DS1621 Digital Thermometer and Thermostat

NC-12 Modbus Application

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Accurate Measurement of the Mains Electricity Frequency

A RF18 Remote control receiver MODULE

Bluetooth Stereo Network

DSO138 oscilloscope program upgrade method

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

Wireless Transmission of JPEG file using GNU Radio and USRP

THE BASICS OF PLL FREQUENCY SYNTHESIS

ESP 8266: A BREAKTHROUGH IN WIRELESS SENSOR NETWORKS AND INTERNET OF THINGS

DAB1001. Wireless Digital Radio Interface. Installation & User Guide

Absolute maximum. User Manual

Using FPGAs to Design Gigabit Serial Backplanes. April 17, 2002

Application Note AN-00160

3. Identification of water pumps through RFID technology. 4. Wireless control of remote water pump using RF technology.

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

AN601 I2C 2.8 Communication Protocol. SM130 SM130 - Mini APPLICATION NOTE

Arduino Lesson 16. Stepper Motors

2.1 CAN Bit Structure The Nominal Bit Rate of the network is uniform throughout the network and is given by:

Timing Errors and Jitter

Remote Controls Radio Frequency or Infrared Content. Whitepaper by Martin Gotschlich, Infineon Technologies AG, 2010

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

RS-485 Protocol Manual

Transcription:

EGRF-433A1 433MHz UHF ASK Data Transmitter and Receiver Technical Manual Rev 1r0 EGRF-433A1 transmitter and receiver pair is a low cost solution for radio wireless control application circuits. Operating at 433MHz ISM frequencies, this low power radio system has a remote operat- (125 meters/370 ft being typical). The control distance can be stretched to 175meters, if short temporary disconnections due to RF signal drop outs can be tolerated. Limitations Before we go any further, it may be a good idea to know the EGRF-433A1 limitations. The most important thing to keep in mind is, the EGRF-433A1 is not a UART wireless cable replacement out of the box. It is, for a fact, a data transmitter-receiver system. But the thing is, its output is a raw, noisy, low level RF pulses that still requires a fair amount of signal processing before it becomes usable for data transmission. The reception data, if present, will be available mixed with lots of random pulses (noise). The receiving MCU is expected to process the reception data to extract its content and examine the data if mits and receives data in a way not compatible with any UART protocol. Programming an MCU to work with EGRF-433A1 does not sound so easy, and the fact is, it is really not. Arduino and gizduino users are quite fortunate though. Someone already built a collection of routines to carry out these tasks, called the VirtualWire library. With the use of this library, using EGRF-433A1 with Arduino and gizduino becomes as straightforward and painless even for beginners. Figure 1. The EGRF-433A1 UHF Receiver (larger of the two) and Transmitter Module. Figure 2. e-gizmo Remote Controller with VirtualWire transmitter module, ready for a gizduino based wireless remote robot control application. Page 1 of 12 pages 2012 e-gizmo Mechatronix Central

EGRF-433A1-T TRANSMITTER CIRCUIT The transmitter module is based on Micrel s UHF transmitter MICRF113. This is a very stable UHF oscillator locked to a crystal frequency. It is capable of delivering RF output of up to 10dbm, although in our circuit, actual RF output is about 3 ence. The transmitter is ASK pulse modulated by applying LVTTL level pulses at the TXIN input. TXIN input is non linear. Basically, what the input pulses does is turn ON and OFF the transmitter at a succession to effect ASK transmission. Figure 3. The transmitter module is crystal locked in frequency, ensuring a stable and more reliable Table 1. Interface Port P1 PIN ID Description 1 +3v3 Power Input, 1v8 to 3v6 volts 2 GND Power Ground 3 No connection 4 TXIN ASK Data Pulse input TXIN GND +3V3 P1 WIRE ANTENNA (SEE TEXT) Figure 4. The transmitter module component layout. A stranded core insulated wire cut to 17cm in length can be used as an antenna. 2012 e-gizmo Mechatronix Central Page 2 of 12 pages

EGRF-433A1-R RECEIVER CIRCUIT The receiver module is built around ATA3741, a UHF receiver circuit capable of demodulating either an ASK or FSK signal. The receiver frequency is likewise crystal locked to keep the frequency from wandering off and getting out of tune with the transmitter. The output of the ATA3741 is already in the form of digital pulses. But as it is, it is not ready for use. As I already mentioned, we could expect a data output mixed with all sorts of noise. Hence, to ensure succesful data transfer, the receiver hosts MCU need something it could easily recognize from noise to get it start processing of reception data and deal with the separation of data from noise more effectively. For this, the data packet is send by the transmitting device with extra payloads for synchronization and error detection. The payload depends on the protocol used. Following is the scary detail. VirtualWire starts transmission by sending a series of synchronization pulses, 18 pairs of 1 and 0s to be exact. The hosts MCU running the VirtualWire reception routine continuously checks for this sync pulses, and will only start processing upon the detection of sync signal. The sync pulses are immediately followed by a start marker - a 12bit pulse pattern, the number of bytes to transmit, and the data stream itself. Transmission is concluded with a 4 byte CRC that must be used by the host controller to validate the data. marker are encoded in 4b/6b format in order not the upset the DC bias of the ATA3741 receiver PLL circuit. Any undesired DC bias within the PLL control loop will almost guarantee a data lost. Fortunately for Arduino and gizduino programmers, you need not worry about these details. Every complicated thing just mentioned had already been taken cared of by the VirtualWire library, so that you don t have to. It is a free Arduino IDE addon library that can work with EGRF-433A1 wireless hardware. If you haven t done so, now is the good time to download this library. Users of non-arduino compatible platform/mcus are not as lucky, and may have to do the dirty work themselves. For now, Google is your best friend. Figure 5. A snapshot of an oscilloscope trace of a EGRF-433A1-T transmitter module sending the message 123456. The lower trace is the expanded highlighted portion of the packet. The lower trace clearly payload itself. Page 3 of 12 pages 2012 e-gizmo Mechatronix Central

valued components even on RF section. This is a PLL receiver circuit frequency locked to a crystal Table 2. P1 Interface Port PIN ID DESCRIPTION 1 DEM Analog Demodulator Output 2 EN Enable Input, Normally open ( 1 ) 3 N.C. No connection 4 DATA Data Output 5 GND Common Ground 6 Vcc +5V Power Input Vcc GND DATA N.C. EN DEM WIRE ANTENNA (SEE TEXT) Figure 7. EGRF-433A1-R Receiver Module components layout. The antenna can likewise be fashioned out of a 17cm length of stranded insulated wire. 2012 e-gizmo Mechatronix Central Page 4 of 12 pages

APPLICATION EXAMPLES To use the EGRF-433A1 with your gizduino, you need to integrate the VirtualWire library with your current Arduino IDE installation. Installing Virtual- Wire Libraries to your Arduino IDE requires only a couple of steps: 1. Download the latest VirtualWire library from http://www.open.com.au/mikem/arduino/ folder to your Arduino IDE directory libraries subfolder (e.g. E:\arduino-1.0.1\libraries) UART port pin 0, pin 1, and pin 2 of the gizduino free. The UART port is one of the most useful features of a microcontroller. A lot of devices would want to connect in the UART port. And it is not needed for EGRF-433A1 to work, although you can use it with equal ease if you want to. It will just be a waste. You will never know when you will need it for other devices. In the following example, it is connected to pin 14. An Arduino sample sketch for the transmitter is shown in the following page. This library will run with all gizduino platform, including the minis. Transmitter Application Example The transmitter circuit requires just one I/O line driving the TXIN. Any DIO can be used to drive the TXIN. But it is probably a good idea to keep the TXIN GND +3V3 P1 say, this setup will work with any Arduino and compatible module as well, not just with the gizduino+. User can freely use any other DIO pin other than the one shown in this example. Page 5 of 12 pages 2012 e-gizmo Mechatronix Central

/* Sample Arduino Sketch for * e-gizmo EGRF-433A1-T * UHF Transmitter Module * Using VirtualWire Protocol * * This will work with all gizduino and Arduino platform */ #include <VirtualWire.h> // DIO txpin assignment. Change pin assignment if you want to const byte txpin=14; // tx pin assigned to DIO 14 void setup() { vw_setup(4800); // Transmission speed at 4800bps vw_set_tx_pin(txpin); //tell VirtualWire which pin to use void loop() { char *msg= 123456 ; // test message 123456 // Send message via VirtualWire vw_send((uint8_t *)msg, strlen(msg)); // That s it! delay(300); 2012 e-gizmo Mechatronix Central Page 6 of 12 pages

Receiver Application Example The receiver circuit, as a minimum, requires just one gizduino DIO to implement. The host controller (gizduino) running the VirtualWire services ing stream is detected, it processes the data, get rid of the noise, checks for data integrity, and then expose the clean receive data to a running user codes. All complex tasks are done by the Virtual- Wire for you. Control to the receiver ENable pin is not necessary, but is highly recommended. The EGRF- 433A1 DATA output pin, as repeatedly mentioned, is littered with random noise pulses. Even with the absence of incoming signal, the DATA output never cease going from state to state (Fig. 11). This will conceivably put a burden in the MCU hosts, with the effect showing as system slowing down. The Enable pin helps minimize this. It works by keeping the DATA output silent (no pulses) when nothing is being sent from the transmitter side (Fig. 10). This is possible because the ATA3741 chip used in the receiver module has a built-in function that can detect the synchronization start pulse on its own. To use it, the host MCU must pull down Enable pin for a short moment after the completion of a data packet reception. An Arduino demo sketch for the receiver module is shown in the following pages. WIRE ANTENNA (SEE TEXT) Vcc GND DATA N.C. EN DEM Figure 9. EGRF-433A1-R Receiver Module on a gizduino+. As in the transmitter wiring example, users can freely choose a different DIO if the application circuit so requires. But remember to modify the pin as- Page 7 of 12 pages 2012 e-gizmo Mechatronix Central

Figure 10. Oscilloscope trace of receiver DATA output with Enable pin in use. The Enable function mutes the DATA output after completing reception of a data packet, and then restart DATA output by itself upon detection of an incoming transmission. Figure 11. You can leave out the Enable function. But this is what will happen in the DATA output. Random noise pulses keeps coming out of the DATA pin even in the absence of an incoming signal. This may present a unnecessary burden that could slow down the processing speed of the hosts MCU. 2012 e-gizmo Mechatronix Central Page 8 of 12 pages

/* Demo Rx program for e-gizmo EGRF-433A1-R UHF Rx module * * by e-gizmo Mechatronix Central * * using VirtualWire Libraries * * This sample program dumps Rxed data to serial port. * Monitor received data by using the IDE Serial Monitor */ #include <VirtualWire.h> const byte rxpin=11; // DIO pin 2 for Rx const byte rxenable=7; //DIO pin 7 for Rx Enable const byte ledpin=13; // Built in LED /* EGRF-433A1-R Speed settings */ // select 9600bps or 4800bps // Make sure only one group is uncommented // Uncomment next two lines if you want to set speed to 9600baud //unsigned int spattern=0x7810; //BR_Range3 //unsigned int lpattern=0x2ee0; // bit check limit 46-56 //Uncomment next two lines for 4800 baud unsigned int spattern=0x6810; //BR_Range2 unsigned int lpattern=0x2fd8; // bit check limit for 4500-5100 bps byte bitctr=14; void setup() { pinmode(rxenable,output); // EGRF-433A1 DIO for ENable pin ATA3741(); // setup Rx module ATA3741 chip // UART is used for this demo to allow visual display // of Rxed data via Arduino IDE Tools>Serial Monitor // Otherwise, it is freely available for other purpose Serial.begin(9600); // Apply VitualWire settings vw_setup(4800); // Bits per sec vw_set_rx_pin(rxpin); vw_rx_start(); // Start the receiver PLL running pinmode(ledpin,output); // LED Page 9 of 12 pages 2012 e-gizmo Mechatronix Central

void loop() { uint8_t buf[vw_max_message_len]; int i; // And dump Rxed data to serial port // Rxed data are stored in buf[] memory Serial.print( Rx Data: ); { Serial.print((char)buf[i]); Serial.println( ); digitalwrite(rxenable, LOW); // Reset EGRF-433A1-R digitalwrite(13, LOW); // Flash OFF LED indicator digitalwrite(rxenable, HIGH); //Re enable to receive next data packet /* EGRF-433A1-R Hardware Initialization Routines * to start RX activity */ void ATA3741(void){ digitalwrite(rxenable,high); // forcing DATA pin low for 15ms pinmode(rxpin,output); // Change DATA pin direction to OUTPUT digitalwrite(rxpin,low); delaymicroseconds(15000); digitalwrite(rxpin,high); pinmode(rxpin,input); digitalwrite(rxpin,low); // wait for t2 bitctr=14; // send 14 bits init pattern while(bitctr>0){ 2012 e-gizmo Mechatronix Central Page 10 of 12 pages

while(digitalread(rxpin)==high); if((spattern & 0x8000)==0) ATA3741_LO(); else ATA3741_HI(); bitctr--; spattern=spattern<<1; delaymicroseconds(15000); pinmode(rxpin,output); digitalwrite(rxpin,low); delaymicroseconds(1000); digitalwrite(rxpin,high); pinmode(rxpin,input); digitalwrite(rxpin,low); // Enter 14-bit bit check limits pattern bitctr=14; while(bitctr>0){ while(digitalread(rxpin)==high); if((lpattern & 0x8000)==0) ATA3741_LO(); else ATA3741_HI(); bitctr--; lpattern=lpattern<<1; // Output a logic low void ATA3741_LO(void){ // wait until rxpin goes hi while(digitalread(rxpin)==low); delaymicroseconds(131); pinmode(rxpin,output); // output a low delaymicroseconds(150); // for 150uS pinmode(rxpin,input); delaymicroseconds(50); // Output a logic high void ATA3741_HI(void){ // Since rxpin should be normally at logic high // just wait if necessary until rxpin goes high while(digitalread(rxpin)==low); Page 11 of 12 pages 2012 e-gizmo Mechatronix Central

PCB ARTWORK BOTTOM TOP Figure 12. EGRF-433A1-T Transmitter Module PCB artwork. BOTTOM TOP Figure 12. EGRF-433A1-R Receiver Module PCB artwork. 2012 e-gizmo Mechatronix Central Page 12 of 12 pages