Welcome! Log In Create A New Profile

Advanced

Precision Piezo Z-probe Now available.

Posted by DjDemonD 
Re: Precision Piezo Z-probe Now available.
July 16, 2017 09:02AM
I have been following this thread for the last week but have been away from my workshop and computer. Fighting against the hotels flash screens with every URL or brief pause made it almost impossible to write anything on the forum. Trying to clarify some things (or at least my take on them)

Quote
Suggy on July 11th
I was going to put the 4 censor mounts pointing to the center but they interfear with some bed supports I have at the bottom, so I was wondering if I could point them off center? 2 pics uploaded so you can see what I mean

The supports that you show in your photographs are intended to entirely replace the bed supports so interference with existing supports should not be a problem. Ideally you should use three of these for easy manual bed adjustment without putting a bending force on the plate. The diagram below shows the way that these are designed to function.



The Adjusting Screw, Adjusting Nut and Stage Spring replace the existing adjuster. The nozzle contact force pushed down on the build stage and through the adjusting nut, parallel mechanism and pressure pad to reduce the pressure on the piezo. Note that no bending of the piezo element is needed - on my Cartesian printer the pressure pad is lifted completely off the piezo after about 0.12mm, almost all of which is due to bending of the 8mm rails that the linear bearing is mounted on.


Quote
DjDemonD on July 13th
So repetier said they have this already in their Dev branch, its called Z_probe_delay. ........

Thanks Simon, found on development version Repetier configuration tool [www.repetier.com] - need to set Enable Z-probing (FEATURE_Z_PROBE) in order to see it. I will try that ASAP

Quote
imqqmi on July 14th
What if I could add two more disks along the x and y axis, or an accelerometer, then compare the signal strength between them to decide from which angle the change came, eliminating the triggering of the sensor when the force came from the x or y axis? I'd need to use the ADC to capture the 3 signals and process it. It would probably take a dsPIC or PIC32 to process the data quickly enough for a low latency between action and detection/reaction.

It should not be necessary to use any comparison of the signals as the outputs of piezos add algebraically - just connect the elements in parallel. If three elements are mounted on three faces of a tetrahedron (Z pointing in the shared axis) then pressures in X and Y should cancel so that only Z will register. I haven't looked at turning moments but for directional forces this should work. There should be no need for anything more than an 8 bit MCU even for data smoothing - it is not intuitively obvious how slow the mechanical contact of a nozzle is in electronic terms but to put it in scale: At 5mm per second the movement is only 5 microns in 1 millisecond and the dumbest 8 bit MCU should cope

Mike
Re: Precision Piezo Z-probe Now available.
July 16, 2017 09:28AM
My experiments so far with an arduino Nano have got a fairly satisfactory output using just simple adc to give a threshold between 0-1023 from 0-5v and just set a threshold in arduino ide. The level with some of my least good prototype 20mm modules is only 5/1023 but it's 40-50/1023 with some of the more developed 27mm assemblies. The other nice thing is it can output a NO and NC output on two different pins. Just select the one you want to use.

I've also written some code to do it by differentiation like we are doing with the analogue circuit which should enable slightly better operation with a range of Piezos, although there's still a threshold to set so whether you really gain anything doing it this way is doubtful.

I'd like to work out the effect of temperature or ask Mike, and then maybe either use a supplied thermistor to automatically compensate for temp variation for the (modestly) heated chamber users.

As for protecting the Nano so far I've seen nothing near 5v with a 1mohm resistor across the piezo pins. I'll try some really violent impacts way more than a head crash see if it can generate 1023, so some better way to protect the mcu might be worth thinking about. That being said arduino Nano clones are £2.50.

Edited 2 time(s). Last edit at 07/16/2017 10:04AM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 16, 2017 10:45AM
Quote
DjDemonD
Okay so the last few are still uploading but

videos are now online starting with drilling a piezo and continuing through how to build a piezo 20 and finishing with how to tune the PCB.

[goo.gl]

Just going back to your videos, I have the new version with just the blue LED.
To set it up do I just turn vr2 anti-clockwise until the blue led goes out to set it and a tad more if its too sentative?
Re: Precision Piezo Z-probe Now available.
July 16, 2017 11:11AM
If you have the kit board which has 3 Piezo inputs it has one led. Make sure vr1 is around 0.4mohm or just leave it alone. Turn vr2 until the led just goes out. Then setup firmware to expect a NO output or trigger on rising signal.

If you have the piezo20 pcb it has a power led which is always on, when powered and a blue "triggered" led on each side which works the same way as the kit board. Vr2 is the left adjuster as you view the board with the precision Piezo logo on. Please download the instructions and follow them there's very little that can go wrong.

Fine tuning of sensitivity is best done with vr2. It's most sensitive at the point the led just goes out. A tiny fraction more takes it down a notch.

Edited 5 time(s). Last edit at 07/16/2017 11:24AM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 16, 2017 01:26PM
After some tips on seting up under bed system.
How to set the preloaders?

Just gone back and read the post about removing the pressure to trigger. I will need to alter the f/m settings to NC for this to work?

Edited 1 time(s). Last edit at 07/16/2017 01:55PM by Suggy.
Re: Precision Piezo Z-probe Now available.
July 16, 2017 02:07PM
I'll leave Leadinglights or Moriquendi to comment on the preloaders, but please set the firmware to NO. The difference is the piezo polarity will be the reverse in this system, but conceivably you could mount your piezos either way around. You will either get a trigger on pressing down, or when you release the pressure. If its when you release invert the polarity of the piezos.

With the 1.21/1.22 board you can set the board up to be NC just turn to the point where the LED is just on, rather than just off, when open. Now its NC for your firmware.

Please DO NOT set this mode with the Piezo20 module (or PCB if using it in another way - its the PCB with just one piezo pair of piezo pins with Precision Piezo logo on the front) the triggered (blue) LED will burn out on 5v supply if left on. Using it NO is fine.

Edited 2 time(s). Last edit at 07/16/2017 02:10PM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 16, 2017 02:40PM
Okay so I've been hitting the nano powered piezo module hard on a very hard surface, and you can get a 1023 (5v) read from the ADC. However I'm striking it with a force that would never be generated in a 3D printer, and if it was would be over a much longer timeframe and therefore would generate less voltage. So not worried about it damaging the arduino. A head crash that could kill an arduino with the 1mohm resistor in parallel to the piezo would destroy much more expensive components in the printer than this board.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 16, 2017 03:00PM
Just to confirm switch the wire's on the piezo and change firmware?
Re: Precision Piezo Z-probe Now available.
July 16, 2017 03:01PM
Only switch the wires on the piezo, if the trigger happens as you release the pressure on the bed.

Make sure the firmware is in NO mode, (on RRF use M558 I0 switch).


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 16, 2017 03:30PM
Quote
Suggy
After some tips on seting up under bed system.
How to set the preloaders?

Just gone back and read the post about removing the pressure to trigger. I will need to alter the f/m settings to NC for this to work?

To adjust the preload put the piezo disc between the pressure pad and flat surface (carriage in my diagram) and turn the screw down to just touch the pad, then 1/4 turn more edit: The preceeding is done without the bed adjusting nut on so what you are setting is how much pressure is on the disc when the bed is pushed down enough to fully release the pressure from the bed adjusting springs. Put some tape, glue or whatever to keep the disc in position - I used a brush-on silicone conformal coating.
Use the settings just as recommended by Simon and Idris. The only change is that the piezo disc is wired the opposite way round and since this might be either way on no_name_piezos (Murata tend to be consistent) it is jut the way that works.

Mike

Edited 1 time(s). Last edit at 07/16/2017 03:36PM by leadinglights.
Re: Precision Piezo Z-probe Now available.
July 16, 2017 04:48PM
Ok thanks for the reply guys. Will have a go tomorrow when I have more time
Re: Precision Piezo Z-probe Now available.
July 17, 2017 01:49AM
Huge thanks to sdavi for getting a PR into Smoothieware edge with the Dwell before probing mod in it.

Their pre-compiled binaries are not always up to date but if you compile your own version of edge then this switch will be present.

Great progress.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 17, 2017 12:37PM
Another question if you don't mind about fitting an LED.
On the latest version there are 2 pins labeled LED, how do I connect an LED and what type would be needed. Board will be mounted under the bed so it would be handy if I could fit an LED to the front so I can keep an eye on it.
Re: Precision Piezo Z-probe Now available.
July 17, 2017 12:46PM
@Leadinglights/Mike
Quote
It should not be necessary to use any comparison of the signals as the outputs of piezos add algebraically - just connect the elements in parallel. If three elements are mounted on three faces of a tetrahedron (Z pointing in the shared axis) then pressures in X and Y should cancel so that only Z will register. I haven't looked at turning moments but for directional forces this should work. There should be no need for anything more than an 8 bit MCU even for data smoothing - it is not intuitively obvious how slow the mechanical contact of a nozzle is in electronic terms but to put it in scale: At 5mm per second the movement is only 5 microns in 1 millisecond and the dumbest 8 bit MCU should cope
Good point, you're right it's hard to just imagine this should work. I still haven't got around to printing and testing a setup like that but I might do it if it turns out the homing and maybe also printing presents any problems with false z end stop triggering.
You're right, mine even runs at 3mm/s. I was just thinking to capture the sometimes steep edges of the piezo disk, a sample rate too slow would miss them. I can't remember exactly what it was, I think it was around 20us, so you'd need at least 100k sampling, preferably 500k samples to catch the spikes. That's when tapping the disk with a plastic pen. It resonates at its oscillation frequency I'd imagine. For 3 disks and separate sampling you'd need 1.5Msps and some processing to detect the thresholds etc. might be outside the 8bit ballpark.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Precision Piezo Z-probe Now available.
July 17, 2017 01:07PM
Quote
My experiments so far with an arduino Nano have got a fairly satisfactory output using just simple adc to give a threshold between 0-1023 from 0-5v and just set a threshold in arduino ide. The level with some of my least good prototype 20mm modules is only 5/1023 but it's 40-50/1023 with some of the more developed 27mm assemblies. The other nice thing is it can output a NO and NC output on two different pins. Just select the one you want to use. I've also written some code to do it by differentiation like we are doing with the analogue circuit which should enable slightly better operation with a range of Piezos, although there's still a threshold to set so whether you really gain anything doing it this way is doubtful. I'd like to work out the effect of temperature or ask Mike, and then maybe either use a supplied thermistor to automatically compensate for temp variation for the (modestly) heated chamber users. As for protecting the Nano so far I've seen nothing near 5v with a 1mohm resistor across the piezo pins. I'll try some really violent impacts way more than a head crash see if it can generate 1023, so some better way to protect the mcu might be worth thinking about. That being said arduino Nano clones are £2.50.

40-50 is quite good with a 5V reference. The PIC16F1827 has a 1.024 Vref on board, so that should be about 5x more sensitive (to noise also).

What kind of sampling rates did that need? I can imagine that homing produces a pretty low frequency. Tapping on a disk with a plastic pen produces about 20us pulses IIRC. With the RIGOL DS1054z with the probe on 10x (I think that means 10M Ohm impedance) I get 20V easily, and with the bigger disk even higher, 25V. It's very low current so it shouldn't harm the PIC, it has protection diodes build in. For a production unit some form of extra protection would be prudent of course.

IIRC the PIC can also do some rudimentary temperature sensing without any external components. If the piezo disk is close enough it can be used with an accuracy of 2 degrees C.

Violent impacts occur when mounting the unit to the printer. Remember that the disks produce a current regardless if power is applied to the printer.

Ironically my servo operated z probe has failed so I need to fix that before I can continue printing and testing the pieze version.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:00PM
Quote
Suggy
Another question if you don't mind about fitting an LED.
On the latest version there are 2 pins labeled LED, how do I connect an LED and what type would be needed. Board will be mounted under the bed so it would be handy if I could fit an LED to the front so I can keep an eye on it.

One for Moriquendi to be precise, but I had one board where the LED stopped working, and just got AN Other LED out and tried it both ways around, one way it lit up on trigger.

I'll leave the electronics pro's to chime in.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:12PM
Quote
imqqmi
@Leadinglights/Mike
.................

You're right, mine even runs at 3mm/s. I was just thinking to capture the sometimes steep edges of the piezo disk, a sample rate too slow would miss them. I can't remember exactly what it was, I think it was around 20us, so you'd need at least 100k sampling, preferably 500k samples to catch the spikes. That's when tapping the disk with a plastic pen. It resonates at its oscillation frequency I'd imagine. For 3 disks and separate sampling you'd need 1.5Msps and some processing to detect the thresholds etc. might be outside the 8bit ballpark.

@imqqmi
If the piezo is being used to detect the vibration from a nozzle contact event then you may be right but for nozzle contact anything above about 10sps should do. DSO screenshot below shows the trace from a piezo at edit: 50ms/s 10ms/cm and 2V/cm. The trace ramps up linearly then turns over at about 8V in just over 10ms when all pressure on the piezo releases.



Early programming (assembler only I fear) of my attempt to make a signal conditioner is 40ksps with a convolution program to smooth and differentiate 19 samples - latency should be less than 2ms. This will be ona an 8 pin PIC12FXXXX (not finalized yet)

Mike

Edited 1 time(s). Last edit at 07/17/2017 02:26PM by leadinglights.
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:15PM
Ok thanks, I hang around whist my mount is printing. Mount it to house the pcb under the bed, hopefully it will slot in if iv got my dimensions right
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:23PM
Quote
imqqmi
............ With the RIGOL DS1054z with the probe on 10x (I think that means 10M Ohm impedance) I get 20V easily, and with the bigger disk even higher, 25V. It's very low current so it shouldn't harm the PIC, it has protection diodes build in. For a production unit some form of extra protection would be prudent of course.

IIRC the PIC can also do some rudimentary temperature sensing without any external components. If the piezo disk is close enough it can be used with an accuracy of 2 degrees C.

Violent impacts occur when mounting the unit to the printer. Remember that the disks produce a current regardless if power is applied to the printer.

.............

@imqqmi
Both Microchip PIC and Atmel parts have very robust protection built in but a force equivalent to a screwdriver being dropped on the sensor will give too much voltage & current for comfort - a resistor of about 4700 Ohms in series with each piezo will limit the peak current. Some of the rarely heard of MCUs used to make cheap kit in the millions often have no input protection though so will need diodes as well.

Mike
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:48PM
My PCB mount






Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:49PM
That's a really nice plot! I'm looking forward to replicating your findings. If it's such a low frequency, I could easily create a ring buffer with low pass filtering, even on a 8 bit PIC as you say. That may also help prevent false triggers from other axes. I've fixed the z probe, a break in the wire. That should be punishment enough for not using proper cnc sensor cables winking smiley Lets see how long a multi stranded CAT5 cable holds up. The old one was an ancient flat cable from a floppy drive.

Here's a scope plot with the piezo disk directly connected to the scope with no resistor other than the input impedance of the scope which is 10M ohm with the probe set to 10x. I tap it with a plastic pen. The voltage rises up to almost 30V. It's a disk of 27mm, the 33mm one is very similar.
Edit, it may be obvious but the plot is at 100us/div horizontally, and 5V/div vertically:
Edit 2, I brightened the picture below, please reload/clear cache to see the new image.


Edited 5 time(s). Last edit at 07/17/2017 02:58PM by imqqmi.


--
Kind regards
Imqqmi

NFAN CoreXY printer:
[reprap.org]
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:56PM
Got to ask, if v1.2 safe to use?
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:58PM
Quote
Suggy
My PCB mount

[attachment 96288 20170717_194351.jpg]

[attachment 96289 20170717_194411.jpg]

[attachment 96290 20170717_194418.jpg]

Looks great please upload it here and I will add it to the site and Thingiverse.

Mike and Imqqmi, I am not really following your discussion as its a bit over my head but its very interesting nonetheless, but would it be a big ask to move it to the general piezo electrics thread, or start a new one as I'm trying to keep this one (broadly) for user support.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 17, 2017 02:59PM
v1.2? Suggy.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 17, 2017 03:07PM
Sorry my bad v1.22
Attachments:
open | download - 1500318600037627002366.jpg (511.3 KB)
Re: Precision Piezo Z-probe Now available.
July 17, 2017 03:08PM
If you're asking is PCB version 1.22 is safe to use then the answer is yes.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: Precision Piezo Z-probe Now available.
July 17, 2017 03:09PM
Quote
Suggy
Another question if you don't mind about fitting an LED.
On the latest version there are 2 pins labeled LED, how do I connect an LED and what type would be needed. Board will be mounted under the bed so it would be handy if I could fit an LED to the front so I can keep an eye on it.

The LED output is for exactly this scenario. Connect any LED between the two pins, anode to LED+ cathode to LED-, the PCB already has a current limiting resistor on board so you literally just connect the LED. If you are using 3.3v for Vin (typically on a Duet) you may find that a blue or white LED will not be very bright, in that case try a red LED.

Idris


{Precision Piezo} Accurate, repeatable, versatile z-probe plus piezo discs, endstop cables, pt100, 50w heaters.
Re: Precision Piezo Z-probe Now available.
July 17, 2017 03:12PM
Quote
DjDemonD
If you're asking is PCB version 1.22 is safe to use then the answer is yes.

Sorry my bad yes was asking about v1.22
Re: Precision Piezo Z-probe Now available.
July 17, 2017 03:34PM
Quote
Moriquendi
Quote
Suggy
Another question if you don't mind about fitting an LED.
On the latest version there are 2 pins labeled LED, how do I connect an LED and what type would be needed. Board will be mounted under the bed so it would be handy if I could fit an LED to the front so I can keep an eye on it.

The LED output is for exactly this scenario. Connect any LED between the two pins, anode to LED+ cathode to LED-, the PCB already has a current limiting resistor on board so you literally just connect the LED. If you are using 3.3v for Vin (typically on a Duet) you may find that a blue or white LED will not be very bright, in that case try a red LED.

Idris

Great thanks. Using a ramps but will be upgrading to a Lerdge when it turns up
Re: Precision Piezo Z-probe Now available.
July 17, 2017 04:38PM
Mount uploaded to thingiverse.
[www.thingiverse.com]
Simple but works
Sorry, only registered users may post in this forum.

Click here to login