Code Monkey home page Code Monkey logo

laser_tape_reverse_engineering's Introduction

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!
Module dimensions: 25x13x50 mm.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.