Fast Stacker v2.0

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

where Hugin's alignment method is based on detection and matching of distinctive local patterns of pixel values ("control points").
If this is how Hugin/Enfuse are doing for alignment, then I think it might just be a coincidence that Hugin/EnFuse "worked better" than Zerene. Feature extraction depends heavily on texture. Back in 2008, I did some work on this, and using feature extraction to match between images, I used that for focus stacking, image stabilisation, super-resolution, etc, etc. One key point of failure of all is lack of "feature" or when image is out of focus. At the time, computing power is still limited, so some advanced algorithm was too slow for real time computer vision work. For example, image stabilization, I was merely computing first order derivative for each pixel, some matching algorithm, simple and fast for real time image stabilization.

Of course, computer vision has advanced so much, anything is possible now, so time to dive back into this. :D

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

@Pulsar123

Also read upon how you solved "false limit" signal. I am not sure why it bothered you since v1.0 and you had it open sourced yet no one pointed it out. You seem to have an oscilloscope which makes think you are an engineer, yet, maybe you are trying to explain it to layman, your explanation does not sound like an engineer. What you did is basically using a low pass filter on an input for MCU. This is something that should be taught in EE201 (or maybe even EE101) in college, yet no one have pointed this out since the very first version.

One suggestion is to use 0.1uF cap instead of 0.01uF, it will help you to debounce the limit switch, too.

Also the solution to backlash . . . never mind, I think I am giving it up, but I hope others will help you out. I am out on this. :D

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Fast Stacker v2.0

Post by rjlittlefield »

mjkzz wrote:
Mon Sep 13, 2021 3:39 pm
Regarding scripting and automation, I should note for the record that there's an API for Zerene Stacker also. I am aware of several automated systems that use ZS under the covers.
Rik, where is the API? Is it free to use? Is it Python friendly?
The API is described at https://zerenesystems.com/cms/stacker/docs/batchapi .

Basically the calling code writes a batch script and launches Zerene Stacker by command line, passing it the batch script and some arguments that say "hide the GUI, run this script, and stop when you're done". The general capability is available in all license levels; some individual options are still Pro-only as always.

--Rik

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

rjlittlefield wrote:
Mon Sep 13, 2021 8:09 pm
mjkzz wrote:
Mon Sep 13, 2021 3:39 pm
Regarding scripting and automation, I should note for the record that there's an API for Zerene Stacker also. I am aware of several automated systems that use ZS under the covers.
Rik, where is the API? Is it free to use? Is it Python friendly?
The API is described at https://zerenesystems.com/cms/stacker/docs/batchapi .

Basically the calling code writes a batch script and launches Zerene Stacker by command line, passing it the batch script and some arguments that say "hide the GUI, run this script, and stop when you're done". The general capability is available in all license levels; some individual options are still Pro-only as always.

--Rik
Thanks Rik, I will definitely check it out. Maybe create some Python bindings, IF needed, to share it here. I think I have both licenses, regular and pro

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

@Pulsar123

My guess that no one has pointed that (your fix for false limit triggering) out is that most experienced circuit designers might take that part as a given, ie, if they were the designer, they would definitely have a conditioning circuit for those inputs, so the problem might be over looked.

I am not sure how many users/followers you have, but here is a suggestion so that your users do not have to implement that hardware change. All needed to be done is to put in some debounce code, which essentially a digital low pass filter. It is not that difficult, a few lines of code, or maybe 10 lines. This way, your users can continue to use it without hardware upgrade. Of course, having hardware conditioning is preferred.

Anyways, I am out :D

Macro_Cosmos
Posts: 1511
Joined: Mon Jan 15, 2018 9:23 pm
Contact:

Re: Fast Stacker v2.0

Post by Macro_Cosmos »

I remember driving a 7-segment timer through classic integrated circuits and tactile switches, it'll get all messed up and I had to use Schmitt triggers to debounce the inputs.
Putting the output between a resistor and capacitor works too.
[IN]
|
[]
|
┣-- out
|
=
|
[GND]
(that was fun)

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

mjkzz wrote:
Mon Sep 13, 2021 3:37 pm
@Pulsar123,

I was looking at your code and I am wondering if you have ever done any embedded programming? Just curious.

It seems that you are relying upon millis() and micros() for timing, users of your system might not notice it . . . but since you open sourced it, I would expect a bit more robust approach implementing it as I have ALWAYS expected for open source projects. So here is my suggestion : use interrupts :D
I have been thinking about using interrupts, but (1) I have to learn more about it, and (2) the code works very well without them so I'm not terribly motivated. In my code, I am solving equations of motion (with fixed accelerations and speed limits; takes quite a few of cpu cycles - quadratic equation solving etc) at every microstep I take (can be as frequent as every 50 microseconds) - I wonder if interrupts would be helpful at all in this situation.

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

mjkzz wrote:
Mon Sep 13, 2021 6:40 pm
@Pulsar123

Also read upon how you solved "false limit" signal. I am not sure why it bothered you since v1.0 and you had it open sourced yet no one pointed it out. You seem to have an oscilloscope which makes think you are an engineer, yet, maybe you are trying to explain it to layman, your explanation does not sound like an engineer. What you did is basically using a low pass filter on an input for MCU. This is something that should be taught in EE201 (or maybe even EE101) in college, yet no one have pointed this out since the very first version.

One suggestion is to use 0.1uF cap instead of 0.01uF, it will help you to debounce the limit switch, too.

Also the solution to backlash . . . never mind, I think I am giving it up, but I hope others will help you out. I am out on this. :D
I am not a professional engineer, or a professional programmer, so take it for what it's worth. I did spend weeks of my time on the project, and I do know that many people reproduced it. If you check my wikia pages, you'd notice multiple users complaining about fake switch detections. Some solved it with a ferrite core used on the cable. The solution I found is simpler, and works very well. I wouldn't go beyond 10nF for the capacitor as (1) it would make limiter switch detection unacceptably inaccurate (I like to stay within 50 us - interval between microsteps), and (2) it would be an overkill - nothing gained. I do have a proper programmatic solution for the switch debouncing.

My backlash solution works very well, but I am open minded for better suggestions.

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

mjkzz wrote:
Tue Sep 14, 2021 1:46 am
@Pulsar123

My guess that no one has pointed that (your fix for false limit triggering) out is that most experienced circuit designers might take that part as a given, ie, if they were the designer, they would definitely have a conditioning circuit for those inputs, so the problem might be over looked.

I am not sure how many users/followers you have, but here is a suggestion so that your users do not have to implement that hardware change. All needed to be done is to put in some debounce code, which essentially a digital low pass filter. It is not that difficult, a few lines of code, or maybe 10 lines. This way, your users can continue to use it without hardware upgrade. Of course, having hardware conditioning is preferred.

Anyways, I am out :D
I did try first the programmatic solution for the fake limiting switch detections, but I didn't like it for two reasons. First, it's not as reliable as the capacitor solution. Second, I had concerns about how long the microcontroller pin will survive this - basically every 10 us or so there are pulses which are either 1.3V above the maximum allowed voltage (3.3V), or negative 1.3V (and I know the pin can only tolerate -0.5V).

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

iconoclastica wrote:
Mon Sep 13, 2021 7:18 am
  • The Cognysis rail does appear to be more durable and sturdy than the Velbon Super Mag Slider I am using, but perhaps that is an overkill; my Velbon has been performing well so far. You can always use a different, more durable rail with my controller and my software.
  • The Cognysis allows for longer (100 mm or 200 mm, depending on the model, versus my 52.5 mm) maximum stacking length. I haven't found this to be a limiting factor yet - perhaps because my focus is on super macro (magnifications 2:1 ... 20:1).
For those that already own the cognisys rail and are willing to experiment, it seems quite possible just to disconnect the original motor and put the FastStacker-motor + controller in place. Or could the FastStacker controller even drive the original cognisys motor?
I know some people used my controller to drive completely different rails. I think it should be possible to hook up my controller to Cognysis rail as well. If it's using a motor which can be driven by my stepper motor driver, this should be fairly straightforward.

Macro_Cosmos
Posts: 1511
Joined: Mon Jan 15, 2018 9:23 pm
Contact:

Re: Fast Stacker v2.0

Post by Macro_Cosmos »

pulsar123 wrote:
Wed Sep 15, 2021 6:21 am
I know some people used my controller to drive completely different rails. I think it should be possible to hook up my controller to Cognysis rail as well. If it's using a motor which can be driven by my stepper motor driver, this should be fairly straightforward.
Yeah it's possible and quite straight forward. Cognisys provides the pin (4 anyway) distribution for their motors. Your controller looks very interesting, I'll check it out later.
I've used the Stackshot 3X and Wemacro to drive a myriad of stages that use bipolar stepper motors. I prefer the Wemacro due to its high current output, simply desolder resistors to drop it, the Stackshot's rated current is quite low, less trivial if I were to increase it.

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

Live demonstration of Fast Stacker 2.0 in 4K:

https://www.youtube.com/watch?v=B0yAh84A31Y

DavyC
Posts: 109
Joined: Sat Sep 22, 2018 1:53 pm
Location: UK

Re: Fast Stacker v2.0

Post by DavyC »

Great job with the Video Demo.

Shows off the capabilities of the Fast Stacker v2.0.

Well done!

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

Thanks!

chris_ma
Posts: 570
Joined: Fri Mar 22, 2019 2:23 pm
Location: Germany

Re: Fast Stacker v2.0

Post by chris_ma »

always great to see these kind of projects, lovely execution.
I know how much time it takes to get there, so congrats for the polished solution!
chris

Post Reply Previous topicNext topic