Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
Binary file added public/images/cog40t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/cog50t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/cog60t.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/modules/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Home = (props) => {
<div className="intro-link-child">
<h3 className="intro-header">OAT/OAM/OAE Firmware Configuration Generator</h3>
<a className="intro-link" href="steps">START</a>
<p className="version">V3.10</p>
<p className="version">V3.11</p>
</div>
</div>

Expand Down
265 changes: 259 additions & 6 deletions src/modules/configurations/base/commonSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export const createBoardStep = () => ({
{ key: 'M10', value: 'MKS GEN L V1.0', image: '/images/mksv10.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V1' },
{ key: 'M20', value: 'MKS GEN L V2.0', image: '/images/mksv20.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V2' },
{ key: 'M21', value: 'MKS GEN L V2.1', image: '/images/mksv21.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V21' },
{ key: 'OAEV1', value: 'OAE_V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' },
{ key: 'OAEV1', value: 'OAE V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' },
]
},
});

// RA Driver step (OAT/OAM)
// RA Driver step (OAT/OAM/OAE)
export const createRADriverStep = () => ({
id: 'RDO',
title: 'RA Driver',
Expand Down Expand Up @@ -208,7 +208,7 @@ export const createDECStepperStep = () => ({
}],
});

// DEC Driver step (OAT/OAM)
// DEC Driver step (OAT/OAM/OAE)
export const createDECDriverStep = () => ({
id: 'DDT',
title: 'DEC Driver',
Expand Down Expand Up @@ -297,9 +297,9 @@ export const createInfoDisplayStep = () => ({
]
},
postamble: [
{ literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'] },
{ literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'] },
{ literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'] },
{ literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'], condition: "($display == YES)", },
{ literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'], condition: "($display == YES)", },
{ literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'], condition: "($display == YES)", },
{
literal: ['// Note that the E1 port is not usable since I2C requires pin 21!'],
condition: "($board == M10) OR ($board == M20) OR ($board == M21)",
Expand Down Expand Up @@ -519,4 +519,257 @@ export const createHallSensorSteps = () => [
]
},
}
];

// Auto PA steps (OAT/OAM/OAE)
export const createAutoPASteps = () => [
{
id: 'AP',
title: 'Auto Polar Align',
label: 'Do you have the AutoPA add on:',
variable: 'autopa',
preamble: ['////////////////////////////////', '// AutoPA Addon configuration ', '// Define whether we have the AutoPA add on or not. Currently: {v}'],
define: '',
control: {
type: 'radioimg',
choices: [
{ key: 'N', value: 'No AutoPA', image: '/images/none.png', additionalLines: ['// No AutoPA settings'] },
{ key: 'Y', value: 'AutoPA is installed', image: '/images/autopa.png' },
]
},
},
{
id: 'AV',
title: 'AutoPA Version',
label: 'What version of AutoPA do you have installed:',
variable: 'autopaversion',
condition: "($autopa == Y)",
preamble: ['// Using AutoPA {v}.'],
define: '',
control: {
type: 'radioimg',
choices: [
{ key: '1', value: 'V1.0', image: '/images/none.png' },
{ key: '2', value: 'V2.0', image: '/images/none.png', additionalLines: ['#define AUTOPA_VERSION 2'] },
]
},
},
{
id: 'ZS',
title: 'Azimuth Stepper',
label: 'Which stepper motor are you using for the Azimuth:',
variable: 'az',
condition: "($autopa == Y)",
preamble: ['// Using the {v} stepper for AZ'],
define: 'AZ_STEPPER_TYPE',
control: {
type: 'radioimg',
choices: [
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 2048.0f'], condition: "$tracker != OAM" },
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define AZ_STEPPER_SPR 200.0f'] },
]
},
},
{
id: 'ZD',
title: 'Azimuth Driver',
label: 'Which driver board are you using to drive the Azimuth stepper motor:',
variable: 'azdrv',
condition: "($autopa == Y)",
preamble: ['// Using the {v} driver for AZ stepper motor'],
define: 'AZ_DRIVER_TYPE',
control: {
type: 'radioimg',
choices: [
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker != OAM" },
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
]
},
postamble: [{
condition: '$tracker == OAE',
literal: [
'#define AZ_MICROSTEPPING 1',
'#define AZ_STEPPER_SPEED 800',
'#define AZ_STEPPER_ACCELERATION 2000'
]
}]
},
{
id: 'ZA',
title: 'Azimuth Advanced Settings',
label: 'These are some advanced settings you may want to override. The defaults are set already. Please only change them if you are sure what they do and what their valid ranges are. Enter the AZ stepper specs and desired settings:',
variable: 'azpower',
condition: "$azdrv == TU",
preamble: ['// Define AZ stepper motor power settings'],
postamble: [{
literal: [
'#define AZ_STEPPER_SPEED 1000',
'#define AZ_STEPPER_ACCELERATION 500',
'',
'',
'///////////////////////////////',
'// AZ parameters will require tuning according to your setup',
'',
'// If you have a custom solution involving a rod you can uncomment and use the next 3 lines for calculations',
'// #define AZ_CIRCUMFERENCE (115 * 2 * 3.1415927) // the circumference of the circle where the movement is anchored',
'// #define AZ_ROD_PITCH 1.0f // mm per full rev of stepper',
'// #define AZIMUTH_STEPS_PER_REV (AZ_CIRCUMFERENCE / AZ_ROD_PITCH * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Steps needed to turn AZ 360deg',
'',
'// If you have a belt drive solution, you can uncomment and use the next 2 lines for calculations',
'// #define AZ_CIRCUMFERENCE (725) // the circumference of the circle where the movement is anchored',
'// #define AZ_PULLEY_TEETH 16',
'',
'// Is it going the wrong way?',
'#define AZ_INVERT_DIR 0'
]
},
{
literal: [
'',
'// Should AZ motor stay energized?',
'#define AZ_ALWAYS_ON 1',
],
condition: "$tracker == OAM",
}
],
define: '',
control: {
type: 'textinput',
choices: [
{ key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.az}', defineLine: '#define AZ_MOTOR_CURRENT_RATING {0} // mA' },
{ key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.az}', defineLine: '#define AZ_OPERATING_CURRENT_SETTING {0} // %' },
{ key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.az}', defineLine: '#define AZ_MICROSTEPPING {0} // steps' },
{ key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.az}', defineLine: '#define AZ_MOTOR_HOLD_SETTING {0} // %' },
]
},
},
{
id: 'ZAO',
title: 'Azimuth Always On',
label: 'It is possible to keep the azimuth motor energized at all times to prevent any shifting in position. This is not necessarily needed for 28BYJ motors, however it is recommended for NEMAs when using AutoPA V2.0.',
variable: 'azalwayson',
condition: "($autopa == Y) AND ($tracker == OAT) OR ($tracker == OAE)",
preamble: ['// Define AZ always-on'],
define: 'AZ_ALWAYS_ON',
control: {
type: 'radioimg',
choices: [
{ key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' },
{ key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' },
]
},
},
{
id: 'LST',
title: 'Altitude Stepper',
label: 'Which stepper motor are you using for the Altitude:',
variable: 'alt',
condition: "($autopa == Y)",
preamble: ['// Using the {v} stepper for ALT'],
define: 'ALT_STEPPER_TYPE',
control: {
type: 'radioimg',
choices: [
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48mod.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 2048.0f'], condition: "$tracker != OAM" },
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 200.0f'] },
]
},
postamble: [
{
condition: '$tracker == OAE',
literal: [
'// ALT',
'#define ALT_MICROSTEPPING 1',
'#define ALT_STEPPER_SPEED 800',
'#define ALT_STEPPER_ACCELERATION 2000'
]
}]
},
{
id: 'LD',
title: 'Altitude Driver',
label: 'Which driver board are you using to drive the Altitude stepper motor:',
variable: 'altdrv',
condition: "($autopa == Y)",
preamble: ['// Using the {v} driver for ALT stepper motor'],
define: 'ALT_DRIVER_TYPE',
control: {
type: 'radioimg',
choices: [
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC', condition: "$tracker != OAM" },
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
]
},
},
{
id: 'LA',
title: 'Altitude Advanced Settings',
label: 'These are some advanced settings you may want to override. The defaults are set already. Please only change them if you are sure what they do and what their valid ranges are. Enter the ALT stepper specs and desired settings:',
variable: 'altpower',
condition: "$altdrv == TU",
preamble: ['// Define ALT stepper motor power settings'],
define: '',
control: {
type: 'textinput',
choices: [
{ key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.alt}', defineLine: '#define ALT_MOTOR_CURRENT_RATING {0} // mA' },
{ key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.alt}', defineLine: '#define ALT_OPERATING_CURRENT_SETTING {0} // %' },
{ key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.alt}', defineLine: '#define ALT_MICROSTEPPING {0} // steps' },
{ key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.alt}', defineLine: '#define ALT_MOTOR_HOLD_SETTING {0} // %' },
]
},
postamble: [{
condition: '$tracker == OAM',
literal: [
'#define ALT_STEPPER_SPEED 3000',
'#define ALT_STEPPER_ACCELERATION 1000',
'',
'///////////////////////////////',
'// ALT parameters are for hardware as designed',
'#define ALTITUDE_STEPS_PER_ARC_MINUTE ((1640 / 60) * ALT_MICROSTEPPING)',
'',
'// Is it going the wrong way?',
'#define ALT_INVERT_DIR 0'
]
},
{
condition: '$tracker == OAT',
literal: [
'#define ALT_STEPPER_SPEED 2000',
'#define ALT_STEPPER_ACCELERATION 1000',
'',
'// Is it going the wrong way?',
'#define ALT_INVERT_DIR 0'
]
},
{
condition: '$tracker == OAE',
literal: [
'',
'// Is it going the wrong way?',
'#define ALT_INVERT_DIR 0'
]
}
]
},
{
id: 'LAO',
title: 'Altitude Always On',
label: 'It is possible to keep the altitude motor energized at all times to prevent any shifting in position. This is usually not needed.',
variable: 'altalwayson',
condition: "($autopa == Y) AND ($tracker == OAT) OR ($tracker == OAE)",
preamble: ['// Define ALT always-on'],
define: 'ALT_ALWAYS_ON',
control: {
type: 'radioimg',
choices: [
{ key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' },
{ key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' },
]
},
}
];
6 changes: 5 additions & 1 deletion src/modules/configurations/base/sharedDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ export const Defaults = {
OAMSpeed: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0, rastpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 }, decstpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 } },
OAMAcceleration: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0, rastpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 }, decstpr: { N9: 2.0, N8: 2.0, N9O: 2.0, N8O: 2.0 } },
OAMMicrostepping: { N9: 128, N8: 128, N9O: 128, N8O: 128, rastpr: { N9: 128, N8: 128, N9O: 128, N8O: 128 }, decstpr: { N9: 128, N8: 128, N9O: 128, N8O: 128 } },
RAHallSensorPin: { tracker: 18 }
RAHallSensorPin: { OAT: 53, OAM: 27, OAE: 27 },
OAEPowerRating: { N9: 2000, N8: 2000, N9O: 2000, N8O: 2000 },
OAEPowerUtilization: { N9: 50, N8: 50, N9O: 50, N8O: 50 },
OAESlewMicrostepping: { N9: 4, N8: 4, N9O: 16, N8O: 16 },
OAETrackMicrostepping: { N9: 256, N8: 256, N9O: 256, N8O: 256 }
};
Loading