• Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    C
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Alternative firmware for a cheap X-40 laser tape measure

laser_tape_reverse_engineering

This project describes my work about reverse engineering electronics (laser rangefinder module) of a cheap "X-40" laser tape measure.
I create my own firmware that allow to use this module for DIY purposes.
Supported module types are: "512A" and "701A". Working of "703A" is confirmed by "Damian" here: Link.
UPD 11/2019: Attention: It was found that newer "x-40" laser tape measures come with "M88B" modules. Marking is "88B" at the PCB near MCU. That modules are based on STM32F0 MCU (it has QFN-32 package). That modules are not supported by my firmware!
UPD 06/2022: Added support for newer U85A/U85B modules based on STM32F0 MCU. See Code/CortexM0 folder.
"701A" module dimensions: 25x13x50 mm.
"U85" module dimensions: 17x7x41mm, Weight: ~4g
See Github Wiki for more information!

Big article in Russian: https://habr.com/post/327642/
Google translated: Link.
Another project page: https://hackaday.io/project/25515-cheap-laser-tape-measure-reverse-engineering

Steps that I have done:

  • Fully reverse engineered schematic of the laser tape measure.
  • Captured data packets at I2C bus with logic analyzer.
  • Decoded that packets and get values of laser modulation frequencies.
  • Create my own firmware that captures low frequency signal and send it to PC.
  • Create my own firmware that captures signal and processing if using Goertzel algorithm. Phase difference results are send to the PC.
  • Main result: Create my own firmware ("Firmware_dist_calculation_fast") that calculates distance to the object.
  • Write C# PC utilities to process and show results.

Video (testing rangefinder module): https://youtu.be/bJaUrZ7ZMj4

Main parts of the laser rangefinder module are STM32F100C8T6 MCU, Si5351 dual PLL, APD (unknown type), laser diode, power sources.
Laser tape measure structure schematic:
Alt text

Article about connecting laser rangefinder module to the Arduino:
https://www.hackster.io/iliasam/making-a-cheap-laser-rangefinder-for-arduino-4dd849
Video: https://youtu.be/FA4mfvgpOQQ

UART data example ("Firmware_dist_calculation_fast"):
DIST;01574;AMP;0993;TEMP;1343;VOLT;082\r\n
DIST - distance to object in mm.
AMP - signal amplitude. TEMP - APD temperature (raw ADC value).
VOLT - APD voltage. String length is constant.
Distance data are transmitted continuously.
UART baudrate - 256000.

UART commands ("Firmware_dist_calculation_fast"):
"E" - enable laser and measurement process.
"D" - disable laser and measurement process.
"C" - start zero distance calibration. You need to run zero distance calibration at the first start. Place any white object at the distance > 10cm from the laser tape before calibration.

Distance measurement speed - near 60 Hz.
Distance measurement accuracy vary from 1 to 10 mm depending from the distance and surface type.

To get better results, small board with APD must be closed from external light.

More Repositories

1

OpenSimpleLidar

Open Source scanning laser rangefinder
C
2,382
star
2

OpenTOFLidar

Open Source TOF Lidar
C
763
star
3

STM32F4_UVC_Camera

STM32F4-Discovery USB Device UVC Camera examples
C
247
star
4

OpenLIDAR

Open Hardware scanning triangulation laser rangefinder
C
200
star
5

STM32_HOST_UVC_Camera

Example of connecting USB Web camera to STM32F4 USB HOST
C
144
star
6

STM32F4_USB_MICROPHONE

Example of using STM32F4-DISCOVERY as USB microphone for the PC.
C
57
star
7

LaserText

Very simple text laser projector
C
54
star
8

STM32F4_SDR_GPS

STM32 based SDR GPS receiver
C
40
star
9

fake86_to_stm32f429_port

8086 PC (x86) emulator for STM32F429 MCU
C
31
star
10

STM32_DisplayLink

Connecting USB-VGA adapter to STM32
C
28
star
11

ESP32_SDR_GPS

Software GPS receiver for ESP32
C
26
star
12

MCUCapture

Utility for plotting array data from MCU RAM
C
26
star
13

uProbe

Simple logic probe for electronic circuits
C
24
star
14

stm32f429_vga_examples

Code examples of using STM32F429 for generating VGA image.
C
23
star
15

SDR_projects

22
star
16

zx_to_vga

ZX Spectrum video signal to VGA converter
C
14
star
17

LDS01RR_lidar

Some info and soft for LDS01RR Lidar
C#
14
star
18

USB_Photoframe

STM32 flash drive emulator
C
14
star
19

STM32F4_phase_laser_rangefinder

C
12
star
20

ROS_simple_nav

Simple Navigation Node for the ROS
C++
11
star
21

10base_t_software_PHY

C
9
star
22

stm32f4-discovery_sound_playback

Simple example of playback signal from the MEMS Microphone to the externall I2S DAC
C
6
star
23

logicdiscovery

Automatically exported from code.google.com/p/logicdiscovery
C
6
star
24

keyence_LK_G407_reverce

Verilog
6
star
25

Casio_calculator_upgrade

Custom hardware and firmware for Casio FX-7000 calculator.
C
6
star
26

WIFI_RADIO

STM32F4 WiFi radio project
C
5
star
27

stm32_linear_encoder

Using optical incremental encoder with STM32 in analogue mode
C
5
star
28

Leuze_RS4_reverse_engineering

Reverse engineering Leuze RS4-4 laser scanner
Roff
4
star
29

tektronix_experiments

Results of my experiments with TDS540D oscilloscope
Assembly
4
star
30

opendous-jtag-xvc

XVC plugin working with opendous-jtag adapter
C++
4
star
31

MH-Z19_simple_pc_test

C#
3
star
32

LaserBeamProfiler

Simple DIY laser beam profiler
C
3
star
33

MH_Z19_CO2_monitor

STM32 CO2 monotor with OLED
C
2
star
34

ROS_files

Some small software for ROS (RQT plugins).
Python
2
star
35

EinkTemperatureMonitor

Simple temperature monitor
C
2
star
36

Power-Meter-2

Device to calculate house energy by detecting electricity meter blinking
C
2
star
37

LRPT_places

LRPT places - Windows utility for drawing marks at LRPT images
C#
2
star
38

MBalancing

Device for dynamic motor balancing
C
2
star
39

esp32_clock

ESP32 clock
C
1
star
40

gps_rf_frontend_sim

Simple GPS RF front-end simulator based on STM32
C
1
star