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. Evan Rowlands

    Evan Rowlands EMR Industries

    Joined:
    Jan 22, 2017
    Messages:
    190
    Occupation:
    business owner/ EMR industries
    Location:
    Melbourne Australia
    Balance:
    - 82Coins
    Ratings:
    +33 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Gday guys
    ok Ive sorted the over heating issue with bigger wire im using 8awg now not 12 awg motor 1 is running nice cool..22.3 degrees

    so ive been doing some testing and cant not work out why the famous motor1 has this little movement when the arm stops .. it started as a shaking so i turn down the kp setting and stopped shaking on the spot but still has this little up and down movment ..motor 2 is fine ..also ive got the motors running to diffrent kp settings is this normal motor1 is on 165 any higher and it starts shaking were motor2 is on 500 if its on 165 same as motor 1 then its very slow unresponsive any ideas
  2. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    sounds like oscillation. make sure everything is tight and there is no play in your linkage to the pot from the motor. check the connections from your pots to the ard, a loose wire here can cause intermittent position. also be sure everything is grounded well.
    • Agree Agree x 1
  3. Evan Rowlands

    Evan Rowlands EMR Industries

    Joined:
    Jan 22, 2017
    Messages:
    190
    Occupation:
    business owner/ EMR industries
    Location:
    Melbourne Australia
    Balance:
    - 82Coins
    Ratings:
    +33 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    thanks mate im thinking its the pot cause motor2 is fine im in smc3 now and as soon as i put kp to 1 its starts shaking if i learn away lke hang out the rig it will stop but starts again as soon as you more the motor ill change the pots to the normal one i use first time using this ones
    might be no good
    thanks heaps for your advise
  4. kwannania

    kwannania New Member

    Joined:
    Oct 1, 2017
    Messages:
    6
    Location:
    Thailand
    Balance:
    38Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    @Evan Rowlands Good to hear that the hot motor is solved. Anyway your motor is running cooler than my room temp. :p

    Your Kp different between motor is quite a lot. I'm thinking the loose rig issue too. You might try to increase "Deadzone" to see whether the shaking is gone. (according to the tutorial, should not over than 1) If you need like 10 to stop the shaking, this would confirm the loose issue.

    To confirm the pot, you might try to manually rotate it to see the "green" feedback line in SMC3 whether it smooth movement according to your rotation.
  5. Evan Rowlands

    Evan Rowlands EMR Industries

    Joined:
    Jan 22, 2017
    Messages:
    190
    Occupation:
    business owner/ EMR industries
    Location:
    Melbourne Australia
    Balance:
    - 82Coins
    Ratings:
    +33 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    Gday mate ..

    ive had a play around with the dead zone and it did improve it but its still there so i checked all the stuff that could come lose and the onlty thing i could find it the back lash of the motor ..motor 2 has the same back lash but no shaking ..
    ill keep looking to see if i can find something else
    cheers mate
  6. yeclimb2

    yeclimb2 New Member

    Joined:
    Apr 1, 2018
    Messages:
    15
    Location:
    china chengdu
    Balance:
    68Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    wow,thank you for your detailed description. now my motor can move correctly.
  7. SimPotato

    SimPotato Member

    Joined:
    May 17, 2017
    Messages:
    47
    Occupation:
    Designer
    Location:
    Gardiner, NY USA
    Balance:
    479Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino

    Found this Use full video
    Shows Nice wiring setup for wiring Sabertooh
  8. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +63 / 0 / -0
    My Motion Simulator:
    DC motor
    Hey @BlazinH

    first I want to say thanks for your program:thumbs

    With your step by step guide I could bring the motors into life:) But I have to face some problems, maybe you can help me with them.

    If the PWMmax is below ~150 the Motors move fine and try to catch the blue line. If I increase PWMmax i face to different problems. My motor isn’t attatched to anything atm, they are just lying around. So, when I increase PWMmax, the switch for “motor 1” in the upper left corner in the program turnes to „off“. I have to turn it on again, that the motors keep moving.
    You can see it in the following picture. The marked points show when I turned the motors on again.
    InkedSMC Problems.jpg
    This error also occurs, when a try to hold the motors manually. I didn’t bold it to a plate yet to figure out if this error will perish. Maybe you can tell me, why the software turns the motors off?!


    The second problem shows up when PWMmax is raised even higher or if I put “Out Mode” to manual and am too ambitious with the slider. Then the PSU turns off:mad: I had this error all the time, before I used the resistors. Is the braking current (without ANY load) so high, that the PSU turns off?!

    I’m using a Meanwell 24V 14.6A PSU and have two times two 5.1 ohm resistors parallel. I know, it’s a not the suggested resistor, but I have no 1.6 Ohm atm. The wiring is seen on the following pics.
    IMG_20180501_170157.jpg

    Is something wrong? Or do I just need to bolt everything together and use proper resistors?

    Attached Files:

    Last edited: May 2, 2018
  9. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +63 / 0 / -0
    My Motion Simulator:
    DC motor
    I had an idea: since i didn't solder the wires to the pot, it could be, that they lose contact, when the motor is shaking to hard:roll Have to test it, if it solves the problem, it's great, if not, i will ask again.
    But i still need to get rid of problem two...
  10. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,573
    Occupation:
    Retired
    Location:
    Brisbane Australia
    Balance:
    28,370Coins
    Ratings:
    +2,844 / 39 / -0
    My Motion Simulator:
    AC motor, Motion platform
    I would like to see bigger cables going to those surge resisters... - they are high wattage for a reason :).
    • Agree Agree x 1
  11. My.stAr

    My.stAr Active Member

    Joined:
    Sep 7, 2012
    Messages:
    151
    Occupation:
    Engineer
    Location:
    Germany
    Balance:
    1,064Coins
    Ratings:
    +63 / 0 / -0
    My Motion Simulator:
    DC motor
    Oops:blush Sounds reasonable... will change the the cables :thumbs
    Thanks

    /edit:
    it was the Motoro_O
    Have no problems with the other Motor. The resistors stayed completly cold...
    Last edited: May 10, 2018
  12. Tao

    Tao New Member

    Joined:
    Oct 31, 2017
    Messages:
    6
    Location:
    United States
    Balance:
    94Coins
    Ratings:
    +0 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Is there a way to use Arduino+Sabertooth to control three motors?
  13. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,286
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,112Coins
    Ratings:
    +1,238 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    You can use multiple arduino/sabertooth, I dont believe they make a three channel sabertooth.
    • Agree Agree x 1
  14. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,283Coins
    Ratings:
    +1,120 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    As BlazinH said before:
    • Agree Agree x 1
  15. Evan Rowlands

    Evan Rowlands EMR Industries

    Joined:
    Jan 22, 2017
    Messages:
    190
    Occupation:
    business owner/ EMR industries
    Location:
    Melbourne Australia
    Balance:
    - 82Coins
    Ratings:
    +33 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform
    2 x ard's 1 x sabertooth and 1 x syren 50 to run the 3rd
  16. Deane

    Deane Old Fart Gold Contributor

    Joined:
    Aug 25, 2018
    Messages:
    215
    Occupation:
    Retired
    Location:
    Wirrina Cove, South Australia
    Balance:
    681Coins
    Ratings:
    +90 / 3 / -0
    My Motion Simulator:
    2DOF
    A Noobie question. First time playing with these boards and a little unsure of what I am doing.
    Can I use this tutorial and software etc for a 2Dof sim using a Sabertooth 2x25 and an Arduino Uno R3. and just enable the two motors in the tuning interface.

    Thanks.
  17. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    It works with 2x25v2 controllers but not the older 2x25v1.
    • Informative Informative x 2
  18. Deane

    Deane Old Fart Gold Contributor

    Joined:
    Aug 25, 2018
    Messages:
    215
    Occupation:
    Retired
    Location:
    Wirrina Cove, South Australia
    Balance:
    681Coins
    Ratings:
    +90 / 3 / -0
    My Motion Simulator:
    2DOF
    Thank you BlazinH fot the reply.
    I confirmed that the Sabertooth 2X25 is a V2.00 so I will use your tutorial thanks again.
    I have another Sabertooth question that is beyond my electrical knowledge of 1%.
    Naturally I am driving two https://www.motiondynamics.com.au/worm-drive-motor-12v-24v-200w-180-rpm-20nm-torque.html from the Sabertooth and have that connected OK
    but question is how do I wiring my two separate 12V 30A 360W power supplies to the one Sabertooth input.
    I know it says not go over 30 V DC which I will be safe with but it is the in series or parallel wiring config that baffles me and I am scared that I will end up frying a very expensive board
    through my own ignorance, so if you can guide me on how-to to do it without magic smoke appearing I would be most grateful.

    Thanks.
    Power2.JPG
    I hope the pics shows what I am attempting by having a separate power supply for each motor whether that is sensible or overkill I don't know.
    Power1.JPG
  19. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,621Coins
    Ratings:
    +1,835 / 32 / -1
    Starting out I recommend you use one power supply and a 12v lawnmower type or larger battery in parallel (+ to + and - to -). This keeps things simple and serves the best changes of success until you can see if your diy rig is going to work as you planed it to. You can attempt to use multiple power supplies and/or remove the battery later if you still wish to. When your not using the rig though be sure to turn off the power supply when using a battery so you don't overcharge it which is dangerous.
    • Informative Informative x 2
  20. Deane

    Deane Old Fart Gold Contributor

    Joined:
    Aug 25, 2018
    Messages:
    215
    Occupation:
    Retired
    Location:
    Wirrina Cove, South Australia
    Balance:
    681Coins
    Ratings:
    +90 / 3 / -0
    My Motion Simulator:
    2DOF
    Thanks again for the reply.I am trying to KISS if you know that, I am saying and referring to myself not you.
    OK so you say that just the one 12V 30A 360W power supply will suffice if used in parallel with a 12V battery.
    The only spare battery that I have is a new motorcycle battery Absorbed Glass Mat technology Battery 12V 8.6Ah which uses a different type of charger for charging and storage but still charges as any other in the bike.
    Can I use that as it is much less bulky to have lying near the rig where it is.
    Does the regenerative current damage a power supply without the external battery ?

    Thanks.