Posted on 10 Comments

Build your own barn door tracker. A reference design

This post provides you a reference design to start building your barn door tracker. You might want to refer to the other posts in this blog for detailed design choices. The design is for an “isosceles” barn door tracker. This design’s fundamental idea is to use readily available components in the market and to give an opportunity for people with minimal DIY skills to build it.

The bill of materials to build the tracker

Please note that you can exchange some of the components listed below to what is easily available for you. The choice of the 8mm pitch lead screw was made because this is available in high quality and at very low prices thanks to the popularity of DIY 3D printing machines. This lead screw (threaded rod) is used extensively in the build of 3D printing machines. If you change this, then corresponding change needs to be done in the software side to change the motor speed. If you are using your own motor speed controller, then take a look at the online speed calculator.

Ply wood for camera arm and fixed arm350mm x 200mm2
Ply wood for motor and nut carriers80mm x 100mm2
Door hinges76mm (3")6
Threaded rod or lead screw200mm length, 8mm pitch, trapezoidal thread (Standard for DIY 3D printing machines and hence widely available)1
Nut for threaded rod or lead screwTo suit your selection of threaded rod1
Shaft coupler8mm to 5mm (or to match your selection of threaded rod and stepper motor shaft)1
Stepper motorNEMA 17 bipolar stepper motor1
Stepper motor mounting bracketTo suit your motor. Flat.1
Control circuitReference circuit1
Ball head for camera mountingMini ball head for lenses up to 55mm. Heavier lenses will requires good ball heads1
Laser pointerGreen laser pointer for polar alignment1

Mechanical plan for the tracker

The following plan is can be viewed in full size by clicking on the image. Let’s do a quick run of the design:

  • The primary hinges connect the camera arm and the fixed arm like a “barn door”. That’s why this is called a barn door tracker
  • The other hinge pairs have the following uses
    • 1 pair connects the nut carrier to the camera arm
    • 1 pair connects the motor carrier to the fixed arm
    • These hinges provide the freedom for the carrier plates to automatically adjust their position as the two arms spread away from each other. This is a critical part of the design. The rigid threaded rod connected to both the carrier plates will force the hinges to adjust themselves to create the “isosceles” triangle
  • Note the dark gray color in the hinge mounting holes. Only these positions have to be screwed. The blank holes should be left without fastening with screws. This configuration gives the hinges the required freedom to allows them to automatically adjust.
  • The position of the ball head should be as close to the primary hinges as possible. This reduces the load on the stepper motor, allowing heavier lenses to be used.
  • The shoulder for the laser pointer can be anywhere, but needs to be as parallel as possible to the primary hinges. We use the laser pointer to do polar alignment. Polar alignment in the case of a barn door tracker is making the hinges point to the north celestial pole (pole star for practical reasons)

The electrical circuit

The barn door tracker has been around since 1975. This was a time in which access to electronics and micro-controllers would have been limited to specialized engineers and labs. Today the prolific proliferation and commodification of micro-controllers puts in the hand of the average DIY enthusiast. Especially systems like the Arduino make it very simple to code and download your software into micro-controllers. In our use case, the Arduino micro-controller is used for the following:

  • User interface – Buttons to control tracking, pause, rewind and fast-forward
  • Speed control of the stepper motor.
  • Home position detection
  • Mode selection – 300mm / 400mm arms, 8mm pitch / 1.5mm pitch

The other important component is the stepper motor controller. We choose to use a DRV8255 based controller. The DRV8255 manufactured by Texas Instruments is a integrated stepper motor controller. There are many DRV8255 carrier boards available. Most of them are pin compatible with each other. The breakout boards for TI’s DRV8825 micro-stepping bipolar stepper motor controllers feature adjustable current limiting, and six micro-stepping resolutions (1 step to 1/32-step). We choose to use 1/32 micro-stepping mode in our design.

The two most expensive components of this circuit are the Arduino (~$8) and the DRV8255 breakout board (~$5). Arduino clones are available for even lower prices.

The circuit requires a 12V DC power source capable of providing 1 amp current. The

I/O details of the circuit:

TerminalConnect toNotes
12V SUPPLY12V 1A external power supplyA NEMA 17 stepper motor will typically consume around 400 mA of power
TRACKPush button or keypadButton user presses to start tracking
PAUSEPush button or keypadButton user presses to pause tracking
F>FWDPush button or keypadButton user presses to wind the mount in the tracking direction
REWINDPush button or keypadButton user presses to wind the mount in the reverse direction
HOMELimit switch or buttonLimit switch placed in such a way that it signals the home (bottom most position of camera arm) to the controller. There is an overriding push button in case limit switch cannot be provided
COIL 1/AStepper motor coil #1
COIL 1/BStepper motor coil #1
COIL 2/AStepper motor coil #2
COIL 2/BStepper motor coil #2



If you want a fully built circuit, you can buy it from me. Please get in touch. More information is here. This is an Arduino shield. You will have to plug it in on top of an Arduino.

The software

The source code for the smart barn door tracker is posted below. This source code is to compiled and downloaded to the Arduino. This source code is fairly well documented if you need to make any changes of your own to suit your barn door tracker.



Reference build image gallery


Astro photography made with this mount

Orion nebula and Horsehead nebula

Picture 1 of 5


10 thoughts on “Build your own barn door tracker. A reference design

  1. Hi Arun.
    Great design, I’ve been researching these things now for about a week and yours seems like the most accurate considering the fact that the “software” could be adjusted if the absolute measuring, and physical putting the thing together weren’t to the tenth of a millimeter.

    I was thinking about building using an 8mm rod with a 1mm pitch to give me many turns, please could you tell me how I could incorporate this?

    1. Thanks! You can use the calculator tool in the blog to get the new parameters. Let me know if you need any help

  2. Hello, thank you very much for the design and programming. I have a query, is it normal that every certain amount of seconds, the rotation of the motor stops and then keeps turning?


    1. Hi Mauricio, no it is not normal. I believe there are 2 possibilities as to why this is happening. The current provided to the motor might not be enough. In this case, adjust the current limiter in the stepper motor controller. The other possibility is that there is some mechanical issue which is causing the system to get stuck.

      1. Hi Arun:

        I found the problem, I had not adjusted the Vref.
        Leave the voltage at 0.6 V and it does not stop anymore, the most probable thing is that when Vref was very high the driver got very hot and it stopped working.
        I thank you very much for taking the time to answer me.

  3. Hi Just built this and I gave the circuit working – before I solder up what function do the switches have connected to D8 and D9.


    1. Hi Dave, D8 and D9 are not used at the moment. I had it in the circuit for future use. It would allow to choose between 4 modes of operation. But at the moment it is not used.

  4. Ok – I am having real trouble – I have checked the circuit loads of times and it is all connected correctly – the stepper works fine in both directions but the code is not issuing the correct states from the outputs – if I ground D3 the motor turns fine – if I allow the direction input to the driver the float high it reverses. With everything connected (pushbuttons or simply patch leads) nothing else works the motor does not reverse and the led simply flashes as though its tracking whatever I do to the other inputs.
    I did message you about the PCB but would like to get it working on a breadboard before I purchase anything. Any suggestions?

  5. Hi did you see the previous message? The three buttons do useful things ie stop, increase speed and reduce speed but I cannot get the motor to reverse – probably needs another switch input but I cannot see how to add that in the code (very new to Arduino) – the problem is that I cannot return the door to its closed position without manually adding a wire into the reverse input to the driver – I suppose I could hard wire that but its not very elegant. Any help welcomed as I’m almost ready to give t a try.

  6. Hi Arun I am building a Barn Door Tracker and need the tracker shield circuit board, I am happy to purchase one off you but if not could you advise me of what I need to purchase so I can get it here in Australia,,,,,,,thank you

Comments are closed.