1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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!
  3. 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
  4. 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

Compact Full frame, 2Dof with TL

Discussion in 'DIY Motion Simulator Projects' started by Rav3n87, Sep 23, 2020.

  1. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yep

    Attached Files:

  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Try increasing kp to 400 and dropping PWmax and PWrev down, say to 200, then rerun the test and post that.
  3. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yep will do, came across another problem which may contribute.....motor wires to number got bloody hot,

    Will upgrade the wiring to the motors tomorrow morning try your suggestion and report back

    Thanks for your help mate, greatly appreciated!!!!
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    When you do can you please also report at what value PWmax starts to move the motor, as I am just taking a wild guess.
  5. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok will do, have upgraded the motor wiring and going to redo the pot wiring aswell and mount the control box properly to eliminate any possibility of errors there,

    Also should my pwmrev match the pwmax?

    And what frequency would you recommend?

    Cheers
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    For testing the Fpwm at 35 should be fine.

    The PWMrev value depends a bit on how the hardware reacts, it will likely end up as the same or a bit less than PWMmax, but tuning this stuff is all about watching the graphs and seeing how the rig responds. For example, in your earlier posted picture there are clear overshoots, which indicate SMC3 settings need to be refined:

    20230106_180027.jpg

    This was written with a different control board in mind, but is meant to be a gentle analogous introduction to what to aim for in tuning, which includes links to more precise information, depending on how far down the control theory hole you want to go: https://www.xsimulator.net/community/faq/a-laymans-analogy-guide-to-pids-pid-tuning.219/
  7. Rodeo5150

    Rodeo5150 ROOKIE BUT LEARNING FAST Gold Contributor

    Joined:
    Mar 21, 2019
    Messages:
    222
    Location:
    Antioch, CA, United States
    Balance:
    1,251Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    @Rav3n87 WOW!!! 3D PRINTING GENIOUS!! is the seat 3d printed as well? BRAVO SIR! BRAVO!
    Last edited: Jan 7, 2023
  8. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Thanks @noorbeast, just having a coffee and getting stuck into the last of the wiring connections and will get back to testing,

    Haha cheers @Rodeo5150 if your interested in any of those projects they are from Lebois racing @Lebois

    Attached Files:

    • Like Like x 1
  9. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok sooooo here's some videos,

    Seems no what I try it's crap





    I'm starting to think these gearboxes are garbage and I need the 50:1 or 60:1s expensive lesson possibly but I guess shit happens,

    Motor 1 on right side (sitting in sim)

    Came up to level at pwm 50

    Motor two was closer to 80, I believe because of a little extra weight on that side
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Have you tried a smaller lever CTC, I see you have the holes drilled for it?
    Left motor seems way too soft, what are the SMC3 settings and square wave reactions for just that motor?
  11. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok will do now...
  12. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok still a little wobbly and the graph shows the wobbles

    Attached Files:

  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Motor 1 is closer but both look to need refinement.
  14. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The backlash does not seem that far outside the norm: https://www.xsimulator.net/community/faq/wormdrive-backlash.293/

    But the motor is not holding position as it should. Is the motor you move with your foot motor 1 or 2?
  16. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yeah i thought the mechanical backlash was acceptable as well, its definitely not excessive!

    That was motor 2 but both of the front motors do it exactly the same, Motor 3 (TL) probably does as well but being side to side movement it isn't noticeable at all

    its like a deadzone of sorts which is weird, i can move the motor and feel a little resistance when i do it until a point it stops, if i push it down to that point it will then move with me as i let off back to where it want to be, I was just expecting it to "fight me as soon as i put any pressure on it, but its not :(
  17. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    @Blame73

    I've been reading through your build thread again haha specifically on the changes to the SMC3 code for using the Cytrons and I'm wondering if you didn't experience the same issue as me because of the gear ratio differences (25:1 vs 60:1) this would have significantly higher holding power over my 25:1's and i was curious if there was a way to up the power level around the center?

    You posted a picture on Post #426 (page 22) of the issue of high power one way and low power the other and then when you modified the code for the Cytron's you have it Low/Low is there a way to up this number in the code? I think it may fix the issue if its possible to change that I'm having with a "freeplay" or Deadzone like outcome mainly around center (See above videos)

    Thanks Mate


    This is the part of the code I'm referring too.....

    void SetOutputsMotor1() // MODE2
    {
    if((Feedback1 > InputClipMax1) && (PWMrev1 != 0))
    {
    PWMout1 = PWMrev1;
    OutputPort &= ~(1 << ENApin1); // Unset Motor1 In 1
    MyPWMWrite(PWMpin1, 255-PWMrev1);
    //WAS ==> MyPWMWrite(PWMpin1, PWMrev1); ------------- MOD By Blame73 for Cytron MD30C
    }
    else if((Feedback1<InputClipMin1) && (PWMrev1 != 0))
    {
    PWMout1 = PWMrev1;
    OutputPort |= 1 << ENApin1; // Set Motor1 In 1
    MyPWMWrite(PWMpin1, 255-PWMrev1);
    }
    else if((Target1 > (Feedback1 + DeadZone1)) || (Target1 < (Feedback1 - DeadZone1)))
    {
    if (PWMout1 >= 0)
    {
    // Drive Motor Forward
    PWMout1+=PWMoffset1;
    if(PWMout1 > (PWMmax1+LiftFactor1)){PWMout1=PWMmax1+LiftFactor1;}
    OutputPort |= 1 << ENApin1; // Set Motor1 In 1
    MyPWMWrite(PWMpin1, PWMout1); // Motor driven when PWM=0 (unset)
    //WAS ==> MyPWMWrite(PWMpin1, 255-PWMout1); // Motor driven when PWM=0 (unset) ------------- MOD By Blame73 for Cytron MD30C
    }
    else
    {
    // Drive Motor Backwards
    PWMout1 = abs(PWMout1);
    PWMout1+=PWMoffset1;
    if(PWMout1 > PWMmax1){PWMout1=PWMmax1;}
    OutputPort &= ~(1 << ENApin1); // Unset Motor1 In 1
    MyPWMWrite(PWMpin1, PWMout1); // Motor driven when PWM=1 (set)
    }
    }
    else
    {
    // Brake Motor
    OutputPort &= ~(1 << ENApin1); // Unset Motor1 In 1
    PWMout1=PWMoffset1;
    MyPWMWrite(PWMpin1, 0);
    }
    PORTD = OutputPort;
    }
    Last edited: Jan 8, 2023
  18. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    @noorbeast

    Had a small spot of luck maybe,

    Are you able to have a look at the graph, I can't turn the kp up any higher than 60 otherwise the issue comes back,

    Not really tracking the graph to well on the down stroke

    Attached Files:

    Last edited: Jan 9, 2023
  19. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,145
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,565Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The down stroke has mass and inertia, so much harder to control.

    At what PWMmax value does the motor start to move with these settings?
  20. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Nope scratch that still total garbage, wherever it stops on the square wave test it rocks up and down, when I'm sitting in, played with settings whilst in and can't get it any better