I do not charge anything to create and maintain these open-source projects. But if you would like to say "thanks" for this project, feel free to send any amount through Paypal using the button below. I appreciate your support!
- Introduction
- Pre-Requisites
- Hardware
- ASCOM Driver
- Arduino Firmware
- Mechanical Components
- Electronic Circuit
- Ideas For Future Improvements
This repository contains code that allows you to build your own automated telescope cover. Here is a short demo video of the finished product, hosted on YouTube. Check it out!
In this repository, you will find:
- The code for the ASCOM driver (Microsoft Visual Studio 2022 project)
- The code for the Arduino firmware
- The various STL files to 3D print all the mechanical parts
- A blueprint for the electronic circuit
- A Windows computer (Windows 10 or newer)
- Microsoft Visual Studio (FYI, I used the 2022 edition...)
- ASCOM Platform
- ASCOM Platform Developer Components
- Arduino IDE
- FreeCAD, a free and open-source 3D parametric modeler
- A 3D printer able to print PETG, and a slicer (I use a heavily upgraded Creality Ender 3 v2, and Ultimaker Cura)
- A few basic tools that any tinkerer must own, such as a breadboard, a soldering iron, etc.
The following are just suggestions... Also, over time, some of the Amazon links may no longer work...
- Seeeduino XIAO (You can get it quicker from Amazon, but you will have to pay twice as much!)
- Mini360 Buck Converters
- Perforated Circuit Board (PCB)
- DC Power Jack
- High torque quality Servo with 270° control angle
- Aluminum Servo Horn
- Bench Power Supply
- Threaded inserts for 3D printed parts
- Assortment of small metric screws, nuts, and washers
- 22AWG solid core electrical wires
- Easy-to-print PETG filament
- Stainless steel cut-to-length hose clamp
Step 1: Download the driver from the releases page, and place the file ASCOM.DarkSkyGeek.TelescopeCover.dll
somewhere on your system (example: C:\Users\julien\ascom-telescope-cover\
).
Step 2: Open a command prompt, but make sure you run it as an administrator!
Step 3: Then, proceed with the installation of the driver using RegAsm.exe
, a utility that should already be present on your system (it comes with the .NET framework). Just don't forget to use the 64 bit version, and to pass the /tlb /codebase
flags. Here is what it looked like on my imaging mini computer:
> cd C:\Users\julien\ascom-telescope-cover\
> C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /tlb /codebase ASCOM.DarkSkyGeek.TelescopeCover.dll
Microsoft .NET Framework Assembly Registration Utility version 4.8.4161.0
for Microsoft .NET Framework version 4.8.4161.0
Copyright (C) Microsoft Corporation. All rights reserved.
Types registered successfully
Note: The output may be more verbose than the above. As long as it says Types registered successfully
, you are good to go!
Note: During registration, you will see a warning that the assembly is unsigned. This is normal as I did not bother going through the pain of signing the assembly, so you will just have to trust that you are registering the DLL that I built and uploaded to GitHub. And if you don't trust me / GitHub, you can build the DLL yourself using Visual Studio.
Note: Once the driver has been installed, make sure you do not delete or move the ASCOM.DarkSkyGeek.TelescopeCover.dll
file, or things will not work! (if you do move it, you will need to register it again in its new location)
Step 4: Start (or restart, if it was already running) N.I.N.A. (or whatever application you use to control your equipment).
Open Microsoft Visual Studio as an administrator (right click on the Microsoft Visual Studio shortcut, and select "Run as administrator") This is required because when building the code, by default, Microsoft Visual Studio will register the necessary COM components, and this operation requires special privileges (Note: This is something you can disable in the project settings...) Then, open the solution (ASCOM_Driver\ASCOM.DarkSkyGeek.TelescopeCover.sln
), change the solution configuration to Release
(in the toolbar), open the Build
menu and click on Build Solution
. As long as you have properly installed all the required dependencies, the build should succeed and the ASCOM driver will be registered on your system. The binary file generated will be ASCOM_Driver\bin\Release\ASCOM.DarkSkyGeek.TelescopeCover.dll
. You may also download this file from the Releases page.
Pretty much all Arduino-compatible boards should work. There is nothing magical about the firmware. However, see the comment regarding the pins and the servo library. Depending on the exact board you picked, you might have to change that.
- Add support for Seeeduino boards by following the instructions from the board manufacturer.
- To customize the name of the device when connected to your computer, open the file
boards.txt
, which, on my system and for the version of the Seeeduino board I am using, is located at%LOCALAPPDATA%\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\boards.txt
. Then, change the value of the keyseeed_XIAO_m0.build.usb_product
fromSeeed XIAO M0
(default) to whatever you'd like. - Finally, connect your Seeeduino board to your computer (make sure you use a USB-C cable that supports data and not just power!), open the sketch file located at
Arduino_Firmware\Arduino_Firmware.ino
, and click on theUpload
button in the toolbar.
Here is a 3D rendering of all the parts involved in this project:
The STL files you will find in the 3D_Files/
folder are just a starting point. You will likely have to create your own version of this project, if only to match the base curvature to your own OTA... That is why I included the FreeCAD file in this repository! (also in the 3D_Files/
folder)
Here is what the electronic circuit looks like:
In the photograph above, the components were soldered onto a 60mm x 40mm PCB.
- Remove the need for a separate 12V power connector, i.e. use the USB cable for both data and power. This change would prevent us from using an Arduino-compatible board because the maximum current that can be delivered by an Arduino-compatible board is usually around 200mA, which is not enough for a powerful servo. In order to do this, you'd have to basically build your own Arduino board using a micro-controller, a USB jack, a USB driver, and many other components... It's quite a project on its own, which is why I decided to go the "easy" route... Alternatively, I found a unit called "PD Micro" which implements USB-C power delivery. I have not tried it yet, but it looks promising.
- Automatically sense the position of the cover before powering up the servo. Right now, if you power up the unit while the cover is open, it will suddenly close very quickly. That can be quite a jarring experience the first time you see it happen. And if something is in the way (example: a flat panel), you could potentially damage your equipment. This could be solved with a simple potentiometer attached to the servo arm.
- Integrate a flat field panel inside the cover. I wanted to keep this project relatively simple, and I did not want to add any more weight to the front end of my already front heavy refractor, so I skipped that, but it can be done and would be a great addition to this project!