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

2DOF Build Log Thread

Discussion in 'DIY Motion Simulator Projects' started by Tim McGuire, Oct 27, 2015.

  1. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,141
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,541Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  2. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Still waiting on the MMs sadly, they should be arriving within the week.
    I shortened the driveshaft supporting the frame a bit, to lower the center of gravity of the base frame as well as to stiffen it.

    2016-03-14 21.33.38.jpg

    I also made some progress on the pedal set that I've been slowly dreaming up a CAD model of. This probably won't happen for a while because construction will be very labor intensive and aluminium isn't cheap!

    Credit where credit is due, I took a few very clever tricks from MajorTinkers wooden pedal set:
    https://chippedwood.wordpress.com/2015/09/03/diy-hydraulic-load-cell-sim-racing-pedals/#more-206

    Most of the fab would ideally be done in aluminium for weight saving purposes (it does have to sit on the end of what is essentially a large lever arm on my sim).
    With Sim.PNG Alone.PNG Front.PNG

    The brake will use a load cell as the measurement element. A two stage spring consisting of a "pedal to pad" simulator, as well as urethane compression springs for a progressive feel.
    Brake.PNG
    Nothing much special about the throttle
    Throttle.PNG
    The clutch has a two spring system to simulate the degressive "heavy at first, then lighter" feel that a normal clutch has. When the pedal is depressed, it rotates the cam that the secondary spring is attached to. This rotation causes an extension of the secondary spring, which acts to assist the motion of the pedal, and make it feel lighter the more it's pressed.
    Clutch Mechanism 1.PNG Clutch Mechanism 2.PNG

    I plan on adding oil dampers to each pedal, but was having some trouble sourcing ones. Has anyone had any experience with these kinds:

    http://www.ebay.ca/itm/Alloy-F-R-Sh...197653?hash=item280fa58555:g:~~8AAOSwwPhWloHP

    These RC shock absorbers are readily available, and about the right size, but I have no idea what kind of damping action they'll have.
    Ebay items never seem to have any actually useful specifications which annoys me to no end. Advice from anyone who's done pedals in the past would be greatly appreciated.

    Attached Files:

    • Side.PNG
      Side.PNG
      File size:
      96.5 KB
      Views:
      660
    • Like Like x 3
    • Useful Useful x 1
  3. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    SHE'S ALIVE!

    I got sick of waiting on the slow boat (airplane in this case) from china, and decided to take matters into my own hands. I ordered two pin-compatible H bridge replacements for the motor drivers.

    http://www.digikey.ca/product-detail/en/stmicroelectronics/VNH2SP30TR-E/497-4501-1-ND/725672

    Now these ICs aren't like a normal SOP chip, you can't just use a normal soldering iron because they have these thermal pads on the bottom that act as heat slugs:

    2016-03-23 18.22.58.jpg

    Fortunately, I have access to a hot air rework station, which made quick work of them (you can see where the left chip exploded in the first picture):

    2016-03-23 18.22.52.jpg 2016-03-23 18.24.48.jpg

    Interestingly enough, these chips actually failed because I short circuited them, and in each one the "high" side of the bridge was the one to fail. This is most likely because the high side switching MOSFET transistors are P-Channel, which always perform worse than an equivalent N-Channel. Nevertheless, I wanted to be sure that they'd work, so I replaced all 4 ICs.

    Two nervous tests later, I was glad to find that the replacements had succeeded!



    Here's a picture of my shameful wiring, I'll clean this up and put it in a project box in due time:

    2016-03-24 22.23.49.jpg 2016-03-24 22.24.04.jpg 2016-03-24 22.23.40.jpg

    Another little tip I can give for wiring, these locking crimp connectors in the right-angle configuration make point to point wiring between the arduino and the driver boards much cleaner and easier to keep organized:

    http://www.digikey.ca/product-search/en?keywords=wm2002
    https://www.digikey.ca/product-detail/en/molex-llc/0022053041/WM4302-ND/26693
    https://www.digikey.ca/product-detail/en/molex-llc/0008500113/WM1114CT-ND/467980

    And these high current screw terminals make fiddling with board positioning much nicer as well:

    https://www.digikey.ca/product-detail/en/te-connectivity-amp-connectors/282856-2/A98355-ND/1131586

    I know I'm not nearly done yet, but I'd just like to thank you guys for all the help! I couldn't have done it without you!

    Attached Files:

    • Winner Winner x 3
    • Like Like x 1
  4. 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
    nice work with the mms.
    • Like Like x 1
  5. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    So I've got it up and running with Simtools now, and I managed a few test runs on AC. I've only got the PWM max duty cycle set to half, but it still throws me around like a ragdoll. The MMs are barely getting warm too. I'll upload a video when I get the chance. I've just run into a little roadblock though. When I start up AC, and launch the "game" window (press the drive button) the sim seems to freak out and spin both motors outside of their allowed axis. This happens before the game has actually loaded. Has anyone else had problems like this before?
    • Like Like x 1
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,141
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,541Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  7. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Definitely!
    Doh! Completely missed those, thanks for the tip.

    I've got another problem. Sometimes my left motor will shut down under what would appear to be normal circumstances. It usually happens with abrupt step loads. The motor appears to just "give up" even though the PWM label in SCM3Utils is showing maximum. The motor isn't receiving any actual power because I can't hear the PWM when this happens, and when I probe the inputs I get no voltage. I've checked my connections, and they seem to be good. Moreover, if I restart the windows utility and try moving the motor again, it works fine. I've attached some photos of the SMC3 graphs:

    Motor Failure.jpg Square wave failure.jpg

    It might be possible that the chip is going into thermal shutdown, but my heatsink is barely warm. Do MMs usually shut down if the supply rail goes undervoltage?
  8. 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
    what are your settings while this happens?
  9. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Sorry, I should have specified:
    Settings.PNG
    PWMmax = 150
    PWMrev = 150
    Kp = 350
    Kd = 50
    Max limits are 170
    clip limits are 255
    pwmFreq = 5k
  10. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    I should also note that I can push the motor back towards it's target position, and if I try to push it past the target position, it starts to push back against my hand, but only in one direction. Are there any bugs with SMC3 that would behave like this? I'm using V0.7
  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,141
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,541Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Just to be clear, does it happen after a big in-game crash?
  12. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    It did happen originally after an in game crash, but I've been able to replicate it in the windows utility using a square wave. It may be thermal limiting. I reattached my heatsink with more thermal paste and that seemed to alleviate it. I'll post if it happens again
  13. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Nope, just happened again :/

    It seems to be happening when the motor hits the PWMmax cieling
  14. 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
    change fpwm to 25khz

    this is not the problem but it is too low
    what happens when you increase pwmmax?
    even with a heatsink a fan is also recommended
    also switch sides see if you can duplicate this with other equipment.
    Last edited: Mar 27, 2016
  15. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    I've tried switching sides and my left motor seems to be fine. Increasing PWMmax doesn't seem to change much, it might be happening slightly less frequently. I've got fans on them now, I'll see if that helps
  16. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,141
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,541Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    If it is only in big crashes try lowering the Main Level % in the Game Manager profile editor to 97%.
  17. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    I had my main % set to around 80. I think something is up with that MM board. It's like it's going into thermal or over-current shutdown for no reason or something. Worst comes to worst I can re-wire the good one to run both motors.
    • Agree Agree x 1
  18. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Video of it in action:



    I feel like this profile still needs a fair bit of tuning, but the vid does a nice enough job of showing how aggressive the motion gets. It's still limited to 58% PWM Max duty cycle using single driver configuration on the MMs. I'll try gradually turning it up to full blast in the next little while :confused:.

    A couple more questions for those who can answer them:

    I can't seem to get the PID controller that runs on SMC3 to tune properly. I've learned a little bit about control systems in school, so I'm familiar with how PID loops work. My problem is that the Kd parameter doesn't seem to be doing anything. If I crank it up, all I get is some extra coil whine on the motors. I've tried it with a range of values, and on both motors. The motors do have some backlash in the gearboxes, so this might be contributing. I still have overshoots on the step response of the sim, pictured below:

    low Kd.png Max Kd.png
    Left: Low Kd value, Right: Maximum Kd value.
    Also, has anyone found a fix for the sway/surge values in the dirt rally plugin? They seem to sit still half the time and spit out erratic values the other half.

    Finally, is there any way to look at the math/parameters of the simtools axis filter algorithms? I'd like to be able to play around with the washout filter in particular, but the "% of axis" slider doesn't mean much to me.
  19. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,141
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,541Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Thanks for posting the video, it is great to see your rig in action :thumbs

    Personally I think you need to refine your heave settings and would befit from tweaking your surge to get a better kick in gear changes: http://www.xsimulator.net/community/faq/snappy-gear-change-motion.121/

    I have found smoothing to be more effective than washout, washout will improve with SimTools 2.0.
    • Like Like x 1
  20. Tim McGuire

    Tim McGuire "Forever a work in progress"

    Joined:
    Jul 26, 2015
    Messages:
    261
    Occupation:
    Electrical/Electronics Engineer
    Location:
    Canada
    Balance:
    2,181Coins
    Ratings:
    +314 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor
    Thanks!

    The heave does seem to shake about a little bit too much. I've got the surge set pretty conservatively, so I'll lower the number in the tuning center a bit. How much of the axis do you usually delegate to heave? I've got it set to 15% in the main profile right now.