Under-bed piezo force sensing

Avatar

By James 17 February 2017 00:34

Member · 22 comments

In another thread:

dc42 wrote

Two points:

1. Force sensors in the bed supports can suffer from the trigger height varying slightly with position. Typically they are more sensitive when you probe close to one of the sensors.

2. If you are going to change your nozzle length by a large amount on a delta printer without resetting the homed height parameter in the M665 command, you had better specify a large dive height in the M558 command.

I wanted to give this it's own thread because I think it is a complex topic and the experience of others would be appreciated. I know there is another lengthy thread about piezo sensing, but it is focused on mounting the piezo sensor the nozzle. Mounting the sensors under the bed presents some unique issues, such as:

1) Three (or perhaps 4 if you are using a Cartesian) sensors that have to, in the end, be treated as one by the board.
2) Reduced sensitivity at any one sensor because the load is being distributed among multiple support posts.
3) There is the potential benefit of integrating the signal, with the appropriate logic, from multiple sensors for better discrimination, but that's "wishlist".

I've been testing some cheap 20mm piezo elements, and what I'm finding is that:

1) It takes a pretty good tap to create much voltage. I think the safe assumption, at least for these piezo elements, is that you need to be able to reliably detect a signal of 0.1 - 0.4 volts at the low end. The high end might go up to 5V+, but in that case you probably really rammed the nozzle into the bed.
2) Other threads talk about need to bend the piezo elements for force to register. I find that straight down compressive force works just as well, if not better.
3) The piezo elements don't have much noise. For example, if you shake them around, you might get hundredths of a volt out of them. It takes an intentional tap in the right direction to exceed 0.1V. Given this, I don't think discrimination of signal vs noise should be a problem, but I have no practical experience yet.
4) They are easy to break. I would suggest straight compressive forces rather than bending because if you bend them too much, you'll ruin them (with an audible crack).

My plan is to place a piezo unit directly under each bed support. Given that the piezo elements do not actually support the bed (the frame does, and the piezos are just slipped in between, like a washer), and that I have springs attached to the bed, I am not sure how much force is going to turn into signal. I don't think this would be an issue if I had the ability to due rudimentary logic on the signal (e.g., running the signal through something like an attiny or adafruit board, as suggested by dc42) given that I don't expect much noise, but right now I don't have that capability, so I'm hoping that it will "just work" when 3 piezo elements are connected in parallel to a fairly simply circuit that turns the voltages into a binary signal for the Duet.

Has anyone implemented this exact configuration, or have thoughts on why it should be done differently?

Avatar

By yngndrw 17 February 2017 12:54

Member · 9 comments

Hi James,

I have a very-much unsupported, totally off the top of my head and rather dodgy idea that might get you in a position to be able to make a proof of concept with off the shelf parts.

Essentially you need a high gain (~30-50 ?), low noise amplifier with overvoltage protection - What comes to mind is a thermocouple amplifier.

Take for example the AD8495:
https://www.adafruit.com/product/1778
https://cdn-shop.adafruit.com/datasheet … 6_8497.pdf

The datasheet shows that this will work at 3.3V, has an analogue output (Which I'd expect to be nearly digital with piezo elements due to the gain) and will be happy with a 25V input signal.

If you connect your piezo elements in series across the input of the amplifier, you may get a digital signal representing the tiniest of forces. I think that an extreme gain like this should help improve the repeatability across different locations on the bed, as long as it isn't too high of course.


Needless to say, this is not a supported use of a thermocouple amplifier and will probably make some (most) electronics engineers cry. It may also simply not work as I envisage in my head.

PS: Thermocouple amplifiers are not a cheap solution, I only recommend them as a possible way of using off the shelf parts for your proof of concept. Also the gain is not adjustable, but Ebay failed me in a search for off-the-shelf adjustable amplifier modules with suitable specs.


Edit: Just noticed there's another piezo thread with a better supported electronics solution: https://www.duet3d.com/forum/thread.php?pid=7345#p7345

Last edited by yngndrw (17 February 2017 13:04)

Avatar

By deckingman 17 February 2017 13:42

Member · 593 comments

The mechanical engineer in me is just trying to fathom how this would work in practice. I'm unclear as to how the Piezo elements would be mounted. You say that they would not be supporting the bed yet the would need to be coupled to the bed in some way. Any chance of a sketch or something?


Avatar

By deckingman 17 February 2017 17:56

Member · 593 comments

Forget the above. Just been looking at this http://forums.reprap.org/read.php?1,635075. Might be worth a read James if you haven't already.


Avatar

By James 17 February 2017 18:09

Member · 22 comments

I meant not fully supporting the bed, of course they have to somewhat support the bed to be coupled to force changes. The piezos are too small to be the only thing that supports the bed, so I was planning to sandwich them between some thin silicone sheet (1mm), both for protection and insulation, with the 20mm aluminum frame under, and a custom printed bracket (which is larger and screws into the frame on either side of the piezo) that holds the bed screws and springs over.

In this set up, the piezo would have some (maybe a lot, depending on how tight the screws are and how compressive the silicone is) pre-load on them. I'm guessing more than optimal, but I think this would allow at least some decent portion of the force to be transmitted through the piezo. If the silicone ends up being too cushioning (I'm assuming not at only 1mm thick), I could use a thin piece of plastic as insulation, which might help give a sharper signal.

A photo of the bracket is below. The two holes on the side are for M3 screws to affix it to the frame. The center hole holds the screws that support the bed (with springs on them). The small channel at the bottom center is to allow for the piezo wires and solder blobs. The piezo will go under this, either directly or with a sheet of silicone in between. SInce the frame is metal, I have to put something insulating under the piezo, so there will be a silicone or plastic sheet there.

bracket.jpg

Avatar

By roboduet 17 February 2017 19:02

Member · 104 comments

Is it possible to add piezo "speaker" that emits high frequency sound (over 20 KHz) to effector or bed and the same piezo "microphone" that receives this sound on other end?

Avatar

By James 17 February 2017 19:19

Member · 22 comments

Someone did something like this. They created a system that detected the nozzle touching the bed by how it changes the transmitted or resonant frequencies, by injecting white noise with something (I don't think it was a piezo) and then they had piezo sensors attached to the frame. They did Fourier analysis to the waveforms using a DSP chip to detect touch vs non-touch positions.

They said it was "simple" because there are libraries available to do the waveform analysis, but I think their definition of simple and mine are a bit different. Still, very cool, just more involved than I want to try to tackle right now.

Avatar

By roboduet 17 February 2017 19:34

Member · 104 comments

Maybe it's possible to detect high frequency digital (0\1) signal of predefined fequency without using such complex things as resonant frequencies, DSPs and other?

In this case it will be slightly simpler task - all that you need is just one "speaker" piezo on effector side and one "microphone" piezo on bed side. No need to use force then touching bed by nozzle to generate high quality signal. Also signal modulation will provide better selectivity of touching/contact.

UPD: maybe it's possible to update firmware to produce just few impulses for "speaker" between each motor step then nozzle going to bed in bed probing function? In this case it's possible to "listen" for received data between steps.

Last edited by roboduet (17 February 2017 19:40)

Avatar

By DjDemonD 17 February 2017 20:43

Member · 319 comments

Hi guys, I'm the piezo hot end guy. I based my ideas on this work http://forums.reprap.org/read.php?1,635075,page=1 by Leadinglights and Moriquendi. They document an under bed piezo system with some 6-9months of testing behind it. The issue they had was a little with heat, and the response of the piezo element changing with temperature, and a small amount of tilting the bed on contact causing one piezo to cancel another out (one being bent upwards and one downwards). This is why I decided to move the piezo to above the hotend where it is cool, and where only one piezo is required. All the benefits of nozzle based probing with none of the drawbacks of other systems.

When it comes to z-probes no perfect one has yet been made, but I am willing to bet that right now the closest thing is the piezo hot end (and I'm not trying to sell them). The IR sensor is very accurate and on cartesian/corexy machines where effector-tilt is not a factor its very suitable, if you're happy that you can't always probe all of the bed as it's offset. However the search continues, I am keen to see what you can come up with.

As for sound my microdelta has a Deltaprintr Mini Hotend on it with a very noisy 25mm fan which spins fast. To manually calibrate it I bring the nozzle down till it touches the bed where the sound distinctly changes, perhaps a mic of some sort could pick this up. A piezo attached to the bed however would overheat, this is the problem with underbed piezo's or FSR's they don't tolerate 110 deg C, so you have to come up with either a simple (not very firm bed) mount or an elaborate mount for them.

Last edited by DjDemonD (17 February 2017 20:43)

Avatar

By James 17 February 2017 20:56

Member · 22 comments

Thanks for the input. I plan to have air circulation under the bed, so even with a bed heater, I'm assuming (perhaps incorrectly) that the temperature will not get anywhere near 100C.

With respect to the piezos offsetting each other, can't a diode or something very simple deal with this? In other words, assume we are only interested in positive voltages and filter negative ones (or vice versa).

Avatar

By DjDemonD 18 February 2017 00:04

Member · 319 comments

Well Moriquendi's latest piezo signal conditioning board has inputs for 3 piezo's so I presume it handles this. He's sending me one but I cannot see any reason to put 3 under my bed, when the one in the hot end does the job better than any other sensor I;ve used so far. I will have a play with it, I was thinking about using two sensors to have a degree of fail safe in the event of a wire break. PM him on reprap if you want one, they're going fast this seems to be gaining some traction.

The two technologies which might be even more promising are accelerometers, to detect contact and what ultimaker seem to be using on the UM3 a capactive-type sensor under the sprung glass bed detects the nozzle pressing onto the glass.

Last edited by DjDemonD (18 February 2017 00:04)

Avatar

By T3P3Tony 18 February 2017 20:32

Administrator · 579 comments

Regarding accelerometers it's worth reading Michael Hackney's experience with accelerometers here:


http://forum.seemecnc.com/viewtopic.php … 25#p102553


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By DjDemonD 18 February 2017 20:39

Member · 319 comments

Yeah I've read that thread they do seem to conclude that currently its difficult to make it reliable. I'd say the opposite were true with the piezo hotend sensor, that seems to be very reliable.

In other exciting news (https://www.duet3d.com/forum/thread.php?id=940) it sounds small at first but this will save hundreds if not thousands of hours of printing time, in avoiding first layer problems. I'm nicknaming it auto first layer calibration as this is what it basically amounts to.

Avatar

By leadinglights Today 10:25

Member · 5 comments

The point made by James in the first posting on this thread is not quite true for piezo disks - although perhaps I spread this about a bit with an early posting on the RepRap forum http://forums.reprap.org/read.php?1,635 … msg-635164 which is a load of doggy-doo.

There is very little variability at different positions on the bed as long as the piezos are fairly closely matched - within batches of no-name piezos there has been less than 3% variability of output or of capacitance. The reason that this is true is that the charge generated on each disk is fairly proportional to applied force. Simply paralleling three discs will give the correct output even if one of them gets a negative output - think of a three legged table with the legs bolted to the floor, the sum the compressive forces on the three legs equals the weight put on the table even if you sit on an unsupported corner causing the opposite leg to be under tension

Mike

Avatar

By Moriquendi Today 18:37

Member · 26 comments

If I can stick my oar in here and give a stir.

I've been using piezo sensors underneath the bed of my enclosed kossel mini for months now and I've never had a problem, I can probe hot (bed at 100c) or cold without any issues

2016_08_22_18_43_13.jpg

2016_08_22_18_46_36.jpg

Idris