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
    On the MD30C manual it's not mentioned you have to use a battery in parallel when using it but I'm doing it anyway. Don't motors produce regenerative corrent anyway when braking/changing direction/... ?

    MD30C doesn't have IN1 and IN2 as the MDSS30 does but just an IN (GND, PWM, IN), nor has DIP switch. Seems to be more direct to use, just change the jumpers and you're done.
  2. 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
    In the manual for your board, as I read it, it suggests a battery but with the MDDs30c you brake the warranty if you don't use a battery.

    A quote from the MDDs30c manual....
    "7V – 35V power supply. MUST BE IN PARALLEL WITH A BATTERY WITH SAME VOLTAGE

    If a power supply that cannot sink current is being used (example: bench top and AC to DC switching power supply), the input voltage will rise when the driver is regenerating (motor is slowing down, or being pushed by external force). Thus, it is important to connect a battery with same voltage in parallel with the power supply to absorb the current generated by the motor. Else, the input voltage might rise to a level where SmartDriveDuo-30 can’t handle and it will be destroyed permanently or the power supply trigger protection mode."

    A quote from the MDD30c manual
    "
    NOTE:

    If Switching Power Supply is being used as power source for MD30C, we recommend parallel it with same voltage battery. This is to absorb the re-gen power from motor. DC brushed motor will become generator when it is slow down and rotate by external force.
    "
    So I think it's just safer to use a battery in your case & required in mine probably due to the fact the demands are x2.

    I have to admit I only have a some what limited understanding when it comes to electronics, self taught, very badly, with large enough holes in my understanding that you could drive a bus through them :D but that never stopped me from tinkering.
  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
    I think most of us sim diy builder didn't have a clue on how to wire a DC motor and drive it with a controller (that sometimes results in some money wasted :D) still many of us now enjoy motion rigs and have learnt a lot during the building process.

    I remembered it wasn't mandatory, not that it was suggested to use a battery in parallel with the PSU, good I was using it anyway.

    I ordered another MD30C today, did you order the S?
    • 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
    Yeah I ordered my MDDs today along with a whole lot of 4 awg and 8 awg wire, the only thing I'm short of now is a 12v battery but there's a garage in the village and I'm sure I'll be able to pick one up there :) I am missing my steel order for building the actual rig though but that's another story altogether. They say it was delivered on tuesday :s I think I would have noticed 7.5 meters of steel box but the seller does seem to be chasing it up, fingers crossed for next week I guess.

    And for sure, I'm learning a lot! I can tell by how many times I've made silly, rushed decisions. I'm not much of a prepper you see, I have to get the ball rolling before I'm able to see what actually needs to be done. This is my cross to bare :)
    • Like Like x 1
  5. 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 is your extra MD30c for traction loss & has it arrived yet? Mines not here yet, hoping monday but I'm guessing wednesday just so I dont get my hopes up.

    I was reading through the manual for the driver, cross referencing it with your wiring and SMC3 & thought I might try and clarify a few things. I think I have it down but everything has different labels etc.

    So correct me if Im wrong but.......

    Direction pins for the first 2 motors are pin 2 (left motor) & pin 4 (right motor) on the Arduino.
    PWM pins 9 (left motor) & 10 (right motor).
    Pot on A0 (left motor)
    pot on A1 (right motor)
    You don't use any of the enable pins
    & your using Mode 2 in SMC3

    Is that right?

    Then there's the small matter of your modification to SMC3, any chance you'd be willing to share?
  6. 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
    EDIT: I MODIFIED THIS POST IN ORDER TO HAVE ALL INFOS IN ONE PLACE

    CYTRON MD30C (works with MDDS30 too)

    First test with a wiper motor (I'm now using heatsinks on the motor driver even if it doesn't heat up, they won't hurt for sure)


    You can find all my modifications to SMC3 searching for Blame73 inside the .ino
    I uploaded it on Mega, grab it from >>>>> SMC3_Cytron_MD30C.zip
    UPDATE: new version with fixes and pot scaler that works with Cytron here

    It uses MODE 2

    Basically I modified directions and brakes that were inverted on half side of the range
    Like this:
    [​IMG]

    EDIT: removed
    Also, commented out there are modifications to scale the feedback range (I had found this trick here in the SMC3 thread), in case you have the pots mounted on the shafts (as I do):
    Wirings are correct:
    PIN settings:
    [​IMG]

    The drivers in their boxes:
    [​IMG]
    [​IMG]

    I'm probably using the third Cytron for traction loss (one of these months...)
    • Like Like x 3
    • Useful Useful x 1
    Last edited: Oct 1, 2023
  7. 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, I did dig through the default code last night and was wondering if the changes were something like that, although I must admit I'm not sure I would have had the confidence to change them myself :) I can just about read through some of the less confusing bits but a coder I am not :D
    So thanks for the upload, should make things a little easier.

    As for the pots, Im using a couple of gears to go from the 300 degree pot movement down to just over 180 of rotation, so with any luck should be good on the defaults but I'll have to wait for my Driver before I can do any real testing.

    I too will be adding traction loss but I'll be happy to get just the 2 motors running at this point. Delivery delays + my inability to judge how long things are likely to take are taking their toll. I guess I'll need another driver too :/ heh, there goes the budget! I'll have to keep an eye on your posts for any ingenious ideas you come up with ;)
    • Like Like x 1
  8. 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
    Just wanted to thank you for all your help. I got my rig up and running yesterday, played Dirt Rally 2 all night& it was amazing. Your code works perfectly and the Cytron board runs great and seems to stay stone cold. Anyways just thought I should let you know & I'll be keeping an eye out for your traction loss, I wont be far behind you but for now I'm just going to enjoy what I've built so far.
    • Like Like x 2
  9. 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
    Great! I'm glad you've been able to have your rig up and running and that my modifications to the SMC3 worked for you too.
    This is a great community where we try to help each others (the way we can...)

    I think I'll make a post with all the infos about Cytron controllers and the SMC3 mod so I can link it in this thead's OP and could be of any helps for the ones who wanted to take the Cytron path as we did.

    Cheers
    • Like Like x 1
  10. 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
    Yeah, good idea. The driver seems really good and the fact that it's cheaper than the sabertooth but with some of the same features (well at least mine), people may well be interested in using it. I'll certainly be getting another one :) Maybe Rufus will include your code as a mode 3 for SMC3, you might even get your name in lights :D
  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 think I might have found one bug, If I goto the top of the motor stroke in SMC3Util in manual and hit the "Clip Input" it works as expected. However if I go to the bottem of the motor Stroke and hit "Clip Input" the motor gets disabled. Not sure if it's the code exactly as I'm no expert but it's odd that it only happens at the bottem of the stroke. Thought I 'd let you know at least.
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,054
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,022Coins
    Ratings:
    +10,885 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Added to the SMC3 section of the FAQs, with credit to yourself: https://www.xsimulator.net/community/faq/arduino-code-for-use-with-various-hardware-and-simtools.31/
    • Like Like x 2
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,054
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,022Coins
    Ratings:
    +10,885 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    On the up stroke gravity acting on the mass of the rig somewhat helps reduce the momentum, but on the down stroke it contributes to the momentum, so I am wondering if your SMC3 settings may need a little more tweaking.
  14. 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
    Yeah I'm starting to wonder if 12v is enough as it does seem to have trouble on the down stroke. I'll put some images on my post of SMC3 Util, rather than hijacking blame73'2 post :)
  15. 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
    I'm having some free time today and testing it again.
    Could you have the clip limit too close to the max limit so it can't brake enough?
  16. 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
    Hey up, sorry I did mean to tell you but it actually came down to my geometry & the fact the PWMrev collapses if I set it too high. Your code works perfectly.

    As far as the geometry goes, the lever arm to the pushrod angle wasn't at 90 degrees at rest, so when the lever arm got to the bottem of it's stroke I had no torque (well very little). This was just down to getting confused and changing the plan halfway through with out thinking of the ramifications. As for the PWM rev, if I set it to over 180 it simply does nothing which I guess is a peculiarity of my setup and motors.

    To get Dirt 2 working before I had to not use the "Clipping Input" at all & limit my axes to 50% but now Clipping Input" works perfectly & I can use the full axes with out issues, well apart from being thrown out of the chair :D

    Soon enough I'll have to move on to Phase 2 Traction Loss and baffle myself some more :)
    • Like Like x 1
  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
    I modified a previous post in order to collect all infos in one place
  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,054
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,022Coins
    Ratings:
    +10,885 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  19. 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
    • Like Like x 1
    Last edited: May 27, 2020
  20. gabe

    gabe New Member

    Joined:
    May 21, 2020
    Messages:
    8
    Balance:
    142Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    So I downloaded this code to help with my issue where one motor would turn the same direction regardless of which side of the blue target line the pot input was on, but now two motors are having that problem.. Does anyone know what the cause could be? I attached a video of the issue.

    https://www.icloud.com/photos/#0obJ8k_HcZSrAHX0wWI32k6Fg