#Building another stewart platform, seeking advice

1 messages · Page 1 of 1 (latest)

minor hornet
#

Hey gang. I hope you're all well.
I've been asked to make another stewart platform like https://www.marginallyclever.com/products/rotary-stewart-platform-2/
but the customer wants the steppers with feedback to ensure precision.
I was looking at SERVO42D and https://www.youtube.com/watch?v=ecmG-Qz5V3g seems to be saying it's not that great.
Is there some better config you'd recommend?
I'm definitely looking to lose the limit switches of the v2 and replace it with Stallguard homing.

The MKS SERVO42C closed-loop stepper system can be found at a reasonable price, but how does it stack up against open-loop steppers we know and love, and how does it perform compared against a servo system?

In this video, we put all three motion systems to the test. We look at the power and thermal performance, and run stress tests to find the ...

▶ Play video
mortal vector
#

You're in the right place to get advice. It's pretty rare to use closed-loop steppers with feedback with Marlin but we do have an i2c encoder feature in there for this kind of thing. The ones that handle feedback and correction themselves to ensure positioning (typically servos) will require less work tweaking the firmware. I'm not sure how Trinamic drivers will interact with a Servo w/r/t stall detection since they are typically looking at real coils with electrical feedback.

minor hornet
#

Uh… so you advice is…?

mortal vector
minor hornet
#

Where else might I ask?

mortal vector
#

The more nerdy code people hang out in the Developer channels. The more mechanical electrical people tend to linger around the Community channels.

minor hornet
#

Just to confirm... I can use the StallGuard to home with a servo42d? can i request the angle value from marlin at any given time?

#

please forgive me for getting dumber with age.

#

I guess it wouldn't be stallguard.

#

UGH. my project needs sensorless homing (eg no separate switch) and - ideally - real time angle reporting.

bitter horizon
#

since the servo42d is its own stepper driver and stallguard is a tmc stepper drver feature. no you can't have tmc stallguard with it. It does however have an equivalent

#

you would need to add advanced comunications into marlin

#

but,,,

#

What the MKS SERVO42D actually provides

It has two separate control models:

  1. STEP/DIR mode
    Acts like a dumb external driver
    Marlin only sends pulses
    ❌ No feedback path into Marlin
    ❌ No stall detection exposed to firmware
  2. Serial (UART/RS485/CAN depending on variant)
    Full “smart servo” control:
    Closed-loop position
    Stall / error detection
    Current control
#

so since marlin is a step/direction engine and in that mode it has no feedback system

#

I can see no way to do "sensorless"

#

without a extreamly massive rewrite of marlin to support non step/dirction control.

bitter horizon
#

I suspct it would be relitively easy to update the code in the SERVO42D to add in a stallgard like io pin, but sadly no source...

minor hornet
#

Hey all. I've been out of the game a minute. I've got bugfix-2.1.x firmware for a BTT_SKR_PRO board. I'm trying to build and upload in VSCode. All it tells me is "failed in 8 seconds" even tho I've disabled silent build.

#

I seems to be failing because it can't find C:\Users\[me]\Documents\GitHub\Marlin-polargraph\.pio\build\BTT_SKR_PRO

#

I also can't seem to get platformio to install anything for this board.

#

what did I miss, please?

mortal vector
#

Delete the .pio folder in the project folder, clean up your $HOME/.platformio folder, and see if that helps.

minor hornet
#

ah, i think my "default_envs" in platformio. was wrong.

#

still failed but at least now it did a lot more stuff...

mortal vector
#

You are not using Auto Build Marlin? With that the env is set for you, so you can leave platformio.ini unedited.

#

mftest -a also picks the env for you, or asks if there are more than one.

minor hornet
#

Remember I've been out of the loop for a minute. when i last used this thing auto build was new. I tried using auto build and it didn't play nice. i just deleted .pio and I'm building again now.

#

building....

#

seems positive so far....

mortal vector
#

Good news! I will make sure my support robot knows this is a possible solution.

#

Looks like you're building one of them there cute robots.

minor hornet
#

yes, clearing out .pio allowed it to build.

#

it's a "rotary" style stewart platform. i used KD310 magnetic ball joints so it can disassemble/fail unspectacularly

#

RUD will not be a total game stopper.

#

the hope is to use stallguard to home off the table surface.

mortal vector
#

That should work if it's got some weight.

minor hornet
#

we shall see! It's testable.

#

now i can't remember if i can upload firmware via USB on this thing...

#

thanks, iphone, nobody wanted it upside down.

#

any idea what that wifi module name is in the config? the wifi board is adjacent to the grey USB plug at the top fo the image.

#

next to the two red lights

#

Hrm.

mortal vector
#

Only AVR boards accept firmware upload via USB.

minor hornet
#

thanks. I'm in the VC showing the live machine, if that's of interest.

#

i set the stall sensitivity to 8... activated sensorless_homing....

minor hornet
minor hornet
#
/**
 * Default Axis Steps Per Unit (linear=steps/mm, rotational=steps/°)
 * Override with M92 (when enabled below)
 *                                      X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
 */
#define FULL_STEPS_PER_ROTATION (200)
#define MICROSTEPPING_LEVEL     (16)
#define MICROSTEPS_PER_ROTATION (MICROSTEPPING_LEVEL*FULL_STEPS_PER_ROTATION)
#define DEGREES_PER_ROTATION    (360.0)
#define MICROSTEPS_PER_DEGREE   (MICROSTEPS_PER_ROTATION / DEGREES_PER_ROTATION)
#define DEFAULT_AXIS_STEPS_PER_UNIT   { MICROSTEPS_PER_DEGREE,MICROSTEPS_PER_DEGREE,MICROSTEPS_PER_DEGREE,MICROSTEPS_PER_DEGREE,MICROSTEPS_PER_DEGREE,MICROSTEPS_PER_DEGREE }

curiously, it doesn't move after that. doesn't even activate on M17.

#

If I then call M92 X8 or M92 X9 it activates and homes.

#

so there's something funny going on with fractional steps?

minor hornet
#

Is it normal to home Y before X? If I have one motor attached it homes X first. If I have two motors attached it homes Y first. I'm not sure if it already things X is home.

#

I will get a bigger power supply to rule out that possibility

mortal vector
#

Y (B) may be homed before X (A) with some kinematics. Delta “only” homes Z, which effectively homes XYZ.

minor hornet
#

quick search of the code doesn't show where to find the kinematic model set.

#

hint, please?

#

DELTA, POLARGRAPH, and COREXY are all undefined

mortal vector
#

What’s the kinematics of a Stewart platform? Add that kinematic to Marlin first, I reckon, if you want XYZ based positioning.

minor hornet
#

I believe I leave the kinematics as 6 independent axies.

#

I do all the kinematic calculations on the PC and then send only the final gcode.

mortal vector
#

I see. So they all “home” to their own 6 sensorless endstops. And that is your known position.

minor hornet
#

that is the plan.

mortal vector
#

The advantage of doing kinematics in Marlin is much more efficient G-code. One coordinate for a linear interpolated move instead of needing to send many small segments.

minor hornet
#

I would love to do it that way, but my math isn't good enough to write an efficient kinematic solver on the board.

mortal vector
#

Cool thing is an agent like Hermes can do it for you. 😁

minor hornet
#

I'll get the hardware working and get back to you about that.

mortal vector
#

I did a “no code” developer day today, adding more skills to Hermes to be able to understand configurations. It is just about ready after this one session to create or upgrade Marlin configurations for users upon request, with back and forth discussion, if needed.

minor hornet
#

sounds great!

mortal vector
#

By “no code” I mean, the agent did all the coding while I just chatted with it via Telegram on my phone, wandering around Austin on a warm day.

#

It also updated all the config documentation, which I will post to the website shortly.

minor hornet
#
M122
10:04:16.234 >          X       Y       Z       I       J       K
10:04:16.235 > Address          0       0       0       0       0       0
10:04:16.235 > Enabled          false   false   false   false   false   false
10:04:16.282 > Set current      250     250     250     250     250     250
10:04:16.282 > RMS current      244     244     244     244     244     244
10:04:16.330 > MAX current      344     344     344     344     344     344
10:04:16.389 > Run current      7/31    7/31    7/31    7/31    7/31    7/31
10:04:16.389 > Hold current     3/31    3/31    3/31    3/31    3/31    3/31
10:04:16.390 > CS actual        3/31    3/31    3/31    3/31    3/31    3/31
10:04:16.438 > PWM scale
10:04:16.438 > vsense           1=.18   1=.18   1=.18   1=.18   1=.18   1=.18
10:04:16.486 > stealthChop      true    true    true    true    true    true
10:04:16.534 > msteps           0       0       0       0       0       0
10:04:16.582 > interp           false   false   false   false   false   false
10:04:16.630 > tstep            max     max     max     max     max     max
10:04:16.678 > PWM thresh.
10:04:16.678 > [mm/s]
#
10:04:16.678 > OT prewarn       false   false   false   false   false   false
10:04:16.726 > pwm scale sum    4       4       4       4       4       4
10:04:16.774 > pwm scale auto   0       0       0       0       0       0
10:04:16.822 > pwm offset auto  36      36      36      36      36      36
10:04:16.870 > pwm grad auto    14      14      14      14      14      14
10:04:16.918 > off time 3       3       3       3       3       3
10:04:16.966 > blank time       24      24      24      24      24      24
10:04:17.014 > hysteresis
10:04:17.014 >  -end            -1      -1      -1      -1      -1      -1
10:04:17.061 >  -start          1       1       1       1       1       1
10:04:17.110 > Stallguard thrs  8       8       8       8       8       8
10:04:17.110 > uStep count      128     128     128     128     128     128
10:04:17.158 > DRVSTATUS        X       Y       Z       I       J       K
10:04:17.158 > sg_result        0       0       0       0       0       0
10:04:17.206 > stst
10:04:17.253 > olb
10:04:17.302 > ola
10:04:17.349 > s2gb
10:04:17.398 > s2ga
10:04:17.446 > otpw
10:04:17.495 > ot
10:04:17.543 > 157C
10:04:17.590 > 150C
10:04:17.638 > 143C
10:04:17.686 > 120C
10:04:17.733 > s2vsa
10:04:17.782 > s2vsb
10:04:17.830 > Driver registers:
10:04:17.830 >          X       0xC0:03:00:00
10:04:17.838 >          Y       0xC0:03:00:00
10:04:17.845 >          Z       0xC0:03:00:00
10:04:17.854 >          I       0xC0:03:00:00
10:04:17.862 >          J       0xC0:03:00:00
10:04:17.870 >          K       0xC0:03:00:00
10:04:17.878 > 
10:04:17.878 > 
10:04:17.878 > Testing X connection... OK
10:04:17.886 > Testing Y connection... OK
10:04:17.894 > Testing Z connection... OK
10:04:17.901 > Testing I connection... OK
10:04:17.910 > Testing J connection... OK
10:04:17.918 > Testing K connection... OK
10:04:17.926 > ok```