Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Question related to the astroeq code  (Read 3335 times)

grizli21

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Question related to the astroeq code
« on: November 18, 2015, 16:50:14 »

Hi Thom  :),
Looking more closely at the firmware i didn't see a fonction for the wired reset input of drivers.
They looks always pulled to 5v, are they?
I was asking because of looking at alternative drivers that do not always have the reset function (may try a cheap high current 1/128 cnc driver).

Otherwise, the 400 steps nema17 i'm testing directly to the worm  is a bit torque bordeline on the g11 so would you give me a tips which line/variable to slowdown accel/deccel phase?
I did some try yesterday in this regards but still nothing changed...
Thanks
Nicolas

« Last Edit: November 18, 2015, 16:52:29 by grizli21 »
Logged

grizli21

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Re: Question related to the astroeq code
« Reply #1 on: November 22, 2015, 14:03:05 »

Hi,

Finally i managed to slow down accelerate ramp by ajusting startSpeed and stoppingSpeed variable.
The thing is it doesn't feel like it is better, meaning that this is almost the beginning of the ramp that is slower but the transition between end acceleration and slew speed is not smooth and make the n300 to wooble back and front.

Do you have an idea where i could investigate?
Thanks you very much
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Question related to the astroeq code
« Reply #2 on: November 22, 2015, 16:09:36 »

Acceleration/Deceleration was a tricky one to get working as there is very little processing power left to do it. The way it is currently done is a little bit of a hack, but it should be possible to slow it down.

There is one calculation you need to change. On Lin 656 (I think) you should find the following:

Code: [Select]
cmd.stepRepeat[motor] = (byte)((18750+(divisior>>1))/divisior)-1; //note that we are rounding to neareast so we add half the divisor.
If you increase 18750, it should slow down the acceleration/deceleration curves. Trouble it, it's not a straight forward relationship. If you double the number for example, it will roughly but not quite double the length of the acceleration time. If you want to make that number larger than 65000, make sure you add 'UL' as a suffix (e.g. 75000UL). In practice you shouldn't need to go that large. Maybe try something like 30000, see where it gets you.

Part of the issue is that there is a 1/x relationship in the speed, so at higher speeds it takes smaller increments to keep going at the same rate. Calculating 1/x is quite tricky especially as once you get to about 20x speed, all of the values are <1 which means it starts accelerating very rapidly (not what we want).
Logged
Tom Carpenter (AstroEQ)

grizli21

  • Full Member
  • ***
  • Posts: 28
    • View Profile
Re: Question related to the astroeq code
« Reply #3 on: November 22, 2015, 19:31:56 »

Hi Tom,
Thanks for advices, acceleration are indeed slower but it is the same behavior the variable i changed , it slow down especialy at startup but the end transition accel/ final slew rate is still a bit strong.

Quote
Part of the issue is that there is a 1/x relationship in the speed
Yes i thinkk i got it ^^... is it a difficult part to have a more linear acceleration ?
Logged