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

Motor setup problem with "SMC3 Utility"

Discussion in 'Ready, set, go - Start your engines' started by motiondynamics, Jun 3, 2021.

  1. motiondynamics

    motiondynamics Member Gold Contributor

    Joined:
    Apr 12, 2019
    Messages:
    172
    Balance:
    1,035Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Hi everyone, last night for the first time I finally connected Arduino Uno R3 with Monster Moto and my 24V DC motor.
    I changed the sketch line by inserting "Mode1".
    I booted SMC3 V1.01, followed the instructions from the following post:

    https://www.xsimulator.net/community/threads/smc3-arduino-3dof-motor-driver-and-windows-utilities.4957/

    I managed to get the engine moving, anticlockwise, clockwise ...
    But I have some problem: I can't set the PID values well.
    Basically I put Kp at 400 and PWMmax 30 and the motor started to move, but I have two problems:

    1) the engine makes noise, as if frying
    2) while the engine is running, the engine stops by itself ("OFF" is shown at the top left, I have to press ON again.

    Why is the engine frying?
    Why does the motor stop by itself when checking SMC3?
    • Like Like x 1
  2. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,460
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. motiondynamics

    motiondynamics Member Gold Contributor

    Joined:
    Apr 12, 2019
    Messages:
    172
    Balance:
    1,035Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Hi noorbeast, yes I have already tested the H-bridge, it works correctly, I had also used it a few weeks ago with X-Sim, it worked perfectly.
    The problem is that I have some problems with "SMC3 Utility".
    In particular, I noticed that, while the motor is rotating counterclockwise / clockwise and I change the PID or PWMmax values, the motor stops. I noticed in the upper left that "Motor 1" goes to [OFF] and I can't bring it back to [ON]. I don't know if it's a bug with the program.
    Later I tried to unplug the USB cable and reconnect but the motor still remains off, in the top left I still see "Motor 1" [OFF].
    I tried to restart "SMC3 Utility" but the motor is still in [OFF] (see attached image)

    I think something happens inside the Atmega328P (EEPROM), in fact I reprogrammed the Atmega328P with SMC3 v1.0, I set the PID and PWM values in "SMC3 Utility" (see attached image) and it starts working again.

    Attached Files:

  4. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,212Coins
    Ratings:
    +594 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Hi @motiondynamics ,
    As soon as the green feedback line goes beyond one of the the red limit lines, SMC3 turns the motor off, which is a protection measure.
    For turning it on again, you need to bring the feedback line back between the red limit lines. For achieving this, disconnect the potentiometer and turn it by hand until the feedback line is centered again. Then connect it to the motor again.

    Now before turning the motor on again, you should reverse the motor cables, because it seems that the motor turns the potentiometer into the wrong direction.
    (This procedure is explained in the second bullet point within step 9 of the SMC3 setup instruction, which you have attached as second image.)
    • Informative Informative x 1
  5. motiondynamics

    motiondynamics Member Gold Contributor

    Joined:
    Apr 12, 2019
    Messages:
    172
    Balance:
    1,035Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Ciao MarkusB, grazie per la tua risposta.
    Ho fatto come hai spiegato, ho allentato la vite del potenziometro (10K, rotazione infinita) e l'ho ruotata fino a quando la linea verde è al centro.
    Adesso funziona.

    Vorrei fare un setup corretto, in modo logico, utilizzando il grafico "SMC3 Utility" e sapendo cosa fare, senza andare a caso.
    Ho già seguito le istruzioni di "Setup iniziale" ma vorrei sapere qual è il modo più veloce per impostare correttamente il mio motore (180W, 24V, 15A, motore 3000 rpm, cambio 60 rpm).
    Avere anche un suggerimento su quale "Out Mode" utilizzare per eseguire una corretta configurazione del motore.
  6. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,212Coins
    Ratings:
    +594 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Ok, at first one question: Have to reversed the motor cables, so that the green "feedback" line now follows the blue "target" line and after this the motor stops? The feedback line should not anymore go beyond the red limit lines. Is this the case?

    If you have achieved this and followed all 10 steps of the instructions, you can fine-tune the parameters.
    For doing this, you find some helpful information about all the tuning parameters in this post.

    About your question about which of the "out modes" you should use:
    I would start with "Manual", because with this mode you can carefully drag the slider by hand.
    If you get more confident, try "Sine", "Square", and "Motion". Tune the parameters until the motor follows the curves as well as possible.

    Oh, and you need to do the final tuning while you are sitting in your simulator, because the optimal PID settings are completely different for an empty rig compared to the rig with you inside.
  7. motiondynamics

    motiondynamics Member Gold Contributor

    Joined:
    Apr 12, 2019
    Messages:
    172
    Balance:
    1,035Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Yes, the green line follows the blue one and follows it, and the engine perfectly follows the trend of the graph (see the graph).
    But I don't know what the yellow graph is .... Is this normal?

    Another thing: when I have finished the setup with "SMC3 Utility", how can I perform the "CALIBRATION" of the motors (position of the arms)?

    Attached Files:

  8. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,212Coins
    Ratings:
    +594 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    The yellow line is the PWM signal. I may be wrong, but I think you can ignore it.

    About the calibration: Do you mean how to center the motor lever when the green line is centered?
    For doing this, you need to again disconnect the potentiometer and then carefully turn it by hand until the motor lever is centered. Then connect it again.

    After this you should be ready to configure all needed settings in SimTools Game Engine.
  9. motiondynamics

    motiondynamics Member Gold Contributor

    Joined:
    Apr 12, 2019
    Messages:
    172
    Balance:
    1,035Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SimAxe, Arduino, Motion platform, 6DOF
    Exactly, I seem to have understood that the function of "SMC3 Utility" is to program the EEPROM of the Atmega328P with frequency, PWM, PID, maximum limits ... Right?

    Next you will need to prepare the GameEngine setup and calibrate the motor axes to adjust them to the right angle.
    So there is no tool to perform the calibration? Or will I just have to turn the potentiometer until the tonearm is in the right trim position?
  10. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,212Coins
    Ratings:
    +594 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Yes, correct.

    About the calibration:

    The first thing you need to do it to make sure that the motor levers are in their middle (horizontal) position when the green feedback line of SMC3 Utils is in the middle (zero) position.
    As explained above, you need to do this manually: disconnect the pot, turn the pot by hand until the motor lever is in horizontal position, and then connect the pot to the motor again. Do this carefully, so that you don't accidentally damage your rig or your fingers with the moving lever.

    In Game Engine you first configure the Interface Settings in order to establish the connection to the Arduino.
    Then you configure the Axis Assignments separately for each game you want to play. Of course, the installation of the corresponding PlugIns is needed for doing this.

    Fine tuning is done while running the game, and one important step is capturing the min/max values via the Tuning Center.

    Please refer to the SimTools User Manual, where you will find all needed information:
    https://simtools.us/wp-content/uploads/2020/10/SimToolsUserManual-v2.5.pdf
    • Like Like x 1