How tomiinek/star_tracker works
Main Components
• Arduino Microcontroller (“Star_Tracker.ino”): This is the central firmware controller that coordinates all subsystems.
• Firmware Modules:
• Configuration Module (src/config.h): Stores system configurations like geographical coordinates and motor parameters.
• Core Control Modules (located in src/core): Includes clock (RTC interface via DS3231), motor controller, mount controller, camera controller (Canon support), and utility elements (e.g., queue handling).
• Control Layer Modules (located in src/control): Contains user interface components such as display output, input handling (keypad/IR remote control definitions), and control processing.
• SD Card (SD/catalog.csv): Provides a catalogue of deep-sky objects for automatic pointing.
• External Hardware Components: Stepper motors with drivers (using A4988, with microstepping control), LCD display, IR receiver, potentiometers, RTC module, and optional camera trigger interface.
Relationships and Data Flow
• The Arduino microcontroller (running Star_Tracker.ino) integrates calls to both core (for precise timekeeping, motor control, mount and camera operations) and control modules (for manual input and display output).
• The control module handles user interaction (manual control via IR keypad and LCD display) and sends commands to the core modules.
• The SD card (mounted externally) is used to retrieve the catalogue CSV, which feeds into the automated pointing and tracking logic.
• The RTC (DS3231) communicated via I2C supply accurate time that underpins the tracking and alignments.
• There is also bidirectional data flow between the user-input layer (via key codes from the IR receiver) and the internal configuration which alters the behaviour of motor and camera modules.
• Modules for camera triggering and motor control encapsulate hardware-specific logic, and they must exchange control signals with the main firmware loop in Star_Tracker.ino.
Architectural Patterns and Design Principles
• Modularity: The project is segmented into distinct “core” and “control” components, allowing separation of concerns between hardware control (motors, RTC, camera) and user interface/command handling.
• Hardware Abstraction: The use of dedicated interface headers (e.g., rtc_ds3231.h, canon_eos1000d.h) allows for encapsulating device-specific details, so that alternative hardware implementations can plug in with minimal changes.
• Configurability: The configuration file (src/config.h) plays a key role in customizing both hardware parameters (like motor specifications, coordinate locations, calibration values) and operational behaviours.
• Asynchronous Operations: The README stresses asynchronous control for stepper motors, meaning that concurrent processing considerations might be represented as parallel flows if the implementation supports cooperative multitasking.
Technologies, Frameworks, and Libraries Involved
• Arduino IDE (C++ based firmware) for implementation.
• Standard Arduino libraries – RTCLib, LiquidCrystal, SD, SPI, Wire, EEPROM – which are integrated and used to interface with hardware peripherals.
Final Recommendations
• Try to incorporate any architectural patterns (modularity and hardware abstraction) into your depiction.