-
1Step 1
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.
-
2Step 2
STEP 2 Materials
Now, as we know how basically the program works, you need to plan your procurement and obtain needed materials.
When this project started the HW was created using pre-assembled componets like GPA board, RTClock, DHT sensor and Populou DRV8825. This is an open source however and as it started to grew in popularity some people created a better HW architecture with their own custom boards and elements. You now can have 2 approaches:
- Buy pre-assembled boards (as I did), or...
- Create your own custom board as Otto Winter did in his project. The project is Open and you can either download files and create it yourself or purchase one pre-assembled unit from Otto: https://hackaday.io/project/21397-rduinoscope-control-v13
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 tit 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
-
3Step 3
TEP 3 Assemble
For more detailed instructions, please visit the Project Website : http://rduinoscope.co.nf/rDUINO_step3.htmlNow 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 (VCC: +3.3V) GPS NEO 6M - RX 16 GPS NEO 6M - TX 17 RTC (VCC: +3.3V) RTC DS3231 - SDA A4 RTC DS3231 - SCL A5 Bluetooth (VCC: +3.3V) BT HC-05 - TXD 14 BT HC-05 - RXD 15 DHT (VCC: +3.3V) DHT22 - out 3 Speaker Piezo Speaker 2 PS2 (VCC: +3.3V) PS2 joystick - VRx A1 PS2 joystick - VRy A0 Declination DRV8825 DEC DRV8825 - STEP 6 DEC DRV8825 - DIR 7 DEC DRV8825 - FAULT +3.3 V DEC DRV8825 - M0 10 DEC DRV8825 - M1 9 DEC DRV8825 - M2 8 DEC DRV8825 - ENABLE DEC DRV8825 - RESET DEC DRV8825 - SLEEP Right Ascention DRV8825 RA DRV8825 - STEP 4 RA DRV8825 - DIR 5 RA DRV8825 - FAULT +3.3 V RA DRV8825 - M0 11 RA DRV8825 - M1 13 RA DRV8825 - M2 12 RA DRV8825 - ENABLE RA DRV8825 - RESET RA DRV8825 - SLEEP TFT Screen use with TFT Shield pins (22-53) + SPI Day/Night (VCC: +3.3V) 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 bord so that components put on the box itsels 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 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 to 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:
-
4Step 4
STEP 4 Box it together
Once the shield board is ready, take the box and start to laid 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 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 like for example: 12V power supply connector, RA and DEC motors connectors.
Prepare your Hot Glue gun and begin hot glue 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 as charm and allowed me to complete the box!
-
5Step 5
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!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Eine sehr schöne Arbeit bin begeistert.
Grüße bodo
Are you sure? yes | no
Vielen Dank für das Kompliment Bodo :)
Grüße Desso
Are you sure? yes | no