www.photomacrography.net :: View topic - macro-rail, micro-processor, nano-steps
www.photomacrography.net Forum Index
An online community dedicated to the practices of photomacrography, close-up and macro photography, and photomicrography.
Photomacrography Front Page Amateurmicrography Front Page
Old Forums/Galleries
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
macro-rail, micro-processor, nano-steps
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions
View previous topic :: View next topic  
Author Message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 19090
Location: Richland, Washington State, USA

PostPosted: Sun Mar 13, 2016 11:33 am    Post subject: Reply with quote

Quote:
I have just tested the full rotation by the step-size of 635 microns.
...
So, the output of the gear-box has been rotated by this step exactly 360°.

OK, good. That leaves an unexplained scaling coefficient of roughly 2 someplace in the optical measurement, but for your situation I'm not worried about that.

Quote:
In order to be able do that I had to change the variable numberOfSteps from int to float because my units are nano-meters :-)

Float is OK for this particular situation, but in general, a better choice would be type "long". For counting, floats have two disadvantages. One is that on Arduino floats have only 24 bits of precision, so the maximum integer value they can store exactly is less than 17 million. The other is that they take a lot longer to compute. Neither of these really matters in your move loop, but it's something to keep in mind for other applications.

--Rik
Back to top
View user's profile Send private message Visit poster's website
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Sun Mar 13, 2016 1:33 pm    Post subject: Reply with quote

Hello Rik,
Quote:
”Arduino floats have only 24 bits of precision”

Many thanks for the hints!
BR, Adi
Back to top
View user's profile Send private message
TheLostVertex



Joined: 22 Sep 2011
Posts: 295
Location: Florida

PostPosted: Sun Mar 13, 2016 5:28 pm    Post subject: Reply with quote

rjlittlefield wrote:

Float is OK for this particular situation, but in general, a better choice would be type "long". For counting, floats have two disadvantages. One is that on Arduino floats have only 24 bits of precision, so the maximum integer value they can store exactly is less than 17 million. The other is that they take a lot longer to compute. Neither of these really matters in your move loop, but it's something to keep in mind for other applications.


And a third is that float is sometimes inaccurate, especially with decimals. If you are doing any sort of math there may be unexpected behavior. Floating point numbers are some times not communicative or distributive when working with certain numbers. So its pretty easy to get hit by a rounding error and not know it. As Rik said, I dont think this would likely come into play either. But its worth knowing about.

And while we are on the topic of coding, digital write on Arduino is agonizingly slow. You will greatly increase your loop speed (and possibly motor function, depending on driver) by using something else.

See this link for more information and testing about the Arduino digitalwrite,
http://www.billporter.info/2010/08/18/ready-set-oscillate-the-fastest-way-to-change-arduino-pins/

Or if you do not want to do the translation manually, https://code.google.com/archive/p/digitalwritefast/
_________________
-Steven
Flickr Macro Rig Control Software
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Mon Mar 14, 2016 3:56 am    Post subject: Reply with quote

Hello Steven,
Many thanks for the links!
But I’m not sure if the faster digitalWrite improves the speed of the motor.
Please take a look at the loop for the movement:
For every micro-step a delay of 200 micro-seconds is used anyway:
Code:
 
for (long i = 0; i < numberOfSteps; i++)
  {
    digitalWrite(_pinStep, LOW);  // This LOW to HIGH change is what creates the
    digitalWrite(_pinStep, HIGH); // "Rising Edge" so the easydriver knows to when to step.
    delayMicroseconds(200);       // This delay time is close to top speed for this particular motor. Any faster the motor stalls
  }

BR, Adi
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Thu Mar 17, 2016 10:35 am    Post subject: Reply with quote

Hello everybody,

After I had stacked a spider I tested the step-size and the backlash of the rail with Zerene.
The calculated step-size should be 0,0044mm for the aperture 0.25 .
Two photos a level of the DOF should be taken with the NIKON CFI BE Plan 10x / 0,25 .

Expected result of test with Zerene (10 step forwards and then 10 steps backwards; first move then shot):
Code:
   
S == calculated step-size = 0,0044mm
M == magnification = 40x   
W == width of the sensor = 36 [mm]
X == expected offset in Zerene      =  S / W * M    =  0,0048889




As far as I can see the real step-size is a little bit bigger then the calculated one.
The backlash is also visible between the last step forwards and the first step backwards.


BR, Adi
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 19090
Location: Richland, Washington State, USA

PostPosted: Thu Mar 17, 2016 11:36 am    Post subject: Reply with quote

That looks like very clean data, not surprising since you're now measuring a step size that's about 30 pixels on sensor, and a couple of degrees' rotation of the micrometer screw.

I'm still intrigued by exactly what happens when the rail reverses direction. Normally, uncorrected backlash results in some "lost movement" where the rail moves less than expected when reversed. But in your graph, the rail looks to move more than expected when the direction is reversed. It's the sort of behavior that I would expect to see in a system that is designed to compensate for backlash but happens to be over-correcting.

Am I correct in assuming that your controller does not attempt to compensate for backlash?

--Rik
Back to top
View user's profile Send private message Visit poster's website
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Thu Mar 17, 2016 12:20 pm    Post subject: Reply with quote

Hello Rik,
Quote:
“ Am I correct in assuming that your controller does not attempt to compensate for backlash?”

Yes, the rail is moved by the simple software step by step without any handling of the backlash. The stop current on TB6560 is set to 20% .
But I’m thinking of adding of some steps to the range in order to compensate the different distance covered by thy rail (dependent on direction).
My next problem is the mounting of the shaft coupling.
Maybe I should use a “casting silicone” or something like that, because the currently used plastic-film is slick.
BR, Adi
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Fri Oct 21, 2016 1:42 pm    Post subject: Reply with quote

Hello everybody,
The current version of my macro-slat looks as follows:

BR, ADi


Last edited by Adalbert on Fri Mar 23, 2018 4:56 am; edited 1 time in total
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Sun Feb 05, 2017 12:02 pm    Post subject: Reply with quote

Hello everybody,
I have just assembled a new Version of the slat. This time I have used the Arduino Uno instead of the Nano.






On this picture you also can see a sensor of the light-intensity, which I am using now for the test of the flash.

So, I have changed the program as follows:
Code:

pinMode(10, INPUT);  digitalWrite(10, LOW);            // LCD back-light
LiquidCrystal*  lcd = new LiquidCrystal(8,9,4,5,6,7);  // instead of 12,11,5,4,3,2
Rail* slat = new Rail(13,12) ;                         // instead of  8, 9
Camera* canon = new Camera(11,9,7300) ;                // pin 11 instead of pin 10


And the rail looks like that:


BTW, and the price of the rail & controller? The total comes to $60

BR, ADi


Last edited by Adalbert on Fri Mar 23, 2018 4:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Tue May 09, 2017 2:24 am    Post subject: Reply with quote

Hello everybody,
Enclosed you will find my current software for the Arduino Uno.
https://drive.google.com/drive/folders/0B7cTJmY-sdYiVmVuZjVUY3RBZmM
The structure of the main menu:
- "Rail GearBox 100"
- "Rail No GearBox "
- "2 Drops 2 Valves"
- "2 Drops 1 Valve "
- "Photo Sensor "
- "MeasureByZerene "
- "Move Step "
- "Rail Flash Movie"
BR, ADi
Back to top
View user's profile Send private message
lonepal



Joined: 28 Jan 2017
Posts: 225
Location: Turkey

PostPosted: Tue May 09, 2017 4:31 am    Post subject: Reply with quote

Dear Adalbert;

Thanks for sharing your experiences.
I have questions.
I am inspecting the chinese made rail which has 3 support rods on the bottom Picture for a long time.
My questions;

1) Does it have any backlash and the movement is precise and smooth?
2) What is the minimum step size?
3) How is the build quality?

Thanks for your help.
_________________
Regards.
Omer
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Tue May 09, 2017 6:43 am    Post subject: Reply with quote

Hello lonepal,
ad 1: I haven’t measured the backlash up to now
ad 2: the smallest step = 0.00125mm
ad 3: the quality is OK but I added a L-element ( right corner )
BR, ADi
Back to top
View user's profile Send private message
lonepal



Joined: 28 Jan 2017
Posts: 225
Location: Turkey

PostPosted: Tue May 09, 2017 7:12 am    Post subject: Reply with quote

Thanks Adi!
It looks like it recompenses it's price.
I will think about buying it.

One more question.
Can you advice me a gearbox to use with nema17 motors?
Thanks.
_________________
Regards.
Omer
Back to top
View user's profile Send private message
Adalbert



Joined: 30 Nov 2015
Posts: 365

PostPosted: Tue May 09, 2017 10:29 am    Post subject: Reply with quote

Hello lonepal,
It depends on that, which lenses you want to use.
If you wanted to use the microscope-lens with the aperture of 0.55 then you would need the step-size=0,0006mm in order to take 3 pictures a DOF.
For the aperture of 0.80 you would need the step-size=0,0003mm. If you wanted to do more than 3 pictures a DOF then you would need smaller steps.
So, I would suggest 5:1 or max. 14:1 would be enough.
BTW, with the step size 0.00125mm you can use the lenses till the aperture 0.40 (0,0011mm expected).
BR, ADi
Back to top
View user's profile Send private message
lonepal



Joined: 28 Jan 2017
Posts: 225
Location: Turkey

PostPosted: Tue May 09, 2017 12:46 pm    Post subject: Reply with quote

Dear Adi;
Thanks for the explanations!
How did you connected the gearbox to the micrometer?
I checked your photos and saw it.
Is this a special coupling that gets longer during motion?
As I know all micrometers move when we spin them.
How did you eleminated this problem? With that red special coupling?
_________________
Regards.
Omer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group