1. 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!
  2. 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
  3. 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

SMC3 Sabretooth TEST version

Discussion in 'SimTools compatible interfaces' started by RufusDufus, Jan 25, 2015.

  1. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,134
    Location:
    Oklahoma City, USA
    Balance:
    15,763Coins
    Ratings:
    +1,806 / 32 / -1
    This sketch uses simple serial mode which only requires setting the dips on a 2x60 to setup the correct perimeters.
  2. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    Ok , thank you for your answer and sorry for this stupid questions :)
  3. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Has somewone thought about using the Radio Control mode of the sabertooth with dip switch 6 set to Microcontroller mode in connection with the SMC3 software. This would make the vulnerable software-serial redundant. The SMC3 has already PWM-outputs. They only have to be changed to lower frequency and pulse ranges from 1.0 to 2.0 ms. This would also make the SMC3 more simple, because 1.0ms means backwards, 1.5ms means stop and 2.0ms means forward.
    Last edited: Oct 6, 2016
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,134
    Location:
    Oklahoma City, USA
    Balance:
    15,763Coins
    Ratings:
    +1,806 / 32 / -1
    It would be easier to use the arduino servo library for RC. And what do you mean by, "This would make the vulnerable software-serial redundant"? It's been working fine as far as I know.
  5. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    The normal RC sends the pulses of 1.0 to 2.0ms for up to 8 servos one after another with a repeat rate of 20ms. So you get 50 updates per second. I think the servo library works the same way.
    At the sabertooth manual is written a example code for controlling the Sabertooth from a microcontroller:
    Output_High(Pin connected to S1)
    Delay(1000us to 2000us)
    Output_Low(Pin connected to S1)
    This suggests that the pulses can be send one directly after another, so you get up to 500 updates per second.

    Maybe I did not express myself correctly. In the original SMC3 the software-serial is not activated and even in this threat is written about timing-problems.

    It would greatly simplify the search for errors in R/C mode, you could simply use a oscilloscope.
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,134
    Location:
    Oklahoma City, USA
    Balance:
    15,763Coins
    Ratings:
    +1,806 / 32 / -1
    Thanks for the explanation of RC functionality @Bernd Manger.

    As far as software serial, I don't use SMC3 myself but @Pit has reported he has been using software serial at 500000 baud without issue with the SMC3 sabertooth version. If anyone were to have issues with it they probably just need to reduce the baud rate and/or use shielded cables. And how many members here have oscilloscopes I wonder?

    Maybe you just need to try the sketch as it is for yourself (or have you already?). ;)
  7. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    Hi, The issue software serial was disabled in the standard SMC3 is a bit different. I was trying to use it as a main user interface and the serial receive was on the edge, although it did work.

    The software serial receive is not required for the sabretooth interface and there was plenty of headroom in the timings when I measured it. The available Sabretooth settings are the limitting factor in this case.

    EDIT: Your suggestion to use RC Mode should be a straight forward change if anywone wants to try it.
    • Informative Informative x 2
    • Agree Agree x 1
  8. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,134
    Location:
    Oklahoma City, USA
    Balance:
    15,763Coins
    Ratings:
    +1,806 / 32 / -1
    I misspoke. The software serial is doing 115200 baud with pits sabertooth. Baud from simtools is 500000.
    • Agree Agree x 1
  9. Bernd Manger

    Bernd Manger Active Member

    Joined:
    Oct 6, 2015
    Messages:
    156
    Occupation:
    Measurement and control mechanic
    Location:
    Germany
    Balance:
    1,006Coins
    Ratings:
    +256 / 12 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    No, i don't have a sabertooth, but i plan to buy one. I'm sure that the sabertooth will gain in importance in this forum, because everyone is looking for a reliable H-bridge and i think we all agree that the cheap MM's and IBT's are a pile of scrap.

    About oscilloscopes:
    I think everyone who works with electronics should have one. People don't have a problem to buy a new iPhone for 600€ every year. A oscilloscope costs only 300€. If you have one, you do not want to miss it.
    And no, I have no company that makes oscilloscopes.:D
    Last edited: Oct 7, 2016
  10. Pit

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

    Joined:
    Oct 2, 2013
    Messages:
    3,025
    Location:
    Switzerland
    Balance:
    29,792Coins
    Ratings:
    +3,038 / 30 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Only the very cheap ones, if you buy the MMS from DX.com ($20) or from SparkFun ($70!), then you wouldn't be disappointed, in the latter case only about the price lol

    Still an alternative ist the Pololu Dual VNH5019 Motor Driver ($ 50), similar features like the MM but it supports up to 24 V . NTL the SaberTooth 2*XX is a great piece of hardware, full of features, long life guaranteed.
    • Informative Informative x 1
  11. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    New little Problem:
    like a few posts above i have had permanent movement on one motor as soon as i tested the simtools output . Everything has worked great with the SMC3 software.
    Now i changed the boud rate from simtools and in the .ino from 500000 to 115200 and this helped - got smooth movement in simtools ... but now the SMC3 software cant connect to the ard anymore , can this be solved or do i have to change the boudrate in the sketch everytime i try to connect via SMC?!
  12. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    I think you are getting confused with the two interfaces. The 500k baud interface to simtools is hard coded and should not be changed. This serial interface only connects between the ATMEGA16U2 and the ATMEGA328 on the Uno board itself (it runs a distance of about 20mm). If this interface is not working there is something else going wrong. So you shouldn't need to change the baud setting from 500k in simtools or the SMC3 code for this interface.

    You are more likely to be having issues with the serial port to the Sabretooth. If you change this baud rate in the SMC3 code then it is the Sabretooth you need to make sure has the correct matching baud rate not simtools or SMC3Utils.
    • Informative Informative x 1
  13. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    Oh that's strange, as said above, on 500000 and smc3 it works perfectly, but with simtools it begins to stutter. Because of this i thought it must be related to the communication between the software (smc3 and simtools) and the ARD
  14. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    If it works with SMC3Utils I would check:

    1/ Simtools was correctly configured with 500kbaud, 8data bits, no parity, 1 stop bit, 10bit binary mode in the interface settings
    2/ You aren't suffering from the windows language setting issue in simtools - ie your windows is setup for us english
    3/ the game profiles are configured correctly if testing a game
    4/ the default profile is configured correctly if you are testing with the output testing sliders.
  15. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    Double checked what you wrote- everything as described... for the language bug : I have set my system to us time format but system language is still German- do I have to change this too?

    And when I change the simtools boudrate to something less then 500000 ( plus change the boud for myserial in the ino, tried 250000 and 115200) everything works as it should
  16. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    Well thats strange, if it works then I guess there's something going on I hadn't thought about, I'm surprised. :thinkIf it works great.

    The language issue is when numbers are printed/displayed using a comma as the decimal point, simtools doesn't recognise it and is looking for a full stop as decimal point so it sends strange values. I believe fixed in the new simtools 2.0 when released.
  17. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    Ok hopefully it will work correctly with v2
    As I understand the tool, when I change some parameters they will be applied to the sketch on the arduino . But when I load the ino file , will this affect the settings I made with tool?
    Man i can't find the problem
  18. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    No, the settings are stored in the Atmega EEPROM and if you are just changing the baud rate in the sketch then it will still find the values in EEPROM and use them.

    Are you sure your windows language settings are not using comma's for the decimal place?

    upload_2016-10-13_20-40-3.png
    upload_2016-10-13_20-40-38.png

    upload_2016-10-13_20-42-17.png
    • Informative Informative x 1
  19. Intruder

    Intruder Member

    Joined:
    Dec 16, 2015
    Messages:
    74
    Location:
    Germany
    Balance:
    435Coins
    Ratings:
    +24 / 0 / -0
    Checked time and format - it's as you posted
    IMG_5302.JPG

    So this doesn't seems to be the problem.

    The 500000 baudrate is hardcodet to your smc3 tool !? No chance to change this for better tuning?
  20. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    13,889Coins
    Ratings:
    +960 / 7 / -1
    Maybe in the future, I would need to set it up again, it was all developed on my previous computer. I'm currently working on a different project.

    Can you post a video of what is happening, it still doesn't make sense to me, if it works in SMC3Utils I can't think of any reason the comms wouldn't work for Simtools other than the language issue.

    Are you testing with a game or the output testing sliders in simtools?