Welcome! Log In Create A New Profile

Advanced

Thoughts on a piezo touch sensor

Posted by leadinglights 
Thoughts on a piezo touch sensor
March 14, 2023 02:56PM
On the rebuild of my delta printer, I have been trying to come up with an accurate, reliable, and practical way of doing bed leveling. The latest attempt has largely been a failure but has at least been accurate and perhaps may be of interest. I am looking for new ideas for a piezo touch sensor and would be interested in any thoughts.

My investigations of underbed sensors have convinced me that all underbed sensors are inherently problematic - no matter what type of sensor is used. A method that has proven acceptable may give significant errors with relatively small changes to the bed weight, geometry, or mounting. Even surface contamination of the nozzle or bed surface can result in a hard contact between the nozzle and the bed.

One way of getting around the problems with underbed sensing is to probe only directly above a single underbed sensor which will give the nozzles Z position at contact. In the case of piezoelectric sensors, and perhaps others such as strain gauge sensors, it is also possible to determine if there is plastic or other contamination on the printer nozzle.

Once the Z contact position has been found there is a great deal of latitude in selecting a sensor to perform a mesh calibration so that errors of level or flatness may be corrected or compensated for. Touch sensors such as the BLTouch, inductive, capacitive, and optical sensors could all be used.

I chose to experiment with a touch sensor using a piezoelectric element, mainly because of the extreme sensitivity and usable resolution of the method, but also because I have a stable and reliable interface circuit for the piezo element.

The earliest piezoelectric touch sensor was intended to explore the extent of the errors in a triple underbed sensor and the results were quite disturbing: The difference between the piezoelectric touch sensor and the triple underbed piezo sensor, while mostly better than 10 microns, were as much as 50 microns different in some areas, and could be much worse in other printers.



A second piezoelectric touch sensor was fitted to my dual-headed printer which has proven sensitive, accurate, repeatable, and reliable. As it was possible to retract both print heads at once, the touch sensor did not need a mechanism to advance the probe. For most 3D printers though, there needs to be some way of extending the probe.



For the third sensor, I tried using a shape memory alloy wire to move a probe into position. The shape memory alloy, in this case, a 0.1mm diameter Nitinol wire, contracts by about 4% of its length when its temperature is raised above 90°C. This touch sensor was not a great success as it was too heavy, despite being constructed from thin metals. It was also too complex and the movement of the probe was jerky and slow. Ultimately it failed as the repeatability was poor.



A fourth sensor using mechanical deployment was designed for fitting to a delta printer. The probe itself is mounted on a lever with a fulcrum consisting of a knife edge. When stowed the lever is held in position by a magnet and when deployed it is held against a pressure block on the piezo element. The repeatability of this sensor is exceptional but only after it has been allowed to settle by performing a number of dummy probe operations. Other problems are that it is again too heavy and that the small piezo element limits the lower end of the system frequency response.



Possible future ways of building a touch sensor are to use a very light stepper actuator as shown below with a stepper module for scale. The overall size of this is quite tiny, about 18mm at its greatest length and less than 3 grams in weight. While I have yet to characterize these to find out if they are suitable, they are quite inexpensive at £3.50 from eBay.



Another possibility is to make a piezo version of a Klicky probe that can be picked up by the effector to take the bed mesh measurements. This again is in the very early stages of spitballing.

Mike
Re: Thoughts on a piezo touch sensor
March 14, 2023 04:10PM
Have you seen the Smart Effector? It uses a built-in strain gauge to detect nozzle contact. [docs.duet3d.com]



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Thoughts on a piezo touch sensor
March 15, 2023 06:28AM
I have always been impressed with the Smart Effector as it is the most elegant print head-mounted nozzle contact sensor that I have seen. The reason I don't use a Smart Effector is that my hobby isn't 3D printing, it is finding new ideas and chasing them as far as they go. Having a 3D printer gives me both a tool to chase ideas and a source of interesting ideas.

I did try my own version of the Smart Effector using piezo disks instead of strain gauges. [reprap.org] I don't remember why I didn't pursue the idea although I know I am much less impressed with using piezo disks in bending than in compression.

Have you explored using the data from the strain gauges on the Smart Effector to detect plastic or other contamination on the nozzle? With an underbed piezo it is fairly straightforward and will even detect a cold nozzle with set ABS or PLA against a glass bed.

Mike
Re: Thoughts on a piezo touch sensor
March 16, 2023 03:57PM
Just an addendum to that last: It seems that the first use of three sensors in the effector was Moriquendi back in April 2016.

[reprap.org]

Mike
Re: Thoughts on a piezo touch sensor
August 16, 2023 05:45PM
O.K., I know, Too Long: Did Not Read. Damn, but Twitter (Sorry, X) has a lot to answer for. Pictures first then.

Sled on effector, parking place in the background.


Bare sled


Sled parked


View from front showing piezo


View from bottom


Of the most recent bed probes, there is a lot of interest in dockable probes, particularly the Euclid and Klicky probes. Dockable probes have a touch sensor, typically a microswitch, that can be docked to the printer carriage with the actuator of the sensor extending below the printer nozzle. Immediately before use the sensor is picked up by automatic movement from a parking position and returned to that position after use.

The most extensive search for literature on dockable probes has not revealed a single one for Delta printers. Beyond the simple fact that CoreXY printers are now all the fashion, dockable probes do not seem to be a good fit for Delta printers.

One problem is that magnetic Delta rods are a very common way of reducing the play in the rod ends, but this comes with the problem that these can disconnect for a number of reasons. I suspect that most Delta printer users have come across their effector cast to one side and six rods dancing about like the tentacles of a demented alien in a 1960s Sci-fi film. Adding the magnetic dock and detach forces of a dockable probe seemed to me to be an unwise challenge to Murphy's laws.

In order to reduce the attach and detach forces I have made the dockable part so that it consists only of the actuator - the part that conveys the touch to the sensor itself. In the case of this implementation, the sled weighs only 6.3 grams and the attachment force is a little under 200 grams

The sled, pictured above, is built from 0.2mm stainless spring steel sheet and attached to an SRBP fixing holding 4 off 2mm x 2mm Samarium Cobalt magnets. There is also a magnetic iron plate to complete the magnetic circuit. Presenting the tip of the actuator directly below the nozzle reduces the X and Y offset to the point where they can be regarded as zero.

The attachment point for the sled has a matching set of 4 off 2mm x 2mm magnets, again with a magnetic iron plate to complete the magnetic circuit. A 20mm piezoelectric disc is arranged so that it will be put under pressure by an arm on the sled. When the tip of the actuator contacts the bed the pressure on the piezo will be reduced - resulting in a signal.

A reed switch positioned between two of the magnets on the attachment is switched on only when the sled is not attached. When the sled is attached the magnetic circuit is complete and no sensible field reaches the microswitch which becomes open circuit

General Discussion

The first question that you will almost certainly ask yourself is: Why?
Why would anybody want to make a piezoelectric touch sensor when God gave us the BLTouch, Inductive, Capacitive, Optical, and even sensorless probes, along with feeler gauges, 80gsm copier paper, Rizla cigarette paper, and so many other methods all of which have religious adherents.

I got my answer when I lowered an M2.5 nut on the end of a cotton thread onto my latest probe at 2mm/sec: the green LED on the conditioner circuit flashed. Since an M2.5 nut weighs about 250mg and triggers the sensor while an M2 nut, at about 140mg, won't trigger it, we know how sensitive it is.

Does this make it too sensitive? We all know that early underbed piezo sensors could be triggered by brats and cats hooliganing around the workshop, or that a spanner dropped on the workbench two feet away from the printer would ruin a bed mesh. But No! The moving part of the touch sensor is so light that it pretty much ignores mechanical noise of less than a full speed home to Z max.

So the answer to the question of Why? Is: If you want to print a decoration on a slice of toast or a Yoda's head on a marshmallow bed, then this is the sensor to do the bed mesh. Also, finding out how to do something is much more fun than buying a BLTouch.

The present status of the probe is that it works, it is sensitive, it is repeatable within our needs - of which more later, and it is reliable. The sled, for that is what I will call the moving part, can be picked up by the effector, and returned to the parking place without snag or hitch.

Problems to be resolved are that the detector for verifying a correct attachment of the sled to the effector is not working and that the pyroelectric effect of the nearby hotend causes a drift in sensitivity. There are a number of approaches to solve these problems and I don't anticipate any difficulty finding a fix.

On the repeatability issue: It is obvious the position of the sled on the effector in the XY plane is not fully predictable as it will settle to a position determined by both the magnetic attraction and by the friction between the sled and the mounting face. The question was, can this position change within a bed mesh run? While not being certain, testing this by sliding the sled as far as it could go and then tapping the mounting lightly with the handle of a screwdriver did not cause it to change position.

An allied potential problem comes from using four pairs of magnets. In a manner analogous to a four-legged table on a non-flat floor, could the sled have two metastable positions? Again from testing, the answer seems to be no - it needs quite a large force to cause the positions to swap.

The next thing is to get some software going for this. You can only get so far with typed in G-Codes. A thread I have been following on the Klipper Discourse group is [klipper.discourse.group] by cloakedcode

I don’t anticipate the software will be entirely without problems, in particular, my using a single pin for two sensors seems to be regarded as non-Klipper. Still, you don’t know if it runs until you kick the wheels.

Edited 1 time(s). Last edit at 08/17/2023 07:15AM by leadinglights.
Re: Thoughts on a piezo touch sensor
August 18, 2023 08:11AM
Today's problem.

The reed switch intended to give a signal that the sled was correctly attached to the holder does not work.

Early tests with larger magnets were very satisfactory, but those magnets would not release the sled at an acceptable pull while weaker magnets would not operate the reed switch.

A serendipitous solution came with the realization that when the sled was mounted to the holder, there would be a substantial pulse from the piezo in the opposite sense to the normal probing pulses and that this quite unique signal could be used as a reliable indication of correct attachment.

Although not yet tested, the use of reed switches to flag that the sled is correctly parked looks workable.
Re: Thoughts on a piezo touch sensor
August 19, 2023 09:57AM
Serendipity can be a harsh mistress. It was thought that the contact of the actuator arm to the piezo would give a single strong pulse in the opposite sense to nozzle contact pulses and that this would be a distinguishing signal for successful sled mounting.


White arrow is the direction of movement of the effector and magnetic mount when mounting the sled.

When I tried this in hot blood, the signal from the piezo was a brief burst of high-frequency random noise. I think this was caused by the actuator arm rubbing against the pressure pad on the piezo, along with noise from the sled moving and rattling against both its parking place and the magnetic mounting. Not even the initial contact pulse was consistently in the expected direction.

I guess it is back to some variation of reed switches to signal that the sled is correctly mounted.

Edited 3 time(s). Last edit at 08/19/2023 10:04AM by leadinglights.
Re: Thoughts on a piezo touch sensor
August 27, 2023 11:33AM
The piezoelectric touch sensor is now working. In most respects, it is above expectations, but there are still some residual problems to be shaken out

video on [www.youtube.com] cheesy gif on [reprap.org]

A sensitivity of 200mg even at a speed as low as 2mm/sec has been demonstrated although I have set it at a much higher 2 grams for these early tests - note that even this is about 10% of the trigger force of a microswitch.

Klipper seems to have much more over-travel than Repetier. The stepper motors seem to run on for about 10 milliseconds after the sensor has signaled the mpu. This is mentioned in Klipper documentation and isn't a worry although there is discernable deflection of the sensor actuator which I have never seen before.

One significant problem is that I have not yet been able to get a working method of detecting if the sled is attached to the effector or in the sled park. I may have to increase the size and strength of the sled mounting magnets so that they can also operate the reed switches reliably.

A good workaround is needed for a problem with the zero position. To be attached to the effector, or to be detached and parked, accurate X, Y, and Z positions are needed for the entry, park, and exit positions. Unfortunately, the tests, either bed mesh or nozzle contact test, will alter the Z position, and possibly the X and Y positions on a Delta printer.

As this printer is intended for rapid substitution of build surfaces as diverse as 0.15mm polyester to 3mm borosilicate glass, a robust method of mounting and parking the sled without operator intervention is needed.

The final (hopefully) problem is that I use the same port (RAMPS AUX2, D44) for both the touch sensor and the under-bed sensor. So far I keep being told that this can't be done in Klipper. In my innocence, I don't understand why not, so I will just have to try everything until something works.

Mike

Edited 1 time(s). Last edit at 08/27/2023 12:31PM by leadinglights.
Re: Thoughts on a piezo touch sensor
September 05, 2023 11:29AM
I have solved the problem of detecting if the sled is mounted to the effector by increasing the strength of the magnets on the effector sled mount, and by slightly changing the geometry of the magnetic circuit. The way that the detection works is that the magnetic circuit is fully contained when the sled is mounted to the sled mount. This is achieved by using high-permeability magnetic iron plates at the back of the magnets in both the sled and the mount. This ensures that there is insufficient magnetic field to operate the reed switch when the sled is attached but sufficient if the sled is not attached or is not fully attached.
Below is a picture of the sled mount, upside down of course. The magnets are 3mm diameter by 2mm thick samarium cobalt and the reed switch is a MKA-10110 costing £3.96 for 10 on ebay.



The arrangement is quite sensitive to misalignment of the sled: Less than 1mm out of position in the Y direction, about 1.5mm out of position in the X direction and, less reliably, about 1 to 2mm of tilt of the sled.
There is a similar reed switch on the sled park which can detect the moment that the sled has been mounted to the effector. This hopefully will stop the effector from being removed from the sled park if it is not correctly mounted.

Mike

Edited 1 time(s). Last edit at 09/05/2023 11:31AM by leadinglights.
VDX
Re: Thoughts on a piezo touch sensor
September 05, 2023 11:41AM
... easy but efficient - good work! smileys with beer


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: Thoughts on a piezo touch sensor
September 20, 2023 11:36AM
So far it is going very well, although I am challenged by trying to get to grips with Klipper's dockable probe software. Computer languages other than Assembly are not in my skill set.

The below is a synopsis of what this dual probe method does and does not do

Advantages

The accuracy and repeatability of the sensors are limited only by external considerations such as step size and surface texture of the bed.

Sensitivity can be very high. On the sled, a trigger force of 2 grams is used on the dockable probe, and trials have shown triggering at 0.2 grams. The trigger force on the under-bed sensor is around 5 grams.

On the sled, there is very little offset in the X or Y direction as the probe tip is directly under the nozzle. Variation in the X and Y position between bed mesh runs is of little consequence. Changes in Z position between runs are moot as the Z datum is set after the bed mesh has been recorded.

The magnetic mount of the sled lends itself to simple detection of successful or unsuccessful mounting of the sled to the mount or to the dock by inexpensive reed switches.

The under-bed sensor is able to discriminate between firm contact, such as between the nozzle and glass, and a softer contact such as would occur with a nozzle with molten plastic contacting a bed. This discrimination extends to being able to detect thinish (ca 0.2mm) set soft plastic on the nozzle. A similar capability exists for the sled but is limited to the detection of detritus or areas of delamination on bed coatings.

Problems

Changing the temperature of the piezoelectric element will give rise to an offset which is proportional to the rate of change of temperature of the piezoelectric element and this will change the trigger value. This is known as the pyroelectric effect.

There is some sensitivity to mechanical noise. This is mainly caused by variations in acceleration in the Z direction, such as noise from the stepper motors or toothed belts.

Detritus between the sled and the mount can cause problems if this leads to the sled moving relative to the mount during a mesh run. The open design of the dock and the magnets on the sled and mount that can attract magnetic particles are a concern.

There is a risk of damage to the sled due to its light construction; this damage can result from misalignment of the effector during attachment or parking of the probe. As the sled is simply resting in the dock, there is some risk of the sled falling out and being damaged or lost

Mitigations of above-noted flaws.

The pyroelectric effect can be reduced to a very low level by thermally insulating the piezoelectric element. A ceramic fiber blanket with aerogel infill and a reflective metalized surface has reduced the thermal offset by 95% in another printer.

The sensitivity to mechanical noise can be reduced by reducing the mass of the force transmitting parts and changing their geometry so that directional accelerations are balanced.

It may be possible to engineer a lid for the sled dock which can only be opened by the approach of the sled mount. In conjunction with software, this should minimize the chances of damage to the sled.

Mike
Sorry, only registered users may post in this forum.

Click here to login