Star Tracker Using 28BYJ-48 Stepper Motor, Arduino and LCD Display to Vary Speed.

15,660

54

29

Introduction: Star Tracker Using 28BYJ-48 Stepper Motor, Arduino and LCD Display to Vary Speed.

Hi, the winter nights are on me and my mind has turned to getting good images of the Milky way and other faint objects. To do that better results are obtained when you track the rotation of the earth and the simplest of these methods is by using a "Barn Door Mount" .

This design allows you to vary the speed with the keypad for accurate timing, and if the battery voltages drop you don't get the slowing down of the drive gears that other designs may suffer from.

I wanted the design to be able to change the speed of the motor, and direction so that it will work in the northern hemisphere and the south if required. "Why would I want to be able to change the speed " I hear you ask, well if you can't get the exact thread screw specified in the design you simply change the speed to compensate :)

I looked at a few designs but I saw good features in a couple so decided to use parts of both of these. May I offer my thanks to the authors of these designs for their inspiration and information.

http://garyseronik.com/a-tracking-platform-for-ast... I liked the fabrication of this design but not the electronics

http://kukuruku.co/hub/diy/diy-an-astro-tracker-in... I liked the electronics of this design so my suggestions an amalgamation of the great work presented by the other builders.

The benefit of the ideas I have combined is that its cheep and parts are easily available, so a short list though its covered in two links above.

28BYJ-48 stepper motor and driver board ( Ebay and others )

Arduino Uno ( Ebay and others )

LCD shield with keypad HobbyTronics. http://www.hobbytronics.co.uk/arduino-lcd-keypad-s...

Screwed rod, hinges, misc. nuts and bolts, 1/2" plywood, Ball Mount, etc covered in the other links above.

Old brass Meccano gears one 15 tooth one 60 tooth for a 4-1 ratio ( Ebay)

Batteries and holders to power it

A box to enclose it all.

Step 1: The Wooden Parts and Gears.

I started by building the wooden parts and figuring out the drive, you can see I printed out the shape of the motor full size from a data sheet I found on line.

Once I bent the screw rod to size on a 7 inch radius and cut it to 7 inches long for a fairly long track time.

The gears I got from ebay were next, the big gear needs a hole drilled in it just big enough to clear the screw rod. Its very important that when the nut to go on the screw rod is fitted is exactly in the centre, the method I used was to cut a 1 inch long piece of screwed rod and put the nut on one end, I then wrapped PTFE tape on the rod that would pass through the big gear to centralise it, then supported on short bit of tube I soldered them together using a small blow torch and flux, all joining faces were cleaned with a wire brush and sandpaper prior to soldering to ensure a good joint. Once its cooled simply remove the 1" piece of rod and the nut should be dead centre.

The small gear required the hole opened up to 5mm to suit the motor shaft and a grub screw fitted .

The author of one of the designs I used for my ideas has very kindly forwarded some laser cutting plans that has agreed to share should you wish to use them, I have no way of testing these as don't have the kit. The author is Alex Kuzmuk, his files are in zip form here he used them in his design Alex Kuzmuk's design

Step 2: The Electronics

These stepper motors are very inexpensive I bought two :) .

You require an Arduino Uno and an LCD shield ( as they are known )

The project I followed was written some time ago and the designer used a different LCD shield, but as Arduino parts normally just work with each other I did not expect it to fail :( , the good news is that I am currently following an online course for Arduino programming and I had covered enough ground to enable me to modify the software to work with the LCD units being sold by HobbyTronics

A picture is worth a thousand words so I hope the wiring image is easier to follow than me trying to explain.

When finally connecting it all up you require to feed the Stepper motor interface board with 5 to 12 volts ( check the polarity its on the board ) as well as feeding the Arduino, I believe its better to feed the motor that way as using the 5volt pin on the Arduino board could not really supply enough amperage to be reliable.

Step 3: Program the Arduino

I have had to alter the Arduino Sketch from the original to work with the LCD used here, Open the Arduino IDE and select New. Use the code attached here.If you require to change the direction of the motor look in the sketch about line 38 you will see this line of code.

double speeds = -271.6;

//changing this value from a negative to positive changes the direction of the stepper motor. This is important depending on the hemisphere you are in.

use 271.6 for the stepper to run clockwise or -271.6 to run anti clockwise.

If you are using different screw threads to the original designs ( 32 Tpi ) like me you will have to alter the speed of the motor, there is an excellent tool online that you can mess with to determine the number of gear turns you will require to get the tracker accurate

https://blarg.co.uk/astronomy/barn-door-tracker-ca...

I'm going to use

.62 RPM / ((2Π / 1436) * 20.00 TPI) = 7.08 inches from hinge to drive screw.

so 37.2 teeth per minuet is my starting point, math is not my strong suit .

After a live run and very good results I have the timing set to -170, now I just have to wait for good sky :)

EDIT: Thanks and recognition to those other web sites that have proven helpful

https://blarg.co.uk/astronomy/barn-door-tracker-ca...

Step 4: Some Modifications After the Build

I found after completing the build that there are some things that could improve the basic design.

The main one I think would have been to add 2 inches to the left of the lower board, cut a shallow V grove or some other method of your choice to locate a green laser pointer parallel to the hinges, green pointers stand out best but only use it for initial location of the pole star as they really show up in the atmosphere and could easily be a hazard to pilots and add to light pollution.

The rubber bands hold the two halves together and make the assembly easier to move about without the camera flapping about, it also serves to hold the gears in mesh for more reliable drive.

I found my camera hitting the board when I pointed it really high, so adding the additional mount below the ball mount solved that.

Laser pointer Pivot Head

Be the First to Share

    Recommendations

    • Recycled Speed Challenge

      Recycled Speed Challenge
    • Make it Move Contest 2020

      Make it Move Contest 2020
    • Build a Tool Contest

      Build a Tool Contest

    29 Discussions

    0
    av8tor66
    av8tor66

    Question 4 weeks ago

    I'm having trouble with the arduino sketch. You have the motorpin definaitions using 15-18. I don't have the same LC shield and don't have pins 15-18 on my Uno. Can you advise and help?

    0
    user56789
    user56789

    2 months ago

    Hi, thanks for the instructions been really helpful to build the barn door tracker. I was able to get everything except the gears drawings. Looks like they are corrupt. Anyone has latest drawings or 3D models? Would highly appreciate if you can share .stl or .obj formats. Thanks in advance.

    0
    MihirA3
    MihirA3

    Question 1 year ago

    Hi, I got the rig running will test tomorrow or day after. Just one question what does the speed 271 means exactly? Couldn't find anywhere. Mine works good at -67.5 but thats just looking at it. If you could tell me what it means I'l be able to make it precise. Thanks

    0
    peter ball
    peter ball

    Answer 3 months ago

    I think

    4096 is steps per rev .....(a)
    271 is steps per second (b)

    divide (a) by (b) and you get. .... Seconds per rev. (c)
    in this example ~ 15.1 seconds per rev of motor output shaft (although gear ratio means 4096 isn't exact, it's about 4073 if memory serves)

    0
    StuartM99
    StuartM99

    4 months ago

    Hello, thanks for doing this, I am new to arduinos etc but slowly getting there. I do have a question though. What do each of the buttons do on the display shield please?!
    ie how do we use them on the tracker? thanks! 8)

    0
    peter ball
    peter ball

    Reply 3 months ago

    The buttons increase or decrease the speed of the motor, although I'm currently struggling to get the fine precision that the buttons are supposed to give. I only get corse control with jumps in speed every two or three whole integer increments.

    0
    eltondantasoliveira89
    eltondantasoliveira89

    3 months ago

    Hello, I'm from Brazil, and I'm having a hard time following the step by step, I did the same procedure as the instructions, when starting the system there is no answer, I could send the details of the calls, I think this would be mine problem, thank you in advance.
    0
    jose1949
    jose1949

    9 months ago

    hola maestro buenas noches estoy intentando cargar el código en la placa arduino y no logro compilarlo me da error,por favor si tiene algun codigo distinto hagamelo llegar.Muchas gracias .José.Mi correo: maqueta1952@gmail.com

    1
    rksmith21
    rksmith21

    Reply 9 months ago

    Quizás pueda usar una versión diferente de Arduino, no tengo otro código
    0
    jose1949
    jose1949

    Reply 8 months ago

    metrochas gracias por su información.Feliz año 2020.Saudos José

    0
    RicardoC252
    RicardoC252

    1 year ago

    It’s an awesome project but I really need help with the power source. Anyone can help me please? Thanks in advance

    2
    iwannabetall
    iwannabetall

    3 years ago

    Can you post details/close up pics on how to connect the arduino? I'm a total arduino newbie and I've been studying Kuzmuk's post before I stumbled on your comments...I have no idea what the pieces to connect the keypad shield is even called so I can't even google it :(

    1
    GrandadBob
    GrandadBob

    Reply 3 years ago

    Hi, I hope these images help, It sounds like your are concerned with the wiring of the stepper motor control board to the Arduino.

    The wires can be soldered or you have to solder pin headers, I just soldered the wires, I connected mine to the holes on the display board as holes are provided for connecting other components there.

    If you look closely at the first image you should see that I have added letters to my image indicating what the connectors are.
    If you need more information please ask.

    FYAFO0UIUHMSLR1.LARGE.jpgStepper motor 1.jpgStepper motor 2.jpg
    0
    IanM343
    IanM343

    Reply 2 years ago

    Hi, could I please also ask how you connected the battery source to the driver board?

    Many thanks!

    0
    russ_hensel
    russ_hensel

    3 years ago

    Could you link to the exact gears you got. Getting gears is often a major problem.

    0
    GrandadBob
    GrandadBob

    Reply 3 years ago

    Hi, I think if I put the ebay link after a while it would say this item no longer exists.
    The gears were old style brass Meccano gears, Meccano is a constructor toy maker, you should be able to sill find gears that give you a 4 to 1 ratio, mine were a 60 tooth and a 15 tooth they required drilling out to fit the shafts.
    I believe you can now get plastic Meccano gears if you prefer working in plastic. I just searched Ebay again and there are a few listings for these gears right now. I do hope that's helpful

    0
    Wayne2778y
    Wayne2778y

    Reply 2 years ago

    I could only find 57 tooth gear and 19 tooth gear in ebay = ratio 3. Will this still work by changing the speed of the motor?? Thanks, otherwise buy another set from meccanospares.com.

    0
    Dragos MihaiC
    Dragos MihaiC

    2 years ago

    Hi

    I plan to build the barn door but I was wondering why not using a direct coupling between the motor and the rod and then using the Arduino to spin it with ~ 1RPM ? In this way I will not have to find and use the gears

    Is not powerful enough the motor for this ?

    Many thanks

    Dan

    0
    stringstretcher
    stringstretcher

    3 years ago

    Sometimes people have a hard time with these small motors lifting a camera with large lens. I have turned my mount around, so that the motor is letting the mount "close" , with the hinge mounted on the right edge. That means the motor is slowing a falling weight instead of trying to lift it. It works better for me.

    0
    KevinK239
    KevinK239

    3 years ago

    I wonder how long of an exposure you can get? I don't see anything your using for balancing the camera.