Ultrasonic Distance Measurement Module



Similar documents
Specification: 1 Specification

Electronic Brick of Current Sensor

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

USB / Data-Acquisition Module NOW LEAD-FREE

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Arduino Motor Shield (L298) Manual

Using Xbee in Serial Communication

Working with microcontroller-generated audio frequencies (adapted from the Machine Science tutorial)

Lab 6 Introduction to Serial and Wireless Communication

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

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

USB I/O CONTROL BOX 8 relays, 8 digital I/O lines and 8 HV inputs

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

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

RS - SPM. Serial parallel translator module

DS Wire Digital Thermometer and Thermostat

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

DISCONTINUED. AtlasScientific. as of 10/21/13. E.C. Circuit. Biology Technology. Features

RS232 Board datasheet

TS555. Low-power single CMOS timer. Description. Features. The TS555 is a single CMOS timer with very low consumption:

Advanced Data Capture and Control Systems

JTAG-HS2 Programming Cable for Xilinx FPGAs. Overview. Revised January 22, 2015 This manual applies to the HTAG-HS2 rev. A

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

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

Agilent Technologies 1670G Series (Option 004) Pattern Generator Specifications and Characteristics

CD4013BC Dual D-Type Flip-Flop

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

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

Wireless Security Camera

Accurate Measurement of the Mains Electricity Frequency

Description. Dimensions. Features. precision works better

AK-STM32-LKIT Development Board

Software Manual RS232 Laser Merge Module. Document # SU Rev A

ET-BASE AVR ATmega64/128

MM74HC273 Octal D-Type Flip-Flops with Clear

Product Datasheet P MHz RF Powerharvester Receiver

Serial Communications

TIL311 HEXADECIMAL DISPLAY WITH LOGIC

DEPARTMENT OF ELECTRONICS ENGINEERING

An Introduction to MPLAB Integrated Development Environment

ACT4077 Driver for MACAIR A3818, A5690, A5232, A4905 & MIL-STD-1553

TS5010 TeraTune Programmable Bandpass Filter

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

ABB Drives. User s Manual HTL Encoder Interface FEN-31

8 by 8 dot matrix LED displays with Cascadable Serial driver B32CDM8 B48CDM8 B64CDM8 General Description

US-SPI New generation of High performances Ultrasonic device

FEATURES DESCRIPTION APPLICATIONS BLOCK DIAGRAM. PT2248 Infrared Remote Control Transmitter

USB-QUAD08. Eight-channel Quadrature Encoder Input Device. Specifications

Lab Experiment 1: The LPC 2148 Education Board

AirCasting Particle Monitor Bill of Materials

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

DS1307ZN. 64 x 8 Serial Real-Time Clock

CD40174BC CD40175BC Hex D-Type Flip-Flop Quad D-Type Flip-Flop

MILE Encoder for EC 90 flat

PC INTERFACE MODULES FOR TOLL-PLAZA CLASSIFICATION SENSORS

CAN & LIN Development Tool CLDT1004 HS CAN

+5 V Powered RS-232/RS-422 Transceiver AD7306

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

PICmicro tm Development Board

MANUAL FOR RX700 LR and NR

ULC Technology: High-performance gate array package using multiple metal layer CMOS technology featuring sub-micron channel lengths (0.

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

MicroMag3 3-Axis Magnetic Sensor Module

Link-65 MHz, +3.3V LVDS Transmitter 24-Bit Flat Panel Display (FPD) Link-65 MHz

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

Brushless DC Motor Controller Product Specification Assembly 025F0129

DAM Series DAM124 4DIN+8AI+4DO Module Model No.:DAM124 WebSite:

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

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

Modification of an AOR AR-8600 receiver to tune it with a ACECO FC-3002 frequency finder

DC Motor Driver 24V 20A [RKI-1340]

DS1621 Digital Thermometer and Thermostat

HIGH SPEED-10 MBit/s LOGIC GATE OPTOCOUPLERS

A Surveillance Robot with Climbing Capabilities for Home Security

DS1621 Digital Thermometer and Thermostat

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

LM555/NE555/SA555. Single Timer. Description. Features. Applications. Internal Block Diagram. Vcc GND. Trigger. Discharge. Output F/F.

MM54C150 MM74C Line to 1-Line Multiplexer

Bluetooth UART/RS232 Module

US-Key New generation of High performances Ultrasonic device

GMB HR84 GMM F346 TECHNICL MANUAL. grifo ITALIAN TECHNOLOGY. grifo Mini BLOCK Housing, 8 Opto Input, 4 Relay Outputs

PI5C

Industrial Bar Code Scanners

Fiber Optics. Integrated Photo Detector Receiver for Plastic Fiber Plastic Connector Housing SFH551/1-1 SFH551/1-1V

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

10/100BASE-T Copper Transceiver Small Form Pluggable (SFP), 3.3V 100 Mbps Fast Ethernet. Features. Application

MM74HC174 Hex D-Type Flip-Flops with Clear

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

GM862 Arduino Shield

ADS9850 Signal Generator Module

X8 Option 2 - Technology

Interfacing Analog to Digital Data Converters

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Microtronics technologies Mobile:

UniPi technical documentation REV 1.1

Transcription:

Ultrasonic Distance Measurement Module General Description Distance measurement sensor is a low cost full functionality solution for distance measurement applications. The module is based on the measurement of time flight of ultrasonic pulse, which is reflected by an object. The distance to be measured mainly depends on the speed of ultrasonic waves in space or air which is a constant- and the flight time of the pulse. The module performs these calculations and outputs a pulse width depends on the measured distance, this pulse is easily interfaced to any microcontroller. Features Supply voltage +5Vdc Supply Current 10mA Measurement distance Range from 2cm to 400cm. Input trigger pulse is 5V TTL compatible (5 µs minimum). Output echo pulse is 5V TTL compatible. Size 44.5mm W x 20mm H x 15mm D. Interface connector 4-pin header SIP, 0.1 spacing. Operating temperature range 0-70 C.

Table1. Connector signals definition Label Definition Direction Function VCC Supply voltage Power Supply power to module 5VDC with 10mA max Trig Trigger Input Input trigger for measurement module. This pin is TTL/CMOS logic (5V and 0V). The trigger pulse should be 5µs minimum Echo Echo Output Output echo pulse from measurement module. This pin is TTL/CMOS logic (5V and 0V). The output pulse width time is function of the distance to be measured GND Ground Ground System ground connected to the same ground of the host. Connection Diagram (5 µs min) Microcontroller +5V Ultrasonic Module VCC +5V Measured distance Output Input Trigger TX Input GND width depends on Measured distance Output Echo RX Timing Diagram Trigger Input T1 T2 Echo Output T3

Timing Characteristics Time Description Value Min Typ Max Unit T1 Trigger pulse 5 10 - µs T2 Echo hold off 400 450 500 µs T3 Echo pulse 150-16000 µs Calculating equation D = (T 0.0343) / 2 Where: D is the measured distance in cm. T is the echo output pulse in µsec. 0.0343 is the speed of sound in air in cm/µsec. Alternative calculating equation D = (T / 29.1) / 2 Where: D is the measured distance in cm. T is the echo output pulse in µsec. 29.1 is the pace of sound in air in µsec /cm. 2012 Page 3 of 7

Typical application circuit using PIC16F628A Here is a simple project you may build to test your module. The project uses PIC16F628A microcontroller to trigger the module, measuring the echo pulse, calculating the distance in cm and displaying it on 2X16 LCD. The project also include the source code written in BASIC language for PROTON compiler. The firmware may be rewritten for any other compiler to perform the required function.

'================================================================================ '==================== Initialization ========================= '================================================================================ Device = 16F628A 'Microcontroller name XTAL = 4 ;XTAL speed in MHz Config XT_OSC,WDT_OFF,BODEN_OFF,LVP_OFF,PWRTE_OFF,CP_OFF ;I/O Ports Programming TRISA = %11111000 TRISB = %00001111 CMCON = %00000111 'LCD definition Symbol DO_RS = PORTA.1 Symbol DO_EN = PORTA.0 Symbol DO_LCD_D4 = PORTB.4 Symbol DO_LCD_D5 = PORTB.5 Symbol DO_LCD_D6 = PORTB.6 Symbol DO_LCD_D7 = PORTB.7 'Other I/O definitions Symbol DO_Trigger = PORTA.2 Symbol DI_Echo = PORTA.3 'Variables declaration Dim W_Word As Word Dim F_Float As Float 'LCD Initialization LCD_TYPE 0 '0 FOR ALPHABETIC 1 FOR GRAPHIC LCD_INTERFACE 4 '4 BIT DATA LENGTH LCD_LINES 2 'NUMBER OF LINES LCD_DTPIN DO_LCD_D4 'DATA PORT LCD_ENPIN DO_EN 'ENABLE PIN LCD_RSPIN DO_RS 'RS PIN '======================================== 'Main '======================================== Cls Print At 1,1,"Distance = " Start: DO_Trigger = 0 ' Output low to the trigger input of ultrasonic module. DelayUS 10 ' Wait 10 µs for trigger pulse. DO_Trigger = 1 ' Output high to the trigger input of ultrasonic module. W_Word = PulsIn DI_Echo,1 ' Read the echo pulse time ( refer to Proton help to get ' more information about In instruction) F_Float = W_Word * 10 ' convert the unit of time to microseconds. F_Float = F_Float * 0.0343 ' multiply the time by the speed of sound in air (cm/µsec). F_Float = F_Float / 2 ' Divide the calculated distance by 2 Print At 1,12," " ' Clear the last value on LCD. Print At 1,12,DEC1 F_Float ' Display the new distance on LCD. DelayMS 300 ' Wait 300 millisecond before next measurement. GoTo Start 2012 Page 5 of 7

Example Code for ARDUINO It should be noticed that: 1. The calculation of distance rely on the Pace of sound (29.1 µsec /cm) and not the speed of sound 2. The distance limited to 200cm only. 3. The calculated distance is sent over serial interface. /* ultrasonic module Ping distance sensor] VCC to arduino 5v GND to arduino GND Echo to Arduino pin 13 Trig to Arduino pin 12 */ #define trigpin 12 #define echopin 13 void setup() Serial.begin (9600); pinmode(trigpin, OUTPUT); pinmode(echopin, INPUT); void loop() int duration, distance; digitalwrite(trigpin, HIGH); delaymicroseconds(1000); digitalwrite(trigpin, LOW); duration = pulsein(echopin, HIGH); distance = (duration/2) / 29.1; if (distance >= 200 distance <= 0) Serial.println("Out of range"); else Serial.print(distance); Serial.println(" cm"); delay(300); 2012 Page 6 of 7

Notes: 32 El Falaky St. Tahreer, Cairo Egypt. Tel: 02-27960551 Sales@ram-electronics.com www.ram-e-shop.com