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

help I do not know what to do Arduino + sabertooth

Discussion in 'DIY Motion Simulator Projects' started by dualclick76, Jul 12, 2015.

  1. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    use the Sabertooth 2x32
  2. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    resistors are connected p1 and b+ p2 and b +?
    Last edited: Jul 14, 2015
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    Okay, you use a 2x32 @dualclick76.

    The 2x32 is different than other current sabertooth models because it is newer and has a built in USB (eventually, I expect all sabertooths will have a built in USB though). The 2x32 now uses the dip switches differently also. I believe this change is due to the fact that it is now very easy to connect a 2x32 to a computer with its USB interface to access Dimension Engineering’s Describe Software to make changes. Older models require an additional purchase of a USB to TTL converter to interface with a computer making Describe inaccessible to those without one.

    To put a 2x32 in simple serial mode set it’s dip switches as follows: 1-off, 2-off, 3-off if using a battery and on if using a PSU, 4-off, 5-initally on, 6-doesn’t matter. The 2x32 is now set up in simple serial mode at 9600 baud. At this point, you still do not need to use Describe software to run at the default 9600 baud rate. We will make that faster later though.

    Now you need to make a small change to the arduino code and load it in order to test to see if the 2x32 is working. Look for this part of code in the XPID_Simtools1_23 program using the arduino programming software:

    void setup()
    {
    Serial.begin(9600);
    SWSerial.begin(38400); //boutons 2, 4 et 5 OFF


    Now change SWSerial.begin(38400); to SWSerial.begin(9600); and load the new code into your arduino. If everything is connected correctly to you arduino it should now work with simtools (assuming you set up the interface as pictured in the XPID_Simtools1_23 documentation).

    If everything is working properly you can now use Describe software to change the 2x32’s baud rate to 115200 baud (see Describes user manual to do this). Now change dip switch 5 from the on position to the off position. This turns off the default baud rate and turns on the user selected baud rate. Now change the code SWSerial.begin(9600); to SWSerial.begin(115200); and load that into your arduino. Your arduino should now be able to communicate with your sabertooth 2x32 at a much faster rate.


    Note: It makes no since to me why this program is set up to communicate between Simtools and an arduino at 9600 baud so after everything is working I would also try changing the code above from Serial.begin(9600); to Serial.begin(115200); and loading that. Change the output baud rate in the Simtools Interface to 115200 and give it a go! If this creates problems somehow you can always switch it back to a slower rate. :cheers
    • Informative Informative x 1
    • Useful Useful x 1
    Last edited: Jul 15, 2015
  4. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    at this time is 2:35 am I'm tired I tried turning the pot there is no movement tomorrow I do some cleaning software and start again from the beginning rechecking connections, while I thank you for the patience you have, sorry bother again thanks thanks thanks I will keep you informed
  5. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,158
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,634Coins
    Ratings:
    +10,909 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Hang in there @dualclick76, frustrating as it is it will be worth it in the end.

    Fault finding is never fun, it is just a process of elimination. Going over it step by step checking each aspect and connections is a wise way to go.
    • Agree Agree x 1
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    Yeah, hang in there @dualclick76 and keep us informed. As far as fault finding goes, I have attached a sketch that will test if the connection between your arduino and sabertooth is working on pin 8 if you want to try it. It should ramp each motor up to full speed and down again. If it works then we have at least eliminated that part as a problem. The 2x32 needs to be set to 9600 baud unless you change it in the code.

    Note: Rename Sabertooth_Motor_Test.txt to Sabertooth_Motor_Test.ino to install on your arduino.

    Attached Files:

    • Useful Useful x 4
  7. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    ok this evening I will try and let you know thanks again
  8. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    test done nothing happens
  9. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    dip switch 1 off,2 off, 3 on, 4 off, 5 on, 6 on
    arduino upload code test nothing happens
  10. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    Right now we should look at this failure as good thing. Hopefully we have isolated your problem. Got a question for you @dualclick76. Have you previously played around with Describe software with your 2x32 connected? If so you may have inadvertently changed some settings that you are unaware of.
  11. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I did not set anything in fact I tried it with the file settings winegain but I do not know if I did it correctly
  12. Paul Shortland

    Paul Shortland Active Member

    Joined:
    May 13, 2015
    Messages:
    154
    Location:
    Northampton - UK
    Balance:
    317Coins
    Ratings:
    +74 / 1 / -0
    My Motion Simulator:
    2DOF, AC motor
    Might be time for screenshots of the describe settings and pics of your set up so we can hopefully ID the issue.
  13. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
  14. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    These are the screenshots of about configuration of sabertooth

    1Immagine.jpg Immagine.jpg Immagine1.jpg Immagine2.jpg Immagine3.jpg Immagine4.jpg Immagine5.jpg Immagine6.jpg Immagine7.jpg Immagine8.jpg
  15. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Arduino/sabertooth
    pin 8 / s1
    grd / 0v



    arduino + sabertooth.jpg
  16. zigzag49

    zigzag49 Active Member

    Joined:
    May 27, 2014
    Messages:
    251
    Balance:
    713Coins
    Ratings:
    +220 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    Try to feed your potentiometer with 5v and 0v the sabertooth. In setting interface has com1 you, that's it for the Arduino to your device manager?
  17. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    It looks like your 2x32 is set at 115200 baud already. Try setting your arduino to 115200 also using SWSerial.begin(115200); and put dip switch 5 in the off position on the 2x32.
  18. zigzag49

    zigzag49 Active Member

    Joined:
    May 27, 2014
    Messages:
    251
    Balance:
    713Coins
    Ratings:
    +220 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    You did well "upload settings to device" to send your configuration to the sabertooth?
  19. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    Or did you connect and download settings? That is what I assumed.
  20. dualclick76

    dualclick76 Active Member

    Joined:
    Mar 23, 2015
    Messages:
    163
    Location:
    italia
    Balance:
    11Coins
    Ratings:
    +40 / 0 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    kids thank you all, tomorrow I will do other screenshots and pictures of the best links from arduino sabertooth, right now I'm in confusion light cleaning of the various codes and start again from scratch thanks again for your patience
    • Useful Useful x 1