Close
0%
0%

Astrophotography Camera Mount

A 3D-printed 10000 : 1 gear reducer and control hardware used for astrophotography

Similar projects worth following
This project is an astrophotography camera mount for my Nikon D3100. The gear train consists of four 5 : 1 and two 4 : 1 sets planetary gear sets to achieve a gear reduction ratio of 10000 : 1. The gears are driven by a stepper motor controlled by a custom MSP430-based board, which also manages the camera's shutter control and user-selected options.

I've been getting into astrophotography recently. If you've ever tried taking a picture of stars in the night sky using a long exposure on a fixed tripod, or if you've seen streaky pictures of stars, then you've seen star trails. Star trail photography is beautiful in its own right but I'm interested in long exposure photography of specific sections of sky and I'm going for sharpness.

I'm shooting using a Nikon D3100 and a Rokinon 14mm F/2.8 lens. This lens is wide angle and is very forgiving in terms of cancelling out star trails. Using the Rule of 500 I can go for several tens of seconds at a time (theoretically 34 but trails start to show up around 25)...but I want more. MORE! MOOOORE LIGHT!

tracking mount is a tripod mount for a camera or a telescope that lets the user fix on a single section of sky. Once the shutter is open the tracking mount moves to keep the object centered. Sometimes this is accomplished with a second camera and image processing software to determine whether the focal object has moved, but this can be done more simply by moving the camera to cancel out the sidereal rotation of the Earth. There are many types of homebrew tracking mounts. This one is mine!

This is a work in progress!  All the gearing has been printed and assembled, the PCBA is done, the firmware is complete, and all the critical features have been tested - but February in Kansas City is not kind to astrophotographers. I probably won't have a chance to test this out for real for a couple months yet, on an upcoming trip to Caprock Canyons. Pictures will be up ASAP!

Code, schematics, and PCB on Github

STL files on Thingiverse

  • 1 × TI MSP430FR2433 microcontroller
  • 1 × NEMA 17 stepper motor 1.8 degrees per step
  • 4 × Stackable 5 : 1 planetary gear sets
  • 2 × Stackable 4 : 1 planetary gear sets
  • 1 × Allegro A3967 stepper motor driver

View all 9 components

  • An Instructive Failure

    Chris04/30/2019 at 16:56 0 comments

    In early April my wife and I took a several day camping trip to Caprocks Canyon in north Texas. The weather was gorgeous (especially compared to Kansas City at the same time), the moon was new, and the evenings were mostly clear. Perfect for astrophotography!

    Below is an A/B comparison shot of a section of  the northern sky centering on Ursa Minor. The camera was attached to the motor mount and the rig was set on the tripod then manually aligned with Polaris (leftmost star in Ursa Minor in this view). All pictures were taken with the same equipment: Nikon D3100 camera, Rokinon F/2.8 14mm lens. The sky was slightly cloudy and partially reflected the orange cast of nearby campfires. The images are cropped / resized in Lightroom and GIMP to show detail but not otherwise adjusted.


    Ursa Minor - 25 second exposure, ISO 3200

    No rotation

    Rotation engaged


    Manual alignment on Polaris aside, the "rotation engaged" image is more blurry than the image without rotation engaged. This level of blur wasn't visible to me on the camera's LCD.

    Here's another A/B shot, this time of the western sky with the same tripod position / alignment and a longer exposure.


    Western Sky - 60 second exposure, ISO 3200

    No rotation

    Rotation engaged


    And now an exclusive picture of me as I proofed the images after we returned home:

    Zooming in on the left side of the western sky photos shows that the star trails with the camera mount rotation engaged are definitely much longer. In fact the arcs are to the tune of two times longer.

    Rotation engaged on the left, no rotation on the right.

    The motor rotation was turning the wrong way for the northern hemisphere. I made the simple mistake of setting the A3967's DIR pin for "counterclockwise" by looking down at the motor mount from above instead of looking at the sky along the axis of rotation. The result was that the camera was actually turning with the rotation of the Earth and not opposite it, and so doubled the apparent motion of the stars instead of eliminating it.

    Well, that's experimentation for you! Aside from the obvious firmware change to swap the directions I'm also taking the time to make some changes to the PCB design to add more control from the MCU to the motor driver and validate the camera shutter control circuit. We're planning a camping trip to the Colorado Rockies this summer which should provide another excellent opportunity for astrophotography and testing the mount. Stay tuned!

  • Testing the Gearbox

    Chris02/12/2019 at 03:52 0 comments

      In order to test the gearbox I decided to add a "Gearbox Test" speed to the firmware.

      Driving at the normal rate could take a long time to make sure the last couple stages are moving at all. There's no reason they shouldn't be moving but that's the point of testing!

      I encountered an unexpected problem though: driving the stepper any faster than a STEP pulse rate of 20KHz (which translates to roughly 80 RPM for a rate at the camera ball head of 0.008 RPM) and the stepper motor skips a lot of steps, enough so that it quickly stops moving altogether. The stepper driver's datasheet lists a minimum STEP pulse width of 1uS and we're well within that limit. What gives?

      I believe the problem is that when it's being driven quickly there is not enough current is getting delivered to the stepper motor on each microstep. The A3967 driver looks for a variable resistance on REF to determine how much current to deliver to the stepper coils. This is by far the largest current consumer in the system and so the biggest dictator of potential battery life, which means that it is important to optimize for the lowest possible supply current while not sacrificing functionality. When I was prototyping a previous iteration of the project I used the EasyDriver's potentiometer to find the lowest supply current that would get the mount moving without skipping steps (~250mA) Problem is that I didn't recalculate the supply current in the current iteration, whoops!

      There are two options:

      1. I can fiddle with the supply current by replacing R6 and R7 to change the voltage divider feeding REF but this board design can't deliver more than 3.3V at REF (should come out to about 400mA). If it turns out that more is needed I would have to do a board spin that divides down the 9V rail instead of the 3.3V rail.
      2. I can test each stage by running the stepper motor at the normal rate while the mount is disassembled and rebuild it, verifying that each successive stage does indeed rotate without "lurching".

      I'm going with option 2. The last couple stages will indeed take a while to test but I'm not in any particular hurry, and not being in a hurry saves me money (no board spin) and effort (no redesign, no replacing the resistors).

  • Cancelling Sidereal Rotation with a Stepper and a Lot of Gears

    Chris02/05/2019 at 01:58 0 comments

    A stable long exposure shot in astrophotography requires cancelling out the sidereal rotation of the Earth. This is the rate at which the Earth rotates and is the reason for star trails. The idea is simple: if the Earth is rotating on its axis in one direction, rotate your camera on that same axis in the opposite direction at the same rate. Rotating on the same axis is easy. All you have to do is line up your mount's rotational axis to the North Star, Polaris, if you're in the northern hemisphere. If you're in the southern hemisphere there is a South Star, Sigma Octantis, but it is rather faint. Rotating in the opposite direction is also easy: counter-clockwise if you're in the northern hemisphere and clockwise if you're in the southern hemisphere.

    The main problem is that the sidereal tracking rate is very very small.  ASCOM Standards has it at 15.041 arcseconds per second. In more useful-to-me terms that comes out to a minuscule 0.00069634 RPM - a little less than seven-ten-thousandths of a rotation per minute! Driving a stepper motor that slowly would be choppy at best.

    In order to get a final output of about 7/10000 RPM, this astrophotography mount gears down a stepper motor by 10000 : 1 using six planetary gearsets: four 5 : 1 sets and two 4 : 1 sets. This lets me drive the motor at a reasonable rate of speed (6.96 RPM).

  • MSP430 Controller Board

    Chris02/05/2019 at 01:16 0 comments

    The controller for this project is by far the most complicated thing I've personally designed. Schematic and board were built using KiCad 5 and fabbed at OSH Park.

    There are a few major blocks:

    • The host microcontroller is a Texas Instruments MSP430FR2433, chosen largely on the "that's what I have" principle.
    • The stepper motor driver is an Allegro A3967. I prototyped this project using Brian Schmalz's excellent EasyDriver (purchased from Sparkfun) so the choice of IC was an easy one.
    • The MCU takes its input from two pushbutton switches and outputs to a Nokia 5110 LCD (also purchased from Sparkfun) as well as a pair of transistors used to switch the camera's remote trigger - the remote trigger functionality is still untested though.
    • The whole thing is powered from a 9V battery which feeds directly into the A3967 and supplies an LM317 to regulate it down to 3.3V logic.

    The board is a four layer stackup. Components and routing on top, 3.3V power plane, ground plane, and more routing on the bottom. The entire thing is hand-soldered, which isn't much of an accomplishment except for the 24QFN package of the MCU. Flux and drag soldering win the day!

    The firmware is pretty simple. On powerup the MCU initializes the necessary peripherals and draws an opening menu to the LCD. The user can select speed  (sidereal tracking or lunar tracking), timer (10 - 60 seconds on the shutter), and then start the driver. While the driver is engaged the MCU PWMs a signal to the A3967 at the rate selected by the user until the user says "Stop."

    This is still a work in progress. The latest fabbed boards had a couple of traces swapped so that the MCU was PWMing the driver's DIR pin instead of STEP. Fortunately the traces were readily accessible!

    The shutter control feature is also totally untested. To date I've been mostly focused (lol) on getting the basic drive mechanics going.

  • Planetary Gears

    Chris02/04/2019 at 03:54 0 comments

    The first iteration of this project didn't use planetary gears. Instead it used a combination of 2 : 1 and 5 : 1 straight gears on three independent shafts, plus a bevel gear to mount the stepper motor perpendicular to the axis (axes) of rotation.

    It was complicated and it never worked very well. The gears were tightly constrained in the walls but without much margin for error because of the multiple axes. They had a tendency to bind and there was a lot of lash, especially in the last 5 : 1 gear which was supposed to hold the camera. Inconsistent movement and non-axial motion are not good in an application where precision timing is key.

    I don't remember what made me start thinking about planetary gears but once I had the thought it stuck and so far it's working out far better. There are more moving parts - 30 moving gears plus the planetary carriers feeding each successive stage, versus only nine moving gears in the original - but all those parts are much more tightly constrained in their range of motion.

    Planetary gears are harder to reason about and calculate parameters for than coaxial meshed gears. The following resources helped a lot:

    • Planetary Gear Simulator - simulates a parametric set of planetary gears in your browser. To simulate a fixed-ring gear set like in this project, set the "Ring Speed" slider to zero.
    • Epicyclic Gearing on Wikipedia - the equations necessary to calculate important things like gear ratio from teeth count.

  • Finding metric hardware in the U S of A

    Chris02/04/2019 at 03:01 0 comments

    I design all my projects to metric dimensions. That's fine for straight up 3D printed parts like brackets and game board pieces but sometimes it makes finding fastening hardware difficult. The local "small" hardware stores - Ace and True Value - all have pretty much identical selection for metric screws and nuts. The big box stores - Lowes, Home Depot, and Menards - are no different, and you can forget finding screws in any "esoteric" (read: small or very long) sizes.

    Talking with some folks at work I discovered that you can order from Grainger and pick up at their physical locations. Less than $20 later and I had a meter of M3 threaded rod, enough M3 lock nuts to effectively never run out, and more than twice as many 6mm M4 hex head screws than I needed. Hooray for Grainger!

View all 6 project logs

  • 1
    Print / purchase gear train components

    STLs for the planetary gear sets and assorted mounts are all available on Thingiverse. In all, the camera mount contains:

    PartQuantity
    5 : 1 planet gear16
    5 : 1 sun gear (motor shaft axle)1
    5 : 1 sun gear (carrier shaft axle)3
    5 : 1 ring gear3
    5 : 1 ring gear with tripod mount wings1
    5 : 1 planetary carrier4
    Motor mount retainer1
    Inter-set retainer5
    4 : 1 planet gear8
    4 : 1 sun gear2
    4 : 1 ring gear2
    4 : 1 planetary carrier (one normal, one "camera mount")2
    Final retainer plate with cutout for camera ball head1
    Tripod mount1

    In addition to the printed parts the gear train contains the following hardware:

    • The planetary carriers each use four M4 hex head screws, 6mm in length, for a total of 24 screws
    • Four M3 screws or threaded rods 80mm in length. If you're using threaded rods, get some M3 lock nuts to put on the rod end in place of screw heads.
    • Four small M3 screws (5 or 6mm) for attaching the stepper motor to the mount
    • Four 15mm M3 screws and four M3 nuts for attaching the assembly to the tripod mount
    • A camera attachment ball head. The ball head lets you point the camera mount due north and adjust the camera independently. I purchased this one from Amazon.
  • 2
    Assemble the motor mount and first stage

    Set the motor mount retainer on top of the stepper motor and attach with 4 x M3 screws. Press-fit the 5 : 1 sun gear with the motor shaft axle to the stepper motor shaft.

    (note: the motor mount STL doesn't have the four holes in the plate right above the screws - I ended up drilling those so I could get a hex wrench into the screws)

    Next, arrange a set of four 5 : 1 planetary gears around the sun gear. Put four of the M4 hex head screws into a 5 : 1 planetary carrier and set it over the planetary gears.

    Start threading the M3 screws/rods up through the holes in the motor mount retainer. It actually turns out to be sort of difficult to thread them all the way through and then slide components down over them - the gears aren't solidly retained yet and can easily go all over the place. It is easier to only thread them up just through the components that have been placed, enough to correctly position the next piece.

    Set a 5 : 1 ring gear down over the planet gears and thread the rods up through it. This may require a little poking at the planets to get all the teeth in the right place. Set an inter-set retainer on top of the ring gear and thread the rods up through it. Press-fit a 5 : 1 sun gear (carrier shaft axle) onto the planetary carrier shaft.

    And the first stage is done! There is now a 5 : 1 reduction from the stepper motor - for every rotation of the stepper, the planetary carrier and thus the next stage's sun gear will rotate 0.20 RPM.

  • 3
    Assemble the remaining three 5 : 1 stages

    Repeat build step 2 for the remaining three 5 : 1 stages. If at any point you need to stop I strongly recommend using some M3 nuts to fasten down the threaded rods at the last completed piece. Tipping this over and having to re-place dozens of gears is not fun.

    For the fourth and final 5 : 1 stage, use the 5 : 1 ring gear with the tripod mounting wings. It doesn't matter which direction the wings are pointing. After the retainer is on the last 5 : 1 stage, press-fit a 4 : 1 sun gear on the planetary carrier shaft.

View all 7 instructions

Enjoy this project?

Share

Discussions

Tyler Gerritsen wrote 06/04/2019 at 14:33 point

I really like your idea of a 3D printable compact tracking mount!  There are already so many barn door style mounts that are overbuilt for nightscape and useless for DSO's.  I think this is a refreshing take on the idea.  Kudos!

How do you perform an alignment?

Do you intend to eventually try imaging with a telephoto lens?  Or are you sticking with wide-angle nightscapes?

  Are you sure? yes | no

tomschulte9 wrote 06/04/2019 at 13:38 point

Thanks Chris. Right now I am printing the gears. Will keep watching the project.

  Are you sure? yes | no

tomschulte9 wrote 06/03/2019 at 21:55 point

Can the board be purchased?

  Are you sure? yes | no

Chris wrote 06/04/2019 at 00:40 point

I might consider that someday but for now it's still a work in progress. I'm in the middle of redesigning the board to correct routing issues like the one pictured in the project logs ( https://cdn.hackaday.io/images/9047171549329243136.jpg ) and to add more driver control to reduce the current draw. Stay tuned!

  Are you sure? yes | no

Dan Maloney wrote 02/04/2019 at 16:02 point

But - it doesn't look like you entered this in the 3D-Printed Gears, Pulleys, and Cams contest. You really should - this is perfect for it. There should be a submission button over on the left on this project while you're editing it. If not, go here: https://hackaday.io/contest/163334-3d-printed-gears-pulleys-and-cams-contest

Nice job!

  Are you sure? yes | no

Chris wrote 02/04/2019 at 19:31 point

Thanks Dan! I am planning on submitting it once I get some more content up - I want to get the controller board's Github in order and the STLs up on Thingiverse before I pull the trigger. Won't be too much longer!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates