NEWS:
SEPTEMBER 2019
New controller and App for Android: STACKDUINO-G3
OCTOBER 2016
I just completed an alternative version of this board with Bluetooth support via HC-06 module: STACKDUINO-G2 BLUETOOTH
This is my PC controlled Stackduino-G2 version. I rewritten the original Stackduino-G1 Arduino code so that the new simplified board can be controlled by the laptop via serial communication either USB cable or a Bluetooth device. To control the Stackduino-G2 board I written a simple TclTk program that implements a Graphical User Interface to easily send/receive commands from/to the PC and have feedback on the board's functionality.
I wanted to build up a focus stacking rig to use at home, side by side with my laptop to check the shots and sequence easily on the computer screen. The functionalities of my Stackduino-G1 have been improved a little bit and the use of a GUI has made possible to greatly simplify the controller's electronics board. LCD and related control buttons became useless so the board's components are reduced to a minimum, as you can see in the following images.
For a detailed partlist take a look at the bottom of this page.
The use of my TclTk interface is straightforward and 'user-friendly'. From the main window, in addition to many other functions, you can set the communication port number (like COM1 in Windows or /dev/ttyUSB0 in Linux) to which the Stackduino-G2 controller is connected, open/close the serial connection, settings of the several variables that control the stacking sequence, star/stop the sequence, shoot a camera test shot and so on (detailed info here below).
Additional functions are listed in the FIle menu (image at right), saving and loading Parameters files in order to store and easily retrieve dedicated configurations, check the microstepping pins status on the Stepper driver module, reverse the current stacking rail direction, enable the Stepper driver's Enable setting to save energy and heat and simple guide as source of basic information on this application and its usage.
In the message window you can find useful information about your current status and actions performed by the Stacking rig. In the following images, some screenshots of the message window showing feedback about normal stacking and user's action taken to, for example, stop the sequence and let the carriage return to starting position, an 'emergency break' to stop immediately the stepper at any time of the sequence, also during motions.
The last image at right shows the 'Hardware parameters''s window where you can set the parameters of your specific hardware, mainly the type of Stepper's driver (Pololu like DRV8825, A4988 or EasyDriver4.4 are supported), the driver's microstepping mode you want to use, the stepper motor's number of revolutions that characterises your motor and finally a number that reflect your rig's reduction gear. The software will set the driver's microstepping pins and slice's depth calculation with respect to these parameters.
The 'Driver microstepping' (drop-down menu) widget allow you to set the microstep resolution for the selected driver type. Select the driver type first, the resolutions availables in the microsteeping menu will be updated accordingly, then set the Stepper motor's number of Steps Per Revolution according to your motor characteristics (usually 200 or 400).
The controller's software uses an internal parameter called 'gear' to calculate the amount of microsteppings needed for a certain amount of 'Step distance'. The 'gear' value depends on the following parameters:
The first couple of parameters was set as seen before. The last parameter is the value you should set in the third field of the 'Hardware parameters' windows. This value can be obtained with the following simple formula.
(StepsPerRevolution / CarriageTranslation) * Microstepping
In my case (200 steps per rev, M8x1.25 lead screw and 1/8 microstepping ) gear is (200/1250)*8 = 1.28
Use 'Show parameters' button to print out and check in the message box the current parameters values. After you choose the type of Driver board, the software will set automatically the three dedicated Arduino's pins and therefore will put the corresponding Driver's microsteps pins high or low.
All these data and parameters are saved in the Arduino's EEPROM and are reloaded at startup.
TclTk GUI application detailed functions
Go to this page.
The controller board
The hardware needed is shown below as I tested on a breadboard.
The Arduino board is a Nano version but it can be an Uno or ProMini as the required pins are only D2 to D12 (you can even further simplify the layout by removing the four LEDs I placed mainly as testing and simple feedback purposes, so the pins to be used will be only 8.
The basic hardware's components list:
Here below an image (at left) showing the layout I designed for my board, with all needed components mounted on a Proto-shield.
I drawn an Inkscape version (sligthly modified, image above at right) more useful to show/hide traces and components during manufacturing process of the board, dedicated to this Proto-shield, drop me an email if you are interested, I'll send you the file with some instructions advices on build in it.
Installation
At the bottom of the page you can find the firmware for the Arduino and the TclTk source to run the GUI application that will give you the control over the Stackduino-G2 board.
To run the TclTk application you need a TclTk interpreter installation on your computer. I use the free ActiveState's ActiveTcl distribution, easy to install and eventually to start learning Tcl language. Once the ActiveTcl installation is complete you have just to double-click on the Stackduino-G2.tcl file to run the application.
If you don't have or don't wanto to install TclTk there is a stand-alone exe available at the bottom of this page (unzip Stackduino-G2a.zip, Stackduino-G2a.exe it's a single-file binary executable Windows program built with freeWrap 6.64).
For any questions/suggestions please send me an e-mail at the following address.
NEWS:
I just completed an alternative version of this board with Bluetooth support via HC-06 module:
September 2016