Telescope Motorization (focus + Orientation)




Introduction: Telescope Motorization (focus + Orientation)

About: Hi! I'm Hugo, 15 yo student from the French Alps. I spend most of my spare time programming, tinkering, building electronic stuff, observing planets through my telescope, learning to pilot airplanes, readin...

When you use your telescope to observe a planet, a galaxy, or a nebula, whether it be only for pleasure, or to take a picture, your telescope will shake every time you manipulate it (when you focus, when you track the object with the equatorial mount, etc).

A solution would be to tighten all the screws very hard, but it doesn't really work.

The real solution is motorization, or automation: just add motors so that you don't have to touch the telescope, just press buttons!

In this Instructable, I will teach you how to do it!

Let's learn!

Step 1: What You Need

For this project, you will need:

- an Arduino / Genuino board,

- a breadboard,

- 1 to 3 stepper motors(I use 28BYJ-48),

- a driver for each stepper (I use ULN2003),

- 2 to 4 push-buttons,

- 2 to 4 10 KΩ resistors,

- a bunch of jumper wires (male/male and male/female),

- 2 to 6 gears (Legos work well, but I use Buki),

- a soldering iron if you use a permanent breadboard,

- some hot glue.

The number of steppers, resistors, etc are variable because it depends if you want to fully automate the telescope or to automate only some parts...

Step 2: How It Works : Focus + Declination Axis

The circuit that controls the focus or the declination axis will feature a stepper motor and two push-buttons connected to the Arduino board.

For the focus, if you press a button, the stepper will rotate in a way and the lens will move in a direction. If you press the other button, the stepper will move the other way and the lens will move in the opposite direction.

For the declination axis, the mechanism will be the same but when the wheel will rotate, it will orientate the optical tube around the polar axis, instead of moving the lens.

This way you will be able to focus and orientate the optical tube around the declination axis without touching the wheel.

Step 3: Electronic Circuits : Focus / Declination Axis

Here is a Fritzing sketch of the system that controls the focus or the orientation around the declination axis.

The connections for the driver board are:

Connect the cables of the motors to the outputs of the board, and for the inputs, it's:

IN1 to Arduino pin 8,

IN2 to Arduino pin 10,

IN3 to Arduino pin 9,

IN4 to Arduino pin 11.

And don't forget to power the board (the pins next to the resistors must be connected to 5V and GND on the Arduino or on the breadboard).

Step 4: Code : Focus / Declination Axis

Here is the code for the focus or declination axis orientation that goes in the Arduino.

#include <Stepper.h>

const int stepsPerRevolution = 200; 
const int button1 = 7;
const int button2 = 4;
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);

void loop() {
    while(digitalRead(button2) == HIGH){
    while(digitalRead(button1) == HIGH){
      while(digitalRead(button2) == LOW && digitalRead(button1) == LOW){

Step 5: How It Works: Polar Axis

The equatorial mount is a very cool system that enables you to track an object in the sky all along the night, following the rotation of the Earth, using only one wheel.

While automated, you won't have to touch this wheel.

The speed of the motor depends on the rotation speed of the Earth, so it is static.

It has to be calculated using the number of steps per rotation, the gears ratio, and the type of stepper and driver used.

Step 6: Electronic Circuit: Polar Axis

Here is a Fritzing sketch of the system that controls the orientation around the polar axis.

The connections for the driver board are:

Connect the cables of the motors to the outputs of the board, and for the inputs, it's:

IN1 to Arduino pin 8,

IN2 to Arduino pin 10,

IN3 to Arduino pin 9,

IN4 to Arduino pin 11.

And don't forget to power the board (the pins next to the resistors must be connected to 5V and GND on the Arduino or on the breadboard).

Step 7: Code : Polar Axis

Here is the code that goes in the Arduino to control the polar axis orientation:

#include <Stepper.h>

const int stepsPerRevolution = 200; 
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {}

void loop() {
  int motorSpeed = 10; //to be calculated, depending on your stepper and gear ratio
  if (motorSpeed > 0) {
    myStepper.step(stepsPerRevolution / 100);

Step 8: Build It, Use It !

Declination axis + polar axis (pictures on Step 5):

Now you will have to fix the gears on the steppers and on the axis wheels using hot glue.

Then you will have to solidly fix the stepper to the structure, using hot glue too.

(Note that on the pictures in Step 5, the blue gear replaces the control wheel. It is fixed on the wheel's shaft.)

Focus (pictures on Step 2):

You will have to fix the gears on the stepper and on the focus wheel using hot glue.

Then solidly hot-glue the stepper to the optical tube of your telescope.

And you are done!

If you want, you can combine all the different parts of this project, and even build a remote control !

Now you have a fully motorized telescope.

You can track objects automatically, focus and orientate the tube without touching the telescope!

Thanks for reading, you can check my other Instructables.

Feel free to post comments, I will enjoy answering them!



    • Water Contest

      Water Contest
    • Metalworking Contest

      Metalworking Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    18 Discussions

    Hugo, thank you for sharing this useful instructable. John R.

    I have a similar project for servo focus control using same 28YBJ-48 motor

    and re-use of printer-paper-pickup tire(s) as the mechanical coupling

    to the focal knob (IN / OUT) , that will not 'jiggle' the target objective

    every time it is rotated.

    I am interested in your mechanical geared tooth coupling method.

    Can you share some detail on sourcing parts, and coupling methods to

    the 28YBJ shaft other than hot melt ThermoPlastic?

    Do you find that there is 'lashing play' within the gears

    and if so, is there a pronounced effect on movement?

    I can share that the tires have varying grip at different room temperatures,

    a typical focus 'race' has a latency or 'lag' in the linear movement.

    USB microscope images are processed with a large noticeable delay,

    which is mildly annoying as the stepper motor is stepped IN and OUT to inspect

    Electronic PCB and component failures at different focus settings.

    My next project uses another Arduino-Stepper pair to move the

    USB microscope (stand base) on X and Y.

    I observe there is not enough power (500mA) in one (PC) USB port

    to power *two* of the 28YBJ types under 'load', so the 'base' movement

    will have ACDC external power and likely at 12Vdc.

    I sketched an Ardi C++ that accepts two momentary keys (IN and OUT),

    a rotary potentiometer for step delay(speed) ,

    driving off the shelf ULN2003 stepper driver board(s).

    That Ardi program also controls the IN OUT over 9600Baud serial remotely,

    using 'i' and 'o' characters and I eliminated the pot to adjust the speed remotely.

    USB Microscope prices are decreasing to the point where every QA inspection

    bench should have this tool.

    I am looking for mechanical coupling advice.

    I also have round electronics control knob hardware from the 80's that have two

    allen set-screws but the shaft is loose and off center when affix to 28YBJ shaft.

    best regards


    4 replies

    Hey John R!

    Wow, this is a very interesting project!

    The gears I use come from creative toys by Buki/Gigo (to build wind turbines, water pressure cars...) from when I was a kid.

    There is no real lag between the gears, but between the gear and the telescope shaft, where the original knob was.

    The hot glue wasn't even sufficent, so I cut a piece of wood and drilled two holes: one to insert the telsecope shaft into, and one to put a screw to tighten the piece to the shaft (because the shaft was flat in some place in order to be able to screw the original knob, see pics).

    Then I hot glued the gear to the wooden piece.

    Maybe you could do something similar (or 3D print it) for the motor's shaft, but I didn't need it there because my gears' middle hole fits perfectly to the motor's shaft.

    Actually, I'm not that good at mechanical coupling, but after a few hours tinkering, it worked ;)

    I don't understand very well: do you want to insert the allen-set screws onto the motor shaft?

    I don't know if I helped you as you expected, but I'm always pleased to help!

    Best regards



    Thanks Hugo ; These are the pictures I needed! the part you made is a "set-screw" lock. And I will likely do exactly same, I did finc local Hobby shop that serves the ?Drone? community here and they have a commercial "coupler" which is used in 3D printing steppers to fix to the threaded linear shaft. The item looks like this but its just right diameter for my motor shaft and can be drilled for the larger size of the Microscope (or telescope). In fact, the owner has a few on order that connect 2.5mm to 3.4mm on the other side...
    I upload an image; The Shop sells the item at $10 in store but I found the same item on Ebay Canada for $6. You can see four "set screws" which use Allen Key locking method...
    If the two items do not work, I will use your method, using Keyhole drill to make round. The same shop also sells that Buki gear set...
    many thanks for reply. John in Canada

    you're welcome !
    sorry for the delay...
    There is no pic but I see what you meen...

    Hey there, I've got question:

    Everywhere I look, I see that the steppermotor needs to be connected to the arduino on pins 8 ,9, 10 and 11. Is there a way to put two stepper motors or more on one arduino, or am I obliged to connect one stepper to one arduino?

    6 replies

    Shields are helpful for adding motors to Arduinos.

    The R.A.M.P.S. 1.4 (just search ebay, you can get kits with or without motors for cheap) shield was designed for 3d printers (, but its a super easy and cheap way to wire 1-5 motors and hobby servos. Open source design so plenty of competition to drive the price down. It has spots for stepper driver carriers usually based on a4988's or drv8825. A big community of people supporting various firmwares... a really good place to start a cnc hobby IMHO.

    Yes you can!
    You just have to connect it to other pins (or if it is for another project where the two steppers do the same thing together, you can plug them both to the same pins).
    If you want an example of the two steppers on the same Arduino, you can check out my latest Instructable, which is an improvement of this one, where the buttons are replaced by a remote control.

    Thank you for your quick reply, I'm going to try this om my telescope, I saw that the hour axis is always on, I want to make the hour axis controllable with the push-buttons, and when the scope is in position I want to install another button to make it follow and stay in position relative to the sky.

    Not yet, I need to order the supplies first and then I'm going to start the build. When I'm in need of help, I'll let you know. Thanks in advance.

    motor rotation is NOT depends on magnification nor lenses, BUT only on rotation sped of earth. Motor rotation should be calculated according to your gear ratio, steps per rotation of your stepper motor, type of stepper driver and fixed.

    1 reply

    Hugo I like what you did here. Shows great ingenuity and this is the key to great inventions. Keep up the good work. You have a bright future ahead of you. My favorite quote I like to use: "You don't have to reinvent the wheel, You just need to find a new purpose for the wheel that was created". Good luck on the contest.

    1 reply

    Thanks a lot SlawomirW for correcting me and helping me make a more accurate Instructable!

    Great tutorial, when I find myself some spare time I'm going to try this.