Z backlash making v3 lose focus

Im using v3 server on the Openflexure v7 beta3.

The problem is losing focus, and after a while the microscope cant even find the focus back,

im guessing it is because of some kind of Z backlash.

Is there somethings i can try to make this better?

Exemplifying, this is the final sticked image

1 Like

Do you have background detect (skip background) on?

A better algorithm to refund focus after it is lost is certainly needed. But generally with skip background on, we don’t normally get something like this

Yes, background detect configured, and “detect and skip empty fields” enabled. This test was made with the default options on the slide scan tab, after instaling a fresh sd card.

Hi @paidedog, can I guess that you have Minimum number of images to test for focus set to 1?

Yes, it was the default. I just tested with this value changed to 49 and this was the result:

Thanks, can you set it to 9 please?

Sorry about this problem. I am really confused as we haven’t seen this. I think a very large number will make it move a much longer distance than we would expect. I think here:

It may have found a sharp feature on an image and decided that is the focus?

What Objective are you using?

With testing stack height of 1, I think we still undershoot as if we’re doing a full stack, but then never move back to the actual focused point. With over 15 images to test, we might be moving so far up and down that we see the cover slip and possibly hit the sample

This should be added to the sanitising inputs issue, or possibly we hard set a value of 9 and use a better stack success metric, which I’m working on

This was the result, with the configurations below

Those are dirty particles on the cover.

Im using 40x objectives: https://pt.aliexpress.com/item/1005008677265523.html?spm=a2g0o.order_list.order_list_main.10.3f41caa4n1TeqH

While we have not managed to replicate this exactly we have a Sangaboard firmware fix in the pipeline that should fix a stalling issue that significantly increases the backlash effects.

The new firmware is available on the Sangaboard repo now we are still working out the best way to easily distribute these firmware upgrades in the v3 system.

Im using an arduino configured as this: arduino_code · master · Bath Open Instrumentation Group / Sangaboard · GitLab

Can this be the problem?

I’m confused, v3 should require newer firmware that this.

Are you using a Sangaboard v5 or the Arduino workaround? Can you try this platformIO firmware?

Sorry, i forgot i installed this, as described on the v3 alpha release thread comments: Index of /sangaboard/sangaboard-firmware/v1.0.3-dev/

I’m going to install the firmware you sugested, it can take a while, as i dont know how yet, but i will be back lol

Edit.:
The commands ended with this, i guess it update the nanoboard?

Uploading .pio\build\nano\firmware.hex  avrdude: AVR device initialized and ready to accept instructions  Reading | ################################################## | 100% 0.00s  avrdude: Device signature = 0x1e950f (probably m328p) avrdude: reading input file ".pio\build\nano\firmware.hex" avrdude: writing flash (14952 bytes):  Writing | ################################################## | 100% 2.00s  avrdude: 14952 bytes of flash written avrdude: verifying flash memory against .pio\build\nano\firmware.hex: avrdude: load data flash data from input file .pio\build\nano\firmware.hex: avrdude: input file .pio\build\nano\firmware.hex contains 14952 bytes avrdude: reading on-chip flash data:  Reading | ################################################## | 100% 1.74s  avrdude: verifying ... avrdude: 14952 bytes of flash verified  avrdude: safemode: Fuses OK (E:00, H:00, L:00)  avrdude done.  Thank you.  ========================= [SUCCESS] Took 14.39 seconds =========================  Environment    Status    Duration -------------  --------  ------------ nano           SUCCESS   00:00:14.395 ========================== 1 succeeded in 00:00:14.395 ==========================

This is the result:

It feels to me as though this can be related to the Arduino implementation. I have a microscope which is running the Arduino motor controller, but on the old Sangaboard firmware, and OpenFlexure Server v2. It will be a while before I can upgrade it and test.
It might help to see the original images in the order that they were taken. The file names have a lot of position information in them - or is that now all in metadata? - which could help to see what happens.