{"id":21849371,"url":"https://github.com/iliasam/laser_tape_reverse_engineering","last_synced_at":"2025-04-05T06:05:47.081Z","repository":{"id":45866216,"uuid":"90557461","full_name":"iliasam/Laser_tape_reverse_engineering","owner":"iliasam","description":"Alternative firmware for a cheap X-40 laser tape measure","archived":false,"fork":false,"pushed_at":"2024-10-23T11:19:52.000Z","size":39763,"stargazers_count":126,"open_issues_count":0,"forks_count":48,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-29T05:07:21.339Z","etag":null,"topics":["laser","rangefinder","reverse-engineering","stm32"],"latest_commit_sha":null,"homepage":"https://habrahabr.ru/post/327642","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iliasam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-07T19:46:13.000Z","updated_at":"2025-03-21T03:26:30.000Z","dependencies_parsed_at":"2025-01-01T08:11:14.479Z","dependency_job_id":"7f387755-4ddc-4d6c-a451-f2c50608ddde","html_url":"https://github.com/iliasam/Laser_tape_reverse_engineering","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliasam%2FLaser_tape_reverse_engineering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliasam%2FLaser_tape_reverse_engineering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliasam%2FLaser_tape_reverse_engineering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iliasam%2FLaser_tape_reverse_engineering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iliasam","download_url":"https://codeload.github.com/iliasam/Laser_tape_reverse_engineering/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294538,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laser","rangefinder","reverse-engineering","stm32"],"created_at":"2024-11-28T00:12:43.066Z","updated_at":"2025-04-05T06:05:47.061Z","avatar_url":"https://github.com/iliasam.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laser_tape_reverse_engineering \n\nThis project describes my work about reverse engineering electronics (laser rangefinder module) of a cheap \"X-40\" laser tape measure.  \nI create my own firmware that allow to use this module for DIY purposes.  \nSupported module types are: \"512A\" and \"701A\". Working of \"703A\" is confirmed by \"Damian\" here: [Link](https://www.hackster.io/iliasam/making-a-cheap-laser-rangefinder-for-arduino-4dd849).  \nUPD 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!  \nUPD 06/2022: Added support for newer U85A/U85B modules based on STM32F0 MCU. See Code/CortexM0 folder.    \nUPD 10/2024: Added support for newer B2A modules based on STM32G0 MCU. See Code/CortexM0_STM32G0 folder.    \n\"701A\" module dimensions: 25x13x50 mm.   \n\"U85/B2A\" module dimensions: 17x7x41mm, Weight: ~4g  \nSee [Github Wiki](https://github.com/iliasam/Laser_tape_reverse_engineering/wiki) for more information!    \n  \nBig article in Russian: https://habr.com/post/327642/  \nGoogle translated: [Link](http://translate.google.com/translate?sl=ru\u0026tl=en\u0026js=y\u0026prev=_t\u0026hl=en\u0026ie=UTF-8\u0026u=https%3A%2F%2Fhabr.com%2Fpost%2F327642%2F\u0026edit-text=).  \nAnother project page: https://hackaday.io/project/25515-cheap-laser-tape-measure-reverse-engineering  \n\nSteps that I have done:  \n- Fully reverse engineered schematic of the laser tape measure.   \n- Captured data packets at I2C bus with logic analyzer.  \n- Decoded that packets and get values of laser modulation frequencies.  \n- Create my own firmware that captures low frequency signal and send it to PC.  \n- Create my own firmware that captures signal and processing if using Goertzel algorithm. Phase difference results are send to the PC.  \n- Main result: Create my own firmware (\"Firmware_dist_calculation_fast\") that calculates distance to the object.  \n- Write C# PC utilities to process and show results.  \n\nVideo (testing rangefinder module): https://youtu.be/bJaUrZ7ZMj4  \n\nMain parts of the laser rangefinder module are STM32F100C8T6 MCU, Si5351 dual PLL, APD (unknown type), laser diode, power sources.  \nLaser tape measure structure schematic:  \n![Alt text](Schematic/schematic_structure.png?raw=true \"Image\")  \n  \nArticle about connecting laser rangefinder module to the Arduino:  \nhttps://www.hackster.io/iliasam/making-a-cheap-laser-rangefinder-for-arduino-4dd849  \nVideo: https://youtu.be/FA4mfvgpOQQ  \n\n\nUART data example (\"Firmware_dist_calculation_fast\"):  \nDIST;01574;AMP;0993;TEMP;1343;VOLT;082\\r\\n  \nDIST - distance to object in mm.  \nAMP  - signal amplitude. \nTEMP - APD temperature (raw ADC value).  \nVOLT - APD voltage. \nString length is constant.  \nDistance data are transmitted continuously.  \nUART baudrate - 256000.  \n\nUART commands (\"Firmware_dist_calculation_fast\"):  \n\"E\" - enable laser and measurement process.  \n\"D\" - disable laser and measurement process.  \n\"C\" - start zero distance calibration. You need to run zero distance calibration at the first start. Place any white object at the distance \u003e 10cm from the laser tape before calibration.  \n\nDistance measurement speed - near 60 Hz.  \nDistance measurement accuracy vary from 1 to 10 mm depending from the distance and surface type.  \n\nTo get better results, small board with APD must be closed from external light.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filiasam%2Flaser_tape_reverse_engineering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filiasam%2Flaser_tape_reverse_engineering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filiasam%2Flaser_tape_reverse_engineering/lists"}