Parallax 28044 User Manual Download Page 1

 

 
Web Site: www.parallax.com 
Forums: forums.parallax.com 
Sales: [email protected] 
Technical: [email protected] 
 

 
Office: (916) 624-8333 
Fax: (916) 624-8003 
Sales: (888) 512-1024 
Tech Support: (888) 997-8267 
 

 

Copyright © Parallax Inc.

 

 

Parallax Laser Range Finder (#28044) 

v2.0  10/31/2015  Page 1 of 23 

Parallax Laser Range Finder (#28044) 

Designed in conjunction with Grand Idea Studio (www.grandideastudio.com), the Parallax Laser Range 

Finder (LRF) Module is a distance-measuring instrument that uses laser technology to calculate the 

distance to a targeted object. The design uses a multicore Propeller microcontroller, CMOS camera, and 

laser diode to create a low-cost laser range finder. Distance to a targeted object is calculated by optical 

triangulation using simple trigonometry between the centroid of laser light, camera, and object.    

 

 

Features 

 

Optimal measurement range of 6–48 

inches (15–122 cm) with an accuracy 

error <5%, average 3% 

 

Maximum object detection distance of 

~8 feet (2.54 meters) 

 

Range finding sample rate of 5 Hz 

 

Compact module with integrated CMOS 

camera and laser diode 

 

Single row, 4-pin, 0.1” header for easy 

connection to a host system 

 

All engineering materials released as 

open source under a Creative Commons 

license; see page 23 

Key Specifications 

 

Power requirements: 5 VDC @ 150 mA 

 

Communication: Asynchronous serial 

300–115,200 baud with automatic baud 

rate detection  

 

Operating temperature: 32 to 122 °F 

(0 to 50 °C)  

 

Dimensions: 3.95" W x 1.55" H x 0.67" D  

(10.05 W x 3.95 H x 1.7 D cm) 

 

Application Ideas 

 

Distance or liquid level measurements 

 

Object detection and/or avoidance 

 

Item counting

 
 

 

 
Table of Contents 

Connections .................................................... 2

 

Usage ............................................................ 2

 

Command Set ................................................. 3

 

Range and Accuracy ...................................... 10

 

Error Modes .................................................. 10

 

Electrical Characteristics ................................ 11

 

LRF Image Viewer ......................................... 12

 

Hardware Design .......................................... 15

 

Theory of Operation ...................................... 16

 

Camera Interface .......................................... 19

 

Care and Handling ........................................ 22

 

Safety .......................................................... 22

 

Open Source Files and Example Code ............. 23

 

Revision History ............................................ 23

 

Summary of Contents for 28044

Page 1: ...asurement range of 6 48 inches 15 122 cm with an accuracy error 5 average 3 Maximum object detection distance of 8 feet 2 54 meters Range finding sample rate of 5 Hz Compact module with integrated CMOS camera and laser diode Single row 4 pin 0 1 header for easy connection to a host system All engineering materials released as open source under a Creative Commons license see page 23 Key Specificati...

Page 2: ...example circuit for connecting the Parallax Laser Range Finder Module Usage The LRF Module is controlled by the host via a serial communications interface To use simply align the LRF Module towards the target object and send the desired command The serial interface is configured for 8 data bits no parity 1 stop bit 8N1 Automatic baud rate detection occurs on initial power up of the LRF Module The ...

Page 3: ...state The LRF is waiting for a U character to be sent by the host in order to automatically set the communications baud rate Occurs on LRF power up only 4 Orange Blinking Error state The LRF has malfunctioned A message identifying the failed operation will be transmitted on the SOUT Serial Out pin See Error Modes page 10 for details If the LED is OFF the LRF may not be receiving power Command Set ...

Page 4: ...hindered at distances outside of the optimal range the LRF could still be used for gross distance measurements or simple object detection See Range and Accuracy page 10 for details Terminal Example R D 0288 mm BS2 Example SEROUT LRF_TX LrfBaud R Send command Wait for distance measurement and store it as a decimal value SERIN LRF_RX LrfBaud 3000 No_Response WAIT D DEC4 range B Single range measurem...

Page 5: ...ra image to settle AWB AEC and AGC are disabled The EV exposure level is also reduced to a minimum value This will cause the entire camera frame including any previously bright areas to appear dark A bright laser spot may now be more easily identifiable within the frame The camera s settings can be reset to their default with the S command Terminal Example E short delay BS2 Example SEROUT LRF_TX L...

Page 6: ...oubleshooting and debugging FW Firmware revision major minor MFG and PID Manufacturer ID and Product ID of the LRF s on board camera SLOPE INTERCEPT PFC_MIN Device specific values calculated during the calibration process X and used for range finding if the LRF Module is uncalibrated the values will all be 0xFFFFFFFF LOWER_BOUND UPPER_BOUND BLOB_MASS_THRESHOLD Parameters used for blob detection du...

Page 7: ...han the BLOB_MASS_THRESHOLD Marker to indicate the blob with the largest mass primary blob In many cases if a single blob is detected within the frame it is likely the laser spot In other cases there may be reflections of the laser light or other spots that are not related to the laser Generally the blob with the largest mass within the frame can be considered the actual laser spot Terminal Exampl...

Page 8: ...D 255 BLOB_MASS_THRESHOLD 16 Write new values Y N Y A Adjust blob detection parameters Receive new blob detection parameters from the user and store them in memory The current value is displayed within the square brackets Each parameter can have a value from 0 to 255 and must be followed by a carriage return CR If the entered value is out of range an error message will be displayed and the command...

Page 9: ...ment purposes The data is sent MSB first one byte per pixel starting at the upper left pixel location 0 0 moving left to right top to bottom across the frame and ending at the lower right pixel location 320 16 Each byte corresponds to the brightness value of a single pixel where 0x00 is black and 0xFF is white A total of 5 120 bytes of binary data is sent An ASCII footer END is attached to the end...

Page 10: ...h causing a significant reduction in accuracy Accuracy also varies with lighting conditions and material of the target object which affect the LRF Module s capability to determine the laser spot within the camera s frame The LRF Module intentionally limits the maximum detectable distance to 100 inches 254 cm At distances less than 6 inches the laser spot is out of the camera s field of view so no ...

Page 11: ...f EEPROM device If the LRF is in an error state but no error message is transmitted then there is likely a failure with starting either the serial communication or auto baud detection cog For further assistance please contact Parallax technical support Electrical Characteristics At VCC 5 0 V and TA 25 ºC unless otherwise noted Parameter Symbol Specification Unit Min Typical Max Supply Voltage VCC ...

Page 12: ... configured automatically after successful connection to the LRF Module using the Connect button The descriptions in this section are for LRF firmware version 2 0 For descriptions of earlier firmware versions refer to the LRF Module product manual version 1 1 The LRF Image Viewer application was designed in Microsoft Visual Basic NET It requires Microsoft s NET Framework Version 2 0 Redistributabl...

Page 13: ...t is only transmitted when the Send button or Enter key is pressed Any data returned by the LRF will be displayed in the Terminal Console Image window Displays an image captured by the LRF Module Grab Image button Captures an image with the LRF Module s camera and displays it in the Image Window The adjacent radio buttons are used to select one of three image types Full Frame 160x128 resolution gr...

Page 14: ...b mass required for the blob to be considered as the primary blob If the blob mass is greater than or equal to the value it is included This parameter reduces the chance of using an unlikely blob such as one caused by optical noise or reflection for range finding calculations This control represents the BLOB_MASS_THRESHOLD value on the LRF Module The above 3 controls can be manually adjusted to he...

Page 15: ...e laser diode control circuitry is on the left A dotted line not printed on the actual LRF Module indicates the recommended cutting point if the user wishes to separate the laser diode control circuitry from the rest of the LRF for custom projects A Prop Plug Parallax 32201 can attach to the four pads JP2 on the back of the LRF in order to reprogram the Propeller s firmware using the Parallax Prop...

Page 16: ...2_Lite spin FloatString_Lite spin FloatMath_Lite spin Basic_I2C_Driver_Lite spin LRF_OVM7690 spin is the top object file This object handles the user interface command processing and laser range finding mathematics LRF_con spin provides the global constants used throughout the program including camera resolution blob detection range finding and calibration settings OVM7690_obj spin provides the lo...

Page 17: ...am storage so the remaining 32KB is available for data storage Each LRF Module s calibration values and blob detection parameters are stored in the data area Written by Michael Green Optical Triangulation The LRF Module uses optical triangulation for range finding where the distance to the target object is calculated with simple trigonometry between the center points of laser light camera and obje...

Page 18: ...sons S2U4L2GL html The following chart shows measurements taken with a LRF Module pfc is on the X axis and angle is on the Y axis The dark blue diamonds show the actual measurements and the resulting best fit linear equation is printed on the chart and denoted with a light blue line Once the laser is shined onto the target object and the pfc value of the laser spot is received an angle θ can be ca...

Page 19: ... of HREF pulses received since the last VSYNC we can determine which horizontal line of the video frame we are currently on PCLK Pixel clock Asserted when valid pixel data is available on the DVP bus For a 640 pixel line in YUV422 format 16 bits pixel 10 240 pixel clock cycles will occur after each HREF pulse There are nearly one hundred 8 bit registers within the OVM7690 device that require confi...

Page 20: ...le is to capture an image with the camera and determine the location of the laser spot blob within the frame Once the blob is detected its centroid center of mass and resulting pfc value pixels from center are determined and passed to the routine that calculates the distance from the LRF to the target object The LRF Module s image processing and blob detection functions as follows 1 Background Sub...

Page 21: ...d 1 pixels within the total blob The centroid of a blob is its center of mass and is calculated by weighting every valid pixel with where it is in the blob and averaging by the total mass For column 1 n of the blob sum 1 s1 2 s2 n sn Where sn column sum for column n Then centroid sum mass Performing the weighted average as opposed to simply setting the centroid location as the center point of the ...

Page 22: ...played in the image box The laser spot should be centered vertically within the frame If the laser spot is out of position the laser diode will need to be manually adjusted and the LRF Module will need to be re calibrated using the X command Safety The LRF Module uses an Arima APCD 635 02 C3 A Laser Diode that contains integrated automatic power control APC circuitry and a glass collimating lens T...

Page 23: ...rawing Example Code for BASIC Stamp 2 Propeller P8X32A and Arduino LRF Image Viewer Additional Resources Grand Idea Studio s Laser Range Finder web page www grandideastudio com portfolio laser range finder Demonstration videos www youtube com playlist list PLsyTdiI7kVn FuHX_4S52HdA8oJjImwHI Sam s Laser FAQ www repairfaq org sam lasersam htm Revision History Version 2 0 Major revisions to reflect t...

Reviews: