Laser distance meter hack

Bench setup for development.

Final code to control and read the SW-A40 laser distance meters.


Project related downloads.

ContinuousMeasurementMode
ContinuousMeasurementMode
ContinuousMeasurementMode.log
38.7 KB
34 Downloads
Details
DualMeasurementResetZero
DualMeasurementResetZero
DualMeasurementResetZero.log
13.5 KB
31 Downloads
Details
Lookup Table LCD Last Line
Lookup Table LCD Last Line
LookupTableLcdLastLine.pdf
67.2 KB
38 Downloads
Details
MeasurementOrigin2
MeasurementOrigin2
MeasurementOrigin2.log
11.5 KB
30 Downloads
Details
PowerOn
PowerOn
PowerOn.log
1.1 KB
36 Downloads
Details
SingleMeasurementNoReset
SingleMeasurementNoReset
SingleMeasurementNoReset.log
3.2 KB
28 Downloads
Details
SingleMeasurementResetZero
SingleMeasurementResetZero
SingleMeasurementResetZero.log
6.3 KB
28 Downloads
Details
UnitsCycle
UnitsCycle
UnitsCycle.log
25.8 KB
33 Downloads
Details

Follow up post for a second device type with different board layout.

19 thoughts on “Laser distance meter hack

  1. It’s so lucky when my Laser Rangefinder was almost like yours (mine was SW-M40). Due to the different, can you help me point out where are the 3 SPI pins in my board? Thank you very much!
    This is the picture of the board
    https://photos.google.com/share/AF1QipOz-SHu2ons81yMIHJ0usprKw2ipbXHM48_K5_R-fGEPUnDD4OujcCK2X6KtnvRvw/photo/AF1QipPVkwGT-talzFGjLetJ5Vk1fEg8AA3hBGyb_Y5f?key=OUVYaGwxZzBJeENzWmJUaXdWanZDeWxlandCZTRR
    Again, thank you very much! So lucky when I got the laser module same as yours.

    • Looks similar. Can you provide a picture from back side of this board?
      In case you have a oscilloscope probe each pin on the LCD connector to find the SPI signals.

      • Here is the picture of back side of the board:
        https://photos.app.goo.gl/ZVhLUGbIYl3oGnKG2
        I lived in Viet Nam, where GDP per person just about 2100 USD/year so an oscilloscope for weekend hobby was expensive.
        I’m also trying to connect the board via TX-RX connector but there was no luck yet :).
        Thank you!

    • Your first picture, the LCD connector pins counting left to right would be:
      5 = Clock CLK
      6 = Data DTA
      8 = Chip Select CS

      I hope the LCD pinout is the same as mine. If it doesn’t work for you than very probably the pinout is different, even when it looks equal.

      • Thank you,
        I will test on tomorrow but I think 80% it will work.
        I will inform you the result.

        • Waiting for your feedback. Make sure your Arduino board operates at 3.3V, this is what the LCD signals require.

        • I don’t wonder. There are obviously so many board variants existing of these laser distance meters that very probably the LCD type varies also. All my working units have an LCD that reads DFG0071 and a date on the back side.

          • ok, I’ll study my circuit better.
            Another quick question: you say “Before you connect any hardware to the LCD bus of the laser distance meter make sure it runs at 3V signal levels!” this is true, but a regular 5 V arduino can read properly a 3V digital signal, right? You fry the telemeter only if you send 5V signal to it.
            Thank you

          • 5V Arduino board might be 3V compatible for reading. But why taking a risk?

  2. hi good job! I have question…… How do you have connected LCD pinout to the arduino? they are so small
    Thank you

    • Using very thin wire from an old coil. Yes, soldering that stuff requires some skills. 😉

      • I have the same device of Khoi Nguyen Phan. I’ m trying to connect it to my arduino uno. Can you post some pictures of those precise soldering?
        Thank you again!

  3. Hi! After reading your article I bought the same range finder you own (on Amazon). I disassembled it, I did all three soldering (data, cs, clock) but it doesn’t print anything similar to your to my serial port. I noticed a slight different lcd pinout as you can see in my photos. I’m using a 5V (it only read signals) arduino with GND connected to – of batteries. If necessary I also have this 3V board http://wiki.stm32duino.com/index.php?title=File:Bluepillpinout.gif
    This are the pictures https://imgur.com/a/LOJMDlt
    What’s wrong? Please help me, I need to read measure remotely
    Thanks

    • You already noticed a different LCD pinout. So maybe the LCD is different, so is the internal controller and hence the LCD protocol. My code works with LCD’s marked DFG0071 on the backside. Anything else is probably different and not believed to work. This project and code is a proof of concept. To make it work with other devices requires additional efforts in reverse engineering.

  4. Hello,
    this is Stefan from hackaday. Unfortunately I do not have my old rangefinder any more.
    I bought an SNDWay later, but got the same device as oregon and Khoi Nguyen Phan.
    It seems that there are a handful companys in china building cloned devices, because they look identically.

    The Pins 5 and 6 of the display connector are connected to Pin 30 and 31 of the STM32 µC. This are RX and TX of USART1 of the microcontroller. So it could be that the display is driven by a uart interface.
    @Michael, do you know if the DFG0071 display is connected to a hardware SPI bus?

    • On the first device I made, the LCD is connected to PB6,PB7 and PB8 which seems to be also an USART. But protocol is clearly SPI.

      • Thanks for your reply. I will check the protocol and give feedback as soon as possible.

        PS. Can someone correct my typing errors 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments will be moderated! Spam deleted immediately!
Before you submit form:
Human test by Not Captcha