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

Tool Calibration Station E3D Toolchanger

Scheduled Pinned Locked Moved
General Discussion
5
21
1.5k
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
    smoki3
    last edited by 18 Feb 2020, 20:11

    Hi together,

    I have designed a tool calibration station for the E3D tool changer. It is equiped with a raspberry pi zero/camera and a hight sensor (guided platform which press a micro switch). The whole station is guided by a linear rail and driven by a stepper motor (equal to Greg's adjustable brush)

    I already switched over to rrf 3.01 with conditional gcode.

    I know want to set the tool offset by running a macro.

    First point I need to know is how I can use the micro switch to probe the tool hight.
    Let's call my tool calibration axis W axis. Then I have to move the W axis until the endstop is pressed. But I don't know how to do this? May @dc42 can help me?

    Later I can do some mathematics to calculate the tool offset with the actual W axis position. This should be easily possible with the conditional gcodes.

    The second point I want the realize is that I put the nozzle above the camera, center it and press a macro button then the XY offset of the tool is set. But this I think is more easily and could be realized also with the new gcodes.
    Is there a object model for the tool offset?

    1 Reply Last reply Reply Quote 1
    • undefined
      Danal
      last edited by Danal 18 Feb 2020, 23:59

      Having a separate station is a great idea.

      Regarding all the commands required to make it work: See the commands in the "tool align" and/or "zonly" script here:

      • https://github.com/DanalEstes/PythonDSF

      Ignore the python... just look a the gcode and read here about the commands and options, such as G1 H2, and work those into conditional Gcode. More doc on the Gcode here:

      • https://duet3d.dozuki.com/Wiki/Gcode

      *****************************

      Regarding your camera... do you intend to use machine vision? Or human alignment to an overlay on the image, such as a crosshair or a circle? For either one of those, you will probably want 'openCV' on your Pi. Almost every install instruction on the internet has you put openCV in a virtual environment, so that you can run multiple releases of opencv. This is a huge hassle. And we really only want one release.

      Therefore, there is a 'direct install' script called "installOpenCV.sh" here:

      https://github.com/DanalEstes/DuetPython

      There are also several sample scripts showing different levels of Machine Vision, or Human Alignment, or ...

      *****************************

      None of the above is EXACTLY what you seek. At the same time, all the pieces you need to create what you seek are in the above. Please be sure and read the 'readme' in both repositories.

      Delta / Kossel printer fanatic

      undefined 1 Reply Last reply 19 Feb 2020, 08:11 Reply Quote 2
      • undefined
        Danal
        last edited by 19 Feb 2020, 00:04

        Oh, and pics? We need pics of your station!!! GREAT idea.

        Delta / Kossel printer fanatic

        1 Reply Last reply Reply Quote 0
        • undefined
          smoki3 @Danal
          last edited by smoki3 19 Feb 2020, 08:11

          @Danal said in Tool Calibration Station E3D Toolchanger:

          Having a separate station is a great idea.

          Regarding all the commands required to make it work: See the commands in the "tool align" and/or "zonly" script here:

          • https://github.com/DanalEstes/PythonDSF

          Ignore the python... just look a the gcode and read here about the commands and options, such as G1 H2, and work those into conditional Gcode. More doc on the Gcode here:

          • https://duet3d.dozuki.com/Wiki/Gcode

          *****************************

          Regarding your camera... do you intend to use machine vision? Or human alignment to an overlay on the image, such as a crosshair or a circle? For either one of those, you will probably want 'openCV' on your Pi. Almost every install instruction on the internet has you put openCV in a virtual environment, so that you can run multiple releases of opencv. This is a huge hassle. And we really only want one release.

          Therefore, there is a 'direct install' script called "installOpenCV.sh" here:

          https://github.com/DanalEstes/DuetPython

          There are also several sample scripts showing different levels of Machine Vision, or Human Alignment, or ...

          *****************************

          None of the above is EXACTLY what you seek. At the same time, all the pieces you need to create what you seek are in the above. Please be sure and read the 'readme' in both repositories.

          So with the G1 Hx commands I just can Home the axis and set it to the axis limits. H2 mean it does ignore the Endstop, H1 set to M208 axis limit and H3 overrides the M208 limit.

          This is the Station:

          I also planed a place a LED inside to illuminate the Nozzle. The camera itself is protected by a small piece of glass, which can be purchased from laboratory equipment

          2020-02-19_08-57-08.png
          2020-02-19_09-12-11.png

          undefined 1 Reply Last reply 19 Feb 2020, 11:28 Reply Quote 1
          • undefined
            timcurtis67 @smoki3
            last edited by 19 Feb 2020, 11:28

            @smoki3 This is awesome! I'll be following this concept.

            1 Reply Last reply Reply Quote 0
            • undefined
              Danal
              last edited by 19 Feb 2020, 13:18

              @smoki3 said in Tool Calibration Station E3D Toolchanger:

              So with the G1 Hx commands I just can Home the axis and set it to the axis limits. H2 mean it does ignore the Endstop, H1 set to M208 axis limit and H3 overrides the M208 limit.

              H3 in particular moves until it hits an endstop, and will move even if not "homed". Capture the position when it stops.

              H3 also has the side effect of resetting the axis limit, so be sure and reset it.

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • undefined
                Danal
                last edited by 19 Feb 2020, 13:20

                So the tool (nozzle) touches the glass to click the switch? Given that we want the tool to be hot (this does change Z), will there be a problem with plastic on the glass?

                Delta / Kossel printer fanatic

                1 Reply Last reply Reply Quote 0
                • undefined
                  smoki3
                  last edited by smoki3 19 Feb 2020, 14:21

                  No the glass just keep the camera clean. Above there will be a small metal platform which presses the Microswitch.

                  I think to do it with G1 H3 isn't a good idea. I will try to test the tool probe command M585.

                  UPDATE:
                  I found this command: G38.2 to G38.5: Straight Probe

                  This sounds interesting but is described very detailed.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Danal
                    last edited by Danal 19 Feb 2020, 23:58

                    G38 series, at the moment, can only work with a Z axis endstop, or Z axis probe. I'm not a million percent clear where your station goes... but... I suspect that your Z axis will still need a switch separate from the station's probe.

                    Multi probe support looks like it is coming soon (the K parameter on the probe definition) but it is certainly not there yet.

                    You COULD re-define the endstop/probe while using the station, and define it back to Z when finished with the station. Having done this in the past, anything that causes the "define back to z" to be skipped will lead to a physical Z crash at the next home.

                    That's why I chose G1 H3, even with its other side effects. Lesser of two evils.

                    Delta / Kossel printer fanatic

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Danal
                      last edited by 19 Feb 2020, 23:59

                      And... if the metal platform clicks the switch, and the nozzle tip is visible to the camera, I am inferring that the nozzle TIP is not what hits the metal and switch?

                      If that statement is true, how does this calibrate for different length nozzles?

                      Delta / Kossel printer fanatic

                      undefined 1 Reply Last reply 20 Feb 2020, 05:25 Reply Quote 0
                      • undefined
                        smoki3 @Danal
                        last edited by 20 Feb 2020, 05:25

                        @Danal said in Tool Calibration Station E3D Toolchanger:

                        And... if the metal platform clicks the switch, and the nozzle tip is visible to the camera, I am inferring that the nozzle TIP is not what hits the metal and switch?

                        If that statement is true, how does this calibrate for different length nozzles?

                        So the calibration of the z axis is independent from the XY axis. You calibrate the Z Axis, the you place the nozzle above the camera und calibrate XY Offset.

                        Ate you sure that the G38 is not working with multiple probes? According to documentation it is working. I have to wait for my new rpi zero then I can wire everything and test the gcode

                        undefined 1 Reply Last reply 20 Feb 2020, 18:05 Reply Quote 0
                        • undefined
                          Danal @smoki3
                          last edited by 20 Feb 2020, 18:05

                          @smoki3 said in Tool Calibration Station E3D Toolchanger:

                          According to documentation it is working.

                          It will need a lot of experimentation. I did some when developing those macros... but... several x.x.X have passed, and the use cases are a tiny bit different.

                          Keep us posted!

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            smoki3
                            last edited by smoki3 22 Feb 2020, 08:14

                            So I made some process today.

                            I connected my probe.
                            It works pretty fine with G38.2. So it should be easy now to calculate the Z Offset.

                            I also made some reliable test.

                            22.2.2020, 09:08:07 M409 K"move.axes[4]"
                            {"key":"move.axes[4]","flags":"","result":{"acceleration":400.0,"babystep":0,"drivers":["4"],"homed":true,"jerk":8.0,"letter":"V","machinePosition":27.392,"max":34.0,"min":0,"speed":1200.0,"userPosition":27.392,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]}}
                            22.2.2020, 09:07:53 M409 K"move.axes[4]"
                            {"key":"move.axes[4]","flags":"","result":{"acceleration":400.0,"babystep":0,"drivers":["4"],"homed":true,"jerk":8.0,"letter":"V","machinePosition":27.390,"max":34.0,"min":0,"speed":1200.0,"userPosition":27.390,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]}}
                            22.2.2020, 09:07:39 M409 K"move.axes[4]"
                            {"key":"move.axes[4]","flags":"","result":{"acceleration":400.0,"babystep":0,"drivers":["4"],"homed":true,"jerk":8.0,"letter":"V","machinePosition":27.392,"max":34.0,"min":0,"speed":1200.0,"userPosition":27.392,"visible":true,"workplaceOffsets":[0,0,0,0,0,0,0,0,0]}}

                            Looks like the repeatability is very good just a deviation of 0.002mm.

                            But I also noticed some issues:
                            I can not probe my titan aero on the tool changer due to the too short axis. I have the same issue on Gregs brush station. So I have to redesign the arm a bit to bring every thing more upwards.

                            I wrote a short macro:

                            G1 X-29.5 Y124 F30000
                            G38.2 P1 V34
                            G10 P{state.currentTool} Z{move.axes[4].machinePosition-44.23}
                            G91
                            G1 V-2 F1000
                            G90

                            With this the tool offset is applied.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              smoki3
                              last edited by 22 Feb 2020, 12:35

                              So next problem:

                              M500 doesn't save the tool offset. It there a way to save it?

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                jay_s_uk
                                last edited by 22 Feb 2020, 13:00

                                I usually take a copy of the output from M307 and then manually edit the config override with the correct values.

                                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                undefined 1 Reply Last reply 22 Feb 2020, 13:04 Reply Quote 0
                                • undefined
                                  smoki3 @jay_s_uk
                                  last edited by 22 Feb 2020, 13:04

                                  @jay_s_uk said in Tool Calibration Station E3D Toolchanger:

                                  I usually take a copy of the output from M307 and then manually edit the config override with the correct values.

                                  To copy manually isnt what I understand from a automatic probe.

                                  Anyway M307 reports just the Heating parameter and not the tool offset. These a reported with G10 Px. But I need to save it

                                  undefined 1 Reply Last reply 22 Feb 2020, 13:32 Reply Quote 0
                                  • undefined
                                    jay_s_uk @smoki3
                                    last edited by 22 Feb 2020, 13:32

                                    @smoki3 sorry, of course it is.
                                    I don't think tool offsets are currently supported by M500.

                                    You'd have to request it to be added by dc42 or look at writing some conditional gcode when variables are implemented in 3.02

                                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                    1 Reply Last reply Reply Quote 0
                                    • dc42undefined
                                      dc42 administrators
                                      last edited by 22 Feb 2020, 17:47

                                      The S-2 option of the G30 command at https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_G30_Single_Z_Probe may be what you need. If you use G30 S-2 to set the tool Z offset, then a subsequent M500 will save the offset in config-override.g. You can also save it explicitly using M500 P10.

                                      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 22 Feb 2020, 17:52 Reply Quote 0
                                      • undefined
                                        smoki3 @dc42
                                        last edited by 22 Feb 2020, 17:52

                                        @dc42 I get the tooloffset applied with meta commands easily. I just want to save it to config override.
                                        Will try it tomorrow with M500 P10

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          Danal
                                          last edited by 22 Feb 2020, 17:59

                                          What is the 44.23 constant?

                                          Or, same question phrased another way: Is it possible to have the station calibrate itself?

                                          Delta / Kossel printer fanatic

                                          undefined 1 Reply Last reply 22 Feb 2020, 18:00 Reply Quote 0
                                          6 out of 21
                                          • First post
                                            6/21
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA