CrashProbe

From RepRap
Revision as of 11:39, 18 February 2013 by Crash (talk | contribs)
Jump to: navigation, search

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

Changelog:

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

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


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, G29 will probe the bed at 3 points and set the Z height based on the average of those points and the probe height offset(5mm). After probing, when the nozzle approaches normal print height the magnet will automatically pull the probe up into it's storage position. <videoflash>93bi-BLU6v8</videoflash>

Huxley Hall Probe.jpg Huxley Hall Probe Xray.jpg

GenericHallProbeMount.jpg

Sketchup file:File:HallSensorProbe.skp

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.

A one time calibration is needed to learn the hall sensor reading when the nozzle is exactly 5mm above the print surface. This allows for probing without the nozzle contacting the heat bed and also allows for the probe to auto-retract.

The shaft is a simple steel 3.17x30.8 RC motor shaft available here: http://rctimer.com/index.php?gOo=goods_details.dwt&goodsid=552&productname=

This shaft has free shipping but will need to be cut to 30.8: http://rctimer.com/index.php?gOo=goods_details.dwt&goodsid=190&productname=

A cube magnet was chosen to aid alignment and solve some other issues. Unfortunately I could only find a source for bulk magnets: http://dx.com/p/ysdx-630-5mm-neodymium-magnet-cube-diy-puzzle-set-silver-125-pcs-175535 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: http://www.digikey.com/product-detail/en/A1302KUA-T/620-1022-ND/1006597

Allegro1302.jpg

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.

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 dropped and higher when sitting at the retract bar. Future firmware will allow pole reversal to be calibrated.


Calibration: 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 5mm. Drop the probe and use G31 to show the current probe reading. Put that value in configuration.h "define Z_PROBE_STOP_POINT". Also enter the hall readings when the probe is fully deployed and fully retracted.

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.


Experimental calibration: Currently G34 will perform an auto calibrate. Note: This code number will likely change in the future. To use the auto calibrate, park the nozzle on the bed as done above, zero the height, and then raise the nozzle 10mm. The calibration code will slowly step the Z motors down while recording the readings. In the process it will obtain, the hall reading of the probe when it is fully deployed, the reading when the height is equal to the probe offset (5mm), and the reading of the retracted probe. If Eeprom is enabled, these values will be saved for later use.


Use:

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 for 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".


Firmware:

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. https://github.com/Crash1/Repetier-Firmware