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

Tutorial SPS - Sabertooth Packet Serial PID motor driver sketch w/SoftStart

Discussion in 'SimTools compatible interfaces' started by BlazinH, Nov 10, 2016.

  1. cyberxu

    cyberxu Member

    Joined:
    Nov 22, 2012
    Messages:
    64
    Occupation:
    AME Planner
    Location:
    Ontario, Canada
    Balance:
    516Coins
    Ratings:
    +31 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Hello all, can anyone tell if this sketch w/softstart also compatible with sabertooth 2x12 model?
  2. FredBasset

    FredBasset Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    30
    Balance:
    461Coins
    Ratings:
    +13 / 0 / -0
    I wondered if anyone had any advice for me, I used this sketch with a Sabertooth 2x32 to build a two motor belt tensioner last year. Its worked really well but the last few days every time I'm in game, the first time the belts pull tight it stops working.

    I've tried everything I can think of to trouble shoot it but run out of inspiration now so just after some wisdom.

    Thanks
    Fred
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Can you please post picture of all of your settings.
  4. Manes

    Manes Member

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    179Coins
    Ratings:
    +12 / 0 / -0
    Hi guys. I go to upgrade my 2 dof to 4 dof. For the moment go to put one motor for corner. Is easy to mod the chasis. Later i Will build a new chasis with 3 dof + traction Lost but for the moment this is the idea. Ok, i have one sabertooth 2x32 and one sabertooth 2x60. This is a problem? For other side i go to use 2 Arduino with smc3. I supuse need to use interface 1 and 2 in simtools but i am not sure about the configuration. In interface 1 i need put axis 1 and axis 2 and interface 2 axis 3 and axis 4? Some link with a similar project?
  5. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Grab a copy of the SimTools manual and keep it handy for reference: https://www.xsimulator.net/community/faq/rtfm-start-with-the-official-simtools-documentation.117/

    Yes you could configure Interface 2 as axis 3 and axis 4, if that suits your design.
  6. Manes

    Manes Member

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    179Coins
    Ratings:
    +12 / 0 / -0
    Yes, i have a paper manual in my room. I must to use another outputs un Arduino interface 2 or are the same?
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Please post on you build thread, so there is some context to consider your question, which is off topic for this particular thread and potentially specific to your project.
  8. Manes

    Manes Member

    Joined:
    Jun 12, 2020
    Messages:
    106
    Balance:
    179Coins
    Ratings:
    +12 / 0 / -0
  9. FredBasset

    FredBasset Member Gold Contributor

    Joined:
    Dec 17, 2013
    Messages:
    30
    Balance:
    461Coins
    Ratings:
    +13 / 0 / -0
    Apologies for not responding to this, it ended up being a simple issue. I'd not had time to investigate it until this weekend but found a faulty solder on the connector between the psu and the Sabertooth.
    • Informative Informative x 1
  10. Grucho

    Grucho Member

    Joined:
    Jan 3, 2023
    Messages:
    46
    Balance:
    240Coins
    Ratings:
    +8 / 1 / -0
    Hello,

    I tried to use a modified version of the script here, the SPS_8.2_softstart modified to work at 38400 BAUD and it is working fine with SMC3 with 2 motors. I have 2 diferrent problem now. I am not able to connect a third motor. I followed the guide and set the address port on the secon sabetooth on the 129 and connect to the arduino in the port 12. It doesn't work and I am not sure how to fix it. Can someone help me out? I am stucked here and out of options, plus my knowledge is very limited.

    Thanks a lot!
  11. Grucho

    Grucho Member

    Joined:
    Jan 3, 2023
    Messages:
    46
    Balance:
    240Coins
    Ratings:
    +8 / 1 / -0
    Sorry for creating confusion. After reading all the posts i figured i need 2 arduinos. I was misslead by the code description that makes you think you can connect 2 sabertooth to the same arduino.
    Thanks anyways guys! Now i will try to sort out the connection issues with simtools and flypt
  12. Grucho

    Grucho Member

    Joined:
    Jan 3, 2023
    Messages:
    46
    Balance:
    240Coins
    Ratings:
    +8 / 1 / -0
    Hi everyone. After researching a bit online I got kind of an issue. The system that I am trying to achive with my build needs to run basically always 3 motors simultaniusly. I am trying to control the movement of a sphere sitting on top of 3 omniwheels. I am wondering if it is possible, to make math easier, to conncet more then 1 sabertooth to the arduino uno. Otherwiese it will be hard to control them separately i guess. Either way, I have no idea how to proceed with the build.
  13. sci666

    sci666 Active Member Gold Contributor

    Joined:
    Mar 18, 2021
    Messages:
    186
    Location:
    Germany
    Balance:
    1,146Coins
    Ratings:
    +70 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    hi there i have a question for the Arduio Sketch.

    there is no need to change anything within the code ? i plan to change the motors in my system to more watt and more rpm ... is it just a configuration thing in SMC3 Software or must i reupload an edited sketch ?
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    If it is only the motors just redo the SMC3 settings.
    • Informative Informative x 1
  15. Grucho

    Grucho Member

    Joined:
    Jan 3, 2023
    Messages:
    46
    Balance:
    240Coins
    Ratings:
    +8 / 1 / -0
  16. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  17. Grucho

    Grucho Member

    Joined:
    Jan 3, 2023
    Messages:
    46
    Balance:
    240Coins
    Ratings:
    +8 / 1 / -0
    That is the problem. I am not sure. All the connections seemed done as described. When i test the motors with SMC3 they run perfectly.

    The problems starts with flypt and simtools.

    With flypt i am able to control one motor only instead of 2 even though in theory I think I did it all right and with simtools nothing works. I have literally non even a signal of movements.
    For sure I am doing something wrong. Not sure where though.
  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Can you please provide pictures of all your SimTools settings, and please make sure it is the latest version.
  19. Raysinred

    Raysinred New Member

    Joined:
    Jul 7, 2023
    Messages:
    5
    Balance:
    26Coins
    Ratings:
    +1 / 0 / -0
    Hello,

    I am brand new in starting my DIY journey, and decided to start slow by making sure I can get the motion control part working before anything else. I just purchased an Arduino R4 Minima (in my infinite wisdom that newer must be better) with plans to use with a Sabertooth 2x32 motor controller. I was able to successfully upload my first code (Blink) and then decided to upload the SPS code. That is when I determined the current Uno R3 SPS code does not work with the new R4 without some changes. Apparently because of the new chip, AVR specific code for the R3 won't work out of the box.

    So my question is, has anyone used the new Arduino Uno R4 Minima, or has anyone modified the SPS code for it? I'm am a very beginner coder for this stuff, but if someone could point me in the right direction, I could give it a try to update the code.

    • The first error that pops up is "Compilation error: 'PORTD' was not declared in this scope". I assume that the pin/port controls are different, but not sure what to change it to?

    • Does this only effect the Arduino SPS code, or would I also have to modify the Sabertooth Arduino Library code as well? Will this effect how the Arduino communicates with the Simtools software?
    Any help is greatly appreciated. Worse case I'll just purchase the Uno R3 and start from there. But it may be worth it to update for the R4 as it does have some nice improvements. Not sure it matters for this application.

    Thank you,
    Ray
  20. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,147
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,577Coins
    Ratings:
    +10,903 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I don't think anyone has reported using the Arduino Uno R4 Minima, or modifying the SPS code.
    • Useful Useful x 1