Building an ascom controlled motorfocus – the minimalistic way


The internet is full of very elegant and extensive solutions for ascom controlled DIY motor focus projects one even fancier than the other featuring temperature control, IR remote control, rotary encoders, bluetooth, leds & display implementations and whatever.

My issue with all of this is that I have zero electric design experience, do not know how to read layout/electric schematics and extensive electric manuals are a mystery to me.
Problem is I still wanted an ascom controlled motor focus.

So I started looking for an absolute minimal and most simple design project for an asom controlled motor focusser.
This is what I came up with.

It consists of only 3 parts.
A motor, a motor driver board and an Arduino Nano clone.

No fancy stuff, just the minimum amount of components needed to get everything working.

Total cost: under € 30.

Summary of the project

This project shows both electric (minimal) components needed for the motorfocus to operate. These are all listed at the bottom of the page. Besides these components also some wiring is needed and I used an old 12V power supply which I had lying around to power the whole unit.

Equipment needed:
  • Small screwdriver
  • Multimeter
Electrical components needed:
  • Arduino Nano
  • L298N motor driver
  • Nema 17 stepper motor
  • 12V power supply or 9V battery
  • some wiring or jumpercables

More on this at the bottom of the page.

Besides the electrical components also software is used to which is loaded to the Arduino microcomputer and installed on the PC which allows astrophotography/automation programs to directly communicate with the focusser and adjust focus whenever needed. All this software is available free of charge and mostly already pre-written for the motor driver which is going to be used. There are several options here, but I went with the L298N driver.

Below is a step by step guide how to assemble the electric components and install the required software to get things going.

All 3 Parts

If there is no reading on the voltage meter it is not a pair

Connect power supply plus (red) to +12V and ground (black) to GND

Connect jumpercables to the L298N

Ground and Digital port 5,6,7,8 connected. That’s it.

L298N Motor driver

This combination is a pair connecting to 1 coil. Tape these together.

Connect the ground wire of the L298N to the GND pin of the Arduino

Note IN1, IN2, IN3 and IN4

Spare power supply, remember to check for plus/minus configuration with the multimeter.

Arduino Nano – Chinese clone

Connect each of the 2 pairs to the L298N out sockets. What pair to what socket is not important

Motor and power supply connected, GND also to Arduino (from same socket)

All parts connected to the L298N

Nema 17 motor attached to mounting bracket (requires M3 screws)

Multimeter to measure the current in the motor wiring.

Note the location of the +5V, GND and +12V on the back of the L298N

Jumpercables to connect L298N to Arduino

Connect IN1,2,3,4 to (D)igital ports 5,6,7,8 on the Arduino (we need these later on in the software setup)

Close up of the Nema 17 stepper motor. Aluminium pulley attached to the axis of the motor.

Software setup and uploading to the Arduino

To get things operational from a software point of view you need to have the Ascom platform installed on the computer operating the focusser, and you need an ascom driver for programs such as Maxim DL, CCDSoft or Sequence Generator Pro to communicate to and operate the focusser on the same computer.

Besides the Ascom platform and driver you also need specific software to run on the Arduino that through the motordriver operates the motor. This software is however already written and available from Sourceforge. More on this at the bottom of this page !

In order to get the focusser operational you need Arduino software which is used to modify the code (if needed) and upload the (pre-programmed) code to the Aruino microcomputer.

Thats is all.

I am aware that below summary in pictures is a bit brief and will try to update to a more extensive overview.

Start with installing the Ascom platform

Download the arduino software for the Nano and the ascom driver from Sourceforge

Download the Arduino software from arduino.cc
Open the sketch (.ino file) and change motor steps per revolution and digital pins used on the arduino (5,6,7 and 8).

Upload the sketch to the Nano.

Attaching motorfocus to the Moonlite

It basically comes down to removing the 10:1 reduction form the Moonlite using the small allen screws in the focusser knob. Then using either timing/drive belts and aluminium pulleys to the axis of the motor and the Moonlite or a direct axis coupling by using a 5mm Z-axis coupler. All of these items can be easily bought from online retailers. Also see the parts listing at the end of the page.

Motor attached to the Losmandy plate with an aluminium profile and using 2 pulleys and a timer belt.

All electrical components built into an outdoor electricity socket.

12V power supply and USB on one side, 4 motor cables on the other side.

Shows aluminium profile used.

Parts list and software source

Electrical components

1) First you need a Nema 17 stepper motor. Just use google. This motor is normally used in 3D printers and should be readily available.
You can find small differences in holding torque, steps per revolution and some come with planetary drive (at a much higher price).
Price level somewhere around $16 or about €14, although you can get these cheaper from AliExpress.

You can buy these from Amazon, AliExpress or other online electronics shops and retailers.

2) The second component you need is the L298N motor driver, just google this as well as the same also applies for this driver.
You can pratically buy it anywhere. Pricing around 3 to 5 euros or usd.

3) Last component is an Arduino Nano. It is up to you if you buy the original version or a Chinese clone. I bought the latter and it is operating without any problems whatsoever. A quick search on Google will show you where to buy them. Price is around €5 or about $6 to $7 (for the Chinese clone)

Besides these main components 2 additional items are needed which is wires or jumpercables to connect the components (no soldering needed) and a surplus 12V power supply or 9V battery to power the (stand alone) unit.

Software

All required software is free of charge:

ASCOM Platform > Start with downloading and installing the ASCOM platform
Arduino.cc > Download and install the Arduino software next. This is needed to program or change the code for the Arduino Nano and upload it to the Nano.
Sourceforge – project page > The main project page on Sourceforge.
Sourceforge – files folder > Download the software for the Arduino. Look in the folder “DRIVER BOARDS”. Pick the L298N and download the (M)inimal version.
Sourceforge – files folder > Look in the folder “CODE ASCOM” and download the myFocuserASCOMSetup16xx.exe file. When this is installed, it allows programs such as Sequence Generator Pro or Maxim DL to communicate to the focusser.

That’s it.

These are the minimum software requirements to get everything running. You could optionally also download the test code to check in windows if and how the focusser is moving before installing everything to the focusser on the telescope.