Arduino code driving a rotation mechanism for telescope aperture masks. All code in this repository except for the TimerOne library was written by Ed Foley.
- Arduino Uno
- Arduino Motor Shield
- SparkFun Electronics stepper motor ROB-09238
- SunFounder Hall switch TS0215
- Compatible USB cable
- Compatible power supply
- Aperture mask rotation mechanism assembly (see Ed Foley's thesis, A Rotating Aperture Mask for Small Telescopes, published 2019)
Stepper wire | Arduino terminal |
---|---|
A (red) | A+ |
B (yellow) | B+ |
C (green) | A- |
D (blue) | B- |
Hall switch line | Arduino pin |
---|---|
SIG | 5 |
VCC | 4 |
GND | GND |
- Clone this repository.
- Set the Arduino sketchbook location to the new MaskRotator directory.
- Open mask_rotator.ino using the Arduino IDE.
- Connect the power supply to the Arduino Uno.
- Connect the computer to the Arduino Uno with a USB cable.
- Press Ctrl+U to upload the sketch.
Either
- Open the serial monitor with Ctrl+Shift+M and type commands manually (e.g.
rt18000
to spin the mask 180 degrees), or - Execute a custom program that implements the rotator's communication protocol.
See A Rotating Aperture Mask for Small Telescopes for complete information about the communications protocol, or inspect the source of mask_rotator.ino.