Focus Stacking Adventures Part IV

My Latest FocusStacker is finally done. This setup is the best balanced version among all iterations of FocusStacker series I constructed earlier. I think, I finally found a good balance between the complexity and ease of use.

I will gather and share all the necessary files (3d stl files, Fritzing project file, Arduino sketch, Android application) very soon. If you are in a hurry,  you can contact me via contact form or send an e-mail. (check the end of my 3d demoreel for e-mail adress)

Here are the main features:

  • Compact Designfs4_cased_rs

I used the same Linear Stage that I used for FocusStacker v2 (DCI CP3-10) This Stage is much smoother than Deltron LRS3-1 which I used in v3. I made all the components (Except the controller -which is a regular Android phone or tablet-) as a single attachment to the Linear Stage. I also replaced the stepper motor with a shorter one. As a result this is the smallest among my other designs. Plus it is cable free (Other then the power cable)

  • Low Power Consumption

Thanks to the new motor (2.8V and 1.3A per phase),  A4988 step motor driver and bluetooth interface, FS4 draws only around 0.4A in idle mode and around 1A on load. This will be a good opportunity for field focus stacking.

  • Remote Control

This was one of my biggest problems and I am glad it is finally solved. When the controls are on the stage itself, using the buttons and/or rotary encoder creates too much vibration. Moreover in some very high magnification levels, It ruins the framing. Making a cable connection between the controller and linear stage is a solution but that approach adds extra cables and makes it less compact. I used a bluetooth communication to control the linear stage with a regular Android phone. The best part is that you dont need to maintain the connection after the sequence started. You may move away along with your phone and it continues shooting. Once the connection is re-established, the remaining time is updated on the phone.

  • Upgradeable

Arduino’s usb plug can be reachable from outsideof the case. It can be re-programmed at any time. Communication between the Android app is established through simple serial commands, so new features and commands can easily be added.

  • Easier to Build

FocusStacker v4 is easier to build compared to the other versions. There are less components, less cable/soldering work. Since all the connectors and switches are on the PCB, it can run without installing on the case. The most difficult part is to find the linear stage. I couldnt find another one and had to salvage it from FocusStacker v2. It is that hard… If you want it to be installed on another Linear Stage, I can do the adaptation of components (or maybe the installation too) for you assuming that you cover my expenses.

The System is divided two parts:

Base Unit



This part is a compact design of motor, driver, all electronic components and linear stage itself.

On the right side of the base there is the power connector. An 11v-17v battery or DC adapter with at least 2000mah can be connected here.

On the left side, there are two switches and one 2.5mm connector to the camera. The switch near to the camera trigger connector is to change between Nikon and Canon camera trigger modes. As I mentioned in my previous posts, when triggering Nikon shutters, both tip and ring should be grounded, whereas in Canon cameras only tip is required to pulled down in order to send the trigger signal.

The other switch, near to the motor is the power switch.

Note that there are no light indicators to tell the device is on or off. A simple indicator could be added but I wanted to make it both simpler and less power consuming.

Remote Unit


The remote control is any Anroid Phone (or tablet) capable of bluetooth connectivity. 



Linear Stage

I use DCI CP3-10 as the Linear Stage. This is the one I bought from Ebay a couple of years ago. This stage is very smooth compared to the deltron I owned. Since both of them acquired as second hand, It is hard to compare them objectively since I have no idea about their initial conditions. But again, even in the 8X magnifications and even the motor is misaligned to the main shaft (This is a measurement mistake I fixed at the final iteration of the project file) the movement is very smooth. Check the unstacked and unaltered video.

Step Motor


My previous motor I used with this rig was actually quite nice. I had low power consumption and relatively decent torque. But it was long and occupying lots of space. I replaced it with a 2.8v 1.3 A Step motor I bought from Ebay. The nice thing is this one has a 0.9° step angle, so the minimum increment is basically halved. Here is the link (it may be dead because it is a listing in Ebay)

Genaral Specification:

  • Step Angle 0.9°
  • Temperature Rise: 80max
  • Ambient Temperature: -20~+50
  • Insulation Resistance: 100 MΩ Min. ,500VDC
  • Dielectric Strength: 500VAC for 1minute
  • Shaft Radial Play: 0.02Max. (450g-load)
  • Shaft Axial Play: 0.08Max. (450g-load)
  • Max. radial force: 28N (20mm from the flange)
  • Max. axial force: 10N

Electrical Specification:

  • Step Angle: 0.9°
  • Motor Length: 34mm
  • Rate Voltage: 2.8V
  • Current/Phase: 1.33A
  • Resistance/Phase: 2.1Ω
  • Inductance/Phase: 4.2mH
  • Holding Torque: 2.2kg.cm
  • # of Leads: 4
  • Detent Torque: 200g. cm
  • Rotor Inertia: 35g. cm
  • Mass: 0.22Kg


I used an Arduino Nano again. Note that, I had to cut the ICSP pins because they were blocking the lid. One disadvantage of using nano is I had to disable Dragonframe connection because of the memory limitations of Arduino Nano. On the other hand, considering I “never” used that option in previous builds, it is not a big issue.

Arduino Sketch will be here soon!!!

Motor Controller

As the step motor driver I chose a4988. You will need an extra capacitor but even with that it  blocks less space then easydriver. It has the same dimensions with DRV8825. If a higher current motor used, it can be replaced with that.

!!! WARNING !!!

Do not forget to adjust the current limit according to your step motor specs. Or else you may damage your motor. Check the manufacturer web page and youtube video to learn about how to limit the current.

Bluetooth Module


I changed the baudrate of my Bluetooth module to 57600. Provided Arduino sketch assumes that baudrate. Either edit the Arduino sketch or change the Bluetooth module’s baudrate with at commands. Check the second link below to use at commands.







3d Printed Parts

I used a Zortrax m200 printer do print out the stl files. These are designed to fit only my Linear stage. If you want to adapt the design with a different stage, you will need to edit these designs. Considering that I couldn’t find another DCI CP3-10, it is very unlikely these designs can be used again, but may be a starting point for someone.


I wish I could have a CNC machined connectors and casing. But if it is not for 1000 pieces, it costs too much for my budget. I am ready to share deeper knowledge and work with people who can help me with the CNC machined parts. A sleek aluminium design would be very nice and cool.

Other then that, If anyone owns or finds another DCI CP3-10 I would like to know that.

Links to the 3d printable STL files will be here soon!!!

PCB and Components

I found a local electronics place to make the PCB. I ordered the most basic built. Single sided, no masking, no fancy stuff. Only the copper ways. Which actually makes it vulnerable to moisture and other weather conditions. It is ok for me since I wont be using it in extreme conditions, but in the future I will probably upgrade this.


Link to the Fritzing Project File and PDF exports will be here!!!

There are also some other required elements like various resistors, switches, connectors and terminals which can be either on eBay or your local electronics store. Although these components are very common and can be easily found, you need to make sure it will fit to your PCB. Because of that, before cooking the PCB, I highly suggest to get a real-size print out of it and check if the components are fitting or not. Especially the two-way switches have lots of variations, and yours may not fit on the pcb or may need extra holes.

Another tip for inexperienced electronics enthusiasts: electricity flows from resistors through each way. You can put them in both ways. However, capacitors for example have + and – poles. You need to put 4N33 optocoupler with correct direction or you will probably fry it. 4n33 has a mark on one of its legs, that is the Anode(1) connector.

Below you can find the complete shopping list for FocusStacker v4 with some links, quantities and prices,



Unsoldered pcb. It is very simple, single layered and no masking.

Link to the Shopping List will be here!!!

Android Application


I used MIT’s App Inventor for the Android application, App Inventor is an easy to learn – block based coding platform. Since this is my first Android application, my code has some flaws and I had to use ridiculous workarounds. I think App Inventor is a perfect place to start but has its own limitations. I am planning to rewrite it with Android Studio, which is the official professional platform for Android Apps.

Link to the App Inventor Project File and .apk package will be here soon!!!

  • Known problems

Marking in and out at the same position resets the marks. Both buttons turn to the default grey color instead of blue. But sometimes when marking in or out, it resets the button colors anyway. If this happens follow this procedure  Goto IN →  Mark IN → Goto OUT → Mark OUT

Assembly and Use

Assembly procedure will of course change for each different linear stage. That is why I will skip the details like which bolts and nuts I have used, which filament I preferred for 3d printing etc.

If you need further assistance, you can contact me via contact form or send an e-mail. (check the end of my 3d demoreel)

After assembling all the parts, power up the motor unit either with 12v 2A power supply, 8AA battery pack or 11.4 3s LI-po power pack. Please note that you may get bluetooth connection or even trigger the camera but cannot move the motor with USB connection.

Before opening the application, make sure the the bluetooth is on, and pairing is done with the HC-05. Default password for HC-05 is “1234”

Open the application and from the BT Connect dropdown list select the HC-05 Bluetooth Module. I renamed my module to “FocusStacker” using the AT commands, check the links at “Bluetooth module” sections for details.

Hit the “settings” button. Settings section divided into 3 sections. Yellow section is related with the timings. Pink section is related with the motor values. Cyan section is for uncategorized features.

Select the same shutter speed value with the current shutter speed of your camera. Adjust the remaining settings as required.

Hit the “Home” button on top left to get back to the main menu. Using the “<” and “>” buttons find the position that you want to start your stack. Hit “Mark IN” button. Mark IN button will turn blue indicating that the in point is marked. Find the position which will be the end of your stack and hit “Mark OUT” button. Check the info screen. You will see the total shots and remaining time with green numbers. Time is calculated by using the Delay values and Step Size entered in the settings sections. If you think the increments are too much or insufficient, change the step size. For most situations 100-150 shots is enough. If the calculation gives you 200 shots it is likely that you are overshooting. I suggest you to find the spot which is the most angled to the camera. Zoom in to that spot and check the in focus area move as you going forward and back. If the focused area jumps and leaves unfocused parts between each step, you need to decrease the step size.

Hit “Test Shoot” to test that your camera connection is ok. “Test Shoot” is also very useful while making the lighting in studio shots, since even tiny touches on the camera itself creates huge shakes. When everything is ok, Hit start and grab a cup of coffee or lunch depending on your how long your stack will take.

You can move away with your phone. You can even turn off your phone or close the app. The focus stack procedure will continue. When you get back in the bluetooth range or turn the app on, the app will update itself and you can always cancel the procedure from the app.

What is next:

So far this design is very usefull. Instead of adding new features, or changing the operation style, my next goal will be about making it more solid. Although 3d printing is an easy way of designing parts, I want to move on to cnc machined parts for the next version.



  1. Congratulations; really a very good job! Thank you very much for putting all the necessary data at the disposal of the community. Excellent project and excellent explanations in each of the four versions. I repeat my sincere thanks. Best regards from Spain.

  2. Hi,
    Congratulations this is huge in time and work !!!
    I come back here very regularly for seeing if this post was complete …
    Are you done this project ? can I see the all the thing somewhere else ? or in private ?
    Anyway, thank you very much to share the content already present on this page, that says to me “this is possible ?” and it’s a good starting point 🙂

    • Yes actually, it is completed and I am using it. It is not totally fool-proofed and has some minor bugs. These are small issues which I am not bother to fix and does not have a huge effect. I am not sharing the final source codes online because of those little things and also there is very little interest in this project. Besides, most people find those a little bit intimidating since I dont have much time to make through explanations about whats going on. I can provide you the source codes if you pm me through ardakutlu at gmail dot com
      I think I am completed my “mobility” phase with focus stacking adventures with this version. Actually, I am working on a Raspberry Pi Controlled multi axis setup right now. Its focusing purely on studio stacking, with much much more automated functionality. This stacker uses ptp connections to control ALL aspects of the camera and it is not limited with a simple “shutter”. It will upload the images into a remote server and even initiate a command for zerene stacker start processing them. Basically it will be possible to prepare the scene, (maybe a panorama stack with 4000 images!) meet with some friends and watch a movie and you will find all images copied and stacked right there. So it will be more then a coffee break 🙂

  3. Hello Arda
    This is a wonderful work and easy to understand writing even for a person with little knowledge and experience about electronic and arduino like me.
    I want to know is this design compatible with nema 17 with step angle 1.8°? Or have to make some adjustment with motor driver and the arduino skecth to handle nema 17?
    Thank you in advance


    • Hi Danny,

      I used a Nema 17 too. The important thing here is the voltage and current of the motor. For step motors, voltage is not very crucial, motor controller handles that very well as long as you are above the minimum. BUT you need to adjust your current limit on your motor controller. I have links for that in the article, I suggest you to check them first. It is wrapped with red ‘warning’ s 🙂

      • Thank you for your reply Arda. It convince may be this is the time I have to leave my manual rail behind and begin to assemble FocusStacker 4. Including build a linear slider because it is difficult to find Deltron or DCI slider here on Indonesia 😊
        How can I get the arduino sketch and the android application for FS4?
        Thank you

  4. Hi Arda,
    I’m really keen on building this (or something very similar) using either an arduino uno, or esp32 (which has built in BT and wifii- but i’m not sure if it will have enough memory) Would you be able to post the arduino code and app?

Leave a Reply

Your email address will not be published. Required fields are marked *