Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Ramping rates control  (Read 8020 times)

spectrasouth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Ramping rates control
« on: February 24, 2015, 03:21:57 »

My first post: Is there any way to set/change the slew ramp-up and ramp-down rates in AstroEQ? I ask this as these rates have a big impact on a stepper motor's ability to start and stop slews without stalling. Previous (Bartels) and current (FS2) stepper controllers that I have do have this ability ... unfortunately they are not EQMOD friendly.

Thanks,
Spectrasouth
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Ramping rates control
« Reply #1 on: February 24, 2015, 14:20:25 »

At the moment, the acceleration/deceleration rates are hard coded as it has to be performed by AstroEQ in software because the driver chips don't have the ability to do it themselves. Any movement >=2x sidereal speeds will see an acceleration up from (and back down to) 1x speed.
To limit processing time, the ramp is an approximated linear acceleration (not quite linear, but close) with a slope calculated based on the mount configuration to be about 5 seconds from 1x to full speed.

What would you like to be able to control? Do you need it slower, faster, or a different profile?

If you let me know what adjustments you require, I'll have a look what I can add in to the firmware.
Logged
Tom Carpenter (AstroEQ)

spectrasouth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Ramping rates control
« Reply #2 on: February 25, 2015, 03:37:40 »

Hmmm ... that's a bummer :(

Both my old Bartels controller and current FS2 allow both stepper ramp up and down rates to be varied to find the fastest ramp rate to/from full slew speed that doesn't stall the steppers. The Bartels allows both variable linear and 'S' slopes but, from memory,  I think the FS2 only has a variable linear slope. Both steppers on my heavy mount are very sensitive to the ramp up/down rates, which also depends on whatever overvoltage I apply to them, and the only way I can find the fastest setting is by trial and error. Typically I needed to set the ramping time for a few seconds (>2) but I don't recall the actual values, which was different for each stepper.

Without the ability to vary the ramp rates I'm reasonably certain the AstroEQ will not work with my mount  :'(
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Ramping rates control
« Reply #3 on: February 25, 2015, 20:36:01 »

If it is that critical, it seems to suggest that you are running the motors right on the edge of their hold torque capability - might need more powerful motors.

Now for am impromptu maths lesson ;)
Part of the issue is that a linear acceleration requires the speed to be a function v'=v+c. But in the microcontroller, the speed is v = b/x where x is the thing that changes the speed, so v' = b/x' = b/x + c = b*(1/x+d), so x'=x / (1+dx). That is unfortunately a very awkward thing to calculate - and very time consuming.
There is a lot for the processor to do when it is trying to accurately time two moving motors while processing frequent commands from EQMOD (which is constantly asking 'are we there yet' ;)), so I had to make the motor routines as efficient as possible.
As it happens, there is an approximation for that horrible formula (Taylor series) which is x'=x-(dx)^2+(dx)^3-... . That annoying continues on forever, but if you stop at the 3rd term you get a very decent approximation. But even that is still quite a pain.
In the end, I am actually just using x'=nx as the acceleration curve, which sort of works, only because of integer truncation and the fact that the numbers are small. It is by no means perfect and is something I hope to find a better way of doing.
Logged
Tom Carpenter (AstroEQ)

spectrasouth

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Ramping rates control
« Reply #4 on: February 26, 2015, 22:24:45 »

The problem with my Japanese mount is that it is heavy and consequently has a high gearing ratio, 9000:1 for the RA and a bit less for the Dec axis. Both axis use 6V/1.2A, 200 step motors so the final 'performance' is only 0.72"/full step for the RA. To get even a slow slew speed (0.6 deg/s) with that sort of ratio means the steppers need to spin very fast, which increases the coil impedance, reduces the current (unless offset with over-voltage) and quickly stalls ... so yes, I always have the steppers slewing very close to their performance limit. The ability to fine tune the ramp rate is critical in my situation.

While I don't doubt what you say about the difficulties in achieving variable ramp rate control (I'm a retired electronics engineer) I do know this has been achieved, as mentioned, in other controllers. Details, including source code, for Mel Bartels' old but successful system (over 1000 built) are at http://www.bbastrodesigns.com/StepperSystem.html. I don't have any details for the German FS2 but I know it has 256 levels of slew rate adjustment.
Logged