Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
**V1.13.18 - Updates**
- Final changes for OAE

**V1.13.17 - Updates**
- Store AZ/ALT steps per degree and allow them to be set from Meade

**V1.13.15 - Updates**
- Changes necessary for OAE, add OAE board
- Check `INFO_DISPLAY_TYPE` builds in CI
- Fix `INFO_DISPLAY_TYPE_I2C_SSD1306_128x64` for esp32 builds

Expand Down
2 changes: 2 additions & 0 deletions Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
#include "boards/RAMPS/pins_RAMPS.hpp"
#elif (BOARD == BOARD_ESP32_ESP32DEV)
#include "boards/ESP32_ESP32DEV/pins_ESP32DEV.hpp"
#elif (BOARD == BOARD_OAE_V1)
#include "boards/ESP32_ESP32DEV/pins_OAE_V1.hpp"
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V1)
#include "boards/AVR_MKS_GEN_L_V1/pins_MKS_GEN_L_V1.h"
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V2)
Expand Down
17 changes: 11 additions & 6 deletions ConfigurationValidation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
#error AZ driver address for DRIVER_TYPE_TMC2209_UART not specified.
#endif
#endif
#elif defined(BOARD_OAE_V1)
// Valid

#else
#error Configuration does not support AZ. Use at own risk.
Expand All @@ -110,6 +112,9 @@
#endif
#endif

#elif defined(BOARD_OAE_V1)
// Valid

#else
#warning Configuration does not support ALT. Use at own risk.
#endif
Expand Down Expand Up @@ -193,7 +198,7 @@
#warning Missing pin assignments for MS pins
#endif
#elif (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN) || !defined(DEC_DIAG_PIN)
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured DEC DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -213,7 +218,7 @@
#warning Missing pin assignments for MS pins
#endif
#elif (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN) || !defined(RA_DIAG_PIN)
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured RA DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -225,12 +230,12 @@

#if (AZ_STEPPER_TYPE != STEPPER_TYPE_NONE)
#if (AZ_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
#endif
#elif (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
#error Missing pin assignments for configured AZ DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -243,12 +248,12 @@

#if (ALT_STEPPER_TYPE != STEPPER_TYPE_NONE)
#if (ALT_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
#endif
#elif (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
#error Missing pin assignments for configured ALT DRIVER_TYPE_TMC2209_UART driver
#endif
Expand Down
82 changes: 47 additions & 35 deletions Configuration_adv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@
#endif

#ifndef DEC_LIMIT_UP
#ifdef OAM
#if defined(OAM) || defined(OAE)
#define DEC_LIMIT_UP 135.0f
#else
#define DEC_LIMIT_UP 0.0f
#endif
#endif
#ifndef DEC_LIMIT_DOWN
#ifdef OAM
#if defined(OAM) || defined(OAE)
#define DEC_LIMIT_DOWN 135.0f
#else
#define DEC_LIMIT_DOWN 0.0f
Expand Down Expand Up @@ -332,16 +332,34 @@
#define AZ_STEPPER_ACCELERATION (100 * AZ_MICROSTEPPING)
#endif

// the Circumference of the AZ rotation. 808mm dia.
// the Circumference of the AZ rotation. 808mm dia (OAT)
#ifndef AZ_CIRCUMFERENCE
#define AZ_CIRCUMFERENCE 2538.4f
#ifdef OAE
// Roughly from the joint to the rod placement is 70mm
#define AZ_CIRCUMFERENCE 56.0f * 2 * PI
#ifndef AZ_ROD_PITCH
#define AZ_ROD_PITCH 0.5
#endif
#define AZIMUTH_STEPS_PER_REV \
+(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / AZ_ROD_PITCH) * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Actually u-steps/rev
#else
#define AZ_CIRCUMFERENCE 2538.4f
#endif
#endif

#ifndef OAE
#define AZ_WORMGEAR_RATIO 1.0f
#endif

#ifndef AZIMUTH_STEPS_PER_REV
#define AZIMUTH_STEPS_PER_REV \
(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / (AZ_PULLEY_TEETH * GT2_BELT_PITCH)) * AZ_STEPPER_SPR \
* AZ_MICROSTEPPING) // Actually u-steps/rev
#endif
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps

#ifndef AZIMUTH_STEPS_PER_ARC_MINUTE
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps
#endif

// AZ TMC2209 UART settings
// These settings work only with TMC2209 in UART connection (single wire to TX)
Expand Down Expand Up @@ -373,7 +391,7 @@
#define ALT_MICROSTEPPING 4
#endif
#ifndef ALT_STEPPER_SPR
#define ALT_STEPPER_SPR 400 // NEMA 0.9° = 400 | NEMA 1.8° = 200
#define ALT_STEPPER_SPR (400.0) // NEMA 0.9° = 400 | NEMA 1.8° = 200
#endif
#ifndef ALT_STEPPER_SPEED
#define ALT_STEPPER_SPEED 2000
Expand All @@ -398,19 +416,30 @@
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR * ALT_MICROSTEPPING) // Actually u-steps/rev

#else
// the Circumference of the AZ rotation. 770mm dia.
#define ALT_CIRCUMFERENCE 2419.0f
#if AUTOPA_VERSION == 1
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
#else
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
#define ALT_WORMGEAR_RATIO (40.0f)
#endif
#ifndef ALTITUDE_STEPS_PER_REV
#ifdef OAE
#ifndef ALT_ROD_PITCH
#define ALT_ROD_PITCH 1.25 // mm/rev
#endif
// the Circumference of the ALT rotation. Roughly 146mm radius.
#define ALT_CIRCUMFERENCE 130.0f * 2 * PI
#define ALTITUDE_STEPS_PER_REV \
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR * ALT_MICROSTEPPING \
* ALT_WORMGEAR_RATIO) // Actually u-steps/rev
+(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR \
* ALT_MICROSTEPPING) // Actually u-steps/rev
#else
// the Circumference of the AZ rotation. 770mm dia.
#define ALT_CIRCUMFERENCE 2419.0f
#if AUTOPA_VERSION == 1
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
#else
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
#define ALT_WORMGEAR_RATIO (40.0f)
#endif
#ifndef ALTITUDE_STEPS_PER_REV
#define ALTITUDE_STEPS_PER_REV \
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR \
* ALT_MICROSTEPPING * ALT_WORMGEAR_RATIO) // Actually u-steps/rev
#endif
#endif
#endif

Expand Down Expand Up @@ -620,23 +649,6 @@
// ////////
////////////////////////////////////////////

// Stepper drivers
#if (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
#define RA_SERIAL_PORT Serial2 // Can be shared with DEC_SERIAL_PORT
#elif defined(__AVR_ATmega2560__)
// Uses SoftwareSerial
#endif
#endif

#if (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
#define DEC_SERIAL_PORT Serial2 // Can be shared with RA_SERIAL_PORT
#elif defined(__AVR_ATmega2560__)
// Uses SoftwareSerial
#endif
#endif

// Focuser
#if (FOCUS_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
Expand Down
1 change: 1 addition & 0 deletions Constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

// ESP32 based boards
#define BOARD_ESP32_ESP32DEV 1001
#define BOARD_OAE_V1 1002

/**
* Supported keypad/display types. Use one of these values for DISPLAY_TYPE configuration matching your used display and keypad.
Expand Down
2 changes: 1 addition & 1 deletion Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// Also, numbers are interpreted as simple numbers. _ __ _
// So 1.8 is actually 1.08, meaning that 1.12 is a later version than 1.8. \_(..)_/

#define VERSION "V1.13.15"
#define VERSION "V1.13.18"
134 changes: 134 additions & 0 deletions boards/ESP32_ESP32DEV/pins_OAE_V1.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/**
* @brief a pins configuration file for an OAE board v1.0
*/

#pragma once

/**
* @brief a pins configuration file for an ESP32-based OAT.
*/

#pragma once

// DRIVER_TYPE_TMC2209_UART requires 4 digital pins in Arduino pin numbering
#ifndef RA_STEP_PIN
#define RA_STEP_PIN 14 // STEP
#endif
#ifndef RA_DIR_PIN
#define RA_DIR_PIN 26 // DIR
#endif
#ifndef RA_EN_PIN
#define RA_EN_PIN 27 // Enable
#endif

// DRIVER_TYPE_TMC2209_UART HardwareSerial port, can be shared across all drivers
#ifndef RA_SERIAL_PORT
#define RA_SERIAL_PORT Serial1
#endif
#ifndef RA_TX_PIN
#define RA_TX_PIN 17
#endif
#ifndef RA_RX_PIN
#define RA_RX_PIN 16
#endif
#ifndef RA_DRIVER_ADDRESS
#define RA_DRIVER_ADDRESS 0b00 // Set by MS1/MS2. LOW/LOW in this case
#endif
// DRIVER_TYPE_TMC2209_UART requires 4 digital pins in Arduino pin numbering
#ifndef DEC_STEP_PIN
#define DEC_STEP_PIN 25 // STEP
#endif
#ifndef DEC_DIR_PIN
#define DEC_DIR_PIN 5 // DIR
#endif
#ifndef DEC_EN_PIN
#define DEC_EN_PIN 33 // Enable
#endif

// DRIVER_TYPE_TMC2209_UART HardwareSerial port, can be shared across all drivers
#ifndef DEC_SERIAL_PORT
#define DEC_SERIAL_PORT Serial1 // SoftwareSerial TX port
#endif
#ifndef DEC_TX_PIN
#define DEC_TX_PIN 17
#endif
#ifndef DEC_RX_PIN
#define DEC_RX_PIN 16
#endif
#ifndef DEC_DRIVER_ADDRESS
#define DEC_DRIVER_ADDRESS 0b01 // Set by MS1/MS2 (MS1 HIGH, MS2 LOW)
#endif

#define SW_SERIAL_UART 0

#ifndef ALT_STEP_PIN
#define ALT_STEP_PIN 13 // STEP
#endif
#ifndef ALT_DIR_PIN
#define ALT_DIR_PIN 23 // DIR
#endif
#ifndef ALT_EN_PIN
#define ALT_EN_PIN 4 // Enable
#endif

#ifndef AZ_STEP_PIN
#define AZ_STEP_PIN 18 // STEP
#endif
#ifndef AZ_DIR_PIN
#define AZ_DIR_PIN 19 // DIR
#endif
#ifndef AZ_EN_PIN
#define AZ_EN_PIN 32 // Enable
#endif

// DISPLAY_TYPE_LCD_JOY_I2C_SSD1306 requires 3 analog inputs in Arduino pin numbering
#ifndef LCD_KEY_SENSE_X_PIN
//#define LCD_KEY_SENSE_X_PIN 34
#endif
#ifndef LCD_KEY_SENSE_Y_PIN
//#define LCD_KEY_SENSE_Y_PIN 39
#endif
#ifndef LCD_KEY_SENSE_PUSH_PIN
//#define LCD_KEY_SENSE_PUSH_PIN 36
#endif

//Serial port for external debugging
#if DEBUG_SEPARATE_SERIAL == 1
#ifndef DEBUG_SERIAL_PORT
#error "There is no default separate serial port for ESP32, please define DEBUG_SERIAL_PORT"
#endif
#else
#ifndef DEBUG_SERIAL_PORT
#define DEBUG_SERIAL_PORT Serial2
#endif
#endif

// Defines for OAE ///////////////////////

#ifndef RA_WHEEL_CIRCUMFERENCE
#define RA_WHEEL_CIRCUMFERENCE 704.97f
#endif
#ifndef DEC_TRANSMISSION
#define DEC_TRANSMISSION (DEC_WHEEL_CIRCUMFERENCE / (DEC_PULLEY_TEETH * 1.0))
#endif
#ifndef RA_LIMIT_LEFT
#define RA_LIMIT_LEFT 5.0f
#endif
#ifndef RA_LIMIT_RIGHT
#define RA_LIMIT_RIGHT 7.0f
#endif
#ifndef RA_TRACKING_LIMIT
#define RA_TRACKING_LIMIT 6.75f
#endif
#ifndef DEC_WHEEL_CIRCUMFERENCE
#define DEC_WHEEL_CIRCUMFERENCE 1.0f
#endif
#ifndef RA_STEPPER_SPR
#define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper
#endif
#ifndef DEC_STEPPER_SPR
#define DEC_STEPPER_SPR (200 * 50 * 4.5f) // change to (200 * 9) for 1.8° stepper
#endif
#ifndef DEC_PULLEY_TEETH
#define DEC_PULLEY_TEETH 1
#endif
Loading
Loading