Take Control of Your Telescope With rDUINOScope – The Best Telescope Automation System Using Arduino!
Introducing rDUINOScope: Arduino-Controlled Telescope Project
The world of astronomy has just become a lot more accessible through rDUINOScope, an Arduino-driven telescope project. The small and inexpensive kit allows users to control a regular telescope from the comfort of a PC, Mac, and even an Android device. With it, you can track stars, planets, galaxies, comets, and more, taking your stargazing hobby to the next level!
At the heart of rDUINOScope is an Arduino programming board which uses G-code to translate user commands into movements for the telescope’s two axes. This easy-to-use code can be entered into the Arduino IDE, allowing anyone with just a little programming experience to customise their telescope operation. The software behind rDUINOScope can also be used with other robotic projects, such as 3D printing and CNC machine tools.
rDUINOScope supports both manual and automatic mode, giving hobbyists the freedom to take control or leave it to the computer. The system can also generate star maps, track celestial objects, and provide all sorts of information about the night sky. By connecting the kit to a laptop, users can access a number of online databases, providing them with a comprehensive library of astronomical knowledge.
Whether you’re just starting out in astronomy or are looking to take your hobby to the next level, there’s something for everyone with rDUINOScope. With it, you can explore the wonders of our universe like never before!
Here's an example source code for the rDUINOScope project:
#include <AccelStepper.h>
#include <SoftwareSerial.h>
#include <Servo.h>
#define STEPPER_X_STEP_PIN 2
#define STEPPER_X_DIR_PIN 3
#define STEPPER_X_ENABLE_PIN 4
#define STEPPER_Y_STEP_PIN 5
#define STEPPER_Y_DIR_PIN 6
#define STEPPER_Y_ENABLE_PIN 7
#define STEPPER_MICROSTEP 16
#define SERVO_PIN 8
#define RA 0
#define DEC 1
AccelStepper stepperX(AccelStepper::DRIVER, STEPPER_X_STEP_PIN, STEPPER_X_DIR_PIN);
AccelStepper stepperY(AccelStepper::DRIVER, STEPPER_Y_STEP_PIN, STEPPER_Y_DIR_PIN);
Servo servo;
SoftwareSerial bluetooth(9, 10); // RX, TX
void setup() {
stepperX.setPinsInverted(false, false, true);
stepperY.setPinsInverted(false, false, true);
stepperX.setMaxSpeed(2000);
stepperX.setAcceleration(200);
stepperY.setMaxSpeed(2000);
stepperY.setAcceleration(200);
servo.attach(SERVO_PIN);
bluetooth.begin(9600);
}
void loop() {
if (bluetooth.available()) {
String command = bluetooth.readStringUntil('\n');
if (command.startsWith("G")) {
int gidx = command.indexOf("G");
int coords[2] = {0, 0};
parseCoords(command.substring(gidx + 1), coords);
moveTo(coords);
} else if (command.startsWith("S")) {
int sidx = command.indexOf("S");
int speed = command.substring(sidx + 1).toInt();
stepperX.setMaxSpeed(speed);
stepperY.setMaxSpeed(speed);
} else if (command.startsWith("H")) {
int hidx = command.indexOf("H");
int angle = command.substring(hidx + 1).toInt();
servo.write(angle);
}
}
}
void parseCoords(String coordsStr, int* coords) {
int idx = coordsStr.indexOf(",");
coords[0] = coordsStr.substring(0, idx).toInt();
coords[1] = coordsStr.substring(idx + 1).toInt();
}
void moveTo(int* coords) {
int targetX = coords[RA] * STEPPER_MICROSTEP;
int targetY = coords[DEC] * STEPPER_MICROSTEP;
stepperX.moveTo(targetX);
stepperY.moveTo(targetY);
while (stepperX.isRunning() || stepperY.isRunning()) {
stepperX.run();
stepperY.run();
delay(10);
}
}
This code uses the AccelStepper library to control two stepper motors and the Servo library to control a servo motor for the telescope mount. It also uses the SoftwareSerial library to communicate with a Bluetooth module for remote control.
In the setup() function, we initialize the stepper motors, servo motor, and Bluetooth communication. We set the maximum speed and acceleration of the stepper motors and attach the servo to its pin.
In the loop() function, we check if there is any command available from the Bluetooth module. If the command starts with "G", we parse the coordinates of the target position and move the motors accordingly using the moveTo() function. If the command starts with "S", we set the maximum speed of the stepper motors. If the command starts with "H", we set the angle of the servo motor.
The parseCoords() function parses a string of coordinates in the