New macro Rail

oracacle

Senior Member
Some may have seen the heavy duty macro rail and related threads. The project has gotten to a point where I am mostly happy with it.

The system has been performing beyond expectations, bot just in accuracy, but in speeds and functionality.
The original spec was to be able to move a heavy camera and lense, these can weigh more then 4kg when combined. After that i would need it to be able to calculate the depth of feild (DoF) , photo overlap and thus distance between shots, from user inputs. This possed a size-able issue as results could be due to many of number being a fair amount less than 1 and some possibly being over 100. It must also be able to cope with deep objects such as flowers that can exceed to 3.8cm limits of the DVD RW rails (which cn be hard to mount flowers on by the way).

After some head scratching, lots of conversation both here and else where solutions started to appear for various things. the design eveloved
this was an early design

proto rail by f2268d215cc925918731918f4efa0289, on Flickr

which evelved into something a little more complex

Exploded by f2268d215cc925918731918f4efa0289, on Flickr

this design made use of low backlash lead screw called a trapzoid thread cut to a very fine pitch. It was suggested that i look into CNC hardware and the use off a ball screw and nut which forced a re-design alongside production limitations, the final design was something that had teken some time to finalise

exploded by f2268d215cc925918731918f4efa0289, on Flickr

most of the component were design to be laser/water jeted to keep costs down.

rail by f2268d215cc925918731918f4efa0289, on Flickr

there was quite some delay while waiting for the aluminium parts due to being low on the priority list at small engineering firm that helped me out with this part of the build. it did however allow me to do more development on the electronics though, which had some last minuite changes.
 

oracacle

Senior Member
During the enitial design I ran some bread board prototypes to ensure that each part of the circuit and programme would work on its own.
First on the list was the micro macro FPU v3, this proved alot harder than the data sheets and manual made it look. The learning curve was like learning to climb a montian before you could walk, but once i started to get some sense from the little beast its gottene asier although i still learning, things like negative number input is still a little confusing, and the use of the function may be halpful in the future.

the intitial circuit looked something along the line of

Circuit 1 v5.1 by f2268d215cc925918731918f4efa0289, on Flickr
minus the camera interface and various buttons and switches. The circuit was built on seperate board for the power, main circuit and the motor controller was a self assembly kit

After reaserching and considering building a custome micro step controller for a by-bolar stepper motor I decided to go for a self assmbly kit ordered from the USA. it make use of the THB6064 controller that allows 64 sub step per step of the motor.
the kist was ordered from http://www.piclist.com/techref/io/stepper/THB6064/index.htm

initial testing showed and issue with controller the motor power sepratly to the logic power, possibly caused by the design of the THB6064 kit. This was not an issue due to the fact that power board that contained the mosfets and regulator could be easily swapped out for a sigle switching design.

more research then followed in regard to interfacing with the camera. I purchased a low cost non-genuine wired shutter release with the intention of reverse engineering it to interface with this, and any future projects that may arise. this proved simple, and after a little testing using a spare PICAXE and some opto-isolators

Code:
Camera Sutter
-------------
	 ------
a.0--->|1  6|
     --|2  5|<----Focus
     | |3  4|--
     | ------ |
     |	  |
     | ------ |
a.1--->|1  6| |
     +-|2  5|<----Shutter
     | |3  4|-+---Common For camera
     | ------
     |
  Ground

using 2 4N25 opto isolators. Common refers to the commen connection to both focus and shutter circuits.

I beleive that comman would be the ground side of the camera but a prefrence to not interfering with camera
votlage and circuits would be prudent due to the cost of repairing or replacing such equipment

The wired shutter release has been modified and fitting with 3.5mm stereo plug interface to allow easy connection
to other home made device

sleeve - Camera comon
Ring   - Shutter
Tip    - Focus

Sleeve  |Ring |Tip
-------- ---\ /--\
	 | |  | |--|
-------- ---/ \--/
after this later research changes to the circuut design were made to have a final design



Proto 1 by f2268d215cc925918731918f4efa0289, on Flickr

As you can see, the circuit as both and EEPROM and RAM IC, even though the circuitry for the RAM is on the board the IC was nit installed due to it not being needed for storing extra that.
The eeprom is used to store calipration data along side setting information incase a stack is needed to be repeated for whatever reason. Initially there was only 6 slots for storing user inputed information, howver that has now been expanded to 256 spaces - more than enough I think.

Even with all the testing done there wasn't anything that resembled a programme capable of doing all of the tasks. I had one that was for display and UI testing, one for doing some (but not all) of the maths needed and one for moving the motor.

which showed i was able to to control the carriages postition accuratly using just maths and that the end stop switch circuit and associated programming worked correctly.
there were some issues with the maths, doing it on papwer was easy due to the fact that i cold easily split the whole number from the decimal to be able to calculate the number of micro steps and full turn that would be required to achieve the moement that was desired. After trawlling thought the instruction set list i found FSPLIT. This was a blessing as it allow me to easily split decimal from whole number

A little head banging against the desk and i had a program that should theoretically work, and inital test where promising, but showed issue when using the pulsout comand in some situations, once that had been resolved with thanks to hippy and various other on here tje project was back on track

on of the first stacks the i made with this rail

2014-04-04_14-30-05 M=B R=8 S=4 by f2268d215cc925918731918f4efa0289, on Flickr

there was some haloing issue, something that indicated both light and movment issues with the camera. some other test run also indicated that a single stack of images could exceed the cpacity of my memory card (yeh over 280 images)
So while i waited for a ring light to arrive that i ordered froma popular auction site i turned my attention to adding in setting time, morrit lock up and stack splitting functions.
These function where quite easily added to the system, settle time can be varried from 0-9 seconds. stack splitting can be varried from 5-2000 shots per "sub stack". however one of the biggect changes that the alteration brough about was the moving of settle time to between when the system locked the mirror up and actaully opened the shutter
 
Last edited:

oracacle

Senior Member
Another post due to 4 image limit in each psot

the result is something that is now limited by either my skill or my lenses, maybe both. I do not have a proper macro lense and am making use of extension tubes to convertert what i have


2014-04-14_00-17-50 M=C R=1 S=4 by f2268d215cc925918731918f4efa0289, on Flickr

The last major change to be made was the additon of a conitinuos shoot mode, unlike the depth set shoot, this simply require the input of the camera data, overlap percentage and then run from the front to the back until you tell it to stop. not used this mode outside of testing, as yet but should come in useful at some point.
 

oracacle

Senior Member
I have been working and meaning to add a little more to this

This is the first cascade of the main menu, as you can it employs a similar style menu selection to ATMs with the buttons on the side of the diplaying relating to the menu displayed next to it


Display-3 by f2268d215cc925918731918f4efa0289, on Flickr

here is the display of the calculated information needed to after user input of camera settings


Display-1 by f2268d215cc925918731918f4efa0289, on Flickr

ID: this is the image depth, the distance from the forward lense element to the the sensor plane
Meg: is the magnifiaction
EA: is the effective aperture, calculated from the f-number andfocal length
SD: symmetrical DoF, the distance that will be in focus and not affected by bokeh

here you can see the distance calculated between each shot with a 30% overlap and the number fo shots to be taken


Display-2 by f2268d215cc925918731918f4efa0289, on Flickr

the final image for this post is a the progress report for coninuous shoot, is gives the number of shot already taken and the the camera current position in relation to the front of the rail


Display-4 by f2268d215cc925918731918f4efa0289, on Flickr

most of the code is prety much finished, some of it still needs notes, howver all 4 slots have been used for the entirity of the project which makes it a little bulky to post.
However if there is any part which you are particularly intrested in please sa and i i will endovour to post it
 

oracacle

Senior Member
Thought I would update this thread to changes that have been made to the system since the last post:-
Added variable CoC data for different camera types
altered calibration cycle so that stored camera information is not affected unless desired, and camera information can be updated without doing an entire calibration cycle
altered default image overlap (from 50% to 30%)
altered default settle time (from 2s to 4s), this is written to the eeprom during calibration, and changes made over-write this information but is stored in the reset subroutine of the settle time menu
added continuous shoot position information during sequence
increased maximum lens length (mounting ring to lens) for 300mm to 1000mm. this allow unconventional lens setups to be used, the object to be shot can be mounted on the macro rail with the camera lens setup held on a stationary mounting if need - mass is not really and issue until the setup get close to 20kg
added variable distance of mounting ring to sensor plane.

here is a shot taken with the lens mounted of camera and a piece of dark cloth blocking light from the space between the lens and camera. it about 9x magnification

Fly-eye by Craig Smith, on Flickr

and here is simon the spider how had 159 shots takne in just 10.25mm
flickr-spdier by Craig Smith, on Flickr
 

veracruz290

New Member
Oracacle, Please forgive my ignorance but I'm trying to understand the functionality. Are you able to produce these amazing shots secondary to taking a series of photos each at different depths. Capturing some portions of the subject in focus some not. In effect slices or scans and then put all the in-focus portions together, thus creating a photo that looks unbelievably great! Congrats on your results these are truly amazing!
 
Top