Skip to content

Commit 3c384e2

Browse files
Merge Develop to publish changes (#37)
- Added AZ configuration for OAM - Added description to completed steps. - Moved BYJ motor options to the end for RA and DEC - Added ALT settings back for OAM - Hardcoded default pin settings for OAM Hall sensors - Added Homing pins for RA and DEC for all trackers - Supressed I2C pins if no info display is selected - Made some adjustments to OAE defaults
1 parent c5ca724 commit 3c384e2

File tree

7 files changed

+115
-36
lines changed

7 files changed

+115
-36
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# OAT Configurator
1+
# OpenAstroTech Mount Configurator
22
This is the source code for a small React-based app, using AntDesign that asks the user a bunch of questions about what components
3-
they used to build their tracker and then spits out the defines that need to be placed in configuration_local.hpp.
3+
they used to build their mount and then spits out the defines that need to be placed in configuration_local.hpp.
44

55
It can be used live at https://config.openastrotech.com
66

77
# Status
8-
Captures the great majority of use cases for the OAT. Please file Issues if you would like to see more variables supported, or if you are
9-
able, please create and submit a PR with an extra step in the code. It's pretty easy to add a new stpe to the Wizard, just look at the
10-
stepProps array in WizardSteps.jsx and add a new array item there.
8+
Captures the great majority of use cases for the OAT, OAE and OAM. Please file Issues if you would like to see more variables supported, or if you are
9+
able, please create and submit a PR with an extra step in the code. It's pretty easy to add a new step to the Wizard, just look at the
10+
stepProps array in one of the oxxSteps.js files and add a new array item there.
1111

1212
# Roadmap
1313
- Bluetooth - not currently queried.
1414
- Dark mode support.
1515

1616
# Using Source code
1717

18-
If you want to constribute to stig project, you'll need to get the source code. If you want to just use it, simply go to https://config.openastrotech.com
18+
If you want to constribute to this project, you'll need to get the source code. If you want to just use it, simply go to https://config.openastrotech.com
1919

2020
## Available Scripts
2121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oat-config-builder",
3-
"version": "0.1.0",
3+
"version": "3.11.0",
44
"private": true,
55
"dependencies": {
66
"@testing-library/jest-dom": "^5.11.9",

src/modules/Home.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Home = (props) => {
1313
<div className="intro-link-child">
1414
<h3 className="intro-header">OAT/OAM/OAE Firmware Configuration Generator</h3>
1515
<a className="intro-link" href="steps">START</a>
16-
<p className="version">V3.10</p>
16+
<p className="version">V3.12</p>
1717
</div>
1818
</div>
1919

src/modules/configurations/base/commonSteps.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ export const createBoardStep = () => ({
103103
{ key: 'M10', value: 'MKS GEN L V1.0', image: '/images/mksv10.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V1' },
104104
{ key: 'M20', value: 'MKS GEN L V2.0', image: '/images/mksv20.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V2' },
105105
{ key: 'M21', value: 'MKS GEN L V2.1', image: '/images/mksv21.png', defineValue: 'BOARD_AVR_MKS_GEN_L_V21' },
106-
{ key: 'OAEV1', value: 'OAE_V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' },
106+
{ key: 'OAEV1', value: 'OAE V1', image: '/images/oaeboard.png', defineValue: 'BOARD_OAE_V1' },
107107
]
108108
},
109109
});
110110

111-
// RA Driver step (OAT/OAM)
111+
// RA Driver step (OAT/OAM/OAE)
112112
export const createRADriverStep = () => ({
113113
id: 'RDO',
114114
title: 'RA Driver',
@@ -119,9 +119,9 @@ export const createRADriverStep = () => ({
119119
control: {
120120
type: 'radioimg',
121121
choices: [
122-
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' },
123122
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
124123
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
124+
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' },
125125
]
126126
},
127127
});
@@ -154,7 +154,6 @@ export const createDECStepperStep = () => ({
154154
control: {
155155
type: 'radioimg',
156156
choices: [
157-
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 2048.0f'], condition: "($stepperlib != N)" },
158157
{
159158
key: 'N9',
160159
value: 'NEMA 17, 0.9°/step',
@@ -200,6 +199,7 @@ export const createDECStepperStep = () => ({
200199
condition: "($tracker == OAM)",
201200
additionalLines: ['#define DEC_STEPPER_SPR (200 * 9)']
202201
},
202+
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define DEC_STEPPER_SPR 2048.0f'], condition: "($stepperlib != N)" },
203203
]
204204
},
205205
postamble: [{
@@ -208,7 +208,7 @@ export const createDECStepperStep = () => ({
208208
}],
209209
});
210210

211-
// DEC Driver step (OAT/OAM)
211+
// DEC Driver step (OAT/OAM/OAE)
212212
export const createDECDriverStep = () => ({
213213
id: 'DDT',
214214
title: 'DEC Driver',
@@ -219,9 +219,9 @@ export const createDECDriverStep = () => ({
219219
control: {
220220
type: 'radioimg',
221221
choices: [
222-
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' },
223222
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
224223
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
224+
{ key: 'A', value: 'Generic A4988', image: '/images/a4988.png', defineValue: 'DRIVER_TYPE_A4988_GENERIC' },
225225
]
226226
},
227227
});
@@ -297,12 +297,12 @@ export const createInfoDisplayStep = () => ({
297297
]
298298
},
299299
postamble: [
300-
{ literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'] },
301-
{ literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'] },
302-
{ literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'] },
300+
{ literal: ['#define INFO_DISPLAY_I2C_ADDRESS 0x3C'], condition: "($infodisplay == OLED)" },
301+
{ literal: ['#define INFO_DISPLAY_I2C_SDA_PIN 20'], condition: "($infodisplay == OLED)" },
302+
{ literal: ['#define INFO_DISPLAY_I2C_SCL_PIN 21'], condition: "($infodisplay == OLED)" },
303303
{
304304
literal: ['// Note that the E1 port is not usable since I2C requires pin 21!'],
305-
condition: "($board == M10) OR ($board == M20) OR ($board == M21)",
305+
condition: "($board IN [M10,M20,M21]) AND ($infodisplay == OLED)",
306306
},
307307
],
308308
});
@@ -424,11 +424,11 @@ export const createFocuserSteps = () => [
424424
control: {
425425
type: 'radioimg',
426426
choices: [
427-
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define FOCUS_STEPPER_SPR 2048.0f'] },
428427
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
429428
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define FOCUS_STEPPER_SPR 200.0f'] },
430429
{ key: 'N49', value: 'NEMA 14, 0.9°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED' },
431430
{ key: 'N48', value: 'NEMA 14, 1.8°/step', image: '/images/nema14.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define FOCUS_STEPPER_SPR 200.0f'] },
431+
{ key: 'BY', value: 'Modded 28BYJ-48 (Bipolar)', image: '/images/byj48.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define FOCUS_STEPPER_SPR 2048.0f'] },
432432
]
433433
},
434434
},

src/modules/configurations/base/sharedDefaults.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,10 @@ export const Defaults = {
4646
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 } },
4747
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 } },
4848
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 } },
49-
RAHallSensorPin: { tracker: 18 }
49+
RAHallSensorPin: { OAT: 53, OAM: 27, OAE: 27 },
50+
DECHallSensorPin: { OAT: 52, OAM: 29, OAE: 29 },
51+
OAEPowerRating: { N9: 2000, N8: 2000, N9O: 2000, N8O: 2000 },
52+
OAEPowerUtilization: { N9: 50, N8: 50, N9O: 50, N8O: 50 },
53+
OAESlewMicrostepping: { N9: 4, N8: 4, N9O: 16, N8O: 16 },
54+
OAETrackMicrostepping: { N9: 256, N8: 256, N9O: 256, N8O: 256 }
5055
};

src/modules/configurations/oae/oaeSteps.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export const getOAESteps = () => [
5252
'#define RA_DRIVER_TYPE DRIVER_TYPE_TMC2209_UART',
5353
'',
5454
'// Define some RA stepper motor settings',
55-
'#define RA_MOTOR_CURRENT_RATING 1200 // mA',
56-
'#define RA_OPERATING_CURRENT_SETTING 80 // %',
55+
'#define RA_MOTOR_CURRENT_RATING 2000 // mA',
56+
'#define RA_OPERATING_CURRENT_SETTING 50 // %',
5757
'#define RA_SLEW_MICROSTEPPING 4',
5858
'#define RA_TRACKING_MICROSTEPPING 256',
5959
'',
@@ -65,10 +65,10 @@ export const getOAESteps = () => [
6565
'',
6666
'// Define some RA stepper motor settings',
6767
'',
68-
'#define RA_SLEWING_SPEED_DEGREE 3',
69-
'#define RA_ACCEL_SecToFullSpeed 1 // Seconds to reach full slewing speed',
68+
'#define RA_SLEWING_SPEED_DEGREE 4',
69+
'#define RA_ACCEL_SecToFullSpeed 1.5 // Seconds to reach full slewing speed',
7070
'',
71-
'#define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper',
71+
'#define RA_STEPPER_SPR (400 * 9) // change to (200 * 9) for 1.8° stepper',
7272
'#define DEC_STEPPER_SPR (200 * 50 * 4.5f) // change "200" to "400" for 0.9° stepper, change "50" to different value depending on worm gear used',
7373
'',
7474
'// Using the 16 tooth gear (recommended) for RA belt',
@@ -89,15 +89,15 @@ export const getOAESteps = () => [
8989
'',
9090
'// Define some DEC stepper motor settings',
9191
'#define DEC_MOTOR_CURRENT_RATING 2000 // mA',
92-
'#define DEC_OPERATING_CURRENT_SETTING 60 // %',
93-
'#define DEC_SLEW_MICROSTEPPING 32',
92+
'#define DEC_OPERATING_CURRENT_SETTING 50 // %',
93+
'#define DEC_SLEW_MICROSTEPPING 16',
9494
'#define DEC_GUIDE_MICROSTEPPING 256',
9595
'',
9696
'// TMC2209 Stealth Mode (spreadCycle) - When set to 0, tracking is more precise, but noisy (high-pitched sound). When set to 1, they are silent.',
9797
'#define DEC_UART_STEALTH_MODE 1',
9898
'',
9999
'// Is it going the wrong way?',
100-
'#define DEC_INVERT_DIR 0',
100+
'#define DEC_INVERT_DIR 1',
101101
'',
102102
'#define DEC_SLEWING_SPEED_DEGREE RA_SLEWING_SPEED_DEGREE',
103103
'#define DEC_ACCEL_SecToFullSpeed RA_ACCEL_SecToFullSpeed',
@@ -110,15 +110,15 @@ export const getOAESteps = () => [
110110
'// AZ Stepper Configuration',
111111
'#define AZ_STEPPER_SPR 2048 // 28BYJ-48',
112112
'#define AZ_MICROSTEPPING 1',
113-
'#define AZ_STEPPER_SPEED 1200',
114-
'#define AZ_STEPPER_ACCELERATION 3000',
113+
'#define AZ_STEPPER_SPEED 800',
114+
'#define AZ_STEPPER_ACCELERATION 2000',
115115
'',
116116
'////////////////////////////////',
117117
'// ALT Stepper Configuration',
118118
'#define ALT_STEPPER_SPR 2048 // 28BYJ-48',
119119
'#define ALT_MICROSTEPPING 1',
120120
'#define ALT_STEPPER_SPEED 800',
121-
'#define ALT_STEPPER_ACCELERATION 3000',
121+
'#define ALT_STEPPER_ACCELERATION 2000',
122122
'',
123123
'////////////////////////////////',
124124
'// Display configuration ',
@@ -130,11 +130,11 @@ export const getOAESteps = () => [
130130
'// Define whether we have the GPS addon or not. Currently: No GPS',
131131
'#define USE_GPS 0',
132132
'',
133-
'// Using the NEMA 17, 0.9°/step stepper for AZ',
133+
'// Using a 28BYJ-48 stepper for AZ and ALT',
134134
'#define AZ_STEPPER_TYPE STEPPER_TYPE_ENABLED',
135135
'#define ALT_STEPPER_TYPE STEPPER_TYPE_ENABLED',
136136
'',
137-
'// Using the TMC2209-UART driver for AZ stepper motor',
137+
'// Using the A4988 driver for AZ and ALT stepper motors',
138138
'#define AZ_DRIVER_TYPE DRIVER_TYPE_A4988_GENERIC ',
139139
'#define ALT_DRIVER_TYPE DRIVER_TYPE_A4988_GENERIC ',
140140
'',

src/modules/configurations/oam/oamSteps.js

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export const getOAMSteps = () => [
223223
{
224224
id: 'ZAO',
225225
title: 'Azimuth Always On',
226-
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.',
226+
label: 'It is possible to keep the azimuth motor energized at all times to prevent any shifting in position. It is recommended for NEMAs when using AutoPA V2.0.',
227227
variable: 'azalwayson',
228228
condition: "($autopa == Y)",
229229
preamble: ['// Define AZ always-on'],
@@ -236,7 +236,81 @@ export const getOAMSteps = () => [
236236
]
237237
},
238238
},
239-
239+
{
240+
id: 'LST',
241+
title: 'Altitude Stepper',
242+
label: 'Which stepper motor are you using for the Altitude:',
243+
variable: 'alt',
244+
condition: "($autopa == Y)",
245+
preamble: ['// Using the {v} stepper for ALT'],
246+
define: 'ALT_STEPPER_TYPE',
247+
control: {
248+
type: 'radioimg',
249+
choices: [
250+
{ key: 'N9', value: 'NEMA 17, 0.9°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED' },
251+
{ key: 'N8', value: 'NEMA 17, 1.8°/step', image: '/images/nema17.png', defineValue: 'STEPPER_TYPE_ENABLED', additionalLines: ['#define ALT_STEPPER_SPR 200.0f'] },
252+
]
253+
},
254+
},
255+
{
256+
id: 'LD',
257+
title: 'Altitude Driver',
258+
label: 'Which driver board are you using to drive the Altitude stepper motor:',
259+
variable: 'altdrv',
260+
condition: "($autopa == Y)",
261+
preamble: ['// Using the {v} driver for ALT stepper motor'],
262+
define: 'ALT_DRIVER_TYPE',
263+
control: {
264+
type: 'radioimg',
265+
choices: [
266+
{ key: 'TU', value: 'TMC2209-UART', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_UART' },
267+
{ key: 'TS', value: 'TMC2209-Standalone', image: '/images/tmc2209.png', defineValue: 'DRIVER_TYPE_TMC2209_STANDALONE' },
268+
]
269+
},
270+
},
271+
{
272+
id: 'LA',
273+
title: 'Altitude Advanced Settings',
274+
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:',
275+
variable: 'altpower',
276+
condition: "($altdrv == TU)",
277+
preamble: ['// Define ALT stepper motor power settings'],
278+
define: '',
279+
control: {
280+
type: 'textinput',
281+
choices: [
282+
{ key: 'P', label: 'Power rating in mA', defaultValue: '{Defaults.PowerRating.alt}', defineLine: '#define ALT_MOTOR_CURRENT_RATING {0} // mA' },
283+
{ key: 'O', label: 'Operating percentage', defaultValue: '{Defaults.PowerUtilization.alt}', defineLine: '#define ALT_OPERATING_CURRENT_SETTING {0} // %' },
284+
{ key: 'S', label: 'Microstepping setting', defaultValue: '{Defaults.AZALTMicrostepping.alt}', defineLine: '#define ALT_MICROSTEPPING {0} // steps' },
285+
{ key: 'H', label: 'Hold current percentage (0 to power down)', defaultValue: '{Defaults.HoldPercentage.alt}', defineLine: '#define ALT_MOTOR_HOLD_SETTING {0} // %' },
286+
]
287+
},
288+
postamble: [{
289+
literal: [
290+
'#define ALT_STEPPER_SPEED 1500',
291+
'#define ALT_STEPPER_ACCELERATION 500',
292+
'',
293+
'// Is it going the wrong way?',
294+
'#define ALT_INVERT_DIR 0'
295+
]
296+
}]
297+
},
298+
{
299+
id: 'LAO',
300+
title: 'Altitude Always On',
301+
label: 'It is possible to keep the altitude motor energized at all times to prevent any shifting in position. This is usually not needed.',
302+
variable: 'altalwayson',
303+
condition: "($autopa == Y)",
304+
preamble: ['// Define ALT always-on'],
305+
define: 'ALT_ALWAYS_ON',
306+
control: {
307+
type: 'radioimg',
308+
choices: [
309+
{ key: 'Y', value: 'Yes', image: '/images/none.png', defineValue: '1' },
310+
{ key: 'N', value: 'No', image: '/images/none.png', defineValue: '0' },
311+
]
312+
},
313+
},
240314
createStepperStealthModeStep(),
241315
createDisplayStep(),
242316
createInfoDisplayStep(),
@@ -268,7 +342,7 @@ export const getOAMSteps = () => [
268342
control: {
269343
type: 'textinput',
270344
choices: [
271-
{ key: 'P', label: 'Pin that sensor is attached to', defaultValue: '29', defineLine: '#define DEC_HOMING_SENSOR_PIN {0}' },
345+
{ key: 'P', label: 'Pin that sensor is attached to', defaultValue: '{Defaults.DECHallSensorPin.tracker}', defineLine: '#define DEC_HOMING_SENSOR_PIN {0}' },
272346
{ key: 'S', label: 'Number of degrees to search for sensor', defaultValue: '10', defineLine: '#define DEC_HOMING_SENSOR_SEARCH_DEGREES {0}' },
273347
]
274348
},

0 commit comments

Comments
 (0)