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

    Z Axis IR Probe Setup Issue

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    17
    2.0k
    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.
    • TimVukmanundefined
      TimVukman
      last edited by

      Hi:

      I am trying to set up my IR Probe for the Z axis. The probe is detecting the bed (which has a glass sheet on it) and other objects if I put them in the way. When I look at the documentation to commission the probe, it indicates that the probe should start off at 0 when far from the bed (it does) and then it should increase the number reported as it gets closer to the bed until it shows around 535 when the red led should come on.

      My red LED comes on and the reading is 441. It does not go any higher than 442. If My HomeZ is looking for 500, it is never going to trigger that it is home.

      I get 4 blinks when the P{robe powers up.

      What am I missing?

      Thanks,

      Tim

      HomeZ
      ; homez.g
      ; called to home the Z axis
      ;
      ; generated by RepRapFirmware Configuration Tool on Fri Sep 08 2017 09:50:05 GMT-0400 (Eastern Daylight Time)

      ; Lift Z relatively to current position
      G91
      G1 Z5 F6000

      ; Move Z down until the switch triggers
      G1 Z-185 S1 F1800

      ; Back to absolute positioning
      G90

      ; Tell the firmware where we are
      G92 Z2.5

      ; Uncomment the following lines to lift Z after probing
      ;G91
      ;G1 Z5 F100
      ;G90

      Config.g
      ; Configuration file for Duet WiFi (firmware version 1.17)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool on Fri Sep 08 2017 10:03:01 GMT-0400 (Eastern Daylight Time)

      ; General preferences
      M111 S0 ; Debugging off
      G21 ; Work in millimetres
      G90 ; Send absolute coordinates…
      ;M83 ; ...but relative extruder moves
      M555 P2 ; Set firmware compatibility to look like Marlin
      M208 X0 Y0 Z0 S1 ; Set axis minima
      M208 X210 Y280 Z200 S0 ; Set axis maxima

      ; Endstops
      M574 X1 Y1 S0 ; Define active low and unused microswitches
      M558 P1 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to ir, the axes for which it is used and the probe + travel speeds
      G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
      M557 X25:175 Y25:175 S20 ; Define mesh grid

      ; Drives
      M569 P0 S0 ; Drive 0 goes backwards
      M569 P1 S0 ; Drive 1 goes backwards
      M569 P2 S0 ; Drive 2 goes backwards
      M569 P3 S1 ; Drive 3 goes forwards
      ;M350 X128 Y128 Z128 E16 I0 ; Configure microstepping without interpolation
      M92 X80 Y80 Z80 E333.33 ; Set steps per mm
      M566 X900 Y900 Z900 E5000 ; Set maximum instantaneous speed changes (mm/min)
      M203 X12000 Y12000 Z12000 E3000 ; Set maximum speeds (mm/min)
      M201 X1000 Y1000 Z1000 E3000 ; Set accelerations (mm/s^2)
      M906 X1200 Y1200 Z1200 E1000 I30 ; Set motor currents (mA) and motor idle factor in per cent
      M84 S30 ; Set idle timeout

      ; Heaters
      M143 S260 ; Set maximum heater temperature to 260C
      M305 P0 T100000 B3988 C0 R4700 ; Set thermistor + ADC parameters for heater 0
      M305 P1 T100000 B4725 C0 R4700 ; Set thermistor + ADC parameters for heater 1

      ; Tools
      M563 P0 D0 H1 ; Define tool 1
      G10 P0 X0 Y0 Z0 ; Set tool 1 axis offsets
      G10 P0 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C

      ; Network
      M550 PTevo Tarantula ; Set machine name
      M552 S1 ; Enable network
      ; Access point is configured manually via M587 by the user
      M586 P0 S1 ; Enable HTTP
      M586 P1 S0 ; Disable FTP
      M586 P2 S0 ; Disable Telnet

      ; Fans
      M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
      M106 P1 S1 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
      M106 P2 S1 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off

      ; Custom settings are not configured

      ; Miscellaneous
      T0 ; Select first tool
      M501

      1 Reply Last reply Reply Quote 0
      • number40fanundefined
        number40fan
        last edited by

        Even waving a piece of paper under it, it won't go above 500?

        1 Reply Last reply Reply Quote 0
        • MoS-tekknixundefined
          MoS-tekknix
          last edited by

          Mhh,

          my config.g contains

          [[language]]
          ; Endstops
          M574 X1 Y1 Z0 S1 						; Define active low and unused microswitches		;
          M558 P1 X0 Y0 Z1 H5 F300 T5000					; enable differential IR sensor
          G31 P500 X9 Y28 Z2.80						; set probe height, threshold and XY offsets
          
          

          You have not undefined a Z-Switch (in M574) and also you have not defined the IR-Probe as Z-Switch (in M558)

          Therefore, you could give it a try.

          Cheers
          MoS-tekknix

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            My guess is that you have a bad connection in the output wire from the sensor. Does the reading drop to near zero when the red led on the sensor is off, or is it still around 400?

            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
            • Motalwundefined
              Motalw
              last edited by

              I Had the same problem a week ago, I have set it to trigger at 400 for a while but later on I replaced the IR Probe wiring and it is working normal (500) since then.

              1 Reply Last reply Reply Quote 0
              • TimVukmanundefined
                TimVukman
                last edited by

                Hello and thanks for the responses.

                number40fan As I approach with a piece of white paper, The readings start 15cm away with 408/409. At 4cm, the red led lights and the reading jumps to 441/442. No movement will increase the reading beyond 442.

                MoS-tekknik I see what you mean about the definitions. As I do not understand gcode at all well yet, I had removed the references to the Z axis endstops. I will go back and check, but I think I grabbed the content from the Commissioning section of the Wiki. P1 would set the probe to Mode 1 which according to the Wiki would have the output dropping in value as it approaches the paper. If I am reading it correctly, I believe I should be setting the probe to Mode 2.

                dc42 I have now isolated the probe away from the machine and replaced the cable with a different known good cable. I am getting exactly the same readings. 408 / 409 at distance, led trigger at 441 and no higher than 442.

                I would appreciate confirmation on which Mode I should be selecting. My probe points down toward a fixed heated bed. I can single step the gantry down and watch the probe start at 0, then register 408 / 409 as it approaches the bed, light the led at 441 / 442 and stay at that output until it physically contacts the bed and I have to kill the power to stop the Z motors.

                Thanks
                Tim

                1 Reply Last reply Reply Quote 0
                • TimVukmanundefined
                  TimVukman
                  last edited by

                  Hi Motalw I am sorry that I did not acknowledge your input in my previous post. I got tied up trying to figure out the wiki. I will change my threshold to 400 to see if that will at least make the probe work as an endstop.

                  Thanks,
                  Tim

                  1 Reply Last reply Reply Quote 0
                  • TimVukmanundefined
                    TimVukman
                    last edited by

                    I have been observing while moving the hotend around via the duet display interface.

                    In Console, I am getting messages that M586 is not yet implemented on this platform. Since this is a code in the network section, it does not make sense. I am connecting from the display which is hardwired to the board.

                    Thanks
                    Tim

                    1 Reply Last reply Reply Quote 0
                    • Motalwundefined
                      Motalw
                      last edited by

                      @TimVukman:

                      Hi Motalw I am sorry that I did not acknowledge your input in my previous post. I got tied up trying to figure out the wiki. I will change my threshold to 400 to see if that will at least make the probe work as an endstop.

                      Thanks,
                      Tim

                      there is no need to apologise.

                      1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators
                        last edited by

                        I am fairly sure that you have a bad connection in the output wire from the IR sensor, or you have connected it to the wrong pin on the Duet. If the connection was ok then you would get a reading of zero when the LED is off.

                        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
                        • TimVukmanundefined
                          TimVukman
                          last edited by

                          Hi dc42

                          At what distance? It starts off at 0. and if I bring the sensor right against the glass I will get 0. I am getting the same results with two different cables. I will check the pinouts again. The pin closest to the ribbon cable connector has no connection, correct? If it wasn't connected properly I wouldn't get the 4 led flashes when I power up,

                          1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators
                            last edited by

                            At large distances the LED should be off and the reading should be zero or very close to zero. When the sensor is close to the trigger height, the LED should remain off but the reading should increase to about 465. When the LED turns on the reading should increase to about 535. If you hold a target very close to the sensor, the LED will turn off and the reading will drop to zero again.

                            You should select mode 1 in the M558 command.

                            I think you have the wrong connections. The pin closest to the ribbon cable connector is the 3.3V pin, which goes to VCC on the sensor. The next one is the MOD pin which you should leave unconnected. The pins are labelled on the underside of the Duet.

                            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
                            • TimVukmanundefined
                              TimVukman
                              last edited by

                              Hi dc42

                              Thanks for your response. Sorry for the delay. I removed my dual z axis setup that was using belt drives. I ordered and received a pair of threaded rods which have now been installed. I have adjusted my settings in config.g and now all 3 of my limit switches for homing are working properly,

                              So, I am ready to sort out the IR Probe configuration. I did print out one of the mounting brackets that you had linked for me and the bracket now has been mounted to the hot end with the sensor.

                              I had asked about the connectors for the IR Probe and while I have not seen a direct answer, I believe your response above answers my question. If I have a connection to the probe from 3.3v and then skip the MOD pin, that would require a 4 pin connector on the DuetWifi board and a 3 pin on the sensor. I have 3 pins at each end, so I will make a new cable.

                              Thanks
                              Tim

                              1 Reply Last reply Reply Quote 0
                              • TimVukmanundefined
                                TimVukman
                                last edited by

                                Hi
                                From the commissioning and setup
                                If you get the expected readings, then you can apply 12V power and continue with commissioning. If not, check your wiring.

                                I got the expected results

                                With 12V power applied, send M558 P1 followed by G31 P500 Z1.0 to the Duet again. Note: if your printer does not use the Z probe to home any axes, you also need to add parameters X0 Z0 to the M558 P1 command.

                                I would like to use the Z probe to home the axis so I did not add X0 Z0 to the M558 P1 command.

                                To calibrate the sensor for Z homing and bed probing, home X and Y, then position the head over the centre of the bed.

                                Positioned the head at Y140 and X100

                                With the nozzle at operating temperature, lower the head so that it is just touching the bed or just gripping a sheet of paper,

                                Set the nozzle to 200 and lowered Z to grip a sheet of paper

                                then send G92 Z0 to define that position as Z=0.

                                Sent G92 Z0 Z value displays 0

                                Raise the head 5mm and remove the paper.

                                Done

                                Then send command G30 S-1 to probe the bed at that point without adjusting the Z height setting. Read off the Z height in the “Head Position” box in Duet Web Control, or from the Z coordinate shown on the Control page of PanelDue, or send M114 to retrieve the head position if using a USB host program on a PC. It should be in the range 0.5 to 2.5mm. Use that value for the Z parameter in your G31 command in config.g. Please note:

                                Ok, did not work. I got a message that the probe did not detect and Z axis is reporting -5

                                The S-1 parameter may not be supported in the official RepRapFirmware release. It is supported in my fork and dcnewman’s fork.
                                Always use a P value of 500. When the probe is triggered, the Z probe reading will be about 535. When it is slightly higher than the trigger height, the reading will be about 465. With a P value of 500, when the Duet sees the reading of about 465, it knows it is getting close to target height and it will slow down the Z motor.

                                I gave the printer a manual +10 and Z now reads 5. Z is not at 5. It is at the point where it holds a piece of paper. The reading for the probe is 547.

                                If you are using my (dc42) fork of RepRapFirmware, then the G31 command in config.g must come after the M558 P1 command. This is because the firmware supports different G31 values for different sensor types.

                                Edited Config.g I removed X0 and Z0 from the M558 Line according to the sentence above that starts off as "With 12V applied…"
                                The G31 command is set at P500 and is the line following the M558.

                                After turning your printer on, do not perform any operation that uses the sensor (e.g. X homing on some printers) for 5 seconds, until after the LED has done its 4 flashes.

                                Saved Config.g
                                Once the Board reboot killed the connection to the printer, I powered it off and disconnected the USB cable.

                                Power printer back on. I have four flashes from the LED on the IR Probe.

                                HomeX ok
                                HomeY ok
                                HomeZ ok
                                My bed surface is a piece of glass on top of the heated bed.
                                Indicators all turned blue indicating that all axis are home.
                                Probe value is 547, and the red LED on the IR Probe is on.
                                Value registered for Z in Machine Status is 0.30

                                It looks like everything is good, even though I had the error that I reported above on the initial probe.

                                Tomorrow I will run it up and print something. Before I set up the probe on the new cable, I did print a configuration cube. It looked quite good and all 3 axes printed at 20mm. I have nice square corners since I have a fang with a fan on it. The bottom layer is smushed, but that could be because I hadn't done the probe setup.

                                If this looks ok, please let me know.

                                Thanks,
                                Tim

                                1 Reply Last reply Reply Quote 0
                                • TimVukmanundefined
                                  TimVukman
                                  last edited by

                                  With the Dual Z axis, what actually gets passed to the stepper motors? Specifically, what I am meaning is with regard to syncronization. I have been having a tough time setting up bed height and it my observations it does not appear that the motors are moving together before the print starts

                                  I have the motors wired into the two Z ports on the Wifi board. When I go to print, the left motor seems to suddenly pull the gantry down to the point where it deflects the heat bed against the springs by pushing the nozzle against it.

                                  Once the print starts, is seems normal and seems to move the same amounts as the right side.

                                  Thanks
                                  Tim

                                  1 Reply Last reply Reply Quote 0
                                  • dc42undefined
                                    dc42 administrators
                                    last edited by

                                    @TimVukman:

                                    I have the motors wired into the two Z ports on the Wifi board. When I go to print, the left motor seems to suddenly pull the gantry down to the point where it deflects the heat bed against the springs by pushing the nozzle against it.

                                    Once the print starts, is seems normal and seems to move the same amounts as the right side.

                                    Thanks
                                    Tim

                                    Two motors connected to the ZA and ZB motor ports get exactly the same current. So the problem you have is a mechanical one.

                                    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
                                    • TimVukmanundefined
                                      TimVukman
                                      last edited by

                                      Thanks for the information. That will help isolate what is going on.

                                      Tim

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post
                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA