Automated Stack & Stitch System Videos

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Automated Stack & Stitch System Videos

Post by mawyatt »

As requested, here's a few videos of the Fully Automated S&S System I've been developing. Watch the Single Axis Videos before these because these reference those Single Axis Videos and don't go into the detail they do.

These videos aren't very good, I've only done the previous mentioned videos as my 1st attempts and they haven't been edited, so don't expect much!

The setup uses a THK KR20 with 1mm threads on the Z axis and a pair of KR15s on X and Y. All are controlled by Pololu Tic-500 and these are USB connected to a Raspberry Pi 3B. The Pi is used with VNC to allow remote operation without need for a monitor, keyboard, nor mouse.

Here's the videos, first is the hardware, then software and a couple operational videos (last is long test stack operating quickly).

https://drive.google.com/file/d/1XHR1tI ... sp=sharing

https://drive.google.com/file/d/1gm8jZB ... sp=sharing

https://drive.google.com/file/d/1p5Sklf ... sp=sharing

https://drive.google.com/file/d/18GxU2U ... sp=sharing


Here's a few images showing the typical S&S setup with the Wemacro Vertical Stand, THK KR20 rail, Magnetic "Home" sensor, and THK KR15 X and Y rails.

Best,

Image
Image
Image
Last edited by mawyatt on Sat Apr 06, 2019 7:29 pm, edited 2 times in total.
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Smokedaddy
Posts: 1965
Joined: Sat Oct 07, 2006 10:16 am
Location: Bigfork, Montana
Contact:

Post by Smokedaddy »

I can't believe how fast that puppy is capable of shooting. Sure would save me a ton of time since everything I do is manual. <g> Nice job Mike.

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

My goal was to get down to ~1 second per image, but still have work to do on the velocity and acceleration/deceleration profiles to reduce motor/controller induced vibrations & noise. I can hear the setup resonances as the motors slide thru the profiles, and if you can hear something it's moving!!

I've been working with the Pololu Tic type motor controller/drivers and use the Tic-500 now. I've stayed away from the Ti driver chips as they have issues with micro-stepping (highly non-linear) and the Toshiba has a problem with the motor current waveforms at the zero crossings causing non-uniform micro-steps. The Tic-500 has none of these issues (uses MP6500), but is limited to 8 micro-steps and doesn't have sophisticated motor current waveform manipulation.

The Trinimac controller/drivers have some nice waveform manipulation features and specs looked promising but I couldn't get them to work properly. Spent way too many hours trying and the CS was of little help, so I finally threw in the towel!!

For now I'll stay with the Tic-500, but hoping for an improved result on the axis holding the camera lens assemblies, so still working on this in the background :roll:

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

kaleun96
Posts: 272
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Post by kaleun96 »

Awesome work! I'm particularly envious of the speeds you're able to achieve.

I haven't had a chance yet to play around with the Trinimac drivers yet but will let you know when I get them fully working. At the moment I'm wasting most of my time trying to work out how to monitor my flash recycle time...

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

kaleun96 wrote:Awesome work! I'm particularly envious of the speeds you're able to achieve.

I haven't had a chance yet to play around with the Trinimac drivers yet but will let you know when I get them fully working. At the moment I'm wasting most of my time trying to work out how to monitor my flash recycle time...
Thanks.

I tried everything I could to get the Trinimac drivers to work. I purchased the 5130, 5160 and 5161 BOBs and eventually got the 5161 to rotate the motor, but that was it. A few days ago I came back and tried working with them again but couldn't even get the 5161 to work. Trying to get them to operate with the Raspberry Pi and with Python rather than another micro controller (Arduino), this may be the problem.

I'm not a programmer, know a little about Python but almost nothing about C, which makes working with them more difficult.

Hope you are successful with the Trinimac's & system, please keep us informed.

For flash recycle detection you could use a Opto-Isolator like the tiny 4 pin LTV817 I use (see custom interface board) with a 470 ohm resistor to tap into the flash LED indicator signal. The isolator output is wired to a standard 2.5 or 3.5mm connector on a pigtail or mounted of the flash case. With the isolator you don't have to worry about static or coupling voltages between the flash and computer which could fry either one or both. This can and does happen, don't ask how I know :oops: , when one is powered and the other not. Voltage protection on chips with pins not designated to work as dedicated cable driver/receiver pins have weak protection and generally shouldn't be "exposed" to outside connections, this is where Opto-Isolators are useful.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Just updated the 2nd S&S Operational Video, this is a little better IMO.

https://drive.google.com/file/d/18GxU2U ... sp=sharing

Best,
Last edited by mawyatt on Sat Apr 06, 2019 7:30 pm, edited 1 time in total.
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Post by iconoclastica »

Mike,

I am sorry if I am asking something you already explained in the videos. But due to failing sound reproduction here **) I still haven't seen them.
Of the part-images that you stitch together, you do have the positions. Do you supply these coordinates to the software, or let you do the stitching based on visual similarities?

Wim

**) I did order those new headphones weeks ago..
--- felix filicis ---

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Wim,

The X, Y & Z coordinates can be created with the software by using a routine that lets you define the start, end and step size for the X axis, then the same for the Y axis. This creates a matrix of X and Y positions, think of [X,Y], so for say X = 6 steps and y 3 steps this is a [6,3] matrix of positions, or 18 individual tile positions. Then the routine allows you to define the Z axis start, end and step size at each individual tile position. This data is stored in a simple text file and can be edited as needed.

I usually plan out my S&S sessions so I know about what the X, Y and Z parameters will be since I know the magnification and subject size, and which camera (Full frame or APC) I'll be using.

Sometime a rough sketch of the subject with the tiles indicated is helpful, like this example.

Hope this helps,

Best,


Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

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

Post by rjlittlefield »

Mike, I think that Wim was asking whether the XY coordinates get fed to the stitching software to assist its work. Or is the stitching still completely independent of the acquisition?

--Rik

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Rik,

If that's what Wim is asking, then none of the "coordinates" are provided to PTGui, which is what I use for stitching. You need to include enough overlap to allow finding the right tiles to put together, for chips this can be difficult sometimes since patterns are often highly repeated. I try an include unique patterns in each tile to help the software along.

Individual tile stacking is done in Zerene.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

I just completed a test to see the effects of vibration induced by the motor/rail movement. The setup is the same as the S&S previous videos but the lens is a Mitutoyo 10X with a Sigma LSA 200mm tube lens.

I used a pin on the IC package which is 400 microns in diameter as a test subject. The modified Wemacro Vertical Stand base S&S System is sitting on an old kitchen table which is a very unstable platform to work from (not recommended!!). I used a small remote HDMI monitor to "see" the effects of induced vibration, and used the D850 digital magnification to zoom in on the pin top (400um dia).

With my laptop on the table you can see the effects of simple typing, or even just touching the table, anything that moves around or on the table can easily be detected. This setup is very sensitive and will certainly show any induced vibration effects.

The motor control current waveforms and timing seem to be working. You can hear the velocity & acceleration/deceleration profiles as the motor transitions from start to mid point to approaching end position, yet can achieve respectable transit times.

The results are much better than I expected, but I'll let you judge for yourself!!

Best,

https://drive.google.com/file/d/1z3bgXY ... sp=sharing
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Chris S.
Site Admin
Posts: 4045
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

Mike,

I enjoyed your video, and watched it twice through. If a picture is worth a thousand words, a video like this seems to be worth a thousand pictures. A few questions:

Unless I missed it, I don’t see provision for focusing along the z axis, or for "posing" the subject along the x and y axes. Did I miss this, or are you reserving these features for a later stage of development? If the latter, do you envision adding mechanical components for these purposes, or doing the job with additional motor commands?
still have work to do on the velocity and acceleration/deceleration profiles to reduce motor/controller induced vibrations & noise. I can hear the setup resonances as the motors slide thru the profiles, and if you can hear something it's moving!!
Which particular sounds do you identify as setup resonances, and why? I’ve been adding stepper motors to my rigs (for very difference purposes than what you’re doing here). I’ve yet to find a way to drive these motors that is completely silent, and have decided that hearing a “gentle purr” is OK, whereas a “whine” is not. (Though I have no data to support this impression.) So I run my motors at a gentle purr.

Would you mind describing briefly what your approach is to acceleration and deceleration? On my rigs, I’ve settled on accelerating/decelerating the stepper motors by decreasing/increasing the length of the pause between motor steps. For my purposes, this works well, and is fairly simple to program. Your approach to acceleration/deceleration sounds more complicated. If so, could you share the benefits of additional complexity?
the Toshiba has a problem with the motor current waveforms at the zero crossings causing non-uniform micro-steps.
I’m using SMAKN TB6600 Upgraded Version 32 Segments 4A 40V 57/86 Stepper Motor Drivers. Are these the Toshiba units of which you speak? I’m having no trouble with them (though my requirements are quite different from yours—I’m microstepping, but my use likely averages microstep non-uniformities toward a point of insignificance), and like them because they are inexpensive and very easy to drive from an Arduino with simple programming.

If these are the Toshiba units you’re describing, could you please provide a link to further information on the issue?

Side note on using VNC to run your Raspberry Pi remotely: As you may be aware, VNC has a storied history. I used to use VNC to take remote control of desktop computers that I supported, but didn't want to drive to. It’s not much good for that anymore; interesting to see that VNC has gained another life as a remote access protocol for Raspberry Pi.

Thanks for bringing us along on this project of yours, Mike!
rjlittlefield wrote:Mike, I think that Wim was asking whether the XY coordinates get fed to the stitching software to assist its work. Or is the stitching still completely independent of the acquisition?
Knowing very little about stitching, I’m wondering: Is this possible? Do stitching programs such as PTGui have a capacity to accept acquisition coordinates for use in stitching?

Cheers,

--Chris S.

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Post by iconoclastica »

rjlittlefield wrote:Mike, I think that Wim was asking whether the XY coordinates get fed to the stitching software to assist its work. Or is the stitching still completely independent of the acquisition?

--Rik
Thank you, Rik, that was exactly what I intended to ask. Several years ago I considered a similar stitching system for scanning large format negatives and faced the challenge of feeding the coordinates that I would know from the relative camera/object position to ptGui. At that time I also posted a question somewhere if that could be done. The answer then was mostly affirmative, but little later I decided that the project was beyond my making skils. Now my flatbed scanner is doing an acceptable job, so the urgency to pick it up again is gone.

Yet it is a powerful technique - and much easier than building and/or running a drum scanner - so it always kept intruiging me. Hence my question.

- Wim
--- felix filicis ---

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Chris,

There is no actual focus or capability to focus of the lens assembly, the lens is focused by positioning along it's optical axis. So the lens/camera is moved by increments along this axis, usually less than the DoF (some of these test demos steps were larger than DoF just to show operation).

Yes there is a routine for "posing" the subject in the X, Y and Z axis. This is before the test exposure routine to allow testing for proper exposure. The next routine defines the X & Y Center position followed by the actual stitching tile coordinate creating routine. In the routine the X start, end and step size are defined (rail goes to these positions allowing visual confirmation on camera or external monitor), then same for Y. Then the routine allows the entry of the Z start, end and step size (rail goes to the representative X @ Y position and Z start, end positions @ this tile position). So the Z axis has a specific start, end and step size at each tile location defined by the X and Y positions.

The resonance sounds can be heard as a change the rail sound, usually loader with a different characteristic, as the velocity changes. For example, when the velocity is accelerating or decelerating.

The velocity profiles include a start velocity, peak velocity, acceleration and deceleration. These are coupled with the motor current waveform characteristics involving fast and slow inductive decays and the timing of such.

I'm using the Pololu Tic-500 and program these parameters after experimenting with the specific motor and rail. Even different motors of the same size (NEMA 17 for example) require different parameters since they can have different electrical characteristics which pose a complex arrangement of electrical and mechanical resonances. This is why I felt the Trinimac controllers have promise with their unique motor control waveform characteristics which bring in technology from signal processing, one of which advertises a somewhat "Silent Mode".

My programming skills are limited to Python, and know very little about C. My attempts with the Trinimac 5130, 5160 and 5161 were already limited by my lack of ability, and thus were not successful. Would be nice if someone with better C skills would tackle these controllers, I still think they have promise.

The Toshiba issue was discovered by an engineer at Pololu, here's a snip.

I have also noticed that with some setups, the TB67S249FTG driver on the Tic T249 can produce bumpy movement because an offset in the current levels it produces causes an abrupt change in current whenever a coil current changes sign.

I used an oscilloscope to look at the coil current as a function of time for the Tic T249 while the motor was moving. I was powering the Tic at 18 V, driving a low-resistance, low-inductance motor (#1474 2), and had a relatively low current limit configured (800 mA). I tried both 1/8 microstepping and 1/32 microstepping. I noticed that when the coil current steps to or from zero, the magnitude of that step was significantly larger than the steps that occur in other nearby steps. This corresponds to the motor turning by a larger angle at those moments, which results in periodic bumps that you can feel. There is one zero crossing of the coil current per full step, so if you know how many full steps per second you are taking in your application, you could calculate the frequency of the bumps.


The Tic-500 I use has the MP6500 driver chip, which has none of these characteristics, nor the TI DRV bad characteristics and works very well but is limited with 1/8 micro steps and non-sophisticated current waveform manipulation.

The VNC works beautifully with the Pi, even the little ZERO W! I've had 3 Pi's operating under VNC.

Hope this helps explain things,

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

kaleun96
Posts: 272
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Post by kaleun96 »

mawyatt wrote:My programming skills are limited to Python, and know very little about C. My attempts with the Trinimac 5130, 5160 and 5161 were already limited by my lack of ability, and thus were not successful. Would be nice if someone with better C skills would tackle these controllers
Have you tried your hand with Arduinos yet? My python skills are about the same as my C++ skills and I would almost say that if you know enough in one then you can get by with the other.

Unless you're bit shifting or editing registers, I don't think you need to know a hell of a lot of coding that is specific to C++. It's still mostly if's, while's, and for's, at the end of the day.

Though the Trinamic's are a bit of a different beast due to the limited library support. If you were to build a custom library from the ground-up then not knowing C++ properly (like myself) is going to be an issue. My hope is to leverage the TMC2100/2130 library by teemuatlut, which is designed primarily for 3D printing, for my needs. While you could hope to utilise every little bit of the driver, if you just need SilentStep, StallGuard, and Spreadcycle then I think these libraries are sufficient (albeit bloated for our needs).
For flash recycle detection you could use a Opto-Isolator like the tiny 4 pin LTV817 I use (see custom interface board) with a 470 ohm resistor to tap into the flash LED indicator signal
I found some internal photos of the Godox TT350 and it's beyond my ability to tap into the signals on this board:
https://fccid.io/2ABYNTT350/Internal-Ph ... os-3263879

My hope was to tap directly into what powers the flash recycle indicator LED but as you see in the photos linked above it's a minuscule SMD component that would be a nightmare to wire onto. With time, patience, and a oscilloscope I'm sure I could find a better place to tap into it but in the mean time I'm going with an externally mounted log-scale light detector to pick up the LED brightness. A bit tricky in of itself and less robust but it should work I think.

Post Reply Previous topicNext topic