how I understood it is that he can turn off each probe, so it should actually, work but would need a bunch of coding in macros to make sure the right probe is active everytime, kind of like with a dockable probe
The problem is assigning one and the same pin in different macros. That wonāt work.
And I donāt know if you can put pins into a if selection.
Isnāt it simply a different value for the same variable in each macro? The Z position for determining the Z offset is obtained by asserting the mcu output pin for the underbed sensor, moving the nozzle down, and taking the point at which the underbed sensor triggers. De-asserting the underbed sensor pin and asserting the touch sensor pin then allows readings for bed mesh. This is shown, admittedly in Repetier with piezo sensors, in Biceps dual head 3D printer calibration - YouTube
I think not with pins.
These have to be unique at the time when Klipper parses the printer.cfg.
Best way to find out is: Just try it.
#####################################################################
HX711
#####################################################################
[hx711 tool0_adc]
sclk_pin: ex:PB10
dout_pin: ex:PB11
gain: A-64
sample_rate: 10
[load_cell hx711 tool0_adc]
counts_per_gram: 1
trigger_force_grams: 50.0
is_probe: True
z_offset: 0.0
l took error messages when l made it. " Load Cell not capturing " . What it be reason for that?
we used multi cpu properties. so do you recommend any other solution for it?
Right now capturing of the load cell data doesnāt start when the printer starts. For now capture can be started and stopped with a command:
START_LOAD_CELL_CAPTURE
STOP_LOAD_CELL_CAPTURE
(Itās a todo item to switch over to auto-start and get rid of these commands. Mostly this was convenient for me for debugging the ADC because I didnāt have to restart klipper to change the ADC settings)
Also:
TARE_LOAD_CELL
This sets the current observed reading to 0.
And:
CALIBRATE_LOAD_CELL GRAMS=100
Sets the counts per gram value based on the difference between the tare value and the current reading. So you tare first and then apply a known load to the load cell and then run calibrate. E.g. you can do this by putting a gram scale on the print bed and driving the nozzle into it until you see something like 250g on the scale, then enter the value on the scale for GRAMS
. This can all be recorded in the config so you donāt have to tare and calibrate on every startup.
And before you crash your machine, make sure its calibrated and that it does trigger when you tap it with your finger. There is a todo item for additional safety checks so right now it can still, potentially, crash your machine.
Some interesting information from Josef Prusa if I understand them correctly.
-
They train AI model on data.
-
They are probing only spots where printed part will be printed.
More in video https://youtu.be/1c-mV9IE67o?t=593
Just dropping this here as a bit of a progress report. I split the Load Cell functionality cleanly away from the ADC functionality. Both objects now support webhooks and emit data streams to the klippysocket
. Iāve also got both the klippyscoket
and Apache echarts working over on ObservableHQ, replacing my scrappy HTML based debugging tool.
Iām still not done with this pass through the code. Particularly I need to re-test probing before I push this to the branch. This should be the last batch of major changes before I work on the linear regression implementation. The results of that will be sent over the websocket so for every probe we can see the entire force graph and the results of the linear regression calculations, in charts, in real time.
I donāt know if I canāt see it because of the angle, but why are you supporting the front part of the plate thats supposed to bend? I donāt think you will get any relieable measurement if it can not move freely.
For machining, I see problems in the depth of the small holes where the strain gauges go. Drilling the holes - maybe, but milling the connector to these holes wont be possible, unless you have an extra cutout in the center of the plate
I figure the plate only needs to bend upwards. The extuder mounting bolts only go into the top plate, but I also realised I posted the wrong pic.
Hey guys! Found this thread after i connected a loadcell to my quantum delta! It is connected to an esp32 that just reads the ads1256 and pulls a pin to ground so my octopus sees it as a normal switch.
I just saw that you have a fork of klipper that has loadcell support! I will have a look how easy it will be to port the arduino library code but it looks relatively straight forward. Also the ads1256 chips cost 2-3$ and the dev boards on amazon are available between 15⬠and 30ā¬
With my current setup I have a standard deviation 0.03mm which is a bit meh.
But thats because of my hacky code and old effector arms which are that stiff anymore and pretty beaten up.
EDIT: just wrapped some aluminium foil around the analog parts and now i have standard deviation 0.001683 with 10mm/s of probing speed
What sample rate and triggering force are you using?
My assumption was that if we used a sample rate near or above the microstep frequency we wouldnāt need linear regression. Iām guessing you are not doing that on the Arduino? 0.001683mm is better than the SD quoted for switch based probes which are already very good sensors.
Actually i donāt know. I was too lazy calibrating.
Iām using 15000hz with differential input ā 7.5khz
Now with the shielding i can probably go to the max of 30khz/2
I guess my triggering force is around 60g.
Once it worked i did not want to disassemble it again after i broke 2 wires on a nother load cell and i stripped the code of everything that slows it down like logging. Maybe i can calculate it looking into the datasheets as i know the trigger and untrigger thresholds.
I do not do any āfancyā stuff like linear regression
I just checked how fast i can probe until the standard deviation increases. Then i just set the sample count to 6 and added shielding. et voila
Now a neat port of the 1256 lib to klipper and i can get rid of the esp32
I havenāt read the ADS1256 documentation. I have an implementation in my branch for the ADS1263, maybe you will find some part of that useful. Because of the high cost of the ADS1263 I intend to remove it from the final version to simplify the PR. Its a very useful development sesnor, but I doubt anyone will build it into a CAN board for us.
I REALLY dont like the HX711/HX717. They donāt do SPI and require the same kind of busy-wait bit-bang code as the neopixels, this is bad for high performance code like klipper. Their sample rates are also very low. Iād like to have one of the ADS* chips to recommend over the HX* chips.
The ADS1256 is ~$7.50 in quantities of 1000 on a reel. If you were trying to make a $30 CAN board. Thatās better than the ADS1263 but really we need to identify one thatās about $1.
Maybe ADS1246?
1 channel, 24 bits, SPI, 2 kSPS, programmable gain, as low as $3.80 in 1K bulk reels. Thats a better fit for out application and a closer competitor to the HX717.
Why 24-bit?
Perhaps I am failing to understand what you are trying to achieve, but a little bit of analog gain and filtering would allow a cheap 8, 10, or 12bit ADC to be used to give a trigger signal when the nozzle touches the bed. Some sub $1 microcontrollers have on-board op-amps and would allow a one chip solution with a few passive components.
- We want precise collision detection (high accuracy/repeatability)
- We want filament force during the print, which is on the scale of several kg
I looked at the math; a 24 bit sensor measuring a 5Kg loadcell is 660 time more sensitive than an 8 bit sensor that can only measure a max of 50g. At 12 bits its still 40x less sensitive. That math tells me that you cant amplify/filter your way to equivalent sensitivity. Plus, using that much gain means you cant measure the full range of the load cell for filament force during a print. Using fewer bits will sacrifice either resolution or range (in the real world, probably both).
We cannot enable/disable the analogic circuit or use a multiplexed ADC and in one channel we use the amplified signal and in the other the raw one?
Getting closer⦠Now I can see those probing events!
I was really scratching my head over some of the angle.py
code I copied that deals with time. Lets just say there were some āmagic numbersā that needed to be re-defined for my code. Previously the reported sample time was incorrect. Now its reported correctly as seconds since printer start (aka in print time). The reported probing times were accurate through so this didnāt impact the probing results.
MCU load is dead flat at 1% (vs 0.5%) with the sensor running, whether Iām probing or not. Load on the pi is at ~8.5% to run the single sensor at 400 SPS, I wish that number could be lower. Memory usage is dead flat. It seem more stable than it has been in the past.
Probe accuracy for 100 probing cycles:
// probe accuracy results: maximum 1.560694, minimum 1.538264, range 0.022431, average 1.550707, median 1.550660, standard deviation 0.004729
I changed the way the config works so its like this now:
# sensor
[ads1263 tool1_adc]
spi_bus: spi3
cs_pin: SPI3_CS
gain: 5
sample_rate: 8
# load cell
[load_cell tool1]
sensor: ads1263 tool1_adc
is_probe: True
z_offset: 0.0
counts_per_gram: 113626
trigger_force_grams: 50.0
It is pushed to the branch. I think this covers 80% of what I had on the roadmap before tackling the linear regression. Might be a few weeks before I get more time to code again though.
is the load cell already bound to the tool? so could you define different load cells for other tools?
I have this print head up and running on my Rat Rig now albeit with a printed top plate.
The flexibility of the tongue can be tuned by changing the length of the slots or by changing the thickness of the aluminium top top plate.
Next step is to make an aluminium top plate and order some strain gauges to install in it. My concern is that even with 4 strain gauges (Wheatstone bridge) I may not get the sensitivity I need with this set up. The maximum pushing force of the Orbiter 2 at 20mm^3 was measured at 6.8 Kg by CNC Kitchen.
With this design the base of the extruder is a stop for the upward movement of the tongue and the top of the supports (Gold parts) are the stop for the downwards movement of the tongue.
There are two recesses in the top of the top plate and two on the underside for the four strain gauges that will make up a full wheatstone bridge load cell. The wiring for the bottom strain gauges runs through a groove in the orange support underneath.