Strain Gauge/Load Cell based Endstops

There are also lots of other uses for the strain measurement that could be explored later, once the basic setup is operational.

For example. The measured strain betwen the extruder and hot end could be used to determine the filament resistance hysteresis and used to calculate and automate the setting of pressure advance.

Looking forward to HX711 support. Iā€™ve been using load cells for real time belt tension measurement for a while now, using decidated stand alone code. Definitely also a great use case.

2 Likes

Interesting idea. There is no hysteresis though. The pressure advance parameter is essentially the amount of longitudinal compression of the filament between extruder and hotend per force unit. This could indeed be measured by moving the extruder with cold hotend a bit and measure the force in dependence of the distance. I am not sure if this will be precise enough to be useful, but I think I could try this out in not too distant futureā€¦

This is the kind of thing that we could test out now if we had a working toolhead. The Marlin pressure advance tuning print is very straight forward. It would be pretty easy to match up captured load cell data to each line to see if there is any correlation between the optimal line and the flatness of the load cell graph.

I think I should just order an MK3->4 upgrade kit so I can have an extruder to experiment with in July. I ordered an upgrade kit to get a Nextruder to test with. My goal will be to have the code ready to work when I get hardware.

1 Like

Well, I do have a working toolhead with load cellsā€¦ Itā€™s just, my machine is right now changed into a CNC mill and I have to find the time to finish the milling job (which doesnā€™t work at 9 pm ;-)). Only then I can turn it back into printer configuration, otherwise I would lose my setup.

These look like they might be easy to package in the top plate of the top plate of my print head. They are a full bridge strain gauge so should have good sensitivity and thermal stability.

I have already been playing with embedding steel parts in the top plate during the printing process and have had good success with this. But also thinking of just milling the top plate out of carbon fibre or similar and expoxing the plate in place. I donā€™t want to use screw fixings.

https://www.aliexpress.com/item/32837365965.html

Looks a bit weak for my taste. Keep in mind, it needs to withstand the extrusion forces without bending significantly (much less than the minimal layer height, say at least 10 times smaller).

So I did a quick test about the idea with the Advance parameter: I loaded ABS filament, switched off the heater and moved the extruder slightly with the cold hotend. While doing so I observed the readings of my load cells measuring the extrusion force. This is the result:
extrusion force cold ABS

(I use Grams as a force unit here, just because it is a handy unit ;-))

So this looks somewhat promising. It levels off, because at some point the material slips through the extruder, so I assume the first data point is actually the most accurate one.

There is a catch though: The extruder movement does not translate 1:1 into a filament compression, since the load cells will ā€œbendā€ due to the applied force. I have a rough estimate how much this is, because this is needed as an input to my load cell probe algorithm (I call it ā€œstiffnessā€ there). Based on that I can compute how much the filament is actually compressed. This is a bit problematic, since the load cell actually ā€œbendsā€ more than the filament is compressed, so precision for this number is really important.

Anyway, I proceeded with this number and computed the Youngā€™s Modulus of the material. From the first data point (at 0.1mm), I got 6.7 GPa, which is at least a factor of 2 too high (ABS has 1.8 to 3.2 GPa). At least I am in the right order of magnitude!

If I increase the ā€œstiffnessā€ parameter I got from my load cell probe calibration, I can bring the result down to realistic numbers. Hence a critical point will be to determine this precisely. This is not so easy. I did this by touching down the nozzle onto the bed and continue moving the head down. This measures multiple effects at the same time, since also the bed and other involved components can bend. Maybe a better approach is to use some external measurement device like a dial indicator to measure the ā€œbendingā€ of the load cells (or even the nozzle) directly, but of course this makes it harder to use this approach.

Another problem is how to get from the Youngā€™s modulus (or any of the intermediate values) to the Advance parameter for Klipper. I am pretty sure this is relatively straight forward to solve, so at this stage I do not yet worry about this :slight_smile:

If you want to have a look at the numbers, here is the spread sheet:

Hello everyone. Been looking into this problem independently for a while, glad to find this thread. I think that the original implementation by Dmytro Ivanischev from Ukraine back in 2018 is worth looking at (blog post translated, video 1) is worth looking at, since heā€™s using a single PCB with the surface-mounted 1 kĪ© resistors hooked up to an HX711. A very primitive implementation as the HX711 is used in a purely digital fashion and hooked up to an endstop input but nonetheless was able to get pretty good first layer results from the images linked in the blog post. Clear that this is worth looking into since the actual loadcell costs on the order of $1 to assemble and less than that (!) to ship via regular postage.

I threw together this quick mockup in CAD showing roughly what I mean here. The loadcell can simply be sandwiched between the extruder and hotend in a direct drive setup, itself occupying a trivial volume in the assembly.

In the next couple of weeks (assuming printer development and testing doesnā€™t occupy too much of my time) Iā€™m probably going to get a 4-resistor loadcell board fabbed at JLCPCB along with a bunch of other electronics Iā€™m working on, test it to see if it actually works, and hopefully wrap a minimum viable bowden toolhead around it. If anyoneā€™s interested in receiving a copy of said toolhead board Iā€™ll probably be ordering a few.

1 Like

Duet3D actually sell something like this aimed at delta printers: Delta Smart Effector

Itā€™s a microcontroller ADC sensing a resistor network. It plugs in like a regular endstop switch.

Hi, I just read through this topic because Iā€™m trying to build a voron with toolchanger. I think I might have a good design for tool change repeatability but Iā€™m certain the offset measurement of the tools will give me a headache.

While I have zero experience in klipper I just wanted to share my thoughts with tool changing in mind:

  • I think measuring the x/y offsets of the tools is hard to accomplish and might not be necessary. On all of my printers there are bits of molten plastic around the nozzle which will make any contact measurement very hard to do. Also different nozzle geometries are not easy to handle. If you measure the outside contour and take the average you are assuming that the hole is precisely in the center of the nozzle. I have modded my Ultimaker 2+ to dualextrusion back in 2020 and I found it sufficient to print a test pattern and set these values manually once - they should only change when you modify the hotend/tool.

  • I think the strain gauges are better mounted on the bed than the toolhead, because on the toolhead it needs space and adds weight. Also you give the tool room for vibration because the strain gauge needs to be a little flexible. I does seem more complicated because you will need at least three gauges but in my opinion you can just take the average load of them for detetcting the touch, so it should not matter where the touch takes place. Regular scales use 4 gauges and they measure the same weight, it does not matter where you are on the scale. From the software side it should not matter where the gauge is though. Does someone agree with me on that? If yes - it would be nice if you would be able to configure multiple load cells for taking the average. It can also be accomplished by smart wiring though.

  • I have a bambulab X1C and they have three force sensors under the bed: Bambulab Wiki. They have a nozzle cleaning procedure which clears the nozzle from plastic buildup in z-direction. They perform a vibration test just before homing. They let the buildplate vibrate and check if the sensors are okay. It might be possible that they also compensate the force created by the inertia of the buildplate during movement.

  • I found this project on Github from 2017, but it seems like itā€™s not really much going on there code wise: https://github.com/kasom/LoadCellZProbe . I donā€™t think they do a linear regression to calculate the moment of touching the buildplate.

  • Also I found this Piezo based bed leveling system. Might not be related but maybe itā€™s interesting.
    I canā€™t put more than two links in this post beacuse Iā€™m a new user. Just goole ā€œprecisionpiezoā€

I hope this contributes to this topic

By the way if Iā€™m happy to contribute but my c is not really good and I donā€™t know much about the klipper system. But Iā€™m good with mechanical stuff and I have several cnc machines. If you need anyhing for testing just hmu

@ alexb. Several observations: Regarding the mounting of sensors on the bed, while it can and has been done successfully, underbed sensors of any type can be troublesome.
One significant problem is that bed probing is a dynamic event and the time it takes for the force of a nozzle contact to reach a sensor can be of the order of milliseconds. At 2mm per second nozzle approach speed, there can be 20 microns of difference between sensors. There can also be reflections from the edge of the bed which can make this effect worse.
There are other problems that can be caused by even a relatively small mismatch between the sensors, particularly when probing outside of the triangle of sensors (assuming three sensors are used)
Yet another problem is that lack of rigidity will affect the probing more with an underbed sensor setup than with any extruder or effector-mounted sensor. Most strain gauge setups I have seen have used a really quite large contact force and give readings that show the lack of rigidity of the bed as much as the flatness of the bed.
A minor point: It is not necessary to get an average - if the sum is linear then the average is similarly linear but less sensitive.
The three force sensors on the Bambulab Wiki website are in fact piezoelectric discs that are used in bending. This is shown clearly in the first picture on the link you gave.
My own preference is to use a single piezoelectric underbed sensor to set the Z reference position (Z offset) with a touch sensor to perform bed mesh mapping.
You can see this setup at Biceps dual head 3D printer calibration - YouTube
his also shows the XY calibration.
Both of these sensors have a system repeatability of the order of 1 micron and a contact force of about 3 grams plus or minus 1 gram. The underbed sensor can also detect plastic or other detritus on the nozzle including cold plastic.
Presently I am working on a strain gauge sensor between the extruder and hotend. This would be able to stop hard nozzle collisions and also provide filament back pressure data to implement real-time pressure advance - making it unnecessary to do a PA calibration for every nozzle or filament change.

Mike

1 Like

Hey, thanks for replying.
What you wrote totally makes sense, I did not think about timing at all. Also the pressure advance measurement is very interesting. I am currently designing the toolchanger of my ā€˜ideaā€™.The changing mechanism is almost finished. I am now doing some changes on the x-axis, the rest should be stock voron trident.
Also Iā€™m designing the hotend part at the moment. I want to go with a rapido and a sherpa mini cnc version.
The reason Iā€™m telling is the hotend components will be mounted on a milled aluminum part anyways. So what I could do is try to integrate the loadcell in that design. It will be some time until I have assembled the whole printer but I could test the funcionality of the loadcell independently. I have access to a 5 axis mill (also a fiber laser) so the aluminium part wonā€™t be a big deal.

Are there any requirements fixed already? Did you choose any strain gauges? Temperature compensation integrated?
I did have to apply some strain gauges during my mechanical engineering studies, I think this wonā€™t be a problem.

I could also provide a sample part to someone with a more advanced testing rig if that speeds the development.

Just a quick clarifying question on these 3x strain gauge setups: Is it:

  1. 3 gauges in series connected to 1 sensor chip
  2. 3 gauges each connected to a dedicated sensor chip

(Iā€™m not trying to rule this configuration out its just not may main focus. If its #2 we would need some way of joining the signals together into 1 Probe object in klipper.)

We really do have a chicken and egg problem here.

  1. We donā€™t yet have any electronics boards that integrate the HX717 (the faster sample rate version of the HX711).
  2. We also donā€™t have a good mono-block hot end design that incorporates the load cell.
  3. We donā€™t have 100% fully baked software (this is the bit Iā€™m working on in this thread!)

There is another thread taking about #2 and there are some musing earlier in this thread. We donā€™t have a good design that integrates the load cell and would prevent the load cell from deforming in a crash. Prusaā€™s Nextruder block has that feature, but its oriented sideways, doesnā€™t mount to any extruder we have and uses custom nozzles. We could use a design that is more open source friendly for #2.

My current plan is to focus on completing #3. Iā€™m buying the Nextruder upgrade kit from Prusa and completing my verification and testing with that hardware.

Hey,
mechanically, 4 might actually be better for that purpose. If you measure outside the triangle, I assume you might get negative (pull instead of push) forces on one sensor. Sum of the (static) forces should still be the same thoughā€¦ but I understand that timing might cause trouble with multiple sensors in the dynamic event. I thought it might be enough to use one sensor. If you have more, you have more information that you can use in the software. So, I donā€™t really know.

Also I donā€™t know how crucial the cable lengths are on the analog side. I guess it makes sense to keep them short? If you have multiple strain gauges on a very big printbed long cables might cause problems? If thats the case you would need multiple HX717s, too. I could be wrong though

Edit: according to this, cable length should not be a problem: https://learn.sparkfun.com/tutorials/getting-started-with-load-cells/all

regarding #1:
Would it make sense to integrate the HX717 into a toolhead PCB like the Afterburner Toolhead PCB?

regarding #2 Iā€™ll make a post in that thread

Also, regarding #1: The HX711 and HX717 have the same footprint. Iā€™ll talk to my electronics guy if they are interchangeable. If yes, it should be no problem to make a fast and cheap HX717 dev board

I suspect that they are. I think the only difference is the internal clock speed. The data sheet I read had the programming being the same for coms so thatā€™s what I coded up.