Giter Site home page Giter Site logo

iliasam / laser_tape_reverse_engineering Goto Github PK

View Code? Open in Web Editor NEW
118.0 118.0 46.0 36.3 MB

Alternative firmware for a cheap X-40 laser tape measure

Home Page: https://habrahabr.ru/post/327642

License: MIT License

Batchfile 0.07% C 99.13% Assembly 0.77% Python 0.01% PowerShell 0.01%
laser rangefinder reverse-engineering stm32

laser_tape_reverse_engineering's People

Contributors

iliasam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laser_tape_reverse_engineering's Issues

Arduino Nano Not working

My device U85B .Nano RX TX connect not reading.but TTL good reading .we need Arduino Nano or 2560 program connect Desktop.it is possible?

Request firmware with lower baudrate

I would like to request a copy of firmware Firmware_dist_calculation_fast for U85 module, but with a lower baudrate of 115200.

The reason for this is to eliminate data corruption due to high baudrate as a reason for the unplausible values mentioned in #5

85A module not working.

In have purchased the following device, which appears to be identical to the D30 device:
https://www.amazon.de/gp/product/B08H8WPB3M/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

Upon disassembly i noticed the module was marked as 85A, but it appears to be visually identical to the 85B module:
Image (20)
Image (19)

On the JRT-Measure website it seems like the 85A is the same as the 85B, just with a more powerful laser diode, better suited for industry applications:
https://www.jrt-measure.com/distance-sensor-short-range/57266349.html

I am able to succesfully program the MCu via the STLink software using the U85B HEX files, but I do not get any data via the serial connection, and the laser is permenantly on.

I have tried using an arduino and a CH340 shield to interface with my PC, and I have tried the serial monitor in the Arduino IDE, Serial Port Monitor, and the PC utilities, but I am not getting any comminication from the module.

Could you provide some support for troubleshooting?

88B planned ?

Great project!

Unfortunately the X-40's are very scarce now. I bought the only one I could find on ebay and it just arrived ... with an 88B module. Any chance you're going to support it someday? Any suggestions where I might find a X-40 with the right module?

Thanks for the amazing work in any case ... wish I could give you 4 stars!

Skip

Looking for Laser ranger's alternative wiring/circuit layout.

Voltage regulation 85B Module

I am using multiple 85B modules for a project, running your firmware.

I see you have inspected the boards thourougly, what is the highest voltage you would reccomend to power such modules?

Lowering the baud rate

The laser works perfectly on a PC, but I have issues using it on my Wemos D1 Mini Pro. I have tried the TX/RX pins and SoftwareSerial, but I only get questionmarks and weird characters indicating that the baud rate is wrong.

I have found multiple people saying that SoftwareSerial doesn't play well beyond 115200. I found the definition of the baud rate in the firmware, but would it be possible to lowering it without any further concern? Any tips on how I can rebuild the firmware hex file?

Port it Arduino framework to make it portable

So it would be nice to port it to Arduino framework so people can easily tinker with the code. It can also allow for use with different chips like the esp32 etc.
There exist a port of the Arduino framework for the stm32 here which is supported and easy to use with platformio, vscode and Arduino ide.

There are also Holtek chips that are almost clones of the stm32, and they provide a nice application note with code, PCB, schematics etc here https://www.holtek.com/page/applications/detail/WAS-18A1
It would be great to port your code to this chip too, especially since this application note is used by all sorts of Chinese rebranders to develop their cheap rangefinders and measurement devices.
The Arduino framework would make the porting process much easier for all these platforms.

Porting the code should be pretty straight-forward, just replace all stm32-specific library code with the more generic Arduino counterparts and make the pin config generic and maybe in another file.

Accuracy and Range Limits

Can you please describe how much is Range limit of measured distance?
The original laser meter is marked as 40m, but what about the new firmware?
Can it measure distances more than 40m by prism reflectors?

Thanks

Turn off laser from serial

Is there a way to turn the laser on and off using serial commands?
Yes there is:

Look at the following code:

void process_rx_data(uint8_t data)
{
  switch (data)
  {
      case (uint8_t)'E': //Enable laser and measurement process
      {
        enable_laser();
        measure_enabled = 1;
        break;
      }
      case (uint8_t)'D': //Disable laser and measurement process
      {
        disable_laser();
        measure_enabled = 0;
        break;
      }
      case (uint8_t)'C'://Start calibration process
      {
        calibration_needed = 1;
        break;
      }
    
    default: break;
  }
}

Connect TX to the USB-TTL module and you can send 'E' and 'D' to enable and disable the laser.
If you have the 703A module the correct PIN to use is the one just above the "TX" as shown in this picture: https://imgur.com/a/ThzwNxz

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.