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

F1 like 3DOF Simulator with heave

Discussion in 'DIY Motion Simulator Projects' started by _cOdaC_, Jun 25, 2024.

  1. Sebastian2

    Sebastian2 Active Member

    Joined:
    Dec 17, 2023
    Messages:
    101
    Balance:
    407Coins
    Ratings:
    +57 / 1 / -0
    Nice seeing you make progress.

    I think I might be able to help you with the settings in SMC3. You might have been victim of a case of AI hallucinations, where the AI talks very confidently about stuff it knows very little about.

    First off, if you don't have specific reasons for putting Limit and Clip to 255, I strongly suggest you lower these values by a lot (more on that below).

    From what I read in your post I am pretty sure that those are the reason why your motor lever only moves so little (you talked about 5...10% of the physically possible range). You blamed the 1:3 ratio between motor and pot shaft for that. Yes, a ratio of 1:1 will give you a wider range of motion , but you are applying a change in fine hardware to solve an issue caused by a simple mis-configuration in software. Also, by changing the ratio the way described above, you'll only get 3 times as much motion range, so still only 15...30% of what would be physically possible. It's like trying to make music feel louder by moving closer to the speaker. In most cases it makes more sense to just turn up the volume knob.

    Limit and Clip are intended to prevent your motors to move to a position you don't want them in. Usually this is used to prevent physical collisions between motor lever and frame of the rig. Clip makes the motor controller reject motor target positions that lie beyond the clip value. So if SimTools tells SMC3 to move the motor to position 95 (the range is 0...1023 with 512 being center) and clip is set to 120, SMC3 will move the motor to 120 and not further. In the diagram in SMC3utils, clip is shown as a orange horizontal line.
    Limit is like a second line of defense. Normally, the motor shouldn't move past the clip. If, for whatever reason, it does, limit comes into play. If the motor position moves past limit, SMC3 assumes a serious error and turns the motor off. This means it won't try to move the motor anymore. The motor can be reactivated by turning the Aduino off, moving the motor into a position within the limits and then turning Arduino on again.
    In the diagram in SMC3utils, limit is shown as a red horizontal line.

    So, how to set clip and limit? Here is my recommendation: Turn on your rig and SMC3utils. Switch to manual mode (radial buttons on the left) and move the slider in the right up and down. The motor that's selected in the top left corner should move up and down as you move the slider. The blue line (where the motor should be) and the green line (where the motor actually is) should be very close to or even on top of each other.
    Now decrease Limit and Clip to 0. Slowly (!!!) move the slider so that your motor approaches a the upper or lower physical limit of motion (whichever is closer to center position). Stop just before a collision happens. Look at the diagram in SMC3utils. Take a mental note of where your blue and green line currently are. This is the place where you want your limit line to be, because under no circumstances should the motor ever move past this point (to avoid a collision).
    Furthermore, I suggest setting clip at a value that's about 50 higher than limit. You can experiment with that value. If it's too high you waste range of motion, if it's too low you might find your motors run into limit and turn off when you do a crash in game.

    Why did you set PWMmax to 115? This reduces the maximum power that SMC3 can demand from your motors to 115/255=60% of their actual maximum power. Is this done deliberately, or is this a ChatGPT hallucination? 255 should be fine in most cases.

    Furthermore I recommend setting Ki and Kd to 0. As I have explained here,

    https://www.xsimulator.net/communit...d-windows-utilities.4957/page-133#post-255366

    the integrative and derivative part of the PID implementation in vanilla SMC3 is broken. Ki and Kd do stuff but it has little to do with what is expected from a PID controller. ChatGPT seems to have noticed that too, as it suggested very small values for those. With only Kp really functional, PID tuning comes down to "increase Kp until green line comes close to blue line while motion is selected on the left side. If the motion in game during a crash is so harsh that you get scared it might break something, decrease Kp"

    That shall be enough for now. Later I'll comment on the other things you wrote.
  2. Sebastian2

    Sebastian2 Active Member

    Joined:
    Dec 17, 2023
    Messages:
    101
    Balance:
    407Coins
    Ratings:
    +57 / 1 / -0
    Here we go again.

    It sounds strange to me that your two PSUs (1000W and 2000W, made by MeanWell, if I remember correctly?) tripped your main breaker. Yes, some surge in current when turning on is to be expected, but what you describe sounds way too much.

    How sure are you that the wiring you used to connect the two PSUs to one plug was not faulty? You could use a multimeter in "resistance measuring mode" to check the connections before plugging it into the wall.
    Both L terminals on the PSUs need to be connected to one pin on the plug. The other pin on the plug needs to be connected to both N terminals on the PSU. Also connect the grounding terminal on the PSUs to the appropiate part of the plug.

    After all, you are lucky to even have 2 wall sockets secured by different breakers in the same room. Running multiple 220V cables across your room sounds very unpreferrable. I've read a lot on this forum but never came across something like this.
  3. _cOdaC_

    _cOdaC_ Member

    Joined:
    Dec 20, 2023
    Messages:
    50
    Balance:
    267Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Oh I'm so glad to see that you are still with me @Sebastian2 , thought I lost you on my way to a proper running rig.

    So, ChatGPT might be smarter than expected. It suggested me to go down with Max Limits and Clip Input. The values I've posted are still for testing purposes (I'M going to add this info to my last post, I get that it might be confusing otherwise). I'm still playing around with the movement of the lever which is why I had temporarily set both to 255. I just wanted to make others reading my posts clear, that PWMMax not being 0 was the key to get SimTools running.
    Same thing for PWMmax which was set to low, just for first test purposes, so that the motor wont go crazy.

    Thank you for your explanation of Max Limits and Clip Input and how to find proper parameters.
    My levers can freely turn 360 degrees. So I set Max Limits and Clip Input to 0 and moved the lever to the maximum, bevore the POT would leave its range of 180 degrees. So, going up, means 45 degrees and fully vertical aligned, as well as 45 degrees down vertically aligned. That turned Max Limits to be 75 and Clip Input to 75 +50% = 113.
    Futhermore I now set PWMmax to 255 and Ki and Kd to 0.
    So now its happy testing.

    Regarding the current peaks: I've had a cable with L,N,Ground. One end connected to the connectors of the 1000W PSU, the other end connected to the connectors fo the 2000W PSU. I then chose the same connectors of the 2000W PSU to connect the power cable with its Pins to it and plug the cable into the power outlet.

    As far as I understood:
    High-power switching power supplies (like my models) have large input capacitors (e.g., 470µF @ 400V)
    These are discharged when switched on ⇒ act like a short circuit
    Inrush currents of 50–200A per power supply flow for a short time!

    I have futher measured the resistance.
    The 2000W has a constant 39 Ohm.
    The 1000W showed 2.1kOhm.

    I then recognized that there might be a shorty somewhere, as it seems that the Sabertooth and Arduino lose power every few seconds. I'll check that for the root cause.
  4. Sebastian2

    Sebastian2 Active Member

    Joined:
    Dec 17, 2023
    Messages:
    101
    Balance:
    407Coins
    Ratings:
    +57 / 1 / -0
    I don't plan on leaving this community :)

    Good to hear you know what Max Limit and Clip can be used for and how it works.
    But now I am confused what restricts the movement of your motor levers. You said you can currently only youse about 5...10% of the possible range, without explaining what stops you from using more. Does this range limit exisit within SMC3utils, SimTools or both? Does the usable range get bigger if Clip/Max Limit is reduced from 255 to 133/75?
  5. Attyla.pl

    Attyla.pl Active Member

    Joined:
    Oct 1, 2023
    Messages:
    298
    Location:
    Polska
    Balance:
    1,308Coins
    Ratings:
    +85 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I think publishing a video with the settings would explain a lot.
    • Agree Agree x 1