Welcome! Log In Create A New Profile

Advanced

Ir sensor not holding Z0

Posted by joestefano 
Ir sensor not holding Z0
July 10, 2016 10:54AM
Black Paint Bed equation fits points [75.0, 80.0, 0.068] [210.0, 80.0, 0.077] [210.0, 230.0, -0.159] [75.0, 230.0, -

0.349] [133.0, 170.0, 0.010]

White Paper Bed equation fits points [75.0, 80.0, 0.422] [210.0, 80.0, 0.965] [210.0, 230.0, 0.289] [75.0, 230.0, 0.924]

[133.0, 170.0, 0.730]

After setting G92 Z0, Run G32 results above I tested with flat black paint on bed and white paper on bed. After I home

then run G1 Z0 The bed is about 1mm lower than Z0 with the black paint and aprox 2.5mm lower with white paper.

If I want to just use the IR sensor for Z0 (no bed probing) Can I just set G92 Z0 and froget it? Will it hold Z0? Just

delete the bed.g file in the sys folder?
Re: Ir sensor not holding Z0
July 10, 2016 01:38PM
White paper and black paint don't reflect IR the same, so they will be different.

If you never use G32, auto-bed leveling, then bed.g isn't used.

I still needed to fine tune the hotend offset after doing the calibration of the IR sensor.
Re: Ir sensor not holding Z0
July 10, 2016 03:08PM
So if the nozzles are 1mm above the bed at Z0 after calibration you use the hotend offsets to correct for that?
Re: Ir sensor not holding Z0
July 10, 2016 03:43PM
Where are the hotend offsets?
Re: Ir sensor not holding Z0
July 10, 2016 06:18PM
I am not clear why you are running G92 Z0. probably the two main reason to use it are:

1. If you don't have a Z probe or a very accurate and reproducible Z homing switch, then you need to tell the printer where Z=0 is before starting a print. Typically you do this by lowering the print head until it just grips a piece of paper between the nozzle and the bed. and then sending G92 Z0.

2. When you have installed a Z probe you need to measure its trigger height so that you can configure in in the config.g file (the Z parameter in your G31 command). To measure trigger height, I first tell the printer where Z=0 is using the above method. Then I command the head up 5mm, and then I send G30 S-1. This tells the firmware to probe the bed but not to use the result to adjust where Z=0 is. So after probing the bed, I can read off the Z height from the web interface, and that is the probe trigger height.

If you are using my differential IR sensor, then if your bed material is transparent to IR (e,g, glass), the trigger height can be affected by reflections form whatever is below the glass. That is why I recommend black paint or black paper under the glass.

HTH David



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ir sensor not holding Z0
July 10, 2016 06:53PM
I followed these directions:
To calibrate the sensor for Z homing and bed probing, home X and Y, then position the head over the centre of the bed. With the nozzle at operating temperature, lower the head so that it is just touching the bed or just gripping a sheet of paper, then send G92 Z0 to define that position as Z=0. Raise the head 5mm and remove the paper. Then send G30 S-1 to probe the bed at that point without adjusting the Z height setting. Read off the Z height and use that value for the Z parameter in your G31 command in config.g. Please note:

I then came across these:
Setting the Z Probe

Quick method

If it’s the first time you are setting the Z Probe (proximity probe), read the next section ‘Setting the Z Probe’ first, for a full explanation.
1.Send M561 then M556 S100 X0 Y0 Z0. This resets any bed plane and orthogonal axis compensation.
2.Move the X axis so that the proximity probe is over the bed target closest to X0 Y0. This is usually around X40 Y0. If the X and Y axes are homed, you can use ‘G1 X40 Y0’ to go there.
3.Move the Z axis down so the nozzle just touches the bed; use a piece of paper, move Z down 0.1mm at a time, until it traps the paper. Then move it down 0.1mm more.
4.Send G92 Z0. This sets the current Z position to 0, for reference.
5.Move the Z axis up 2mm. Send G31. The response will most likely be less than 600.
6.Move the Z axis up 0.1mm. Send G31.
7.Repeat the above until G31 reports a value of around 600, +/-20
8.Send M114, and note the Z height.
9.Send G31 Z[zzz] P[ppp], where [zzz] is the height of Z from the M114 command, and [ppp] is the value reported by the last G31 command
10.An EXAMPLE might be: G31 Z2.5 P598
11.Home Z to test, and adjust as necessary.
12.Copy the G31 Z[zzz] P[ppp] command you have derived into the config.g file on the SD card.
This seemed to work for now.

Unfortunately the way my heat bed is constructed it is not possible to take it apart and paint the underside of the glass black. I may end up with a mech endstop if I cant get this to work.
Re: Ir sensor not holding Z0
July 10, 2016 07:45PM
Out of curiosity, where is this documented? particularly the G30 S-1 command.

2. When you have installed a Z probe you need to measure its trigger height so that you can configure in in the config.g file (the Z parameter in your G31 command). To measure trigger height, I first tell the printer where Z=0 is using the above method. Then I command the head up 5mm, and then I send G30 S-1. This tells the firmware to probe the bed but not to use the result to adjust where Z=0 is. So after probing the bed, I can read off the Z height from the web interface, and that is the probe trigger height.

I realize that I am working with a custom build but it seems that if all the instructions were in one place it would be much easier. You would certainly have more time on your hands.lol
Re: Ir sensor not holding Z0
July 10, 2016 09:12PM
Spoke to soon, just ran a print and the nozzles crashed into the bed. Can you point me to the directions for using a mech endstop instead. I have a 3 wire end stop [www.ebay.fr].
Re: Ir sensor not holding Z0
July 11, 2016 12:34PM
Quote
joestefano
Where are the hotend offsets?

In config.g, it's the line:

G31 P500 X0 Y12 Z0.37 ; set threshold and offsets - z offset is last one - increase to get closer to the bed

I added the last bit to remind me which way to go to get closer to the bed. The current Z0.37 is due to a print lifting off the bed and bending the IR stuff on the little pc board, I haven't fully re-adjusted them.

I adjust the offset after getting everything to temperature, and use the paper method to verify when it goes to Z0, it slightly grabs the paper. Then I do a small test print to see if the settings are usable.

This all assumes the IR sensor is triggering at the same height, every time. I'm using a bed with an AL MIC-6 plate with purple glue stick.

If the nozzle crashes into the bed, either the Z offset is wrong or the ir sensor isn't getting repeatable readings off your bed.
Re: Ir sensor not holding Z0
July 11, 2016 08:36PM
Is it possible to connect a mech switch as a back up and the Ir sensor at the same time? If the IR sensor does not stop the bed from crashing into the nozzles the switch will trip and stop the bed. If not how do I alter my config so it doesn't look for the IR sensor anymore?
Re: Ir sensor not holding Z0
July 12, 2016 04:21AM
If you are getting bed crashes then you are using the IR sensor in the wrong way, or you don't have ti wired correctly. Most users of the Duet on Cartesian printers use one of four different types of IR sensor and don't have any problems with bed crashes.

Assuming that your IR sensor is triggering at a sensible height above the bed surface - typically 1 to 2mm if you have the bottom edge of the sensor board mounted 1.5mm higher than the nozzle - then I think the real problem is that you don't understand what the gcodes do. If you did, you would be able to adjust the config and homing files to get the behaviour you want. Here is a summary:

G31 P500 Z1.65

This command is put in config.g. It tells the firmware that the analog trigger value of the Z probe is 500, and it triggers when the nozzle is 1.65mm above the bed surface. You need to measure the trigger height of your own probe installation and use it in place of the 1.65. [Although this command is normally used only in config.g, you can send it - like almost any gcode - at any time, so no need to restart the Duet when you want to experiment with new values.]

G30

Probe the bed, starting at the current XYZ position. The head stops when the probe trigger height is reached, and the height that the firmware thinks head is at is reset to the Z probe trigger height (as defined by the G31 command). This is typically used in the homez.g and homeall.g files to do Z homing. Before issuing G30, use a G1 command to move the probe to the XY coordinates where you want to probe. Note that the head must be higher than the trigger height when you issue the G30 command. That's why you'll see the sample homez.g and homeall.g files raise the head 5mm first.

G30 S-1

As G30, except when the trigger height is reached, just stop without adjusting the firmware's idea of where Z=0 is. Useful to measure the trigger height, because if you previously used G92 to set Z=0 when the nozzle is just touching the bed, then the trigger height will be the current Z coordinate after running G30 S-1.

G30 Pn Xx Yy Z-99999 Hh

Moves the head to the specified XY coordinates with Z equal to the dive height (see M558), probes the bed, and saves the height error in slot n. The H parameter is an optional trigger height correction. If the S parameter is also present, the firmware also calculates bed compensation or delta calibration based on the accumulated data. You can only use this form of the G30 command after the printer has been homed, because it needs the Z=0 position to be approximately right to be able to go to the dive height.

G92 Z### (where ### is zero or a height in mm)

This tells the firmware that the print head is at Z=0 (i.e. nozzle just touching the bed) or at the specified height. Normally sent manually, either to set the Z=0 height before starting a print when no Z probe is available, or as part of the process of measuring the Z probe trigger height. Can also be used in homez.g and homeall.g if a microswitch is used for Z homing, to correct for a microswitch that triggers a little above Z=0.

M558 Pn Hh Fm Ts (where n, h, m and s are numbers)

Selects Z probe type n and sets the dive height to h mm, the probing speed to f mm/min and the travel speed between probe points to s mm/min.

All these are described at [reprap.org].

Bear in mind that if your slicer start gcode includes a G28 command, then the Z axis will be homed again, so the Z homing section in homeall.g will reset the printer's idea of where Z=0 is. Whatever code you have in homez.g, you should have the equivalent code in the Z homing sectoin of homeall.g.

Homing Z using a microswitch i covered at [duet3d.com]. This is a more up-to-date version of the page on the reprap.org wiki.

HTH David



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Ir sensor not holding Z0
July 12, 2016 07:54AM
Your right, I don't fully understand the G codes. Thanks for the tutoring.
Sorry, only registered users may post in this forum.

Click here to login