1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Showroom Compact AC Servo 6DOF Rotary Stewart platform

Discussion in 'DIY Motion Simulator Projects' started by knaufinator, May 26, 2020.

  1. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    I assume it can can be simtools' problem, does your contrller support any other software.
  2. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
  3. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    Sir I posted some videos to show you the problem, thank you very much for your time.
  4. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    I just performed the same test on my rig, powered on rig, used simtools, disconnected pcb, reconnected and used simtools again, and it behaved as it should. it does not move down unexpectedly.

    If I was you, I would do more testing within Arduino Serial Monitor, with motor debug enabled in the code.
    When motor debug is enabled, periodically the motor positions are sent out - "0,0,0,0,0,0" means it thinks its at home for all motors, from motor 1-6.Now send it commands,... such as down heave (2047,2047,1047,2047,2047,2047X),... .or up heave (2047,2047,3047,2047,2047,2047X)..

    repeat these commands and try to characterize whats going on when you unplug...

    I have no idea what its doing. I have heard of issues with the chinese language version of windows having issues with simtools... maybe there is something like that happening here...


    Because you have this odd issue, I do not recommend having a chassis ontop until you can get this characterized
    • Useful Useful x 1
  5. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    Yes Sir I will try out thank you very much, two more questions
    Does this controller work with other software?
    Which esp32 pin should estop wired to?
    Thank you
  6. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    an ACTUAL E-Stop Should KILL the power to the rig. my estop releases the relay that powers the motors,... this is independent of the PCB.

    I have a semi-Estop wired into the PCB, but this just stops sending commands to the motors,... not good enough for a final safety measure. The pins are on the PCB, to the right of the RJ45 connector. its pin 22 on the eps32, as defined in the Helper.h file as ESTOPPIN
    • Like Like x 1
  7. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    Sorry sir, Where is to the right of rj45 connector. And I wonder if there is no solution to this simtools problem do I have alternative option for software.
  8. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    There are other sim software packages out there that compete with simtools,.. I would assume you can get them working the same way as simtools. I've not tried. You just need to match the format ..i.e.2047,.....X
    • Like Like x 1
  9. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    U2

    Attached Files:

    • Like Like x 1
  10. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    oh silly me I always thought that is for powering pcb
  11. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    Hi sir, I did some test as you instructed.
    First, I thought the U2 was to power the pcb, I always keep it plugged with phone charger which offers 5V power, anyway that's very stupid.
    Now I unplugged it and uncomment #define DEBUG_MOTORS 1 #define DEBUG_NO_ESTOP 1
    I send six 2047,which is suppose to be home but it heaves down to lower position and print six(-419).
    If I unplug it and reopen the monitor, it takes the lower position as start point(printing 0), if I send 2047 again, it heaves down to a even lower position.(That's exactly what happened with simtools.
    Then I wonder, maybe i did something wrong to estop, so I comment #define DEBUG_NO_ESTOP 1 and did some more test. it's completely random result.
    It doesn't work at all when I short u2, but sometimes the motor did stop if I give u2 that phone charger power, but after that it's completely dead the motors won't move at all even if I unplugged the phone charger, I have to restart the pcb.
    By trying this I burned one of my esp32.
    Oh and there is this one time it printed "ww3f",maybe this indicates someting.
  12. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF

    FYI, the Estop/pause,.. is a NO type circuit,.. (Normally Closed) This means you need to have the circuit CLOSED to operate the rig, when this circuit is Opened, then the logic is to stop sending position changes.

    Dont put 5v on the estop circuit,... i suspect this would damage it......

    the PCB derives all power from the 5v USB line.

    ARE YOU 100% positive you changed NOTHING in the source code,... even dimensions in the helper.h file,... as your rig is behaving as if you changed the size parameters and dont have the values "calibrated" correctly.
  13. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    Yo bro, as someone who has been through this process, I can surely tell you that first you shoud change your structure, to raise the bottom so the arm won't hit the base, because definitely, every time you power off the motor it will drop to the lowest point which can cause conflict to the base, or you have to keep it powering on 24/7, which is a waste of money.
    As for the homing process staff, you need to modify your motor driver(the box attached to the motor),it got three mode, dn Fn Pn turn to Pn mode, modify Pn-XXX to specific value as follow.
    • pn002 - Control Mode - "002"
    • pn003 - Servo enable - "001"
    • pn098 - Gear - "80"
    • pn109 - Position command deceleration mode- "002"
    • pn110 - Position command a filtering time constant - "050"
    • pn111 - S-shaped filtering time constant Ta position instruction - "50"
    • pn112 - position instruction Ts S-shaped filtering time constant Ts - "50"
    Input Designation

    • pn52 - 23 Sigin 1 - homing trigger
    Home location after sensor is activated

    • pn36 - +/-11 X1000 pulses to get you in the ballpark area after home trigger
    • pn37 - ~ +/-5000 as needed for precision to finish off where you want the arm to land after home trigger
    • pn38 - 100 init speed
    • pn39 - 100 back home speed
    homing rotation direction settings

    • pn033 -3 power on homing
    • pn034 - 0 clockwise
    • pn034 - 1 counter clockwise
    the vlaue related to homing process lies in pn33-pn39. Do modify these values you will get expected result.
    spend some time reading the servo manu you will understand it perfectly.
  14. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    oh sir yes, I did change the structure data, modified as the excel sheet tells me. as for the estop you mean I should short the u2 to operate and cut to stop?
  15. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    //variables for platform positions
    static float theta_r = 51.25;
    static float theta_s[6]={0,60,-120,-60,120,180};
    static float theta_p = 37.845;
    static float RD = 65.42;
    static float PD = 69.642;
    static float ServoArmLengthL1 = 21;
    static float ConnectingArmLengthL2 = 59;
    static float platformHeight = 46;

    this part is modified to my structure
  16. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF
    ok, so this is something I have not covered as,.. no one has modified the code at this level and lived to tell me about it..,... you need to calibrate these values so that they converge at home correctly. something in the values make the platform want to go down in order to equalize the equation.

    https://onlinegdb.com/muCwqMFO_

    fork this so you can change the values for testing.

    This is an online c compiler I used for this back when i was working on this same issue. This helped me tune the algorithm. I have entered your values into it, and have mine commented out above yours. The core algorithm for reverse kinematics is in this code.. the same as it is in the excel file and my esp32 controller.

    when you hit run, you see the output at the bottom - the Alpha value is the what you need to get very small in order to eliminate off balance values. "0.0000032414..." get this alpha value to like the 10 thousands place in precision to 0, and it should balance at home correctly..

    I do notice though,... your theta R value is very large compared to mine,....
  17. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    oh yes sir but I have to make it this large to get the excel graph the same shape as my structure design. Is there any way I can send picture to you, I seriously didn't find a way to post picture here. I want to send you my structure cad design.
  18. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    and where should i put my alpha value?
  19. knaufinator

    knaufinator Active Member

    Joined:
    Nov 16, 2017
    Messages:
    155
    Occupation:
    Computer Engineer - RFID Specialist
    Location:
    akron,ohio
    Balance:
    1,131Coins
    Ratings:
    +184 / 1 / -0
    My Motion Simulator:
    AC motor, 6DOF

    you dont put the alpha value somewhere,... you try to modify your structure values to make the alpha value converge close to 0.... something is not correct.

    you should be able to attach pictures to these posts.
  20. FeidhlimLee

    FeidhlimLee Member

    Joined:
    Oct 31, 2021
    Messages:
    48
    Balance:
    344Coins
    Ratings:
    +7 / 0 / -0
    so if I change the data should I change the structure of my already built simulator?!