Topics

sticky OnStep Configuration Generator

Khalid Baheyeldin
 
Edited

Pete,

Great points in your post.

I am also convinced that a configuration generator is a significant UX (User eXperience) improvement, and will help those who are starting with OnStep and save them considerable time and effort.

So, I wrote an OnStep Configuration Generator:

It does the following:
  • Asks for the two gear ratios, motor steps per rotation, microsteps, ...etc. (same as the spreadsheet)
  • Calculates the most important 'hard' parameters, 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.x.h file.
As of 10 Feb 2018, this generator is in sync with the current Beta (1.1.f) and Alpha (1.2.a) [both at the time of this update].

If you have a version that is earlier than 1.1.f, please download a more recent newer version.

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

Here is a video demonstrating the generator step by step.

Your feedback is welcome.

On Fri, Jan 5, 2018 at 06:20 am, <pete.ingram@...> wrote:
I was wondering if a configuration program might not be possible.  Obviously it would need to be PC based and then the Mac guys will cry foul.  Oh well.  My idea was formed around the concept of the config program actually writing to configxxx.h file.  Is this viable or even desirable?

What tends to happen, at least to me, is that I get a new widget and I immerse myself in its technicalities until it works.  I then use it.  Over time I forget how I made it work.  Obviously I have drawings and notes but, even so knowledge gets lost. 
So I make OnStep work and then after two years I decide to upgrade some hardware that is incompatible with the current OnSTep configuration.  I now have to re-learn how it works.  This a configuration program would be a quick and easy way to get back running again.  I realize that this may not be a direction you wish to move towards.  Again, it's just a thought.

I will test anything you guys want if I am able to do so.  I'm just about to build another couple of MiniPCBs so I should have some non-destructive (to my rig) capacity.

Pete
 

A config program is a good idea but care needs to be taken that more time is not spent updating the config program than you spend enhancing the core code.  That said, what I read in here is than many people would like to upgrade older telescopes goto but are either unable to deal with soldering or they, like me, are more than a bit scared of even the configxxx.h file.  At first, I had absolutely no idea what the variables did.  I read, I asked, and, as you know, I made mistaiks (oops).  However, my stumbling around eventually bred some understanding and now it works although I still don;t understand exactly why.

I printed the configxxx.h file and read it like a newspaper over and over until I got my head around the logic.  It was hard to understand, even from the comments, how to configure my device.  Perhaps more comprehensive commenting (instead of a user manual) would help more.  "This variable changes xxx so that yyy may go faster, slower, whatever."  A real dummies, simple guide.  

Maybe that would help.  The problem is, YOU know exactly what each one does.  I and maybe others do not.  I have found the best way for me to be sure that I understand something is to explain it to someone else.  I discover this when explaining things to my son when he was about 7.  I could explain things simply and concisely only if I fully understood it myself.  

The lack soldering skill is a problem as is sourcing probably unfamiliar components.  I wonder if EasyEDA could supply fully populated PCBs perhaps without the Teensy.  I know Seeed Studio do this but in runs of (I think) 10+ boards.  This minimum quantity might put you and/or Howard into selling finished boards.  Selling working boards would certainly increase your numbers but, warranty and support would probably be a nightmare for you.

The above is just me thinking and writing at the same time.  Two things at once is never a good idea for me...

Khalid Baheyeldin
 

Pete,

Like you, I am a newbie when it comes to electronics, soldering, ...etc.
I also dread attaching the motors to the mount, and adjusting the tolerances ...etc.

I lack experience in these areas.

I have been lurking on the mailing lists for a few months, and a pre-populated board would help a lot. Yes, in theory anyone can order the parts (I will probably make mistakes) and solder them (and make more mistakes).

Where I can help is software (firmware really). So I jumped in and ported the STM32F1 board, and reorganized the code to implement a HAL layer to make future boards easier to integrate.

Do I fully understand the innards of OnStep? Not at all. Just enough to help with certain areas.

My STM32 board is on order, and I will use a combination of pre-built components and breadboarding, to avoid soldering and ordering discrete components.

For example, instead of connectors, MOSFETs, resistors, capacitors, I order this mini board:

https://www.ebay.ca/itm/262599227624

It takes 5.5mm jack 12v and outputs 12v (for the motors), 5v and 3.3v (for the MCU).

Also for stepper drivers, I order a pair of TMC2130 and a pair of LV8729 (1/128 capable), and will experiment with both.

I plan to plug them into this stepper driver extension min board:

https://www.ebay.ca/itm/172265420592

This board has the disadvantage of M0/M1/M2 being all routed to the DIP switch which makes each individual one either open or to VCC. So in effect it is like a RAMPS board, where the MCU cannot control the M0/M1/M2 lines.

But that can be worked around. I may de-solder the DIP switch and solder pin headers which I can route to the MCU.

If that does not work out, I will put the driver on a breadboard, and all I need is a 100 uF capacitor between VMOT and GND.

The downside: no status LEDs, large footprint, not very rugged, ...etc.

But that is all a learning experience with minimal expenses into something that may not work.

I have not ordered any motors since I find the info I have is confusing (to me).

There is still the obstacle of mounting the motors, but first I get the electronics working, then I will figure it out.

Anyways ...

The configuration generator is a way to reduce the very steep learning curve for OnStep. It now has the same validations that the spreadsheet does. So that helps. Will warn you if you have obvious errors or out of range. So it should be pretty safe, after the What-If scenarios have been run on the spreadsheet. As safe as manual editing that a newbie will do.

Terry Fishlock
 

Really like the idea of a configuration generator. It would take a lot of the mystery out of the project for new people like myself.

Khalid Baheyeldin
 

@telfish,

Did you try out the config generator?

If so, how did it go?

hitosi sato
 

 Dear Khalid

I'm Hitosi from Japan.
I tested Generator on web Python.
It seems that too difficult to use for me, I could make config.h for Classic pins.
The reasons are bellow.

1.Almost beginner does not Know what is Python.
   Excel function is more popular.(I know it does not need to study Python,only put conditions)
   I can read how to determine the value from cell calculation.
2.This Generator does not tell us which micro-step value is suitable for my motor and mount in tracing mode and GOTO mode when use mode-swiitch.

I am beginner,often consider that I want to track more smoothly in sidereal rate for good guiding,
I want to get more fast GOTO,what is best answer?

I read WiKi everyday to understand and get my best value now.
If possible,i want to know about above especially explanation about hard limits.

Regards

Hitosi

Khalid Baheyeldin
 

Hitosi,

Thank you for taking the time to test it and let me know.

The spreadsheet is still required before using the config generator, at least for the time being.
The reason is exactly what you said: the spreadsheet allows What-If analysis to be done: that is, changing values and then seeing what the effect on the results are. This is where you will answer questions like: smooth sidereal tracking, or fast Goto, or a compromise between both.

Once you have reached a set of results in the spreadsheet, then you enter them into the config generator.

Its job is to create a correctly formatted Config.x.h file from the parameters that you selected.

It tells you before you start that you have to use the spreadsheet first, for the above reasons.

It does some validation, but not all. The reason is that OnStep Alpha now has validation on the supported range of microsteps for a specific stepper driver model, and much more.

As for Python, you don't have to install it. You can run the program on the web by copy and paste.

I am thinking of a configurator web page, but that will take more effort. For now the Python script will do the job.

I also plan to reformat the spreadsheet to make it more naturally flowing (instructions near the top, values entered on the left, and results on the right. Also, to make it part of the OnStep download, so the .zip is self contained. But that is some time in the future.

hitosi sato
 

Hi Khalid
Thank you for detail comment.
I want to try again config Generator.
Can you add 48 stepper motor to your python Generator?


Regards
Hitosi

Khalid Baheyeldin
 

What is the number 48? Is it steps per full rotation?

Like 200 for 1.8 degree motors, and 400 for 0.9 degree?

KHK
 

oh oh, now I see the      #define lines       :-) sorry!
Would an additional possibility of storing the result be possible?

regards and greetings to Ontario, Canada
Karl-Heinz

Am 09.01.2018 um 23:54 schrieb Khalid Baheyeldin:

@telfish,

Did you try out the config generator?

If so, how did it go?

Khalid Baheyeldin
 

You mean the output to be put in a file called Config.x.h?

Right now, you copy and paste it into a file.

It is possible to write directly to a file, but that requires that you have Python 3.x installed.
This option is not feasible when the script is running from the web site.

I am thinking of alternatives for improved usability for this script.

Meanwhile test the script out as it is and let me know.

tomofreno2000
 

A source of confusion to me regarding the motor drivers is the effect of 1/256 step interpolation used by the Trinimac drivers.  They generally permit a min of 1/16 step (other than the 2130 with SPI input).  If you put this value in Howard's spreadsheet, then it indicates you need twice the gear reduction ratio as used with the older 1/32 step drivers to get the same arcsec/step.  But people seem to be using them without changing gearing and reporting smoother tracking than with the older drivers.  I assume that is due to the 1/256 interpolation, but if I go strictly by the spreadsheet, I should double the gear ratio if I use the 2100 or 2208.  I decided to just plunge ahead, build the board and test it.  The drivers are inexpensive enough that I can change them, and I am mounting them in Pololu headers for easy replacement.  Would be nice if the wiki addressed this question though.

I like the idea of a configurator, i.e. one place that lists all parameters, and permits determination your values for them, necessary for input in the config.h file.  It might be easiest to just make an extended addition of Howard's spreadsheet.

Howard Dutton
 
Edited

I wouldn't count on much smaller than about 1/32 step (give or take) doing much for accuracy or precision in general (for a hybrid stepper, tin-can's are worse.)  But the TMC2xxx 256x interpolation should help make for smoother tracking with less vibration.  For guiding it has 1/16 step "responsiveness" and interpolation isn't going to change that. 

Keep in mind that commercial systems like the G11 digital drive operate at 0.5"/half-step or the GM8 at 1"/half-step so where are you at?

hitosi sato
 

Hi Khalid

Yes,48 is stepper 7.5 degree motors.
It does not need to do in hurry.
It seems that both Howard and you have many works to do for new OnStep.

Hitosi

Khalid Baheyeldin
 
Edited

Hitosi,

I added the 49 stepper motor.

What is even better is that the config generator now runs online. Nothing to download.

You can enter your parameters directory and the configuration will be generated for you.

Just press Ctrl-A then Ctrl-C, and then copy it into your Config.x.h.

The instructions are on the page itself.

Here is the direct link to the page: http://o.baheyeldin.com:1111/

hitosi sato
 

Hi Khalid

You are fast at work!
I tried new Generator written in web-form .
The values such as 73728.0 and 184320 are correct.(same as my OnStep)
AXIS1_STEP_GOTO 2 is incorrect?
I am using the value 16 now.


#define StepsPerDegreeAxis1 73728.0
#define StepsPerWormRotationAxis1 184320.0
#define AXIS1_DRIVER_MODEL DRV8825
#define AXIS1_MICROSTEPS 32
#define AXIS1_MICROSTEPS_GOTO 1
#define AXIS1_STEP_GOTO 2

Thank you
Hitosi

Khalid Baheyeldin
 

Hitosi,

Thanks for testing!

The correct values are calculated the same way as the spreadsheet, so they should be the same.

As for AXISn_STEP_GOTO I fixed it at 2.

This is based on my limited understanding of it after Howard tried to explain it, but I did not get it.

I can change it to something else if there is a formula for it that I can use.

Khalid Baheyeldin
 

And you can always edit the result before saving it to the Config file.

But I prefer that the values in the file be 'good choices' based on the input, and the formulas.

hitosi sato
 

Hi Khalid

Many thanks for reply.
OK
I will be try another time.
Now,there are various configuration change in alpha OnStep.
Howard works for  "kaizen" energetically.

I only Know that using driver name and micro-step value directly(32 16 8....) without (5 4 3...) in alpha blanch.
I will wait new spreadsheet and generator.

Regards
Hitosi

Terry Fishlock
 

I get this.

This site can’t be reached

baheyeldin.com refused to connect.

Try:

  • Checking the connection
  • Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

On Wed, Jan 10, 2018 at 11:35 PM, hitosi sato via Groups.Io <hitosisato0911@...> wrote:
Hi Khalid

Many thanks for reply.
OK
I will be try another time.
Now,there are various configuration change in alpha OnStep.
Howard works for  "kaizen" energetically.

I only Know that using driver name and micro-step value directly(32 16 8....) without (5 4 3...) in alpha blanch.
I will wait new spreadsheet and generator.

Regards
Hitosi