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

Arduino uno with the Sabertooth

Discussion in 'SimTools compatible interfaces' started by bartez81, Dec 13, 2013.

  1. bartez81

    bartez81 i like amps

    Joined:
    Feb 11, 2012
    Messages:
    48
    Location:
    Kraków
    Balance:
    - 2Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN6, Arduino, JRK, Motion platform
    Hello
    if someone connected the Sabertooth to Arduino uno with open source code from site? I've read that it is difference in PWM and may not work (fullPWM/half PWM??). I prepare to buy Sabertooth. How connect saber to the Arduino?
    Best regards
  2. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,642Coins
    Ratings:
    +1,839 / 32 / -1
    Hi @bartez81 . The sabertooth uses a single channel in analog mode to control both forwards and backwards. Therefore it doesn’t use a pin for direction. It works similar to a R/C servo but uses a different method. In this case center position would be 2.5v. So that’s probably where you heard someone say “half/pwm” since its uses half of the pwm for forwards and the other half for backwards. I think this method with the sabertooth is mainly intended to be used for controlling a vehicle or robot with a wired joystick that uses potentiometers.

    But the sabertooth is an intelligent controller so why use the pwm method anyway when you’re already paying for a controller with its own microprocessor built it? The sabertooth’s simple serial mode works about the same as its analog mode. But you don’t use a voltage to control the direction and speed, you use a single byte variable. So instead of using a value to create a voltage with pwm in the arduino to send to it, you can just send a byte value straight to the sabertooth! Instead of sending a 0-5v signal, you send a 0-255 valued byte.

    As far as the code, it could be out there but I haven’t come across it myself. But it would be quite easy for someone to do that has arduino programming experience. I’m just learning it now but I think I know enough even I could do it since it would just take some minor changes to existing code. I’ll take a look at RufusDuffus’s code to see if I can modify it for use with the sabertooth when I get a chance.

    May I ask why you wish to use the sabertooth controller? If you want to use pwm output why not just get an h-bridge that works with existing code?
    Last edited: Dec 13, 2013
  3. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    949Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    Hi, i use arduino + sabertooth
    http://www.xsimulator.net/community/threads/my-new-3dof-4motors-arduinoméga-sabertooth.4926/
    if you wish to use sabertooth with PWM (analog mode) you will need a low pass filter !

    and..
    if you wish to use in Packetized mode , you will need an Arduino Mega because it has several serial com port and you will increase the price of your simulator ! o_O

    Prilad wrote a good software for Arduino:
    http://www.xsimulator.net/community/threads/arduino-uno-duemilanove-2dof-firmware.4564/

    and
    RufusDufus wrote too a good software for arduino.
    http://www.xsimulator.net/community...driver-and-windows-utilities.4957/#post-48592

    i will test it next week with my new Polulu...
    Eric
    Last edited: Dec 14, 2013
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,642Coins
    Ratings:
    +1,839 / 32 / -1
    My bad! Memory that is! My question still is why use the sabertooth with analog mode? And if I'm not mistaken the uno will work with Packetized mode. But you must send four bytes with it so it's slower. Much easier and faster to use simple serial mode.

    Edit: And also by using simple serial mode instead of analog mode you don't need a low pass filter that smooths out the signal!
    Last edited: Dec 14, 2013
  5. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,642Coins
    Ratings:
    +1,839 / 32 / -1
    • Like Like x 1
  6. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    949Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    Good, I misunderstood this feature, I thought (remember) that it was only to change the pin (Rx, Tx)!

    And you're right, the simple serial mode is the best choice for sabertooth with arduino !
    Last edited: Dec 14, 2013
  7. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    949Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    Interresting....let me know if you have a good result with it !
    Thanks
    Eric
  8. bartez81

    bartez81 i like amps

    Joined:
    Feb 11, 2012
    Messages:
    48
    Location:
    Kraków
    Balance:
    - 2Coins
    Ratings:
    +15 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN6, Arduino, JRK, Motion platform
    Hello
    Ok try the serial mode with Arduino mega. I have a large dc motors, and unfortunately I do not use monster shield. I have to attend to Arduino Mega for 20 euros if someone was that interested.