Topics

sticky OnStep Configuration Generator lives on ...

Khalid Baheyeldin
 

The OnStep Configuration Generator is now updated to work with 3.16 (stable) and 4.x (latest master).

This update was done because some people still struggle with the syntax of the configuration file, despite the format of the configuration file from version 3.x onwards was vastly improved to make it more friendly. The users who struggle with the format have no programming experience, and it is difficult to explain that it is case sensitive, it is one argument per #define line, and so on ...

The OCG does the following:
  • Asks for the version of OnStep that you are using.
  • Asks for the two gear ratios, motor steps per rotation, microsteps, ...etc. (same values from the spreadsheet)
  • Calculates the most important parameters to get you going, and validates them as per the spreadsheet formulas.
  • Sets some useful parameters to enabled.
  • Leaves a lot of the remaining parameters unconfigured, as they are in the original Config.h file.
There is no point in supporting version 2.2 or earlier, because it no longer the stable version, and new users will be using the stable or latest master.

The Configuration Generator is now online, and instructions are at the top of the page.

This is a video demonstrating the generator step by step, although for the older versions. The principles are still the same.

Your feedback is welcome.

Alain K
 

Hello Khalid,

I don't see the TMC5160 in the driver list ?

Thanks.

Khalid Baheyeldin
 

On Mon, Jul 27, 2020 at 11:26 PM, Alain K wrote:

I don't see the TMC5160 in the driver list ?
Yeah, it is because the TMC5160 requires a lot of other values to be entered, unlike all other drivers.
I may add it later, but it will require more clutter on the generator's page.

For the time being, just generate a TMC2130, then manually edit the file to change the driver model, and enter the IRUN/IGOTO/... values.

Alain K
 

Thanks Khalid.

Howard Dutton
 

On Tue, Jul 28, 2020 at 07:49 AM, Khalid Baheyeldin wrote:
Yeah, it is because the TMC5160 requires a lot of other values to be entered, unlike all other drivers.
OnStep requires no additional values for the the TMC5160 vs. the TMC2130, if you don't specify the current it falls back to 600mA and OnStep provides a warning on compile.

And sure one should specify IRUN, but that's the only other option most need for decent performance.  If they want to mess around with IGOTO and IHOLD they're tuning and compiling/uploading/testing several times probably at that point and who cares then.

I didn't look at the OCG and how you set this up... but it should would be nice to grab an Config.h file and turn it into a template then parse the file to insert the values.

#define AXIS1_STEPS_PER_WORMROT [       ] //  12800, n. Number of steps per worm rotation (PEC Eq mode only:)                <-Req'd
                                          //         n = (AXIS1_STEPS_PER_DEGREE*360)/reduction_final_stage

#define AXIS1_DRIVER_MODEL [            ] //    OFF, (See above.) Stepper driver model.                                      <-Often
#define AXIS1_DRIVER_MICROSTEPS [       ] //    OFF, n. Microstep mode when tracking.                                        <-Often

Markus Kempf
 

Good to know, I had my new 5160 defined as 2130 without any problems but I always used the Spi current settings. Are there any specific options for the 5160? 

Markus
Am 29. Juli 2020, 10:47 +0200 schrieb Howard Dutton <hjd1964@...>:

On Tue, Jul 28, 2020 at 07:49 AM, Khalid Baheyeldin wrote:
Yeah, it is because the TMC5160 requires a lot of other values to be entered, unlike all other drivers.
OnStep requires no additional values for the the TMC5160 vs. the TMC2130, if you don't specify the current it falls back to 600mA and OnStep provides a warning on compile.

And sure one should specify IRUN, but that's the only other option most need for decent performance.  If they want to mess around with IGOTO and IHOLD they're tuning and compiling/uploading/testing several times probably at that point and who cares then.

I didn't look at the OCG and how you set this up... but it should would be nice to grab an Config.h file and turn it into a template then parse the file to insert the values.

#define AXIS1_STEPS_PER_WORMROT [ ] // 12800, n. Number of steps per worm rotation (PEC Eq mode only:) <-Req'd
// n = (AXIS1_STEPS_PER_DEGREE*360)/reduction_final_stage

#define AXIS1_DRIVER_MODEL [ ] // OFF, (See above.) Stepper driver model. <-Often
#define AXIS1_DRIVER_MICROSTEPS [ ] // OFF, n. Microstep mode when tracking. <-Often

Howard Dutton
 

On Wed, Jul 29, 2020 at 04:06 AM, Markus Kempf wrote:
Good to know, I had my new 5160 defined as 2130 without any problems but I always used the Spi current settings.
For the TMC5160 you should ALWAYS use one of:
TMC5160, TMC5160_QUIET, TMC5160_VQUIET

The registers are similar but NOT identical to the TMC2130.

Are there any specific options for the 5160? 
None that are exposed to the user.

Markus Kempf
 

for my piece of mind, I immediately changed to TMC5150 and it still works...

I also tried the GPS change to RX3 again without success.

#define SERIAL_A_BAUD_DEFAULT        19200 //   9600, n. Where n=9600,19200,57600,115200 (common baud rates.)                  Infreq
#define SERIAL_B_BAUD_DEFAULT        19200 //   9600, n. See (src/HAL/) for your MCU Serial port # etc.                        Option
#define SERIAL_B_ESP_FLASHING         OFF //    OFF, ON Upload ESP8266 WiFi firmware through SERIAL_B with :ESPFLASH# cmd.    Option
#define SERIAL_C_BAUD_DEFAULT         9600//    OFF, n, ON for ESP32 Bluetooth.                                               Option
#define SERIAL_C_BLUETOOTH_NAME  "OnStep" // "On..", Bluetooth device name for ESP32.                                         Option

// TIME AND LOCATION -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TLS
#define TIME_LOCATION_SOURCE          GPS //    OFF, DS3231 (I2c,) DS3234 (Spi,) TEENSY (T3.2 internal,) or GPS source.       Option
                                          //         Provides Date/Time, and if available, PPS & Lat/Long also.

#define SerialGPS Serial3
#define SerialGPSBaud 9600


The GPS TX goes to RX3 PC11 on EXP1 left row second pin from top.

Markus


Am 29/07/2020 um 14:04 schrieb Howard Dutton:

On Wed, Jul 29, 2020 at 04:06 AM, Markus Kempf wrote:
Good to know, I had my new 5160 defined as 2130 without any problems but I always used the Spi current settings.
For the TMC5160 you should ALWAYS use one of:
TMC5160, TMC5160_QUIET, TMC5160_VQUIET

The registers are similar but NOT identical to the TMC2130.

Are there any specific options for the 5160? 
None that are exposed to the user.

Khalid Baheyeldin
 

On Wed, Jul 29, 2020 at 04:47 AM, Howard Dutton wrote:
OnStep requires no additional values for the the TMC5160 vs. the TMC2130, if you don't specify the current it falls back to 600mA and OnStep provides a warning on compile.

And sure one should specify IRUN, but that's the only other option most need for decent performance.  If they want to mess around with IGOTO and IHOLD they're tuning and compiling/uploading/testing several times probably at that point and who cares then.
The default Config.h has all the I* parameters set to OFF.
If this works, with a compile warning, then I can add the TMC5160 without having to ask for the values for each of the I* values.
Should I?

I didn't look at the OCG and how you set this up... but it should would be nice to grab an Config.h file and turn it into a template then parse the file to insert the values.
That is exactly how I am doing it in this refresh/re-design. The values that will be set by the OCG are tokenized, and the OCG replaces those tokens.

The new format of the Config.h lends itself well to this. I have two Config.h templates, one for 3.16 and another for master.

The only thing I added is the two lines for the GPS serial port and baud rate. Nothing else was changed.

Of course, this is all a point in time thing, and if new variables are introduced I have to merge them (in the master template).

Khalid Baheyeldin
 

The OCG now has support for the TMC5160. The compiler will issue a warning that the default for IRUN is 600mA, with the name of the exact parameter. The user then has to go edit that parameter to whatever they want.

Howard Dutton
 

On Wed, Jul 29, 2020 at 08:38 AM, Khalid Baheyeldin wrote:
I didn't look at the OCG and how you set this up... but it should would be nice to grab an Config.h file and turn it into a template then parse the file to insert the values.
That is exactly how I am doing it in this refresh/re-design. The values that will be set by the OCG are tokenized, and the OCG replaces those tokens.

The new format of the Config.h lends itself well to this. I have two Config.h templates, one for 3.16 and another for master.

The only thing I added is the two lines for the GPS serial port and baud rate. Nothing else was changed.

Of course, this is all a point in time thing, and if new variables are introduced I have to merge them (in the master template).
Nice!

Khalid Baheyeldin
 

On Wed, Jul 29, 2020 at 04:41 PM, Howard Dutton wrote:
Nice!
I am thinking of adding a link to the OCG at the top of the Config.h page on the Wiki.
Basically saying: if you want a quick basic Config that you can use right away for testing, or to further build on, then use the OCG.

Thoughts?

Howard Dutton
 
Edited

On Wed, Jul 29, 2020 at 01:46 PM, Khalid Baheyeldin wrote:
On Wed, Jul 29, 2020 at 04:41 PM, Howard Dutton wrote:
Nice!
I am thinking of adding a link to the OCG at the top of the Config.h page on the Wiki.
Basically saying: if you want a quick basic Config that you can use right away for testing, or to further build on, then use the OCG.

Thoughts?
I see no issue with it other than the usual downside of the user having no idea what capabilities and configuration are since they didn't "read the instructions."