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

Circuit not working with Arduino R3 and IBT-2 in SMC3 Utils

Discussion in 'Ready, set, go - Start your engines' started by gaboff_k, Nov 24, 2022.

Tags:
  1. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    Hi all!
    Please help me deal with SMC3utils IBT -2.
    Compiled the diagram:
    1.Arduino UNO
    2. Two drivers bts7960 IBT-2
    3. Two wheelchair motors 24V 250W 75RPM
    4. Two power supplies 24V 15A 360W
    5. Two variable resistors

    I have experience building a circuit with one MonsterMoto driver, two wiper motors, and an Arduino R3 (ch340). This scheme works fine with SMC3utils in both Sim tools and a number of games (dirt rally, DSC, No limits, Assetto Corsa).

    photo_2022-11-24_21-21-18.jpg photo_2022-11-24_21-21-58.jpg photo_2022-11-24_21-22-07.jpg photo_2022-11-24_21-22-11.jpg
    But with this rack came across a problem. Arduino flashed SMC Ver 1.00. When flashing, I indicated MODE 2. I didn’t rule anything else in the code. Attached is a screenshot of the settings. One encoder turned out to be broken and does not go into the allowable zone (because motor 2 is turned off). The second encoder is perfectly controlled. In this case, the engine does not react in any way in any modes. At the same time, there is power at the 5V driver, there is 24V at the input, Arduino flashes merrily with tx rx lights. I checked the diagram several times. Motors tested directly 24V. They work ... Tell me, please, what could be the problem?

    Attached Files:

    Last edited by a moderator: Nov 24, 2022
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
  4. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    18,635
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    133,282Coins
    Ratings:
    +10,263 / 48 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Just to check, you used this SMC3 v1.0 code: https://www.xsimulator.net/community/attachments/smc3-v1-0-zip.40556/

    And you set Mode 2 exactly like this: https://www.xsimulator.net/community/threads/problems-with-my-simulator.15382/#post-207320

    Did you follow each of the configuration steps:

    1. Disconnect the motor power supply
    2. Make sure Simtools is not running – we’re not ready for that yet!
    3. Wire up the Arduino (with SMC3 installed) to your H-Bridges and connect to your computer via USB
    4. Run the Windows SMC3 Utility software and make sure it communicates with the Arduino (There is no need to set baud rates, they are not configurable)
    5. Set the Kp, Ki, Kd, PWMmin, PWMmax, PWMrev to 0 for ALL motors (This will make sure the motors don’t move)
    6. Set Clip to 255 (you need to do this first) and Limit to 255 (This will give you plenty of margin if something goes wrong while setting up)
    7. Turn on the power to your motors – nothing should move at this stage!
    8. Set Kp to about 400
    9. Now slowly, increase PWMmax… at some point the motor should start to move. When it does check the “Green” feedback line is moving toward the “Blue” target position.
      • If it is then that motor and feedback is wired correctly - proceed to test other motors.
      • If it is moving away turn off motor power immediately (or quickly reduce PWMmax again). In this case you need to either reverse the wires to the motor being tested –OR– reverse the +5V and GND wires to your feedback pot for the motor being tested (do not do both). Restart the test from the beginning.
    10. Do the above for each motor

    If that is correct then likely it is a hardware problem. If you swap control boards to the other motor does the problem move with it?
  5. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    I did everything according to the instructions. The engines did not move. Unfortunately, changing the control board did not give a positive result.

    1. Could this be because I purchased multi-turn potentiometers (about 10 turns)? Or it will be critical when working with engines, and only the position of the encoder signal within acceptable limits affects the engine start.
    2. It seems very strange to me the reaction of the PWM line to a change in the position of the guide (in the screenshot)

    Attached Files:

    Last edited by a moderator: Nov 26, 2022
  6. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    Tomorrow I will try to change the Italian arduino to the Chinese analogue CH340. Perhaps this will help.
    Last edited by a moderator: Nov 26, 2022
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    18,635
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    133,282Coins
    Ratings:
    +10,263 / 48 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    How are the pots connected to the motor?

    You can gear pots.
  8. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    Thank you for the answer. I will try to repeat it in English. So far I'm not connecting the encoder to the motors in any way. But I plan to use such a scheme. At the moment, this is not so significant, since if the motor is not docked with the encoder, it will simply rotate freely until the encoder axis is shifted by the fingers. In my case, the engine shows no signs of life.

    Attached Files:

  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    18,635
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    133,282Coins
    Ratings:
    +10,263 / 48 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The pots need to be centered and connected to the motor, as they provide positional feedback.
  10. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    I absolutely agree with you about the feedback... But I am sure the engine will move in any case, whether it receives a signal from the encoder or not. The main thing is that the encoder signal is within acceptable limits. Now I have a problem that 24V is coming to the driver and the driver does not transmit to the motor 24V ... 5V is on the driver. As for the digital signals, I can't watch them.
  11. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    Please check if I'm wrong. When working correctly. By turning on SMC3utils, the motors should be centered. If the encoder is visible, its position is visible, but at the same time, when the engine moves, the encoder axis does not shift (and the axis must be shifted according to the program), then the engine will rotate freely... To infinity.

    Attached Files:

  12. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    In my current solution, the encoder is attached to the motor shaft via an adapter, and it works... But if the encoder is removed and thrown on the floor (at acceptable values), the engine will not care. If he needs to shift, he will shift. In my case, the engine is completely silent with the correct settings. You say, install an encoder, in order to receive a broken connection... Will it really help?

    Attached Files:

    • t1.jpg
      t1.jpg
      File size:
      312 KB
      Views:
      8
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    18,635
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    133,282Coins
    Ratings:
    +10,263 / 48 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sounds like the controller may be faulty.
  14. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    Swapped both controllers. They behave the same way. I'm still sinning on the Italian Arduino. Quote: "The SMC3 is a "Simulator Motor Controller for 3 Motors" written for the Arduino UNO R3. At the time of writing this it has not been tested on any other Arduino model."
    But R3, as far as I can tell, is a compatible board, with minimal differences. I admit that these differences may be critical to the operation of SMC3utils
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    18,635
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    133,282Coins
    Ratings:
    +10,263 / 48 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Correct SMC3 is writen for R3 and issues have previously been reported with other variations.
  16. gaboff_k

    gaboff_k New Member

    Joined:
    Nov 8, 2022
    Messages:
    10
    Balance:
    63Coins
    Ratings:
    +0 / 0 / -0
    So far, I have only noticed the differences that SMC does not always load settings into ita arduino. Or rather, it doesn't do it fully or correctly. So, for example, the next time I start, I may pop up deadzone to 0 on both engines or not save the last values for PWM max.

    Well, in any case, so far I think it's about BTS7960 drivers. In the reviews, I came across messages when these drivers were massively defective from different parties. Now I ordered from China (they won't be superfluous) and I want to get an oscilloscope, see what's going on the digital cannel. Now I connected the R3 to a new circuit, reassembled for the third time, replaced the resistors for a shorter stroke.