Welcome! Log In Create A New Profile

Advanced

Piezoelectric disks for Z contact detect and bed levelling

Posted by leadinglights 
Re: Piezoelectric disks for Z contact detect and bed levelling
April 18, 2019 02:57AM
Hi frankvdh,

I may yet take you up on your offer of help but at this moment I am pursuing a different goal. The aim is not to extract a good contact from a bad background but to show up when a bad background has made the integrity of a signal unreliable. The method I use on both the slope and the baseline is to do a version of a running average (Savitsky Golay) which does provide filtering but I then use MAD (Mean Absolute Deviation) to pick up that those two parts were close to straight lines. If the signal does not pass a few sequential tests then it needs to be repeated.

The example that a friend used to describe it is that LIGO uses sophisticated filtering methods extract a signal from two colliding black holes as it is hard to get the black holes to do it again. With a 3d printer we can clean the nozzle before re-probing or try again without a small child banging the table the printer is one etc..

Mike

Edited 1 time(s). Last edit at 04/18/2019 03:50AM by leadinglights.
Re: Piezoelectric disks for Z contact detect and bed levelling
May 14, 2019 05:00AM
I have been working on a modification of a piezoelectric bed leveling sensor and conditioner which is able to distinguish between a good nozzle contact and one made unreliable by virtue of plastic between the nozzle and the bed, dirt under the nozzle, external vibration and even loose glass plate on the print bed.It does this by distinguishing the signature of a good nozzle contact from a bad one: A good contact is shown by having a sharp onset followed by a very linear rise in output at a predictable rate.

Other useful features are that the contact speed can be less than 2mm per second and contact will be detected within less than 20µm. A secondary contact output shows that contact has occurred but may be unreliable - this contact being within 100µm. The secondary contact is to prevent bed damage in the result of a good contact not being received.

Although this will meet my own needs, it has become obvious that developing this to meet the needs of others will need a considerable investment in both time and money and this means that I will not be able to make it an open source project.

My question is, will there be sufficient interest to make the further development worth my while? Although I can't at the moment price the whole thing, I think that a target of "competitive" is very achievable - assuming that anything that sells in reasonable quantity such as BL Touch is the competition.

A bit of info on [reprap.org] and [reprap.org]

Mike
Re: Piezoelectric disks for Z contact detect and bed levelling
May 14, 2019 12:21PM
You have some kind of 350Hz'ish pick up on your ADC values leadinglights (going by your graph) which you for sure has noticed. Wonder what that is ?

If your piezo sensor leads aren't a twisted pair, then maybe try twisting them (or use screened lead), that super-imposed HF should then go away I'd have thought.

Anyway, good work, thank you for sharing !

Am just working out what the best way is to build in a piezo disc (I bought five 26mm (I think) disc's off ebay) into the hotend/extruder assy I'm currently doing. I'll be doing the same with a little CPU once I have it sorted out.

Edited 1 time(s). Last edit at 05/14/2019 12:22PM by Pippy.
Re: Piezoelectric disks for Z contact detect and bed levelling
May 15, 2019 12:04PM
@Pippy A somewhat similar noise is visible on the scope here [reprap.org] In the case of that trace it was the mechanical noise from the Z stepper motor. I assumend that this was the case with the 350Hz noise but it doesn't tie up with the stepper frequency. I can't investigate at the moment as I have dismantled the rig to use it for milling my new heated build stage but it is on my "wierd things to be checked" list.

For the circuit I have switched to a PIC16F1703 which has two useful Op-amps built in and enough mojo to do some fairly complex data processing. For piezo discs Murata are best but most of the Chinese ones are perfectly good although you should be aware that sometimes the polarity varies even within a batch

Mike
Re: Piezoelectric disks for Z contact detect and bed levelling
May 15, 2019 01:21PM
Have you considered something like a bandpass filter? A smallish circuit to attenuate unwanted frequencies to single out the desired frequencies so that you get fewer false positives? This is how glass break sensors for alarm systems work, a mic (Oh look, a piezo one!) is filtered to attenuate sounds outside of the frequency that glass breaking makes, so that it can very sensitively report when the window is broken.

You get a distincitve "sound" from nozzle contact with something solid, so you just need to pick up on those frequencies.

A bandpass filter can be done for a single channel with 24dB/octave with a single quad op-amp and supporting resistors and capacitors. This should get you a fairly narrow range of frequency to listen for, and ought to allow you to make the thing much more sensitive, without triggering false alarms, or at least let you know if you're getting good contact.


MBot3D Printer
MakerBot clone Kit from Amazon
Added heated bed.

Leadscrew self-built printer (in progress)
Duet Wifi, Precision Piezo parts
Re: Piezoelectric disks for Z contact detect and bed levelling
May 15, 2019 02:37PM
@SupraGuy,
A lot of work was done by many people on sensing the vibration from the contact but much of it was based on false assumptions. The piezo in almost all of the sucessful Z probes does not sense a vibration but a pressure change. the fact that the initial contact signal decays away through leakage in the element and amplifier is irrelevant as it has done its job by then. Similarly, trying to "tune" the circuit based on frequency is going to be so printer/hotend/bed specific that it will become unreliable if there is a change; for example, temperature causing a frequency drift.

My very early circuits even dispensed with a potentiometer to adjust for the trigger point but were dependant on the hardware of the sensor going from full pressure to no pressure within a short distance - see the firs post in this thread. My present circuit/software is sufficently immune to unwanted stimulus that it can even ignore one "British Standard Child Banging on Printer Table" of unwantedness.

Mike
Re: Piezoelectric disks for Z contact detect and bed levelling
May 16, 2019 06:19AM
Looking forward to seeing your final gubbings leadinglights !
Re: Piezoelectric disks for Z contact detect and bed levelling
June 11, 2019 04:00PM
Just reporting that I have been running some early tests in a "semi-real-world" situation that shows repeatability of well better than 0.5 gram at 2 grams of nozzle contact pressure.



10 microns of movement of the nozzle gives 0.60 Newtons ( say 62 grams or 2¼ ounce) of force in the middle of the bed.so 2 grams should equate to 0.067 micron. As my Z axis is 1mm/rev and ¼ step on a 1.8° stepper there is sledome even one step difference in trigger points.

Mike.
VDX
Re: Piezoelectric disks for Z contact detect and bed levelling
June 12, 2019 05:12AM
... are you interested in even finer resolutions and/or "non-contact" force measuring?

Developed some sensing methodes in my "active" time, when working in the micro/nanotech industry cool smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Piezoelectric disks for Z contact detect and bed levelling
June 12, 2019 07:38AM
Hi Viktor,

I am very interested in any possible technology for sensing in 3D printers. Finer resolutions are nice, but only insofar as a finer ultimate resolution will point to a likely better reliability.

At the moment I am convinced that piezo sensing is the best available technology but even it is imperfect as it doesn't lead itself to a sensor which can be strapped to any printer - as can the BLTouch or various non-contact sensors.
The most interesting of the non-contact types is using the nozzle as a capacitative probe: The non-linear relationship between distance and capacitance can be used to indicate an approach in the 10 microns region - the shape of the approach curve can likely even predict things like clean nozzle, hard plastic on the nozzle or soft plastic on the nozzle.

I look forward to hearing of other potential sensing technologies from you.

Mike
VDX
Re: Piezoelectric disks for Z contact detect and bed levelling
June 12, 2019 09:07AM
Hi Mike,

a pretty simple non-contact sensing can be achieved by a fine nozzle, blowing air, and measuring the pressure change inside the nozzle when moving toward a surface -- the pressure change rises nearly exponentially shortly before contact.

Another non-contact sensor can be done by focussing a beam of white(!) light with a lens with "high chromatic error" and a colour sensor nearby - with the colour aberation the spot area will be "more blue" in the top and "more red" in the bottom. This is used with the "Chrocodile"-Sensor

A simple but pretty precise and reliable "contact" sensing can be done by fixing a piezo buzzer to the nozzle and a microphone to the bed (or the other way around).

Made some others too with different methodes, but cold be too complex for common use ...


*** EDIT ***
- for the "Chrocodile"-sensor - this is best done with a fiber bundle, where the "feedback sensor"-fiber is in the middle and the light-emitting fibers arranged concentrically around - have some "image-feeding" fiber-bundles with 3000 or 10000 parallel fibers with bundle diameter of up to 1mm, where a 0.2mm fiber can be placed in the middle of the light entry end, so it will receive the reflection from the sensor-end ... and around the 0.2mm fiber there is enough place/volume to feed the white light through.

This could be used even without a chroma sensor - fix a short FL lens to the sensor end and measure the reflected brightness - when the focus is exactly on the surface, the reflection is stronger ... above or below it will weaken ...

Edited 2 time(s). Last edit at 06/12/2019 09:20AM by VDX.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Piezoelectric disks for Z contact detect and bed levelling
June 12, 2019 10:42AM
I have actually tried the pressure drop method when deployable microswitches were the only common hight sensors used on RepRaps. I used a small nozzle of 2mm diameter feeding cooling air into a larger tubewith a 10mm diameter opening at the build stage end - when the area of the gap was less than the 2mm nozzle the pressure rose rapidly. The outer tube was lowered and the pressure for the sensing nozzle were both taken from the "near field cooling" air from an aquarium pump.

The Chrocodile sensor is very intriguing. I have come across confocal distance sensing before but with two different color light sources - deliberately using chromatic aberation is genius.

My trials with a piezo buzzer were not succesful as I was not able to make it insensitive to noise pickup. Although I never tried a fixed frequency and narrow band filter I abbandoned this as I thought it likely that getting a good noise immunity would probably mean that getting a confirmed signal would take several milliseconds and give a poor sensitivity.

On my trials of the new piezo sensor I have found that the difference between a nozzle contact on the aluminium of the bed and a bed with 130 micron thick overhead projector transparancy film is clearly picked up. This bodes well for the detection of dirty nozzles.

Mike
VDX
Re: Piezoelectric disks for Z contact detect and bed levelling
June 12, 2019 11:25AM
... for the sonic contact measuring you should optimize it to solely "structure-borne sound" (? - in German "Körperschall") - so the sound transmitted trough air is negligible, but instantly sensed with contact ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Piezoelectric disks for Z contact detect and bed levelling
October 03, 2019 06:45AM
I thought that I would just update you on the progress of my new piezoelectric controller. The controller is one that gives two signals to the controlling device (Arduino, Duet etc..) One signal is to show that a nozzle contact has been seen while the other signal shows that the signal is good - not noise or contamination on the nozzle.
The latest software and hardware working, although showing that more work is needed. The circuit and program are very sensitive to a good bed contact, responding in 4ms and about 15µm of travel after the nozzle first touches the bed. It also detects plastic on the nozzle which I simulated with a 0.25mm rubber gasket. Although it rejects some mechanical noise, such as most finger taps on the bed or dropping 8mm balls on the bed, it can be fooled with careful finger taps. Worse though is that detects noise through the workbench and frame. This was most unexpected as it 100% immune to rattling from the end of an X or Y movement or the beginning of the Z probe down move.

I am presently rewriting the software to modify the windows that a contact event must be within to improve this. Hopefully, I can beat the noise through the workbench problem as I can see what it is doing. It may be more difficult to beat the calibrated finger tap though.

I have put the hardware on [circuitmaker.com] but because circuitmaker is less common than say Eagle, I have the circuit diagram below. I will put Gerber and NC files on the same site once the latest changes have been done (improved EMC and test points)







Software is on [github.com]

Beware though, the software is written in Microchip assembler both for speed and because I prefer it to high-level languages. I am given to understand that assembly language causes terror in the unwary and may cause brain rot.

I will not be pursuing this beyond the point where it works to my satisfaction so anybody who wants to copy is most welcome. MIT license applies so even commercial as long as attribution is given.

Mike
Re: Piezoelectric disks for Z contact detect and bed levelling
October 12, 2019 03:12PM
After a lot of testing, I have found that this conditioner works acceptably well for my printer. Having said that, it does seem that the recognition of the nice linear ramp will not give a universal conditioner that needs no adjustment. The signal to show that a contact event is or is not good will have to have some provision for adjustment. The things that have made ramp recognition less reliable than hoped for include a bounce in the signal [reprap.org] and greater than expected compliance at the corners of the build stage and variability between piezos.

Originally I had designed in some communication (I2C) between the conditioner and the controller (RAMPS/Arduino etc..) to effect adjustments but my excitement about how well a nozzle contact ramp is recognized led me to hope that no adjustment would be needed.

Present plans are to ignore the printer controller altogether for adjustments, doing them instead with a PC or laptop by way of the original I2C pins and a USB to I2C module such as this [www.robot-electronics.co.uk]

Mike

Edited 1 time(s). Last edit at 10/12/2019 03:14PM by leadinglights.
Sorry, only registered users may post in this forum.

Click here to login