Posted on

The tangent error in a barn door tracker

The barn door tracker’s geometry has an inherent error which creates a slow drift while tracking the sky. In the most basic of barn door trackers, this drift starts becoming apparent in about 10 minutes. In the “isosceles” barn door tracker described in this website, the drift starts to become apparent after 20 minutes. Mathematically the drift or error is because of the non linear relationship between the included angle of the triangle and the length of the base (threaded rod/nut displacement). A linear (or constant speed) increase in the length of the base of a triangle does not produce a linear increase in the included angle. This is apparent from the math below:

S = 2·L·sin(θ/2)
‘L’ is the length of the two the arms
‘θ’ is the included angle of the arms
‘S’ is the base or displacement of the nut/threaded rod.

θ = 2·sin1(S/(2·L))

When we solve for dθ/dt (rate of increase if angle) given a constant dS/dt, we get a non linear solution. In simpler terms, the angular velocity of the barn door tracker will not be constant when the threaded rot is rotated at a constant rate.

The following chart shows how the actual angle starts drifting away from the expected angle for a barn door tracker which is not compensated for the tangent error. This is for an isosceles barn door mount with an arm length of 300mm

The following chart shows the actual drift error, when the barn door tracker is not compensated for the tangent error. This is for an isosceles barn door mount with an arm length of 300mm

Traditional solutions

The traditional way to solve this problem was by means of mechanical improvements. Typically a second arm was introduced in the camera side. By the introduction of a second arm to drive the camera arm, tracking accuracy was greatly increased. This increase in accuracy allows exposure times of up to one hour. Another traditional method was by introducing a specially designed guide profile between the the camera arm and the actuator. This profile has a negative version of the tracking error thus canceling out the tracking error.

Modern “smart” solution

The traditional solutions substantially increased the fabrication difficulty of the barn door tracker. Also, these solutions were from an time when electronics and micro controllers were the toys of specialized engineers and technologists, out of reach of the average DIY enthusiasts. The solution to the tangent error through software is a simple and elegant one.

The tangent error is created because a constant speed applied on the threaded rod of the barn door tracker produces a non linear response in the angle of the tracker. The solution for this is to adjust the speed applied to the threaded rod continuously  so as to maintain a constant linear response in the angle of the tracker. This can be achieved by software running in a small micro controller like the Arduino. This concept is visualized in the chart below:

The software source code to perform this correction is provided free and open source here.

 

6 thoughts on “The tangent error in a barn door tracker

  1. Great write up. And nice code.
    I am building up a tracker based on your design and need to get the tangent error correction values base on my measurements.

    At the end of the Tantent error section you mention “The software source code to perform this correction is provided free and open source here”
    I cannot find the link to the code, is it still available?

    Thanks.

    1. Thanks Cory. I have node-js code which is available in a repo. I am not able to make it “live” on this wordpress site. If you can run node-js code I am happy to share it with you.

      1. That would be great. Nodejs code is fine.

        1. BTW I had to modify your code slightly due to constraints with the “const PROGMEM uint16_t timerLookup[]” array and “unsigned int newTimerValue”;.
          My stepper driver board can only do 1/8 microsteps. So when you use your calculator to determine the stepper timings the value is beyond 64k and thus beyond the scope of uint16_t.
          It unfortunately too me way too long to work out why my stepper timings were so far out, the code was truncating timing values 🙁
          Anyway I just changed that array and variable to ‘uint32_t’

        2. Thanks for pointing out the change required to handle 1/8 microstepping. I have updated the gist to reflect this change.

        3. Find the code for the tangent error correction here : https://gist.github.com/indstronomy/ecea64a8d838d29312092903324f8acd

Leave a Reply

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