Update 04-03-2017 - !!20mm piezo version now available (as alpha for testing)!!
Update 16-7-17 latest thinking on firmware setup can be read here http://forums.reprap.org/read.php?1,767998,page=9
Update 02-03-17 - Added an stl to make a template to use to mark the centre of the piezo disc before drilling.
Also one for 20mm piezo, for future use.
Update 24-02-17 So have this system running on Smoothieware and improved running on RepRapFirmware (Duet).
Smoothie - configure it as either probe or as a probe and an endstop. You can use the same pin which differs slightly from Smoothieware documentation. Set debounce_ms 1 for both, then probe at decent speed.
G31 X0 Y0 Z0 P100
M558 P5 I1 F500 X0 Y0 Z0
in config.g remove the I1 from M558 if you configure the signal board as active high instead.
Probe at decent speed.
Update 17-02-17 After much testing and in collaboration with Zesty Technologies, maker of the Nimble extruder, Lykle has produced a delta effector for the piezo sensor system. It is designed for Haydn Huntley magnetic rod system (but might suit other magnet-in-rod systems). Assembly guide to follow.
You can also download this and 2 more versions with different design styling and rod spacing from http://www.thingiverse.com/thing:2117069
Update 05-02-17 Piezo controller board mount to attach the board somewhere on your printer by Sakey added. Thanks.
Update 02-01-17: I have changed some of the Marlin settings after some testing to ensure more reliable operation. Also reduced the sensitivity of the piezo using VR1 on the signal board, to reduce false triggers.I have also neaten up some of the text fr better readability.
Update 29-01-17: I have turned the circular upper piece over (for the generic version) as it prints better this way around, if you have already downloaded it re-orientate it before printing, if you are downloading it now its the right way around for printing.
Description and build Instructions:
This is the latest and now considered Beta version of the hotend piezo z-probe I have been developing. It follows on from the excellent work done by Leadinglights and Moriquendi (http://forums.reprap.org/read.php?1,635075,page=1) I decided to see if I could move the piezo sensor to the hotend, well the cold-end above the heatsink. This would simplify the process of installation, remove the need to suspend the print bed, keep the piezo away from heat amongst other benefits.
Thanks to Xochal for the 90 degree Tee groove mount adaptor this is derived from.
You will need some piezo transducers I used these: Murata 7BB-27-4 As 27mm such as
Place one on a flat hard surface and drill a 4.5mm hole in the dead centre (you can drill 5mm if easier). It takes a little bit of time, use light pressure and stop frequently to allow the heat to dissipate. Lightly file around the edges of the hole to remove burs. Use a spur point wood drill bit, unless you have something better - let me know.
There are two versions, one works with Lykle's effector http://www.thingiverse.com/thing:2047422 and the other can be bolted to the underside of your effector or carriage, the only difference is the side on which the nut traps are located.
Print the parts. You will need 4x 4mmx20 smooth steel rods (I used some woodscrew shanks cut with a dremel) I have also tried 4mm acetal rods which work too. Push the rods firmly and as straight as possible, into the circular top piece, the rods hang down on the same side as the large circular recess for the piezo disc.
Heat press them or bond them with acetone/superglue, they need to be tight in the top part. Grease the rest of each rod. The lower part (clamp) when assembled, slides over the rods and they provide the lateral stability for the hotend. It can only move vertically when probing.
You can assemble the clamp and try it on to the rods. The holes for the rods, in the clamp will probably need to be enlarged, I drilled them out to 4.5mm. Make sure the clamp can slide up and down, it needs to be a good fit so that it can slide, but be well constrained laterally. Heat press 2xm3 nuts into each clamp part, one to do the clamp up, the other to attach it to the upper part.
The hot end clamp goes around the groove mount of your hotend and is secured with m3 bolts and nuts. Make sure the bolts/nuts do not stick out of the clamp.
Assembly for the generic version (read this either way):
Attach the bowden tube to the hot end, make sure its tightly inserted with no play, as access to it later is not possible. Attach the clamp and do it up tight, the upper surface has the raised domed part as shown in the images above. Place the piezo disc over the bowden tube with the ceramic and solder pads facing downwards. This has been designed with genuine e3d v6/lite hot ends in mind. If you want to use a clone or other hotend with a groove mount, drill or modify the top piece centre hole to fit the bowden coupler of your choice. Attach your bowden tube here and run a ptfe fialment guide tube from below this through the piezo, into your hotend. This is untested at present but I see no reason why it wont work. Let me know how you get on.
The piezo discs I am using have a solder pad right on the rim of the flange, there is relief in the clamp for the solder pad and wire on the piezo disc. Try to get the solder pad into this groove. It will slip about so there is no harm putting a drop of adhesive between the piezo and the clamp, to keep it in place.
Insert the hotend, clamp and piezo into the upper piece which needs 4 x m3 nuts heat pressed into it either to attach it to your effector or carriage..Use 2 x m3 bolts ideally just the right length (around 20mm) to secure the upper part to the clamp with the piezo disc in between. Try to tighten them evenly, if you do them up quite tight this will make the nozzle firmer, but the sensitivity will be less, its a balance.
If using the generic version you can mark and drill your effector (or print a new one) and attach the assembly with hotend, with 4x m3 bolts.
Assembly Lykle's Effector Verison.
Print the effector, make sure the cross shaped opening in the centre is clean of any brim or elephants foot-first layer, attach it to your printer.
The only difference is the upper part has the nut traps on the other side. Attach the circular upper part (with the 4mm smooth rods inserted and greased as above) with 4 x m3 bolts. Attach the clamp to the hot end and rotate it so it will face the right way when assembled. Attach the bowden tube securely, then slide the piezo over the top, solder pads downwards, a drop of adhesive might help to hold the sensor in the right place. Now lift the hotend, clamp, piezo and bowden tube assembly into the effector, engaging the rods and do up the two m3 bolts that secure it together - tighten as described in the generic version above.
For Both versions:
Now secure the leads of the piezo sensor with heatshrink/cable ties to something so they aren't being pulled about as your print head moves around. What I did (image attached above) was to extend the wires by soldering/heatshrink then cable tie the wires to one of the acetal rods (ensuring I did not wedge the two parts apart or the sensor would not trigger).
Attach the piezo to the controller board a design for which is available here https://www.dropbox.com/sh/3q38ew98kt7f8sq/AAB_uA6tQL2ETlGcnfdijm2Ra?dl=0
Moriquendi/Leadinglights designed this board and Moriquendi has some made, PM him at reprap forum he should be able to make you one, for a small fee. He makes them in batches so please be patient.
The controller connects to standard endstop/probe pins on your board. Make sure +,- and sig are the right way around.
Further details on tuning this board and a little video walkthrough are available at https://www.duet3d.com/forum/thread.php?id=752&p=3 I will update the long post I wrote about tuning there as things develop.
Config for Duet wifi is in the post above.
My instruction are based around setting the piezo board to output a falling signal when triggered. So quick guide is:
-attach piezo board to your controller
-attach the piezo (polarity is important)
-turn VR2 (carefully don't short anything) until the LED just comes on and then 1/4 turn more.
-push up on the nozzle, see if the LED blinks positively OFF-ON
-if not adjust VR1 until it does (this is the sensitivity)
-move the print head around, if there is slight flicker during normal moves that's okay, but you want a definite OFF-ON when you push up on the nozzle. Adjust VR1 to get the signal is clearly above the noise.
Configuration for Ramps/mega/Marlin RC bug Fix from 21-01-17 on (it might work on earlier versions but you'll have to adapt the settings).
Connect to Z_min endstop plug, ensure that signal,+,- go the right way, on the piezo board it goes +,sig,- on a ramps board you can swap the pins in a 3 pin plug so that the + is towards the centre of the ramps board, - is the middle pin and sig is towards the outside of the board. Do not get these mixed up. Normally use the z-min endstop pins.
-#define Z_MIN_PROBE_ENDSTOP_INVERTING true
-//#define ENDSTOPPULLUP_ZMIN (i.e. you do not need a pullup for z_min
-#define Z_MIN_ENDSTOP_INVERTING true (provided you use the LED on with VR2 method)
-#define X_PROBE_OFFSET_FROM_EXTRUDER 0 // X offset: -left +right [of the nozzle]
-#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
-#define Z_PROBE_OFFSET_FROM_EXTRUDER 0.2 // Z offset: -below +above [the nozzle]
-#define XY_PROBE_SPEED 1000
-#define Z_HOME_DIR -1
-#define HOMING_FEEDRATE_Z (10*50) (reduce if your z axis can't move this fast but a faster z homing speed makes for better triggers)
-I have enabled auto bed levelling with bilinear mode (non-flat bed) and set options there to suit
(please remove the - symbol from the lines above I have to put this in or Thingiverse formats it strangely).
I have added these lines to my start gcode:
M109 S130; Heat extruder before probing
M201 X300 Y300 ;acceleration low
M205 X2 Y2 ;jerk low
G28 ; home all
G29 ; Grid Level
M201 X1500 Y1500 ;acceleration normal - use your own values
M205 X20 Y20 ;jerk normal - use your own values
So this warms the nozzle to below ooze temperature for almost all filament, you don't want filament on the nozzle when probing (bed should be hot also). I chose a fixed temperature to use for probing to standardise for thermal expansion in your hot end, by altering z offset, you can use babystepping and then offset for the next print.
Then it reduces acceleration and jerk to low values.
Then it homes, then it auto/grid levels.
Then return accelerations/jerks to normal, use your normal values here.
This is necessary as it is so sensitive it will trigger when the head comes to rest over a probing point before it actually probes if your head is moving fast and stopping suddenly. You shouldn't need to go slower than this but do so if you get false triggers.
General approach is the same as for auto bed levelling with an inductive probe.
As mentioned elsewhere the nozzle is the probe so offsets are x0,y0 z0.2 this is an approximate z offset which should leave the nozzle just above the bed at z=0, reduce it for a lower nozzle, increase it for a higher one. In marlin this can be done by sending M851 Zx where x is the offset. Then m500 to save.
Now probe away, its very sensitive but very accurate. Marlin's M48 probe repeatability test shows a standard deviation over 10 probes of 0.009014mm. So its very reproducible. Try this test with your old probe before trying this one.
Please be aware with this sensor in its current build, there is no fail-safe operation if for example the piezo becomes detached etc... So it is recommended after powering on your machine just to check the probe, either read its analogue value from your firmware at rest, and when pushing up on the hotend, visualise the blue LED on the signal board changing, or sending m119 and pushing up on the hot end to check it shows triggered, you might have to try repeated taps whilst sending m119's to get a triggered response..
For early testing if your controller allows easy reduction of motor current (if digital) then you lessen the impact of a head crash if it happens.
Some videos of some of the earlier prototypes and a bit of help to tune the signal board.