Project tutorial

rDUINOScope © GPL3+

FREE and open source Arduino Due Telescope GOTO.

  • 5,055 views
  • 2 comments
  • 12 respects

Components and supplies

Ard due
Arduino Due
from http://www.arduino.cc
×1
3.2" TFT 400*240 SD Touch Module With Shield for Arduino Due
I used the one from Elechouse
×1
RTC DS3231
Real time clock from Ebay
×1
GPS uBlox Neo 6M
GPS module from Ebay
×1
PS2 joystick for Arduino
again from Ebay
×1
10167 01
DHT22 Temperature Sensor
Temperature and Humidity sensor
×1
HC-05
Bluetooth module HC-05 from Ebay
×1
DRV8825
Evaluation, Demonstration Kits, Boards and Modules / Evaluation Kits, Boards and Modules
×2
SY42STH47-1684B Motors NEMA 17
Motor Drives - SY42STH47-1684B Motors NEMA 17 (44 N.cm torque)
×2
PCB
Prototype Electronic board (PCB)
×1
Belts & Pulleys
x2 Pulleys 40 tooth, x2 Pulleys 10 tooth and x2 Belts suitable for your telescope mount
×2
Mfr 25frf52 1k sml
Resistor 1k ohm
×10
Panasonic eca2am101
Capacitor 100 µF
×1
Electronic Components
Wires + Switches (x3) + Connectors (2x5pin for RA & DEC, 12 VDC and USB for programing)
×1

About this project

Description

The world's first standalone Arduino-based telescope control Goto.

All available open source telescope controls either use Raspberry Pi, which consumes a lot of power, or uses Arduino as extension to a computer, smart phone or tablet. rDUINOScope is the first Arduino-based, stand alone device allowing amateur astronomers to enjoy the night sky.

The initial idea was to create a cheap and easy-to-build alternative of commercially available GOTO products like the ones manufactured by SkyWatcher, Orion, Vixen and others. Thus the hardware architecture is built on an Arduino DUE board and cheap sensors available on the market. Instructions on how to build and user's guide were created on the project website. In the heart of the system is an Arduino DUE board, loaded with software which is constantly developed to add functionality.

rDUINOScope with Stellarium:

Details

rDUINOScope is an open source, Arduino Due-based Telescope Control System (GOTO). Drafted as a stand alone system, rDUINOScope does not need a PC, tablet or cell phone, nor Internet connection in order to operate and deliver stunning views!

Basically it has a database with THE BEST 250 stellar objects (Messier and Hidden Treasures Catalogues) and 200 stars, calculates their position on the sky and points the telescope. Implemented alignment procedures allow for an "always in the eyepiece" experience when slewing to selected objects and once the object is in the eyepiece, the system keeps tracking it.

In case, however, you'd like to take advantage of your electronic devices, #rDUINOScope utilizes Bluetooth communication (wire-free setup) to connect with all electronic devices and accept commands based on MEADE LX200 communication protocol.

The system works with stepper motors of all types and can be mounted on both DIY Mounts or Commercially available products like SkyWatcher, MEADE, Orion, Vixen and etc.

Functionality:

What's inside the rDUINO SCOPE?

rDUINOScope Github

Build instructions

STEP 1 Preparation

Before we start, it is important that you understand how the software works in order to be able to make changes and customize it for you. After all this is one of the most significant strengths of this project!

To understand this part you need to download the code from the Project Files, along with the "libraries" files ... or simply download the whole package from: http://rduinoscope.co.nf/downloads.php. All referenced row numbers are according the code of V2.1. Boiana EQ

You should know how the Arduino code works. Usually Arduino program have 2 sections- SETUP(); and LOOP(); SETUP() is executed at the beginning of the program and basically it utilizes the system; LOOP() is a constant loop function which fires multiple times per second. So in order to assure we have screens, touch inputs and etc. and the screen not flickers because of the LOOP() we need to invent a mechanism to let Arduino know what is the User expects it to do. Thus in the LOOP() section you will see a very small portion of the code that only says "Consider Touch.. or Consider Time ..." and etc. The rest of the activities happen within those functions which allows us to alter the flow of the program so that the screens are not refreshed multiple times per second.

Calculations: I have used some information found on internet on how to calculate position of stellar objects. Most of the information I collected from the following link: http://www.stargazing.net/kepler/altaz.html - Describes needed formulas and approach to calculate Hour Angle (HA), knowing location, current time, and stellar object RA and DEC.

Once I created the code to calculate HA /row 678: void calculateLST_HA() / , I used this page to check if it works OK: http://www.jgiesen.de/astro/astroJS/siderealClock/ , and on a later stage when I added the DB with Messier Objects I used Stellarium (http://www.stellarium.org/) application for the same checks.

The main issue I found was not the formulas themselves, but the way Arduino deals with variable types and in particular the precision of the calculations.

Now once we have the HA and DEC calculated for a given object, we want to make the mount point the telescope and to do so, we need to somehow know how much exactly motors needs to turn. To succeed in this I need to know what is the worm to gear ratio – i.e. how many turns should the worm do in order that the gear makes 360°. I have Vixen Super Polaris and quick search on internet revealed that it uses 144 tooth gear for both RA and DEC shafts. I have created a simple Excel file (*.XLS - http://rduinoscope.co.nf/downloads/Gears_Stepper_Calculation.xlsx) to calculate how much the motors should turn once I calculated HA and DEC, and also how often to "fire" motors in order to compensate for the Earth rotation.

The same mathematical model I used in the XLS is also implemented in the code, so what you need to do is simply substitute the values for your mount in the beginning of the code (rows 34 to 37).

// HERE GOES THE Mount, Gears and Drive information.
// ... used to calculate the HourAngle to microSteps ratio
// UPDATE THIS PART according to your SET-UP
// ---------------------------------------------
// NB: RA and DEC uses the same gear ratio (144 tooth in my case)!
//----------------------------------------------
int WORM = 144;
int REDUCTOR = 4;  // 1:4 gear reduction
int DRIVE_STP = 200;   // Stepper drive have 200 steps per revolution
int MICROSteps = 16;   // I'll use 1/16 microsteps mode to drive sidereal - also determines the LOWEST speed.

Now once we calculated ratios, the code will know how much to turn the motors in order to point the telescope to the corresponding coordinates and also what is the clock speed so that the mount can track the object. Functions taking care of the above starts at row 906 and row 917:

void Sidereal_rate(){
}
void cosiderSlewTo(){
}

Considerations: You know, this is not a consumer ready product. It allows you to customize it for your needs and thus is very flexible, but with the flexibility comes some drawbacks. I have included this “considerations” section in order to make sure those are not dropped from your To Do list.

  • Mounting motors is a simple task, which however impact the way your calculations should work. In my scenario Vixen Super Polaris have their original gears put on the right side of the worm shaft. I however found those shafts to be short in order to replace the gears with pulleys and thus moved the pulleys on the opposite side of the shaft (left). This caused that the motor actually needs to turn backwards in order to increase telescope position and thus I had to revise the original code I have created. You should definitely revise the directions you motors turn other ways you will end up with wrong counting of the steps, thus wrong position. Let me show you what I mean: See row 1028 where I command motor to STP_BACK, but on row 1031 I increase the counter += ... (All referenced row numbers are according the code of V2.1. Boiana EQ).
if (SLEW_RA_microsteps > RA_microSteps){
     digitalWrite(RA_DIR,STP_BACK);
     digitalWrite(RA_STP,HIGH);
     digitalWrite(RA_STP,LOW);
     RA_microSteps += RA_mode_steps;
}else{
     digitalWrite(RA_DIR,STP_FWD);
     digitalWrite(RA_STP,HIGH);
     digitalWrite(RA_STP,LOW);
     RA_microSteps -= RA_mode_steps;
} 

ACTION: Revise the following parts of the code: void consider_Manual_Moveint xP, int yP), void cosiderSlewTo() and void Sidereal_rate().

  • Northern VS. Southern Hemispheres: The code also inverses the FORWARD move depending on the hemisphere you are located. This is done in a part of the code, where I take care of the Touch inputs. You might need to revise the code section.
  • Gearing on DEC and RA axis: My code works assuming that both DEC and RA axis use 144 tooth gear. This is the case for Vixen Super Polaris. In case you have a different setup you might need to revise some portions of the code. If you have issues to identify those parts of the code, drop me a message and I’ll try to help you out!

Plan your activities: Now we reached a point where we need to plan our activities to actually build the rDUINO Scope GoTo system. Rough estimation is that you should be able to complete the system in 2-3 days considering you have everything needed (HW, Tools and Materials). It took me something like 4-5 months to complete it, considering I was only able to work during the night (not every night), and also I needed to do a lot of research. Putting it all together took me like:

  • 1 day to build the Shield board and live up the system
  • 1 day to pack everything in a box
  • 1 day to fix motors and pulleys to the mount

STEP 2 Materials

Now, as we know how basically the program works, you need to plan your procurement and obtain needed materials.

Bill of Materials: Most of the materials I used are bought from Chinese suppliers on Internet. Few of them however I decided to buy locally mostly because they were considered good to have and I wanted to avoid delays: GPS, Bluetooth and Joystick. It cost me roughly $190 USD to get all this, so it is really a low cost compared to how expensive is to buy such system from manufacturers. You can find list of materials along with their prices and where you can buy them on the project website: http://rduinoscope.co.nf/rDUINO_step2.html, but the list is also available on this website in the "COMPONENTS" section.

If you can find them cheaper or deliver them faster I strongly suggest you do so.

Additionally depending on your design, you might need 40 pin. cable with connectors for the TFT, some plastic bolts to fasten the joystick, USB cable to ensure the Arduino Due is still programmable when enclosed in the box, fan and others.

If you don’t have those at home (as I didn’t) you should also buy some soldering materials, solder, nippers, digital multimeter, and others.

Software you will need: One important part of building your rDUINOScope is to download and install the Arduino IDE and all related Software (drivers, board definitions and libraries). Follow the below list in order to install needed on your computer:

  • Go to Arduino website and download the IDE: https://www.arduino.cc/en/Main/Software. Install the software – Once the software is installed it will also install drivers needed so that your computer recognizes the Arduino board when connected.
  • Run the Arduino IDE and navigate to: Tools -> Board -> Boards Manager, once there Download and install Arduino Due board definition “Arduino SAM Boards (32-bit ARM Cortex-M3)”;
  • Download the libraries pack that I used as part of the program and copy-paste them in the “libraries” folder of your Arduino IDE installation. (NOTE: "libraries" is a folder on your computer, but it is also a folder within the COMPLETE PACK available on the project website: http://rduinoscope.co.nf/downloads.php, so what you need to do is to download the pack, rename the extension to .ZIP, open it and copy the content of the "_libraries" folder from the ZIP to the "libraries" folder on your computer.)
  • Restart the IDE and open the main program file - “_02_Boiana_EQ.ino”. You will noice that 4 more files will open in a separate TABs. Those are supporting files taking care of different parts of the software.

You should be able now to compile the code and load it to the Arduino Due board after connecting Arduino to your Computer.

Note: In case you are not aware of how the Arduino IDE works and what needs to be done in order to program Arduino, refer to website and tutorials: https://www.arduino.cc/en/Tutorial/HomePage

STEP 3 Assemble

For more detailed instructions, please visit the Project Website : http://rduinoscope.co.nf/rDUINO_step3.html

Now is the time to create the Shield board. A Shield board is a board with pinouts which you stack on top of the ArduinoDUE board. Some of the components needs to be on that board and some are better positioned on the enclosure box instead. My split goes like this:

  • Shield Board holding: both DRV8825 drives, RTC3231 clock, Bluetooth module HC-05, Piezo speker, Connector for 12V and pinouts for the remaining components;
  • Monthed on the box components are: GPS Module NEO 6M - RX so that the antenna can always points toward the sky, DHT22 temperature sensor sticked outside of the box through a hole, PS2 Joystick, the TFT Screen and all switches (ON/OFF switch and Day/Night Mode switch). Additionally I have drilled holes for the Motor Drives connectors, 12V power supply connector and a USB cable port that goes to ArduinoDUE Native port to allow for Software updates without opening the box.

How to connect components to ARDUINO DUE board:

Component .... Hardware Pin .... Arduino Pin

GPS

  • GPS NEO 6M .... RX .... 16
  • GPS NEO 6M .... TX .... 17

RTC

  • RTC DS3231 .... SDA .... A4
  • RTC DS3231 .... SCL .... A5

Bluetooth

  • BT HC-05 .... TXD .... 14
  • BT HC-05 .... RXD .... 15

DHT

  • DHT22 .... out .... 3

Speaker

  • Piezo Speaker .... 2

PS2

  • PS2 joystick .... VRx .... A1
  • PS2 joystick .... VRy .... A0

Declination DRV8825

  • DEC DRV8825 .... STEP .... 6
  • DEC DRV8825 .... DIR .... 7
  • DEC DRV8825 .... M0 .... 10
  • DEC DRV8825 .... M1 .... 9
  • DEC DRV8825 .... M2 .... 8
  • DEC DRV8825 .... RESET DEC DRV8825 .... SLEEP

Right Ascention DRV8825

  • RA DRV8825 .... STEP .... 4
  • RA DRV8825 .... DIR .... 5
  • 3V
  • RA DRV8825 .... M0 .... 11
  • RA DRV8825 .... M1 .... 13
  • RA DRV8825 .... M2 .... 12
  • RA DRV8825 .... RESET RA DRV8825 .... SLEEP

TFT Screen

  • use with TFT Shield .... pins (22-53) + SPI
  • Day/Night .... Mode Switch .... A3

Right... Now we are ready to assemble the Shield Board. Get a prototyping PCB and assess how to cut it, so that it can hold all components to have some room for wiring and have the pinouts soldered in such a way that it can be stacked on top of Arduino. Please note that you need to solder all the pins used by Arduino and connect them either to the components on the Shield board or to a connector on this shield board so that components put on the box itself can be connected, too.

I'm including some photos below of the process:

Once those were done, I connected the board and tested the shield! It wasn't working! :( I checked the wiring and it turned out that I have created a bridge between 2 connections and I had to fix it. Please note that as of this moment I started to check every soldering for issues as I really got lucky to not burn my Arduino or anything else with the wrong wiring. NB: Make sure you check all connections! Make sure you follow the following wiring diagram for the DRV8825 and motor drives as it is important.

Make sure you use a suitable power adapter (12V, 1.6A) and connect the motor drives before the power is ON! NB: Never connect motor drives when DRV8825 is under load as it might burn the drivers!

Now as all components are soldered in place, I suggest you also connect the motor drives, load the software to the Arduino board and test the entire setup. It should work without glitches at this point.

You should now be able to play around with the software and get to know the User Interface. In order to help with the interface I have created a USER'S GUIDE page on the project's website: http://rduinoscope.co.nf/guide.html

Your setup should look something like this:

STEP 4 Box it together

Once the shield board is ready, take the box and start to lay out all of the remaining components and plan where you need to drill holes and what shape and size. The best way to cut holes is with a small pocket knife (at least for me). It really doesn't matter if it is a round hole or a square one. You can easily carve it with a small sharp knife.

The only exception is for the screen where you really need a long, even and square hole. I asked for help and my father did it on his cutting machines.

Once you are happy with the layout and consider it doable, start cutting the holes. It is a long process and creates some mess, but should not take you more than 2-3 hours. Sometimes I used drills when I had to do circled holes, for example: 12V power supply connector, RA and DEC motor connectors.

Prepare your hot glue gun and begin hot gluing components to the box as shown below:

Now all is connected and boxed, except for the component on the front face of the box. I've decided to put there the TFT Screen, the PS2 Joystick and the Day/Night Mode switch. When I got to the TFT Screen I created a simple ribbon cable connection with male and female connectors and hooked it to the screen. This however did not work! The reason is that the pins got mirrored and as such the TFT screen can no longer work. Thus I decided to work out some complicated 2D to 3D conversions and work out the connectors I had with the ribbon cable in order to solve the problem

Long story, short: It is not a rocket science, but gave me some hard times until I figure out a solution. An ugly solution, but it worked and it still working a year later. Below you can see what I mean.

Basically what you see here is:

  • Ribbon cable
  • 40 pin female connectors
  • pins to solder on a PCB cut to form array (2 x 20 pins)

It worked like a charm and allowed me to complete the box!

STEP 5 The German Equatorial Mount

Now as much as I want to share with you how to connect the motor drives to your mount, I can't. The truth is that any manufacturer creates their own design and as such, there is no solution that works for all.

I use Vixen Super Polaris from the 80's and the below method works for it. I need to remind you that the decisions you took in STEP 1 where you needed to change the values in the code will now affect our work. Below you can see my setup of pulleys and belts.

I purchased 2 sets for my setup. I just wasn't sure how it will work and thus purchased a set with reduction 1:4 and a set with reduction 1:3. The belt's size should also be different because the reduction affects the distance between both pulleys. I admit that with good planning and design you can decide upfront how to proceed and spare some money, but I was in a hurry. I needed to make it work!

After having the belts, pulleys and mount in front of me, I decided that the best approach for me would be to use 1:4 reduction because all seemed to fit perfectly on the mount and I started to work on the motor housing. After half a day, I was able to come up with this:

I tested the entire setup and had to made some changes to the software (update the variable values to 4 on row 35) so that it represent my final design decision. Tested it again and all worked as charm.

I had to wait for a good starry night in order to test it properly, but until I waited, I realized that something is not quite right!

I had the best Telescope Control GOTO system, much better than what I can buy with my hobby budget, but it didn't look right. It needed some final touches, something that later on made me proud of my rDUINOScope!

Finally, my rDUINOScope Vixen SP Ferrari look as I feel it should look!

Files

_READ_ME.txt: Description of the final release v.2.1 Boiana EQ along with some F.A.Q.

_02_Boiana_EQ.ino: Main Arduino file

graphic_screens.ino: GRAPHICS FILE - linked to the main file

touch_inputs.ino: TOUCH INPUTS FILE - linked to the main file

BT.ino: BLUETOOTH COMMUNNICATION - linked to the main file

regular_updates.ino: TIME UPDATES - linked to the main file

Schematics

How to wire Stepper Motors and DRV8825
How to wire Stepper Motors and DRV8825 and connect them to Arduino DUE
Schematic motor bgfpajggjc
How to wire supporting hardware
How to wire all all sensors and conenct to Arduino DUE
Schematic hw wf6e4b31ip

Code

Code snippet #1Plain text
// HERE GOES THE Mount, Gears and Drive information.
// ... used to calculate the HourAngle to microSteps ratio
// UPDATE THIS PART according to your SET-UP
// ---------------------------------------------
// NB: RA and DEC uses the same gear ratio (144 tooth in my case)!
//----------------------------------------------
int WORM = 144;
int REDUCTOR = 4;  // 1:4 gear reduction
int DRIVE_STP = 200;   // Stepper drive have 200 steps per revolution
int MICROSteps = 16;   // I'll use 1/16 microsteps mode to drive sidereal - also determines the LOWEST speed.
Code snippet #3C/C++
if (SLEW_RA_microsteps > RA_microSteps){
     digitalWrite(RA_DIR,STP_BACK);
     digitalWrite(RA_STP,HIGH);
     digitalWrite(RA_STP,LOW);
     RA_microSteps += RA_mode_steps;
}else{
     digitalWrite(RA_DIR,STP_FWD);
     digitalWrite(RA_STP,HIGH);
     digitalWrite(RA_STP,LOW);
     RA_microSteps -= RA_mode_steps;
} 
Github
https://github.com/dEskoG/rDUINOScope

Project logs

V2.1. Boiana now available
Project log #1
about 2 months ago - 0 comments

Current released version : V2.1 Boiana EQ. Available for download at http://rduinoscope.co.nf/index.html

In development is a version for Alt_Az mounts which will be available soon as V2.1 Boiana Alt_Az

Comments

Similar projects you might like

NeoPixel Thermometer!

Project tutorial by fmattiussi

  • 7 views
  • 1 comment
  • 1 respect

Arduino - Have Fun with Color Sensor

Project tutorial by khanhhs

  • 865 views
  • 0 comments
  • 12 respects

Arduino - Web-Based Thermometer

Project tutorial by khanhhs

  • 934 views
  • 0 comments
  • 13 respects

Using Python and Arduino MKR1000 for Secure IoT

Project tutorial by Luigi Francesco Cerfeda

  • 2,900 views
  • 1 comment
  • 15 respects

Tech-Tris

Project tutorial by Simone Adobs

  • 78 views
  • 0 comments
  • 2 respects

Play Music With Your Remote

Project tutorial by Simone Adobs

  • 790 views
  • 12 comments
  • 7 respects
Add projectSign up / Login