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

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 Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 0 / -0
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,009
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,758Coins
    Ratings:
    +10,872 / 54 / -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?
  4. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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
  5. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,009
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,758Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    How are the pots connected to the motor?

    You can gear pots.
  7. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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:

  8. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,009
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,758Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The pots need to be centered and connected to the motor, as they provide positional feedback.
  9. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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.
  10. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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:

  11. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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:
      211
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,009
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,758Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sounds like the controller may be faulty.
  13. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,009
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,758Coins
    Ratings:
    +10,872 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Correct SMC3 is writen for R3 and issues have previously been reported with other variations.
  15. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 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.
  16. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 0 / -0
    Hello to everyone who wanted to help and who may face this problem in the future.

    I figured it out, even though it wasn't easy for me (not an electronics technician).

    Broken drivers from China. Both. I bought two pieces in Russia. Also faulty. They began to sort it out. In stock, all 30 pieces are broken). I had to poke around a little and everything worked.

    Conclusion: even a few pieces may be faulty. It's not our hands that are crooked, it's your drivers that are junk!

    I had to solder the 74HC244D,653 chip.

    Thank you all. We are working further

    https://youtube.com/shorts/e--1ZbjrBjE?feature=share

    Attached Files:

    • Informative Informative x 1
  17. Design89

    Design89 Member

    Joined:
    Oct 25, 2022
    Messages:
    32
    Location:
    Netherlands
    Balance:
    214Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Which pins did you solder? I have some problems that the motors are only running in one direction...
    • Like Like x 1
  18. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 0 / -0
    My engine driver didn't work at all. In my photo, an example of poor-quality soldering of a bus converter (the second one turned out clean). The converter did not work completely, not one PIN at a time. So I think it's the settings.

    Attached Files:

  19. Design89

    Design89 Member

    Joined:
    Oct 25, 2022
    Messages:
    32
    Location:
    Netherlands
    Balance:
    214Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Okay thanks. I'm trying to figure out my problem. Motors only turn in one direction and start stop, as shown with the green line. Motor 1 and 2 turning 1 direction.JPG
    Did check my wires and soldered all the wires for 1 motor, still same problem.

    So unfortunately for me not the same problem as you had.
  20. gaboff_k

    gaboff_k Member

    Joined:
    Nov 8, 2022
    Messages:
    32
    Balance:
    125Coins
    Ratings:
    +8 / 0 / -0

    1. Before starting the motors, you need to make sure that the encoders are working. You can not supply power to the engines. Are your encoders adjusting properly?

    2. kp 500 until the moment your circuit is working properly, you do not need to set it. Set to 0 and then gradually increase until the motors start to rotate. Important! If at low kp your motors turn on at full power, then the driver is not working.