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. 90kgOver300m

    90kgOver300m Member

    Joined:
    Apr 6, 2023
    Messages:
    43
    Occupation:
    Maintenance technician
    Location:
    United Kingdom
    Balance:
    263Coins
    Ratings:
    +13 / 0 / -0
    Hi, I want to say this thread has been very useful as I'm also making a sim using cytron controllers, so thank you :)

    I have a question on the code, I'm new to coding arduinos and just want to check / confirm something.
    I am using MD20 controllers, which use the same 3 pins (PWM, DIR & GND) as your MD30. This means I only have connections to pins 2, 4, 6, 9, 10 & 11 on the arduino (for PWM & DIR). I want to configure pin 5, 7 and 8 as inputs / outputs to control an electronic brake on my motors, and status LED's.

    I'm a bit confused looking at the code, see below. But it appears you might have pins 3, 5 and 7 wired? Or is this not the case?
    upload_2023-9-21_14-56-56.png

    Like I say, I'm new to coding arduinos and any help / clarification will be much apppreciated.
    TIA :)

    Attached Files:

  2. 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
    Hey,
    I haven't wrote the original code, I only adapted it to work with my Cytron MD30C (and somebody's also using it with his MDDS30), anyway PIN 3, 5, 7 are used as second output pins for Motor H-Bridge 1, 2 and 3 (ie PortD bit position); you could of course adapt the code gettig rid of those and using those pins for your needs

    (I'm not using those pins too)
    • Informative Informative x 1
    Last edited: Sep 21, 2023
  3. 90kgOver300m

    90kgOver300m Member

    Joined:
    Apr 6, 2023
    Messages:
    43
    Occupation:
    Maintenance technician
    Location:
    United Kingdom
    Balance:
    263Coins
    Ratings:
    +13 / 0 / -0
    Ahh perfect thanks for clearing that up!
  4. 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
    Ok, here it is: v3 of my rig :)

    [​IMG]

    • Rewired and resoldered from scratch (I had too much signal noise)
    • Added pulleys (adding pulleys was one of the best upgrades ever for me, it stopped PSUs occasional tripping, being the position of the pots and the their range much more accurate)
    • Diodes (KBPC5010 1000 V 50 A)
    • Moved the two individual emergency stop buttons to one single button
    • Moved the rig to the center of the room because I have a projector that I use when I'm tired of using VR, for arcade games or when someone wants to try the rig and can't use VR
    • Because of the previous point I had to build a protection from the levers because I didn't want my daughter or anybody else got hurt by them
    • Since I was building the box I moved the Arduino UNO from one of the Cytron's boxes (that I had built out of PC PSUs) to the back of the new box where is easily accessible in case of need. It was a pain in the a$$ doing it previously
    • Moved butt shakers to the back of the seat and to the front of the pedals and added a dedicated switch
    • Updated the code of the SMC3 Mode2 for my Cytron MD30C (grab it here)
    • Last but not least... Thrustmaster T818. I wanted a direct drive steering wheel and since I already owns two Thrustmaters wheels for the T300 I opted for the T818; it delivers a constant 10 N⋅m of torque that's more than enough for me (I'm using it at 70% ingame gain)
    Next steps: already ordered some WS2812B led strips for RPM Dash

    A few more pics:
    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
    • Like Like x 2
    • Winner Winner x 1
    Last edited: Oct 1, 2023
  5. 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
    I modified the SMC3 code once again because the original pot scaler wasn't working in MODE2 with my Cytrons.
    Now it does. Added... the linear scaler :)

    Yes, the knob is a Fender Stratocaster knob (I had around) :D
    [​IMG]

    Waiting for the WS2812B led strips to arrive I modified the code to have another couple of effects for showing RPMs; I'll show you as soon as I get the strips
    • Like Like x 2
  6. 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
    Edit: temporally removed the attachment because I'm making some changes and adding the chance to use a TM1638 module to monitor ranges

    This is the latest version of the SMC3 code I modified to work with my Cytron MD30C (I'm not the SMC3 author, I just modded it so that I could use it with my motor controller)

    You can find more details of the previous changes and how to set up the MD30C here

    In this version:
    A note: I preferred slowering the motors down when inside the clipping zone instead of reversing motors direction, because reversing them was causing problems for me, like motors tripping or weird rebounds (i.e. if the target remains inside the clip zone, reverse force will take them out but being insede the clip zone motors go back in and so on...)

    I'm linking this post in the previous ones

    tip: if you're using a previous version that's (somehow) working fine for you... back it up!
    • Useful Useful x 1
    Last edited: Oct 6, 2023
  7. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,140
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,535Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Much appreciated, I have updated the FAQ to this latest code update :thumbs
    • Like Like x 1
  8. 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
    I had almost finished working on my SMC3 modded versions then a few things occured and... it's still there, almost finished. I will finally complete it one of these... days/weeks, let's see

    I uploaded to YT a video I had recorded (during the video SMC3 is set to 'Motion' mode):


    Description from the video:
    A mod I made of the SMC3 software in order to use it with Cytron motor controllers (MD30C).

    I also modified the pot scaler and added support for TM1638 displays and FastLed RGB stripes. This way you can see on the display the values reached by the pots/motors, how close you are to clip input, min/max values reached, how many times you entered clipping zones, the scaler value (that can be set on the fly), set the stripes RGB effects, ...

    The stripes reflect the positions of the two motors, can have different effects and can also be used with few effects when not... simracing
    • Like Like x 2
  9. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi, I'm coinsidering Cytron MD13S for my build, would this mod work on it too? Did you post your SMC3 mod? I don't see it anywhere...
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,140
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,535Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Why would you be considering using the Cytron MD13S, when it is comparatively significantly inferior to the MD30C: https://www.cytron.io/c-dc-motor-driver
  11. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks for the info. I noticed that DOFReality uses MD13S, so they must be good enough and they are not too expensive. I ordered 3x dual 100A drivers on Ali weeks ago but the seller didn't send anything as I just found out. I'm getting a refund but I had problems finding those boards anywhere else and remembered the DOFReality rig, so checked out MD13S today. 6 of them are cheaper and should be good enough, and I will only need 4 x 750W HP Power supplies in 2 24V pairs instead of six (I have 5 LOL). With dual drivers I can't split the load as 3 motors per PSU pair. With 6 individual drivers I can.

    MD30C looks great, but it is more than twice more expensive: $282 for 6 of them instead of $116 for 6 x MD13S.
    I'm planning to use 250W wheelchair motors - is there a reason to avoid MD13S with those? Or are there alternative inexpensive 24V drivers I should also consider?

    250W at 24V is less than 11A, and I assume it's a peak output, so I would think that 13A should be enough for the drivers.
    Last edited: Oct 7, 2024
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,140
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,535Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Please see the FAQs here: https://www.xsimulator.net/community/faq/cytron-md13s-for-smc3.358/

    But, and it is a big But, lowest cost hardware does not necessarily translate into the cheapest or most reliable DIY rig, so do plenty of research and take note of what hardware is most commonly used.
  13. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks! I'll read it through. Appreciate the pointers.
  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
    Hey,
    No, I didn't upload the code, yet.
    I modified it because it was heavy on the Arduino uno to also control LEDS and the TM1638 module.
    I moved the code to control the TM1638 LED strips to an Arduino Nano. It's working fine for me as you can see in the video I posted, but I wouldn't consider it finished, as I'd like it to be. At least, not as completed to be distributed since I wouldn't be available to give support right now. Because of... life.
    It seems that as soon as I am able to play with the rig, something happens that makes me not use it for months (as it's happening nowadays)
    I have the older version that doesn't support the TM1638 Module and the LED light strips, someone else is using it and it seems to be working fine. I can share it with you but, again, I don't know if, when or how I could assist you for any supports.
    Thank you for your understanding
  15. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks, I would appreciate it if you share it with me. I'm not looking into LED strips, but if I go with Cytrons and face the same issue of swapped accelerations, your fix would really help. I don't expect any support - either it works for me or it doesn't.
    It would also be nice to try the TM1638 module code, if you don't mind. Also, no support expected. It's such a neat idea to have a display and stats and if I can make it work - it would be nice, if not - no big deal. I do have a couple of Nanos lying around too. Or maybe the original Arduino R3 will even handle just the screen module without the large LED stripe you have.
    Last edited: Oct 8, 2024
  16. 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
    Hey Ronan,
    sorry for the late reply. today's my daughter's b'day, but as soon as the storm passes (her classmates will soon be here) I will post both versions, the 'flat' one and the one that supports scaling, TM1638 display and FastLED via Ard Nano (that works for me but who knows...)
    As I said, no support granted
    Cheers
    • Like Like x 1
  17. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Happy Birthday to your daughter!
    • Friendly Friendly x 2
  18. 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
    Two versions

    The "flat" old one (SMC3_Cytron_MD30C 1.1.zip) that drives three motors (I think it has some bugfixes compared to the one I had previously posted). Someone is using it and it's working fine.

    And the new one (almost finished but not fully tested) that supports TWO motors and: analog motion scaler for Cytron, TM1638 Display+LED, FastLED RGB (WS2812B) LED strips (SMC3_Cytron_MD30C 1.6.zip)

    The LED strips let you see the position of the motors (or potentiometers, it's the same...) so you can f.i. check if you're often going in the clip zone. Controlling the strips with the main Arduino that runs the SMC3 code was heavy (on top of all the rest) so I moved the code to a slave Arduino UNO/Nano board. The Led strips have different visual styles and can also be used with random effects when not in use.

    RGB (WS2812B) LED strips connected to the Arduino Uno/Nano SLAVE (via I2C Mode) will show your current feedbacks position. The device will act as a listener (slave board) with I2C events raised by the Arduino master (the onewith the SMC3 code)

    If you want to use the LED strips you should also have a TM1638 module, so you can change functions using its buttons. The TM1638 module also stores and shows live values of your ride like max/min input values reached, how many times you enetered the clipping zone, how close you went to the clipping zone, etc.
    Many other things I don't remember... I'm getting old

    The three options are DISABLED by default, so if you want to use them uncomment the ones you need (define ENABLE_SCALING, define ENABLE_FASTLED, define ENABLE_TM1638)

    Wirings Ard UNO
    upload_2024-10-13_15-54-55.png

    Wirings Ard NANO
    Master UNO board -> Slave Arduino Nano: SDA -> A4, SCL -> A5, GND -> GND
    DATA_LEDPIN1 12 //LED output pin1 (left feedback/motor)
    DATA_LEDPIN2 11 //LED output pin2 (right feedback/motor)

    dependencies:
    robtillaart/RunningAverage@^0.4.3
    fastled/FastLED@^3.6.0



    As I said, I'd like to - and if I can I will - but I can't assure I'll be able to provide a (quick) support. Sorry for that.
    @Ronan Design

    Cheers,
    Blame73

    Attached Files:

    • Like Like x 1
    • Winner Winner x 1
    Last edited: Oct 14, 2024
  19. Ronan Design

    Ronan Design Roman Design - Custom MSFS Scenery

    Joined:
    Jun 4, 2021
    Messages:
    216
    Occupation:
    Web Designer, MSFS Scenery Designer
    Location:
    Toronto, Canada
    Balance:
    1,439Coins
    Ratings:
    +88 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks you very much! I'll see if I can make it work. So from what I see the TM1638 is connected to the main Arduino running SMC3. Which means if I don't want the LED strips I don't need to connect the slave Nano. I actually only want TM1638 to see the clipping data. Cool.
    I'll see if I can merge the "soft start" feature into it. BTW which version of SMC3 did you use as a start?