Arduino Star Finder For Telescopes
Arduino Star Finder For Telescopes
by Daniel Hingston
rst Instructable, so please go easy on me! view the Sun through the telescope at any time.
Doing so will cause permanent eye damage.
** Ca ut io n **: when building and testing your
telescope star- nder, please take immense care to not
sidereal time gets earlier or later depending on to the inclination of the telescope, and azimuth is
position relative to the Greenwich meridian. analogous to the heading.
Achie v ing Accura cy This was the challenging bit, and required weeks of experimentation. Luckily I've done this
so that you don't have to! There are four main quaniti able sources of error in this system, and they must be
managed to ensure that the telescope will manage to nd what we want. Firstly, let's calculate the Field of View
(FOV) of our telescope.
So what this means is that when using the 'Super 25' eyepiece lens, you will see an area of the sky 1.923 degrees
across. Therefore we need to make sure that the device is accurate enough to always locate an object within this
angle. So to make sure that the device would work, I tried to quantify each source of error, and do some statistics to
predict the performance of the system. You don't need to do this step unless you're also interested.
The location of trig points, or triangulation stations, are precisely listed by the Ordnance Survey, the UK’s mapping
agency. I took the GPS unit to six of these locations, and test results were taken, so that the device’s gures could be
compared to the known OS coordinates. Repeating this test a few times gave me enough results to provide a mean
gure of GPS accuracy, which was 11.6m. Using a formula called the Haversine Formula, again from Practical
Astronomy with your Calculator, I could nd that this should a ect the overall telescope alignment by an almost
non-existent 0.000581 degrees. Clearly this was not going to be the issue!
2. Po t e nt io m e t e rs
In this project, we're using potentiometers to measure the angle and heading of the telescope. This is potentially a
large source of error, rstly from the potentiometers themselves (including quality of the pots, plus the quality of
their installation into the telescope mount), plus how we read this data with the Arduino. An a ordable
magnetometer and gyroscope unit (the 1120 3-Axis Accelerometer and Magnetometer from Adafruit) was tested,
but was found to have an accuracy of greater than 1°, insu cient for this purpose. Optical encoders do not have a
su ciently high resolution if used in a 1:1 ratio with the movement of the telescope, and would therefore require a
gear system to raise the number of counts per degree of movement, hence why potentiometers with a linear
resistance output were chosen.
So what will be their resolution? To work this out we need to look at how the Arduino measures the analogue signal
from the potentiometers. The ATmega2560chip of the Arduino has a 10-bit analogue to digital converter (ADC),
which means that the voltage reading from the potentiometer is mapped onto a set of discrete values from 0 to
1023. The number of integer values within this range is what determines the maximum resolution of the
potentiometer reading.
The potentiometer selected for measuring the rotation of the telescope, a 6187R 1 K Single Turn Precision
Potentiometer from TT Electronics has an electrical travel over 340°. To nd the angular resolution we divide 340°
by the 1024 intervals, using equation 6, and see that the angular resolution is 0.332°. This is equivalent to 17.2% of
the width of the eld of view using the 25 mm eyepiece lens. To improve the resolution of the potentiometer
readings, an external 12-bit ADC, the ADS1015 4-channel ADC from Adafruit was selected. This small module
performs the analogue to digital conversion, and supplies the Arduino with the digital readout. The new range of
output discrete values is between 0 and 1660. This seemed to be the best compromise between the Arduino's 10-bit
ADC and the Adafruit 14-bit ADC that is also available. The elevation of the telescope will have a greater resolution,
as the telescope is being rotated over a smaller arc than it is in being rotated in heading. This results in an error of
0.10 degrees in heading, and 0.077 degrees in pitch, so not a big deal either.
3. Accura cy o f Ra /De c Da t a
For each of the 45 objects in the database (16 clusters, 20 nebulae and 9 galaxies), the gures for the J2000 right
ascension and declination coordinates were taken from the HyperLeda database. This source quotes the accuracy of
the coordinates is 10 arcseconds (0.00277°). The reason for this inaccuracy is likely because of the di culty of
determining the centre of these astronomical objects in order to de ne their position, as many of them are rather
amorphous in shape. Object 19 in the database for instance, the Crescent Nebula, has an apparent width of 0.33°
and an apparent height of 0.17°. As it has an irregular shape, it is not possible to accurately determine the true
centre of the object, hence a partial explanation for the inaccuracy in the Ra/Dec data.
4 . Pro g ra m Erro r
By far the greatest source of error was generated by the Arduino and its program. I'm sure a better programmer
Arduino Star-Finder for Telescopes: Page 6
could reduce this signi cantly, but I'm a relative amateur, and found managing the large numbers, decimals and all
the associated arithmetic quite challenging. To assess the magnitude of this, the Arduino results were compared to
position results calculated in Microsoft Excel, and it was found that the mean error was 0.72 degrees.
S UM M ARY: O v e ra ll Erro r
In Excel, each of the four identi ed sources of error was independently randomised, then combined to produce this
graph (heading image of this step). That image shows 5000 randomised results and their distribution within the
FOV of the telescope. Results within that black circle would be visible to the observer. The analysis was performed
so that the errors may partially cancel each other out, as would be the case in reality. 81.94% of these theoretical
points fall within the eld of view. Whilst not perfect, this seemed good enough in my mind to continue with the
practical details of the project.
Step 3: Ingredients
Here's the list of components I used for this project (note that the above image only pictures a few of them, that's
just a shot of my GPS test setup). With the exception of the major components, I haven't speci ed a particular
product or supplier. This is because that might not be helpful to people who like in a di erent country to me, and
also because for many of these components (switches etc.) it doesn't hugely matter what you use.
You'll also need jumper leads of di erent lengths and types, multicore wire, solder, insulation tape, lament for
your 3D printer, and a computer with the Arduino IDE software installed to allow you to program the Arduino.
T he Print e r
Download
https://www.instructables.com/ORIG/FIO/IGBR/JG754UNF/FIOIGBRJG754UNF.stp
…
Download
https://www.instructables.com/ORIG/FR3/2AUO/JG754UNJ/FR32AUOJG754UNJ.stp
…
Download
https://www.instructables.com/ORIG/F46/SRQN/JG754UNR/F46SRQNJG754UNR.stp
…
Download
https://www.instructables.com/ORIG/FKO/QXZS/JG754UNS/FKOQXZSJG754UNS.stp
…
Download
https://www.instructables.com/ORIG/FS8/WQ2O/JG754UNZ/FS8WQ2OJG754UNZ.stp
…
Download
https://www.instructables.com/ORIG/F47/244F/JG754UOI/F47244FJG754UOI.stp
…
Download
https://www.instructables.com/ORIG/FGI/7AK9/JG754UON/FGI7AK9JG754UON.stp
…
Download
https://www.instructables.com/ORIG/FBL/90EJ/JG754UOP/FBL90EJJG754UOP.stp
…
Download
https://www.instructables.com/ORIG/FVQ/5ERP/JG754UOQ/FVQ5ERPJG754UOQ.stp
…
It's worth doing a better job than me at this! There's a not included speci cs of the wiring for any of the
lot of wiring inside the control box, and can get units as there is nothing unusual, and for all of the
di cult to work with unless you're neat. The above components I have used such as the ADC and the LCD
diagram should answer any questions you have about screen, there are a multitude of good wiring
the internal layout of the control box, as well as the instructions online, many of them on Instructables.
previously shown block diagram of the system. I have
Here's the Arduino program needed for the telescope. obeying the same format. The program is lightly
Upload this to the Arduino MEGA, making sure that annotated for clarity. Do n' t f o rg e t , you need to
your connections match the pin attachments made in install the ve libraries called for at the start of the
the program. If you want to increase the number of program in order for this to work!
astronomical objects in the object database, increase
the number of objects 'n' and add your entries below,
Download
https://www.instructables.com/ORIG/F08/FBF0/JGCJCOQQ/F08FBF0JGCJCOQQ.ino
…
If everything has gone to plan, the Arduino star- nder should now be ready to use!
Ho w t o o pe ra t e t he de v ice :
There are some things I'd like to do di erently if I had the chance to do this project again. Maybe you'll adopt some
of these ideas when you do your version of this project?
The above picture of the moon was taken using my phone camera through this 130mm Dobsonian telescope, whereas the
picture of Whirlpool Galaxy M51a was taken by me using the 6" Bradford Robotic Telescope.
Excellent. I did something a bit similar (a satellite pointer) years ago and i used that same book. My
head still hurts when i think abut the math.
Congratulations on the job, I think it's spectacular. I am working on it and a wiring scheme would be very helpful, if possible I would be very grateful
Greetings from Spain
Hi there. Very sorry I didn't reply sooner, I have not been active on Instructables for a while, and
have just come back to the site now. I'm sorry I don't have a full wiring scheme, perhaps see
DurkV's comment below with a detailed (modified) schematic? Thank you
Very very nice project. Please, what are these constants in azalt() method means ? 6,47777 for
altpotgood and 4,88529 for azpotgood. I used MPU-6050 accelerator/gyroscope.
Thanks.
Hi Hocki. Apologies for not replying sooner, I haven't been active on Instructables for a while. I
think that those values are to scale to potentiometer readings to degrees of altitude, i.e. the
However, if you're going to pay a bit anyway, or just want the best accuracy with absolute position
information, look for rotary encoders with Gray Code. They're expensive, but you'll know exactly
where in the rotation you are at all times. The linear ones give amazing precision - they use an
optical reader like a computer mouse and a strip of plastic with the gray code micro-printed on it.
As for your math and program accuracy, it appears you did a fine job. You have to remember to
take into account the actual arc resolution of the telescope and total field of view. For a relatively
small focal length and aperture like this, the Arduino's accuracy is fine. There are math libraries
that could extend the resolution a bit, but they take up a lot of space the stock Arduino might not
have available. If you do wish to step it up a bit, the new Raspberry Pi 3 or 4 could be a fine
compute engine with full Linux C++ math libraries and all sorts of support. If you want to save a
few dollars, the Teensy 3.x line is extremely powerful for the price, programmable with the Arduino
IDE, and a lot of memory for those larger programs and libraries.
The deal with encoders is, they give incremental changes in position, not absolute position from a
known position. So this brings the necessity of a homing method, each time the unit is powered up.
Thus adding complication to the mechanics of the design and to the the operation of the device. At
each power up move each axis of the the scope mount to a "zero" position, then make calculation
for desired position for the object selected.
So I think the potentiometer is a good choice in this application. But pots have a temperature
dependence. Luckily these are usually given in the performance data sheet. So as an upgrade to
this device one could also add a temp sensor and have the software compensate for the
temperature effect on the pot.
When implementing any A/D converter it is imperative to include power supply errors when
evaluating performance accuracy
I, too, would appreciate a wiring diagram/schematic. Great project. Right up my line of interest right
now.
Thanks
Hi, I like your project, BUT!!!
Where is the circuit diagram, NOT A FRITZY generated one.
What are your potentiometer values and where did you purchase them?
What are you using to power the project?
Thanks Tom
wooooow just wooooow. Are you a scientist who works for NASA.
Great job! I see lots of care taken when creating this Instructable!
Would it be possible to add on an input for coordinates for closer, and faster moving objects? I'd
like to visually track the International Space Station, and other items in the night sky.
Thank you ToolboxGuy. That's a good suggestion, but I'll tell you why I didn't add it. The
mathematics for calculating the position for all 'deep-sky' objects is the same, so for galaxies,
nebulae, star clusters etcetera you can use the same process. The planets and the moon all have
different, and actually quite complex patterns of movement which would need to be calculated
differently. If you're interested, the book I recommend, 'Practical Astronomy with your Calculator'
has a lot more info on this in case you'd like to add this functionality.
I was considering a low tech approach for now - just look up the current info online, and punch in
the numbers - that kind of "input." Later, create a REST API call to fetch the coordinates from
somewhere else, confirm it's in my view of the sky at this time, and if so, take aim. If not, error
message with "not in view at this time."
I'd love to be able to just say "what's in my field of view right now, and where is it?" but Alexa and
Google aren't nearly that sophisticated yet.
The space station moves fast enough that I don't think this would be a practical way to track it.
Years ago I built a satellite tracker that used two servos to point at satellites based on their norad
coordinates. If you google arduino satellite tracker you may find other examples. Also, if you have
a smartphone there are various night sky programs to tell you where to look. Because the satellites
are bright and moving, once you know where to look you can track them pretty easily by eye.
Sounds like a fun project, I assume as that was years ago it's not on Instructables? Funnily enough
when testing my telescope for this project I was having fun by trying to track airliners as they
passed above my house, but as like they move quickly like the ISS it was really tricky (there was
no risk of accidentally observing the Sun as I positioned the house between me and it btw).
Thanks Gadisha, I'm a big fan of the old 70s Hitchhiker's Guide to the Galaxy TV series.
Nice project. I don’t know whether I’ll build one but I definitely will go through the sketch in detail.
I used the 12 bit version of these encoders in a different project
http://www.madscientisthut.com/Shopping/agora.cgi?
cart_id=2909535.207305&p_id=ASRE10BIT&xm=on
so 4096 ticks per rev. They were also fairly easy to interface to an Arduino. I used code available
from website as a starting point.
Hi there, thanks for your kind comment. That looks like a useful piece of kit, there have been a few
other users suggesting that encoders may prove to be more useful in this application than
potentiometers, and I'd be interested to experiment more with this.
I don't really have words to compliment you enough! This is one of the most incredible projects I
have ever seen - and I'm not just saying that! You can't hear my tone of voice, but I am in complete
awe. This is a very well done Instructable and a great project! Thank you for taking the time to
share all this information!
Cheers dude, my pleasure.
Great project! You may be able to improve the Arduino calculation accuracy simply by using an
STM32-based 32-bit processor, like in the "Blue Pill", without even changing your code. These
high speed (72 mHz vs. 16 mHz for Arduino) processors/boards can be programmed by the
Arduino IDE, and can be purchased from China for as little as $1.85.
Thank you, thanks for your comment, that's an interesting suggestion. Being able to reduce the
calculation error would be a very useful thing, I'll definitely order one of those and at some point run
some bench tests to confirm what difference in output values may be seen. Cheers!
Love your project. I've been meaning to add Taki's algorithm to my own digital setting circles
projects and allow it to be used without an iPad/SkySafari. I'll definitely have to take a look at your
code and see if it can be integrated into mine.
That said, you would be much better off using optical encoders + quadrature encoding. Would be
significantly higher resolution. I currently use 10K count encoders from US Digital which equate to
40,000 ticks per revolution or 0.009deg accuracy. Note that your mount has to be perfectly
square/perpendicular and can't have any other defects to see the full resolution, but either way, it's
orders of magnitude better then analog pots.
You can find cheaper/lower resolution encoders to keep the cost down, but for about $30/ea you
can get 2500 count encoders which end up being 0.036deg.
Hi there, thanks for your comment. Several other users too have commented about these
encoders, so it seems like I missed a trick here, but good to know. I'll definitely look up those
particular units as that's a very useful piece of kit. The other issue of the potentiometers is that they
produce minorly fluctuating output values, only to a minor degree, but not ideal. Thanks
Great tutorial dude!! Really well explained and very easy to make! Voted ! Good luck!
Amazing project!
Cool beans