Introduction: Remote Controlled Telescope - Arduino

Picture of Remote Controlled Telescope - Arduino

This is an improvement of my previous project Telescope motorization (focus + orientation).

At the end of this project, I mentioned that you could build a remote control for the telescope, instead of pressing buttons on a breadboard wired to the telescope and the Arduino.

In this Instructable, I will only describe the changes to the code and to the circuit of the previous project.

Basically, when you press the right arrow button, the lens tube will move out, and it will move back if you press the left button. This will focus.
The polar axis rotation is always on.

Let's learn !

Step 1: Hardware Needed

Picture of Hardware Needed

For this Instructable, you will need all the stuff from the other one, except the push-buttons and resistors that are replaced by an IR receiver (I unsoldered mine from an old DVD reader).

Of course, you will also need a remote control (I use my TV's one).

Step 2: The Circuit

Picture of The Circuit

In the previous Instructable, there was a stepper and two push-buttons connected to the Arduino.

In this one, the buttons are replaced by an IR (infrared) receiver.

Here is a Fritzing sketch of the circuit.

(Note that there are actually 2 motors...)

Step 3: Code

Here is the code of the Arduino.

#include <IRremote.h>
#include <Stepper.h>

int pin = 3; IRrecv receiver(pin); decode_results decode_ir;

const int stepsPerRevolution = 30; Stepper myStepper(stepsPerRevolution, 4,5,6,7); Stepper stepper1(stepsPerRevolution, 8,9,10,11);

void setup() { Serial.begin(9600); receiver.enableIRIn(); myStepper.setSpeed(100); stepper1.setSpeed(3); }

void loop() { stepper1.step(-1); if(receiver.decode(&decode_ir)){ Serial.println(decode_ir.value, DEC); receiver.resume(); if(decode_ir.value == 3772794553){ myStepper.step(-stepsPerRevolution); } else if(decode_ir.value == 3772819033){ myStepper.step(stepsPerRevolution); } } }

Actually, the values of my remote control are certainly not the same as you.


In order for you to know what they are, just read what displays in the Serial monitor and use it as reference values in the main code.

Comments

ИгорьА1 (author)2016-09-25

Interesting idea. Timelapse is will be great with moving a telescope. If at the same time will receive and compute data of ecliptic.... Interesting to see and save pictures,for instance - the comets.

About This Instructable

640views

15favorites

License:

Bio: Hi! I'm Hugo, 15 yo student from the French Alps. I spend most of my spare time programming, tinkering, building electronic stuff, observing planets ... More »
More by Hugo Trombert:Remote Controlled Telescope - ArduinoBluetooth robot arm + app | Arduino & AndroidTelescope motorization (focus + orientation)
Add instructable to: