This sensor is perfect for any number of applications that require you to perform measurements between moving or stationary objects. Naturally, robotics applications are very popular but you’ll also find this product to be useful in security systems or as an infrared replacement if so desired.sensor measures distance using sonar; an ultrasonic (well above human hearing) pulse is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return.
The URM37 V3.2 Ultrasonic Sensor uses an industrial level AVR processor as the main processing unit. It comes with a temperature sensor which is unique in its class. The sensor has unique three output mode (PWM, RS232 or TTL) which let it easy to adapt to most devices and applications. The sensor provides one channel servo control output which can be used for sweep function.
The URM V3.2 Rev2 has a jumper which allows user to select RS232 level output or TTL level output.
Specification
- Power: +5V
- Current: <20mA
- Working temperature: -10 ~ +70 C
- Detecting range: 4cm-3m (3-5m is possible, but depending on situations)
- Resolution: 1cm
- Interface: PWM, RS232 or TTL (via Jumper)
- Servo control: One servo control output
- Operating Mode: Serial (PWM) passive control mode; Autonomous Mode; On/OFF Mode
- Temperature sensor: 12 bits reading from serial port
- Size: 22mm × 51 mm
- Weight: 30g
Documents
- Manual
- Arduino Library (Only IDE V1.0 Compatible)
- Arduino Library (IDE 0023 and below)
- Help Mate
Tutorial
Projects
Arduino Sketch
This is the Arduino sketch, which using the software Serial to drive the URM37 module. for more way to drive the module, you could download the library for URM37 from resources.
NOTE: Please put the sensor jumpers to TTL mode. See above for a picture indicating TTL mode
/* DistanceBySoftwareSerial.pde - URM 37 Control Library Version 2.0.0 Author: Miles Burton, [email protected] Copyright (c) 2009 Miles Burton All Rights Reserved This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // # This library is a improvement version of URM 37 Control Library Version 2.0.0 from Miles Burton // # Original Author: Miles Burton, [email protected] // # // # Editor : Lauren from DFRobot // # Date : 08.05.2012 // # Product name: URM V3.2 ultrasonic sensor TTL connection with Arduino // # Product SKU : SEN0001 // # Version : 1.0 // # Update the library to make it compatible with the Arduino IDE 1.0 or the latest version // # Description: // # The sketch for using the URM37 from DFRobot based on the Software Serial library // # You could drive the URM37 with 2 digital pins on your Arduino board, and it works stable. // # Connection: // # VCC (Arduino) -> Pin 1 VCC (URM37 V3.2) // # GND (Arduino) -> Pin 2 GND (URM37 V3.2) // # Pin 6 (Arduino) -> Pin 9 TXD (URM37 V3.2) // # Pin 7 (Arduino) -> Pin 8 RXD (URM37 V3.2) // # #include "URMSerial.h" // The measurement we're taking #define DISTANCE 1 #define TEMPERATURE 2 #define ERROR 3 #define NOTREADY 4 #define TIMEOUT 5 URMSerial urm; void setup() { Serial.begin(9600); // Sets the baud rate to 9600 urm.begin(6,7,9600); // RX Pin, TX Pin, Baud Rate Serial.println("URM37 Library by Miles Burton"); // Shameless plug } void loop() { Serial.print("Measurement: "); Serial.println(getMeasurement()); // Output measurement delay(50); } int value; // This value will be populated int getMeasurement() { // Request a distance reading from the URM37 switch(urm.requestMeasurementOrTimeout(DISTANCE, value)) // Find out the type of request { case DISTANCE: // Double check the reading we recieve is of DISTANCE type // Serial.println(value); // Fetch the distance in centimeters from the URM37 return value; break; case TEMPERATURE: return value; break; case ERROR: Serial.println("Error"); break; case NOTREADY: Serial.println("Not Ready"); break; case TIMEOUT: Serial.println("Timeout"); break; } return -1; }