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. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    The settings are exactly as they are above for simtools I didn't need to change anything from before.

    In SMC3 I have the settings low but like I say it works perfectly using the SMC3 utility no jerking nice and smooth.

    Soon as I try to test using simtools it's terrible.

    Can't upload pics as I'm out at the mo. I will do a video after when I get home, shouldn't be too long
  2. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    I did the same experience first when beta testing, while SMC3 was working flawlessly I had troubles to get SimTools working. Anyway you are an experienced user ntl there could be something wrong though ;)
  3. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,954Coins
    Ratings:
    +1,016 / 10 / -1
    Unless there is something specific about the sabretooth version it should be OK. I've always used 1ms on my standard SMC3 on UNO.

    You could try using SMC3Utils in UDP passthrough mode to search for problems. It will display a light blue line showing what it receives from simtools and a dark blue line showing the returned value from the arduino (or the other way round?). It might help tell you where the error is introduced?
    • Informative Informative x 1
  4. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    BTW I assume it's a baud issue.
  5. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Yes need to set that up in UDP ...... never had to use it before how do I do it @RufusDufus is it in the SMC3 thread ??
  6. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Also tested and failed. I got a lot of communication errors between UNO and Sabertooth resulting in jerky movements.
    • Informative Informative x 1
  7. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I changed the rate 112500 in describe for each sabertooth
  8. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    And SimTools?
  9. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,954Coins
    Ratings:
    +1,016 / 10 / -1
    OK, that's interesting. I'll have a quick look at the sabretooth code and see if there is anything I can find otherwise I can't offer any other advice at the moment.
    • Like Like x 1
  10. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Here some screenies

    upload_2016-11-12_11-44-46.png

    upload_2016-11-12_11-45-21.png
    upload_2016-11-12_11-45-51.png

    These are the same for all 3 Sabertooths and UNO's

    Attached Files:

  11. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    ok, try to set the Sabertooth to BAUD 38400 for testing purposes (Describe)
    • Agree Agree x 1
  12. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    Sorry to hear your are having issues. I see serial timeout in DEscribe says 0. That screen shot is after running the sketch and download the settings again correct? My plan was to have only one sketch for both sabertooths but in may be necessary to make two, one for the 2x60 and one for the 2x32. The problem may be because the 2x32 is a V3 sabertooth and the 2x60 is V2. After @Pit couldn't get the sketch to work on his 2x32 after I got it working on my 2x60, I had to call DE support to confirm that V3 is not 100% compatible with V2 commands. That's why you must use DEscribe on the 2x32 to set its baud. I forgot to check if the serial timeout was also working or not though and from your screen shot it isn't. That shouldn't be causing your issues but maybe the code for the 2x60 is screwing with the 2x32. I assumed the 2x32 would just discard the V2 commands but maybe its causing the problem.:confused: But again, I don't have a 2x32 myself to test with.

    Shortly I will be sending you a striped down sketch that @Pit has had success with to try to see if that makes a difference since he said my posted sketch is not working for him now either.
    • Like Like x 2
  13. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    Good idea to try this too. Don't forget to change the baud to 38400 in the sketch to though.
    • Informative Informative x 1
  14. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    What should I set serial timeout to ?

    WIll try this now
  15. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Right, I forgot to mention it. Thanks @BlazinH
  16. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    Its fastest setting, 100ms.
  17. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Right, I forgot to mention it. Thanks @BlazinH
  18. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    change it where ??
  19. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I changed it uploaded it and it goes blank again ?
    upload_2016-11-12_13-5-40.png
    upload_2016-11-12_13-5-51.png
  20. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    same here