Telescope Electronic Focuser

by ghethco in Circuits > Arduino

10812 Views, 90 Favorites, 0 Comments

Telescope Electronic Focuser

Finished myFOCUSERPRO2.jpeg

In amateur astrophotography, we run our telescopes overnight. Electronics and software automate the process of taking pictures. But, especially on cold evenings, the focus may go out in the middle of the night. This means you lose much of the night's images. An electronic focuser, which moves the focus knob through a combination of hardware and software, solves this problem.

This project is based on Robert Brown's "Arduino ASCOM Focuser Pro2 DIY". Robert is a super guy and more than willing to help those who choose to follow in his footsteps. His project is very well documented. I'm only hoping to supplement it a bit with some info and pictures aimed at those with limited skills (such as myself) :-) I'm not an electrical engineer, I'm more of a software guy with some limited knowledge of electronics and basic soldering and assembly skills. I'm also going to focus on only one version of Robert's focuser (there are many). This one is based on the DRV8825 driver chip and a NEMA-17 stepper motor. This combination has the best resolution (steps/revolution), so I didn't see any reason to build anything else. The cost is a bit more than some of the other combinations, but by only $10 or $20. The overall project is super cheap, we're building this thing for something like $50 in materials. That is dirt cheap compared to the cost of commercially available focusers, which can top $1000 and are much heavier than what we will build. But, like many of you I'm sure, the biggest reason I'm doing this is for the pure geeky fun of it!

If you go to buy all of the components for this project from dealers, you will see that you mostly have to buy at least 5 parts, sometimes bags of 50 parts! If you don't want to go that route, contact me at gary.hethcoat@gmail.com since I have a lot of spare parts and I can sell you a "kit" with a PCB and only the parts you need.

Supplies

  • PCB (printed circuit board) - download the Gerber Files and order from JLCPCB.com --- 5 PCBs, $30, 1 week turnaround! Don't hesitate, see below.
  • Arduino Nano - clones are available on Amazon. The genuine article will likely be hard to find.
  • DRV8825 - stepper motor driver chip/board - again, clones available on Amazon
  • NEMA-17 Stepper Motor - see below, there are two options.
  • Coupler for NEMA-17 Stepper Motor (also two choices, see below)
  • LM7808 Voltage Regulator with TO-220 package - Amazon
  • TO-220 heat sink + screw (for LM7808) - Amazon
  • Ceramic Capacitor 0.33uf - Amazon
  • Ceramic Capacitor 0.1uf - Amazon
  • 100uF 35V Bipolar Capacitor - Amazon
  • 1N5408 3A Diode - Amazon
  • HER208 3A Diode - eBay
  • PTC Polymer Resettable Fuse 3A - Amazon
  • 12V Prewired LED Red
  • 5V prewired LED Blue
  • 5V prewired LED Green
  • 3mm Bezels (for LEDs)
  • 12V On/Off toggle switch - Amazon
  • Mini On/Off 3-pin 2-position slide switch - Amazon
  • Capacitor 47uF 35V - Amazon
  • 4.7K 1/4 Watt resistor
  • 5V buzzer/beeper - Amazon
  • 75 Ohm or 33 Ohm 1/4 Watt resistor - Amazon
  • Power plug Male/Female 2.1mm x 5.5mm - Amazon
  • USB cable - USB mini male to USB Type A
  • 3D printed case
  • DB9 connectors - Amazon
  • 4-pin headers for stepper motor - Amazon
  • GX 12mm 3P female/male connector pair - Amazon
  • 2-pin headers - Amazon
  • Headers and wire (miscellaneous sizes and gauges)

Order PCBs

myFP2M-DRV8825-PCB-crop.jpg

Download the Gerber Files. Make an account on JLCPCB.com, upload the Gerber zip file, that's it! Cost is $25 - $30, and you will have 5 PCBs in about a week. Unbelievable!

Work Out Your Hardware Requirements

IMG_5220.jpeg

Robert Brown did an excellent video on how to work out your stepper motor requirements. You should watch (and bookmark) this video. Pretty dry but important!

Determine Your Shaft Size

IMG_4959.JPG
IMG_5197.JPEG

You will need to remove the regular focus knob on your telescope's focuser. Most of these have one or two set screws. Measure the diameter of the exposed shaft. This will determine the size of the coupler you will use to connect the stepper motor. My telescope is the Orion ED80T-CF. It has a 6mm shaft. The focuser knob had two set screws.

Stepper Motor Choice #1 - NEMA-17 (Direct Drive)

NEMA-17_DD.jpg
IMG_5198.JPEG
IMG_5220.jpeg

This NEMA-17 direct drive stepper motor is available from Adafruit and many other sellers. It is not very powerful, it will not supply enough torque if you put any load on it or have a heavy optical train (like I do) and the focuser has to "pull" it upward when the telescope is vertical. I tried this one first and found it wouldn't work for my application. If you are (for example) doing a focuser for a catadioptric telescope like a Celestron C-8 or similar, the focus knob has no load on it so this smaller, lighter motor will do the trick. But -- you have to be careful that the mechanism is true and the motor does not have a load on it at any time, otherwise it will 'stall' and stop moving. This motor has a 5mm drive shaft. So, for my telescope I used a 6mm to 5mm coupler available on Amazon. You will need to order one sized for your telescope's focuser shaft size.

Stepper Motor Choice #2 - NEMA-17 Geared Stepper Motor

Geared_NEMA-17.jpg
6mm_to_8mm_coupler.jpg
67070904164__DB90DCE4-4908-4509-AB72-C5B438C3D5E7.jpeg
67070872856__B4362A01-F633-4BA8-8CB4-A86A08DAED3B.jpeg
67070864793__E5D8140C-E531-4948-BF9F-D1059571623D.jpeg

If your optical train is heavy and the focuser has to bear it (see above) then this motor may be a better choice. This motor is available on Amazon. This motor has a larger shaft diameter (8mm) and is quite a bit heavier overall than the direct drive motor, mainly because of the gearbox. Since my focuser shaft is 6mm, I ordered the coupler shown here in the 6mm to 8mm version from Amazon. You need to order it sized for your focuser shaft size.

Begin PCB Assembly

Board_Progress_02.JPG

Start with the small components first. Here we see the following components installed:

  • Female headers for the DRV8825
  • these are important so you can replace the component if it is damaged
  • 100uf capacitor
  • 47uf capacitor
  • 4.7K resistors
  • 75 Ohm resistor
  • 0.1uf capacitor
  • 0.33uf capacitor
  • LM7808 voltage regulator w/TO-220 heat sink package
  • 2-pin headers for 12V power and on/off switch
  • 4-pin header for stepper motor

Continue PCB Assembly

IMG_5162.JPG
IMG_5163.JPG
IMG_5164.JPG

Add the remaining components:

  • Female headers for Arduino Nano
  • 1N5408 3A Diode (you may need to make the pins smaller to fit through the holes in the board. DO NOT drill out the holes in the board!
  • HER208 3A Diode
  • Headers for the LEDs, buzzer (2-pin) and temperature probe (3-pin)

Notice we are NOT populating the parts of the board intended for Wifi or BLED. Feel free to take on that part if you like, but you're on your own :-)

Plug in the DRV8825 and Arduino Nano

IMG_5165.JPG
IMG_5166.JPG
IMG_5167.JPG
IMG_5168.JPG
IMG_5169.JPG
IMG_5170.JPG

With the DRV8825 and Arduino Nano plugged in, the basic board is complete. We are now ready for some testing.

Test the Board

IMG_5176.jpeg

The project creator Robert Brown made a good video on testing the board. If you connect the 12V power with the barrel connector (right side of photo), the Nano should light up without the USB connection. Connect the Arduino USB cable and upload some test sketches. If you're not familiar with Arduino, watch some tutorial videos. You won't need to write any sketches from scratch, but you will at least need to figure out how to upload them to the Nano.

Here is a link to the main FILES area on Robert Brown's site. In the "ARDUINO FIRMWARE" folder, in it you will find a ZIP file "myFP2-Firmware 312-1.zip". The version number "312" here may change if Robert posts new firmware. Download and unzip. There are sub-folders for the different versions. There are some test sketches in the "Tests" folder, start with those. I used the "LEDandBuzzer" and "TestStepsDRV8825" tests. When you're ready to go on to testing with the windows driver, you want "myFP2_DRV8825_312-1", open that folder. Upload that main sketch to the Nano.

3D Print the Enclosure and Bracket

Board_Progress_01.JPG
67068665263__6936F183-7CD2-4CF7-AE86-C812ED89FEFD.jpeg
67070860455__0F9A1ED7-FC8B-4C0A-B8F5-7666F132D4AE.jpeg
67070862797__06A3B743-A5F6-4722-BBF0-1F189A7DD2E0.jpeg
67070864793__E5D8140C-E531-4948-BF9F-D1059571623D.jpeg
67070872856__B4362A01-F633-4BA8-8CB4-A86A08DAED3B.jpeg

If you look in the FILES area on Robert Brown's site (see link above) you will see a sub-folder "3D Printed Parts". In the sub-folder "Cases" you will see many variants of the case for the DRV8825 based focusers. Download and check them out, I just grabbed the first one and printed it. I ended up modifying it a bit after printing. Depending on your telescope, one of the Brackets that Robert has may work for you. If not, you may need to design and print your own bracket(s), gears, and so on.

In my case I decided to make a custom bracket. I really had to, since the underside of my telescope's focuser is all curves, no flat area for attaching the mounting bracket. I also decided to make a separate mounting plate for the stepper motor, since I figured aligning the shafts precisely would be all but impossible. The holes in the main bracket the match the holes in the plate are oversize to allow for this alignment. Those are the last screws to be tightened.

Install the Windows and ASCOM Drivers

Again from the main FILES page, go to "ASCOM DRIVERS" and download everything. Install on Windows 10, this part is pretty straightforward. The little app is simple and works great. Read the documentation though, there are a lot of functions and options. Once you get it working, there's some calibration you need to do. Position "0" is with the focuser all the way IN (at least for a refractor).

More Build Photos

IMG_5201.JPEG
IMG_5202.JPEG
IMG_5203.JPEG
IMG_5204.JPEG
IMG_5205.JPEG
IMG_5206.JPEG
IMG_5207.JPEG
IMG_5208.JPEG
IMG_5209.JPEG
IMG_5210.JPEG
IMG_5211.JPEG

Calibrate the DRV8825

DRV8825-Adjust_Current.JPG

The current needs to be adjusted on the DRV8825. Before you do this, the stepper motor will probably move, but it will make a 'stuttering' sound instead of moving smoothly.

Focuser for a Celestron Catadioptric Telescope

IMG_5530.jpeg
IMG_5531.jpeg

My other telescope is a Celestron NexStar C6E. I only use the OTA. The mount and tripod are pretty much useless for astrophotography. I built a second set of electronics, and I had the NEMA 17 Direct Drive motor left over since it didn't work for my Orion ED80T-CF refractor. See above, this motor does not produce a lot of torque, but you don't need much for this application since there is no 'load' on the focusing shaft. All that remained was to design and print a bracket, and buy the needed parts. Here are a few photos of the "bracket", which is a simple 3D printed plate that mounts to the telescope's focuser ring, and serves as a mount for the stepper motor. The focuser 'knob' on the Celestron is just a rubber sleeve that usually pulls off easily. It may need some careful coaxing with a screwdriver.

Mechanical Parts for the Celestron

IMG_5536.jpeg

The plate has slotted screw holes for tensioning the 6mm belt. The belt and pulleys are off-the-shelf items available on Amazon. The focuser shaft on the telescope is 13.1mm in diameter. I started by trying to drill out a metal gear for the focuser shaft. Since there is no drill bit that exactly matches the 13.1mm of the shaft, I had to do some rough enlargement of the hole. This resulted in a gear that wasn't true and "wobbled" a bit. This proved fatal for the stepper motor! It stalled when tension on the belt increased. So, as they say, "back to the drawing board". Or in my case, back to SolidWorks :-)

3d Printed Gear / Pulley

IMG_5560.jpeg
IMG_5561.jpeg

I want to make this direct drive system work. The motor is much lighter than the geared motor. So, I duplicated the aluminum gear pulley in SolidWorks, and printed it out. It's the same in form, but has a perfect, true 13.35mm hole. The hole is made slightly larger than the shaft, this is normal. To get a slide-fit in a 3D printed part, you normally make the hole 0.5mm larger than the shaft. I wanted a tight / press fit, so I only added half that, 0.25mm. This arrangement turns 100% true, no wobble. I did find, though, that the 3D printed gear would slip on the shaft, so it needed a set screw.