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

Showroom Blame73's 2DOF Seat Mover

Discussion in 'DIY Motion Simulator Projects' started by Blame73, Nov 20, 2014.

  1. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,281Coins
    Ratings:
    +1,115 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    weird... could you post a close picture of your Arduino/md30c?
  2. gabe

    gabe New Member

    Joined:
    May 21, 2020
    Messages:
    8
    Balance:
    142Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Sure, Let me know if this is good enough. If needed I could draw up a schematic. I am using the screw terminal shield for the Arduino, but you should be able to see the input locations. The screw terminals supply 5v power to arduino, pots, etc.

    Attached Files:

  3. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,281Coins
    Ratings:
    +1,115 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    From what I see it's hard to say because you can't follow all the cables from Cytrons to Arduino. PINs seem to be ok.
    Have you tried connecting them (just for testing purposes) without the shield? A mere Arduino/Cytron connection to see if it works
    With the setting I posted and with that sketch I just finished an hour session and all went fine.
    I seem to remember I had the problem of motors rounding in one directions before I made the changes to the sketch, I don't remember if by the time the problem was the MODE 1 or the PINs settings (it needs MODE 2 with my modified sketch-but that's already set, so you should be good if you're using it)
    • Like Like x 1
  4. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino

    I'd try swapping the PWM an DIR pins, as it's the effect I'd expect if they were the wrong way round. Direction would always be in one direction as the PWM would always be positive & speed would always be the same as the Direction voltage would be a set value rather than proportional. & as Blame73 says, Mode2 on the Cytrons.
    Hope you get it working.
    • Agree Agree x 1
  5. gabe

    gabe New Member

    Joined:
    May 21, 2020
    Messages:
    8
    Balance:
    142Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Thank you for the help! Fingers crossed, but it looks like removing the screw terminal shield and connecting to the Arduino pins. I still don't know what exactly the problem was with the screw shield, but at least I have a way forward. Thank you for your time, expertise, code, and help.
    • Like Like x 2
  6. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    Ah yes, sometimes the smallest things make a huge difference. Removing all unnessacary hardware and leads have saved my projects on more than a few occasions. Anyways, hope you get it sorted.
  7. Squarebob

    Squarebob Member Gold Contributor

    Joined:
    Mar 26, 2020
    Messages:
    47
    Location:
    Georgia USA
    Balance:
    71Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    Hi Guys, I too had a Sabertooth 2x32 go wonkers.I have an MDDS30 to take it's place. I have downloaded the sketch Blame73 made. What I need to know is what are the dip switch settings you guys are using on the MDDS30? Thanks in Advance
  8. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,281Coins
    Ratings:
    +1,115 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hey,
    I got the the MD30C, @p00ky's got your model (that's using with the sketch I modified). I think he can help you out with the dip switches and wiring
    • Useful Useful x 1
  9. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    So my Dip settings are.....

    1, on
    2, off
    3, on
    4, on
    5, off
    6, on
    7, on
    8, off


    Hope that helps.
    • Like Like x 1
    • Informative Informative x 1
    • Useful Useful x 1
  10. Squarebob

    Squarebob Member Gold Contributor

    Joined:
    Mar 26, 2020
    Messages:
    47
    Location:
    Georgia USA
    Balance:
    71Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    I will give them a try. I really miss not having traction loss working. At half the cost of a sabertooth 2x32 I would think the Cytrons would become very popular for our rigs. I will report back with my results. THANKS
  11. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino

    I have had no issues with my Cytron, so with any luck you'l be away in no time. Not sure how relevant it is as the Cytron is the controller I have ever used but on start up, I tend to go into Simtools GameEngine, goto Output Testing, turn it on and slide the pitch until you get movement. Sometimes both motors start straight away but sometimes it will take a second or 2 to kick in. Once there running, they simply work. The only other thing I would say is make sure you have Simtools GameEngine running before hooking up the power & remember to disconnect the power before closing down Simtools GameEngine, if you dont, your motors will just run and ignore the potentiometer inputs.

    Im intending on adding tracktion loss, so either getting another Cytron MDDS30 or a single MD30C. It should be dooable with Blames code but until I've tried it I can't say.
  12. Squarebob

    Squarebob Member Gold Contributor

    Joined:
    Mar 26, 2020
    Messages:
    47
    Location:
    Georgia USA
    Balance:
    71Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    OK. I loaded the sketch for the UNO. Set the dip switches. I wired the Uno to the MDDS30. Same Uno I was using with the sabertooth. Made sure utilities program was set correctly. Everything at zero and limits at 255. Turned on the 24 Volts ( power supply with batteries ), and WHAM, the motor went full speed till it hit the linkage, broke the bracket for the pot and bent the motor mount. That was a shocker. Then I saw your last post!!!!!! I don't like the idea of making sure this is on or off before the other is on or off ect. I am too old to remember things like that. I need simplicity like with the sabertooth. I am going to contact Dimension Engineering to get the 2x32 replaced, but in the meantime I have to print a new pot bracket, fix the motor mount, and live without traction loss and surge. Do you think there is a simple workaround to the motor "taking off" like that? By the way, once you have traction loss you will wonder how you ever played without it.
  13. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    Ouch, thats sounds a little painfull :/

    Sorry I should have been more specific concerning the start up & shut down order. It is something I admitedly only found out through trial and error.

    So I guess a couple of things. You might want to double check you got the Dir pin and the PWM pin for each motor the right way round. You probably did but check, as if you didn't the motor will probably just start going in one direction constantly & you wont be able to control it.

    As for the Start Up and Shut Down order, all it really comes down to is.......

    On Start Up - Connect the Power Last.
    On Shut Down - Disconect the Power First
    Oh &........
    All ways Power Down when switching between Simtools and SMC3Util.

    I understand this to mean......

    Always make sure you have a proper/valid PWM Signal going to the driver before connecting the power.

    Now to get a little technical (not that Im an expet, correct me if Im wrong and all that)

    From what I understand from the manual, the driver wants to see a certain signal (Stop Motor) on start up when in PWM mode.

    From the manual

    "The Analog/PWM signal to stop the motor must be available when SmartDriveDuo-30 is turned on/reset. Else, the driver will show Input Error until the correct (stop) signal is available."

    "Stop signal for PWM Sign-Magnitude - 0% duty cycle"

    "Input Error (Error LED blinks 2 times) Every time SmartDriveDuo-30 is power up, the input data must be ‘stop’ (for RC, Analog, PWM input mode). This feature prevent the driver from sudden run, especially when the driver accidently reset."

    Basically, the motors shouldn't move until they see a PWM signal with a 0% Duty cycle for each motor. When the Driver recieves a PWM signal with a 0% Duty cycle it initialises the motors & their ready to run.

    Looking at the Arduino code it looks like that PWM is set to 0% on boot but quite often the Driver will still be in Input Error Mode after you switch the Arduino on, meaning the Motors are not going to run until you tell the Arduino to set the PWM signal to 0%. This can be done in Simtools via the Output Testing (waggle the pitch slider until you see life in both motors) or in SMC3Util - Output mode - Manual (waggle the slider on the Right, Up and Down unti l you see life in both motors).

    Now Im not sure what the setup is when it comes to the Sabertooth but with the Cytron you should try the motors out in SMC3Util first before running Simtools. This is to make sure there are no problems with making the motors spin, making sure they spin in the right direction & finally to Tune them.

    As the Sabertooth is a different driver from the Cytron, you would need to run SMC3UTils & Tune your motors again before running Simtools.

    As for the Runaway Motor Problem.

    Im not really sure how to solve that beyond checking you have a valid PWM signal first. I've never used the Sabertooth and I don't know how it controls it's motors or talks to the Arduino or what to expect when you power it up. With the Cytron, once the Motors are initalized, to make sure the Motors dont move, you have to guarantee a Pwm signal with 0% Duty Cycle & to protect your Pots you have to guarantee a valid analogue signal. If either of these are wrong your goign to have a bad day.

    Sorry this ia a bit of a tome :D & not sure how much of it is useful to you :(

    I'll keep a closer eye on the forum over the next few days so if you have any questions just ask & hopefully I'll get back to you a little more promptly. The Cytrons a good board, perhaps with a few quirks imo.
    • Informative Informative x 1
  14. Squarebob

    Squarebob Member Gold Contributor

    Joined:
    Mar 26, 2020
    Messages:
    47
    Location:
    Georgia USA
    Balance:
    71Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 4DOF
    I will try some setups on the bench with some small motors when I get time
  15. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    Well just shout if you have any questions. If I can help I will. Hopefully you'l get it all sorted. Im finally going to start working on the Traction loss today but I suspect it's going to take a little while to get the design down.
  16. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi Guys

    Just received my md30cs for my build and was going to do a miniature setup for a test while i wait for more bits to arrive, i grabbed your code @Blame73 to have a go and was going to report back but its getting stuck verifying, I've attached a snip of it,

    Thank you for your efforts on the custom code mate should make life a lot easier for everyone!

    Attached Files:

  17. Blame73

    Blame73 Well-Known Member

    Joined:
    Nov 6, 2014
    Messages:
    1,213
    Location:
    Italy
    Balance:
    8,281Coins
    Ratings:
    +1,115 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    Hey,
    what Arduino version are you on?
    I'm using 1.0.6
  18. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi there, I use Blames code so thought I'd check the verification with the latest version of Arduino IDE (1.8.1.3) & it compiled fine. The picture you poosted of the verification failure, showing TCCR2B is not the first reference of it in the code which makes me think your code is failing verification earlier, probably on a different part of the code. This can easily happen if you accidentally move, delete etc parts of the code while scrolling throught it.
    Can you copy the entire error message and post it. when getting a verification error it's normally best to scroll to the top of the issues and work your way through it, as a problem might have occurred earlier in the code which ends up with a trickle down effect, breaking later parts of the code.
  19. Rav3n87

    Rav3n87 Active Member

    Joined:
    Sep 9, 2020
    Messages:
    131
    Balance:
    723Coins
    Ratings:
    +44 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    @Blame73 @p00ky

    Well..... dont i feel stupid :(

    simply closed the ide, opened it again and it flashed straight over :roll


    Thank you for your help, will try not to be so stupid moving forward lol

    is there anything i need to change for using these pots? 6127V1A180L.5FS

    I've wired up a controller and tested using a servo i have with the hall directly attached (servo has the guts removed and direct power feed to motor) doesnt seem to respond

    apologies for the questions i will now move over and start my build thread to compile the info over there

    Appreciate the help guys!
  20. p00ky

    p00ky Active Member

    Joined:
    May 4, 2020
    Messages:
    109
    Occupation:
    Self Employed Laser Cutter
    Location:
    Wales
    Balance:
    350Coins
    Ratings:
    +56 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino
    Well I'm glad to hear your over the first hump, as for the second.........

    As far as I'm aware you pshouldn't have to do anything different using the Hall Effect sensor however I'm still using cheap pots so I might be wrong.
    How are you testing exactly? Are you using SMC3util? With SMC3util I would suggest you connect everything but the power to the motor controller, start up the util and try hand turning the Hall Effect pot, you should be able to see the motion on the graph. If it shows movement, I would then try setting it the hall effect to the centre, adding power to the motors and then go through the SMC3util initial setup stages which you should find here.......

    https://www.xsimulator.net/communit...3dof-motor-driver-and-windows-utilities.4957/

    Hopefully that helps. Link your build thread & i'll follow it, I'm no expert but will be happy to help if you run into issues :)
    • Like Like x 1
    • Agree Agree x 1