From RepRap
Jump to: navigation, search

Quick and dirty instructions.... this should be moved to a better place in the future.


2/13/13 - Fixed huxley mount and added generic mount to sketchup file.

2/18/13 - Firmware now supports eeprom use. A quick calibration solution is being tested.

3/11/13 - Update Sketchup file to add built-in support. Added automatic calibration instructions.

This is an experimental Z height probe using a hall effect sensor wired to a spare analog input port. Sliding the retract bar drops the probe below the nozzle tip. Before a print, a gcode will probe the bed and set the Z height. After probing, when the nozzle approaches normal print height the magnet will automatically pull the probe up into it's storage position. A Z end stop is no longer used and the probe will automatically adjust Z height to varying bed heights.

Huxley Hall Probe.jpg Huxley Hall Probe Xray.jpg
Sketchup file:File:HallSensorProbe.skp
Probe Mount: The sketchup file above includes a mount for a huxley style hot end and a more generic mount for other printers.

If you choose to alter the probe mount, pay attention to the dimensions. In my tests, they were fairly critical for accuracy. The hall sensor should sit under the magnet as closely as possible yet still allow a smooth surface for the magnet to slide. The Z height of the hall sensor in relation to the magnet was picked to allow automatic retraction and widely different hall readings when the probe is deployed and retracted. The bottom of the probe mount should be 5mm above the nozzle.

After printing run a 1/8" drill through the bore hole. The center of the bore has been enlarged to reduce friction so you will just need to clean up the top and bottom bearing surfaces until the bare shaft drops through smoothly. Also make sure that the two walls that the magnet slides on are smooth.

The shaft is a simple steel 3.17x30.8 RC motor shaft available here:

This shaft has free shipping but will need to be cut to 30.8:

A cube magnet was chosen to aid alignment and solve some other issues. Unfortunately I could only find a source for bulk magnets: The other square magnets at DX are not a perfect cube and may or may not work depending on magnetic field alignment.

The hall sensor is an Allegro A1302. This is the same sensor used on the hall-o and some other end stops. Available from digikey and other electronic suppliers:

Pin 1 = 5V Pin 2 = Ground Pin 3 = Analog Output

Hot glue the hall sensor into the probe mount with the beveled face towards the magnet. (Very Important)


NOTE: The gcodes will change in the future to something more appropriate.

Code was added to Repetier to read the hall sensor in the same loop as the temp sensors. Two external Z_Probe files were added that contain the bulk of the probing code.

Note: I am not a programmer. If you can make it better, please fork it.

Magnet alignment:

Take two magnets and allow them to snap squarely together. Make sure they are square, if one is rotated 90 degrees then they will be attracted with an offset. Carefully pull the magnets apart and mark the face that was attracted to the 2nd magnet. Place that side on top of the probe pin. Use G31 to read the sensor when it is fully dropped. If it is in the 2500 range, reverse it 180 degrees. G31 should read lower when the probe is dropped and higher when sitting at the retract bar. Future firmware will allow pole reversal to be calibrated.

Calibration: ***IMPORTANT***READ***CAREFULLY***

Consider performing your initial tests on a soft material such as a piece of cardboard so you don't damage your nozzle or bed. Remember, this is experimental, keep your finger on the reset button just in case.

In short, we need to obtain the hall reading when the nozzle is a know distance (number of steps) above the bed.

First, check that the magnetic poles are correct as mentioned above.

Because the Z end stop is no longer going to be used, you will need to temporarily change the Z height value to allow Z to be moved manually downward. Use something like "G92 Z50" to set the current Z height to 50. Then use M114 to read the position back into your host software.

Carefully lower the clean nozzle onto the bed. Be careful and don't crash the bed. When the nozzle is barely off the bed, set the Z height to zero with "G92 Z0". Then read the coordinates back into the host firmware with M114. Double check that the nozzle is showing a height of zero.

Now raise the nozzle to 10mm. Drop the probe and use G34. G34 will slowly single step the probe toward the bed and stop at .3mm or when the probe automatically retracts. At the point where the probe records it's lowest reading, it will briefly raise the nozzle up 2mm and record that reading. It now knows the 'optimal' probe height and complimentary hall reading. The probe will then again descend downward to find the point of retraction and the retraction hall reading. If EEPROM is enabled, these values will be saved for later use. Otherwise you will need to type the values into your config file.

During the calibration process, a colon delimited list of heights and hall readings will be output for later graphing if necessary.

You should only need to re-calibrate if the height between the nozzle tip and probe tip changes.

Testing: Raise Z back up and use G30 to test the probe. The current code will move the probe down a little bit past the calibrated height, then slowly rise to the calibrated height and then lift off the bed an additional 5mm.

Make sure that the initial Z height is high enough so the dropped probe doesn't contact the bed during X and Y homing. Slide the retaining bar over to drop the probe then slide it back in place to allow automatic retraction. In your start G-Code, change "G28" to "G28 X0 Y0 ;Home X and Y ONLY". We will not be homing on Z anymore. Add "G29 ;3 Point bed Probe" at the appropriate point in your initialization sequence. You may want to also add "G1 Z.5 F200 ;Force probe retraction".