• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

laser as z probe

Scheduled Pinned Locked Moved
Duet Hardware and wiring
9
26
2.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    timcurtis67
    last edited by 6 Nov 2019, 12:21

    @chilli said in laser as z probe:

    il-300

    I would imagine you would need to use a raspberry Pi type device and program it to understand the signal put out by the il-300. Then have the Pi talk to the duet through serial communication in the form of Gcodes.

    Anything is possible if you want to put the effort into it....

    1 Reply Last reply Reply Quote 0
    • undefined
      chilli
      last edited by 6 Nov 2019, 13:16

      i will be able to get the datasheet tomorrow, to see what output i can get from the laser.
      what type of output would i need to communicate with the duet?

      undefined 1 Reply Last reply 6 Nov 2019, 15:42 Reply Quote 0
      • undefined
        grizewald @chilli
        last edited by 6 Nov 2019, 15:42

        @chilli Have a look at the following two pages:

        https://duet3d.dozuki.com/Wiki/Choosing_a_Z_probe
        https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe

        You'd need to find some way to make the sensor support one of the interfaces which already exist.

        Most interfaces are very simple and emulate a switch, so all they tell the Duet firmware is that the sensor has been triggered (i.e. has sensed the surface of the bed.)

        It may be possible to do something with a Pi, but if you are emulating a probe and need to convert the data from the sensor into a simple switch, the time taken to do that conversion could introduce delay and inaccuracy.

        It's hard to speculate without knowing how the laser sensor talks to things.

        1 Reply Last reply Reply Quote 0
        • undefined
          Danal
          last edited by 6 Nov 2019, 16:43

          A Pi is MASSIVE overkill.

          An Arduino micro or an ESP8266 or even ESP32 is still overkill; still, I'd lean toward them simply because they are available at quite low prices in "quick ship" retail channels. Example: They are in the $4 to $6 area, qty 1, from vendors like Amazon.

          Get the datasheet for the laser, and in all likelihood, we can put a wiring diagram and a simple sketch (arduino program) in this discussion thread.

          @chilli Can you order from US amazon? If not, in what country are you?

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • undefined
            chilli
            last edited by chilli 11 Jul 2019, 07:04 7 Nov 2019, 07:03

            I'm based in Germany.
            Got an arduino uno flying around here, so could use that if necessary

            I changed from the il300 to an il100, cause of the range of the laser
            Also uploading the datasheets and the manuals of both

            Page 5 of the il1500 manual: As far as I can see, the il1500 can give out an analog output from 0 to 5V. I can also set a low and max point, inbetween its giving out a go signal.
            Maybe I could use one of them

            AS_107023_IL_IM_96M13643_GB_1109-3a.pdf
            IL-100_Datasheet.pdf

            I can upload the datasheets also in german/other languages if that helps

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators
              last edited by 7 Nov 2019, 20:29

              I looked into laser distance sensors several months ago, especially as there are some low cost ones around now. The main problem is that you need extremely high resolution, repeatability and temperature stability.

              Let's start from first principles. The speed of light in vacuum or air is very close to 1 foot per nanosecond. So each nanosecond of measured time is 300mm of distance there and back, or 150mm one-way. Therefore each picosecond represents 150 microns of distance. If we take 30 microns as the required repeatability of Z probing (and some types of Z probe are better than this), this means that your measurement system needs a resolution and stability of about 200 femtoseconds. Even if you can achieve this resolution, it's most unlikely that you will achieve this stability.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              undefined 1 Reply Last reply 8 Nov 2019, 07:39 Reply Quote 1
              • undefined
                chilli @dc42
                last edited by 8 Nov 2019, 07:39

                @dc42 said in laser as z probe:

                I looked into laser distance sensors several months ago, especially as there are some low cost ones around now. The main problem is that you need extremely high resolution, repeatability and temperature stability.

                Let's start from first principles. The speed of light in vacuum or air is very close to 1 foot per nanosecond. So each nanosecond of measured time is 300mm of distance there and back, or 150mm one-way. Therefore each picosecond represents 150 microns of distance. If we take 30 microns as the required repeatability of Z probing (and some types of Z probe are better than this), this means that your measurement system needs a resolution and stability of about 200 femtoseconds. Even if you can achieve this resolution, it's most unlikely that you will achieve this stability.

                but i'm using the il1500 to read the measurement of the laser (il100). i can give out an analog high signal if a preset distance is reached. Wouldn't it be possible to to read the analog signal with the duet?
                should workk like a switch then or not?

                undefined undefined 2 Replies Last reply 8 Nov 2019, 10:45 Reply Quote 0
                • undefined
                  grizewald @chilli
                  last edited by 8 Nov 2019, 10:45

                  @chilli The analogue output would indeed work like a switch and the Duet could read that. (You may need to scale the voltage down to 3.3V for the Duet, depending on which input it is connected to and the version of your Duet.)

                  It's interesting to see how they've used a triangulation technique to get around the problem that David raised regarding simple reflection measurements and the difficulty of measuring femtosecond time differences. That the sensor you have has a repeatability of 4 microns is very impressive and certainly makes it a candidate for a good bed probe. (The printing surface may be important though.)

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    gianakop
                    last edited by 9 Nov 2019, 13:08

                    To get an idea about how fast an Arduino can deal the different measurements from a laser sensor, you can see this video: Measure Distance with VL53L0X 6 pin Laser module with Arduino
                    Although the VL53L0X sensor is very accurate and
                    (in my opinion the best laser sensor for a 3d printer due to its extremely tiny size) Arduino can't manipulate the measurements fast enough. (you can see the rate that the measurements appeared on the screen). However, I think that the VL53L0X sensor definitely could be used for that purpose maybe with another microcontroller ...

                    https://www.youtube.com/user/NGYT40

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators @chilli
                      last edited by 9 Nov 2019, 14:21

                      @chilli said in laser as z probe:

                      @dc42 said in laser as z probe:

                      I looked into laser distance sensors several months ago, especially as there are some low cost ones around now. The main problem is that you need extremely high resolution, repeatability and temperature stability.

                      Let's start from first principles. The speed of light in vacuum or air is very close to 1 foot per nanosecond. So each nanosecond of measured time is 300mm of distance there and back, or 150mm one-way. Therefore each picosecond represents 150 microns of distance. If we take 30 microns as the required repeatability of Z probing (and some types of Z probe are better than this), this means that your measurement system needs a resolution and stability of about 200 femtoseconds. Even if you can achieve this resolution, it's most unlikely that you will achieve this stability.

                      but i'm using the il1500 to read the measurement of the laser (il100). i can give out an analog high signal if a preset distance is reached. Wouldn't it be possible to to read the analog signal with the duet?
                      should workk like a switch then or not?

                      Yes you can feed an analog voltage in the rang 0 to 3.3V into the Duet Z probe input. But you've totally ignored the point I was making.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      undefined 1 Reply Last reply 13 Nov 2019, 09:50 Reply Quote 0
                      • undefined
                        chilli @dc42
                        last edited by 13 Nov 2019, 09:50

                        @dc42 I didn't quite get what you meant, sorry

                        what would happen if you feed a negative voltage (-3,3V) into the Duet Z probe input?

                        undefined 1 Reply Last reply 13 Nov 2019, 10:02 Reply Quote 0
                        • undefined
                          themelle @chilli
                          last edited by themelle 13 Nov 2019, 10:02

                          @chilli said in laser as z probe:

                          @dc42 I didn't quite get what you meant, sorry

                          what would happen if you feed a negative voltage (-3,3V) into the Duet Z probe input?

                          What David tried to make clear to you:
                          While it may be perfectly possible (from a wiring and software point of view) to use this laser sensor as a z probe, it may actually be quite unusable because your setup needs a timing resolution of at least 200 femtoseconds (read: 0,000 000 000 000 200 seconds) - and must be reliably reach this resolution for every measurement taken. On this scale small variations in timing imply huge differences in the measured distance.

                          You can clearly see the effect in a demo
                          https://www.youtube.com/watch?v=S2jaAQEv3Yo&feature=youtu.be&t=510
                          where the measured distance deviates in millimeters.

                          undefined 1 Reply Last reply 13 Nov 2019, 17:23 Reply Quote 0
                          • undefined
                            hurzhurz @themelle
                            last edited by 13 Nov 2019, 17:23

                            @themelle I think the sensor @chilli wants to use does not work by the Time-of-Flight principle like the VL53L0X.
                            It probably uses triangulation / measureing the reflection angle by distance via a CMOS image sensor.
                            I saw a video about a similar sensor a while ago: https://youtu.be/0D9nJIzNVTY?t=130

                            undefined 1 Reply Last reply 14 Nov 2019, 06:03 Reply Quote 0
                            • undefined
                              chilli @hurzhurz
                              last edited by 14 Nov 2019, 06:03

                              @hurzhurz yes that one looks kinda similar. And that principle would work?

                              @themelle @dc42 Do you know what would happen if I feed negative voltage (-3.3V) into the Z probe input?

                              undefined undefined 2 Replies Last reply 14 Nov 2019, 08:41 Reply Quote 0
                              • undefined
                                dc42 administrators @chilli
                                last edited by 14 Nov 2019, 08:41

                                @chilli said in laser as z probe:

                                Do you know what would happen if I feed negative voltage (-3.3V) into the Z probe input?

                                Probably nothing, because the ESD protection diode in the MCU will protect the input. But for safety, you could use a series resistor and a Schottky diode to ground.

                                Yes I was assuming that it is a time of flight sensor.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  hurzhurz @chilli
                                  last edited by hurzhurz 14 Nov 2019, 18:05

                                  @chilli Yes, I think so. Though, the needed resolution of the image sensor probably needs to be very high to achieve this crazy measurement resolution of 2-4µm... maybe they also use some clever algorithms to interpolate.
                                  I just found this video with an illustration: https://youtu.be/g-EJ4FDB4qQ?t=34

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    chilli
                                    last edited by 15 Nov 2019, 06:39

                                    I've been trying out a bit and it seemed to kinda work. I'm getting a signal in.
                                    Can't work on it till probably next week, cause the z-axis clutch broke.

                                    Another thing is, that the laser is giving 0V if the distance is 0. if it's more than 0 the voltage rises till 5V and stays there and same with negative, falling to -5V.
                                    As the z probe input works with 3.3V i was thinking about using a resistor to ground and also in series a schottky diode for the negative voltage (thanks for that info @dc42).
                                    I'm just not sure about what resistor and what diode to use. Any suggestions?

                                    What current does the input draw at 3.3V?

                                    maybe this schottky diode:
                                    https://www.conrad.de/de/p/panjit-schottky-diode-gleichrichter-1n5817-do-41-20-v-einzeln-1304858.html

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      hurzhurz
                                      last edited by 16 Nov 2019, 11:24

                                      Do you really need to deal with negative output voltage?

                                      Pages 5&6 in the il1500 manual it look like you can set different output voltage range modes:

                                      • 0V to 5V
                                      • -5V to +5V
                                      • 1V to 5V

                                      So I think you can simply use the first one together with a voltage divider?

                                      Well, any maybe you could simply use the digital output "LOW/HIGH judgment output".
                                      Here you could use a optocoupler for isolation between it and the duet.

                                      undefined 1 Reply Last reply 17 Nov 2019, 20:30 Reply Quote 0
                                      • undefined
                                        chilli @hurzhurz
                                        last edited by 17 Nov 2019, 20:30

                                        @hurzhurz yes these modes are possible to set, but the problem is that the voltage stays after the set point is reached.
                                        For example 0-5V: above 0 the voltage is 0V, the closer it gets to 0 the voltage rises (the point from which is the voltage rises can be set too) : 10mm 0V; 5mm 2,5V 0mm 5V.
                                        If the distance gets negative the voltage stays 5V
                                        So I thought it would be better that the voltage above and below 0 would change, so that it doesn't get too deep and still thinks it's at 0 distance

                                        Not sure if I was able to explain it understandably...

                                        The idea with the digital output and the octocoupler sounds possible, will try that!

                                        undefined 1 Reply Last reply 17 Nov 2019, 23:01 Reply Quote 0
                                        • undefined
                                          hurzhurz @chilli
                                          last edited by 17 Nov 2019, 23:01

                                          @chilli I hope I understood it correctly, but I would do it like this for the analog output way:
                                          For your example values: 10mm=0V / 5mm=2,5V / 0mm=5V
                                          I would define the middle (5mm) as my target trigger point and later set my probe height offset accordingly (G31 Zxxx).
                                          Therefor I would adjust the probe trigger value (G31 Pxxx) so it matches the value that the duet measures at 2,5V (or 1,65V in case of an ideal voltage divider).
                                          This way, you can see if you are below or above the trigger point.

                                          Btw, we could also have a conversation in German if that helps...

                                          undefined 1 Reply Last reply 18 Nov 2019, 07:50 Reply Quote 0
                                          12 out of 26
                                          • First post
                                            12/26
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA