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

SMC6 - 6DOF Motion Simulator

Discussion in 'DIY Motion Simulator Projects' started by Gadget999, Jul 8, 2022.

  1. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Hi Guys,

    I wanted to share with you the latest Sim I have been building

    I have called it the SMC6 - basically it can control up to 6 actuators using one board

    The Board is a Teensy 4.1 which is very powerful and has plenty of inputs and outputs
    its speed is 600 mhz compared to an Arduino at 16 mhz !
    it can be overclocked to 1GHZ if you use a chip cooler !

    The motors are indexed using shaft encoders for very high accuracy
    the encoders are 1440 ppr and are attached to the motor not the output arm
    combined with the gearbox of the motor there is some very fine resolution available

    the default resolution on full range is 16bit - or 65,535 steps !

    The motors on this sim are Brushed DC motors from an electric tow tug
    Brushed motors have greater stall torques than brushless motors and are very much suited to motion sims

    Something i found with building my previous driving sims is that not all the actuators do as much work as the others, some of them draw much more current - this is just the way the motors are loaded on a driving sim
    I decided to use a mix of different gear ratios so the motors doing the most work can have more torque
    The SMC6 firmware measure the acceleration and speed of the actuators and can make them run faster or slower so having different gear ratios does not matter.

    the gearbox ratios are

    2 x 60:1
    2 x 40:1
    2 x 30:1

    The motor drivers are 200A each and are buffered by 2x 12v batteries - there is around 1600 amps available from the batteries. I do not think you would be able to power this sim using single phase house electricity

    In testing we have seen over 1000 mm / sec on this sim ! - no one has been brave enough to sit on it during a test yet !

    There is a PC configuration program that i have written also that lets you test the actuators and also configure the PID control for each motor
    Test modes include sine wave, square wave, step up and step down.
    I am working on a tool that lets you draw a test cycle and then make the actuators replay it

    you can see the first test here

    more videos will be available when I am ready to release them
    • Like Like x 3
    • Winner Winner x 2
    • Creative Creative x 2
    • Informative Informative x 1
    Last edited: Jul 15, 2022
  2. leductrinh

    leductrinh New Member

    Joined:
    Aug 11, 2020
    Messages:
    17
    Balance:
    31Coins
    Ratings:
    +25 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    i am also building 6 dof with wormgear , can you share more ?
  3. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    What questions do you have ?

    Do you have a build thread ?
    • Like Like x 1
  4. Fifi

    Fifi Oi Oi Oi

    Joined:
    Jul 7, 2022
    Messages:
    8
    Balance:
    65Coins
    Ratings:
    +1 / 0 / -0
    Hi,

    I am researching my first build, and came across your earlier build, and now this one. I like your earlier build.

    After looking at your video, can I ask:

    1. Is the battery powering only the motors, and the electronics are powered by power supply on LH side of cabinet?
    2. What type of motor controllers are they please? Top of cabinet, 3x units - does each one control 2x motors?
    3. Do you have a diagram for how you connected the Teensy 4.1 please?

    Thank you.
  5. kalbasator

    kalbasator Active Member

    Joined:
    Dec 28, 2021
    Messages:
    105
    Location:
    Kazahstan, Almaty
    Balance:
    400Coins
    Ratings:
    +37 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 4DOF
    Second question - This is a 100A driver for two motors, like this:

    Attached Files:

  6. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Yes these are the motor drivers

    They can handle 200 A for short periods of time

    I suggest you use a cooling fan on them
    Last edited: Jul 15, 2022
  7. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF

    Hi Fifi

    attached is a wiring diagram for the Teensy 3.6 / 4.1

    the software and firmware is not open source

    There are several power supplies

    24V - keeping the batteries charged
    12V - powering the encoders and the main isolation relay
    5v - powering the electronics and motor drivers
    3.3v - used to supply 3.3v at the board level

    the batteries power the DC motors and also work as buffers for the regenerative power from the motors

    Attached Files:

    Last edited: Jul 15, 2022
  8. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Today I implemented the ability to create a custom test or waveform

    basically you can have a text file that has 3600 entries and the software will read them one at a time and send them as a stream of positions to the selected actuators



    next step is to install simtools and get it working with LFS :)
    • Old Old x 1
  9. Fifi

    Fifi Oi Oi Oi

    Joined:
    Jul 7, 2022
    Messages:
    8
    Balance:
    65Coins
    Ratings:
    +1 / 0 / -0
    Thank you for the replies. It is very handy for me to be able to research different options before building.
  10. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    @noorbeast can you confirm I have the correct settings for simtools

    My Sim uses the protocol

    TGT65536,65536,65536,65536,65563,65536

    Basically TGTAxis1,Axis2,Axis3,Axis4,Axis5,Axis6

    The start and stop positions are TGT32768,32768,32768,33768,32768,33768

    Pic attached of current config

    Attached Files:

  11. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,520
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,950Coins
    Ratings:
    +10,770 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I have no idea of what hardware you are using, or if it is compatible with and supported by SimTools, hence please explain the designation of TGT?
  12. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    the board can respond to many different commands

    TGT is designated Target- each actuator is sent a position between 0 and 65536

    a string like this is sent "TGT10000,20000,30000,40000,50000,60000"

    i have simtools v2.5.x installed and it beeps when i try and enable output testing

    however - using a serial port sniffer I can not see simtools is sending any data
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,520
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,950Coins
    Ratings:
    +10,770 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Is the hardware you are using, whatever that may be, supported by SimTools?
  14. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    I designed and wrote the code for the device - so if it does not work I can make it work

    can Simtools transmit a line of data like this ?

    "TGT10000,20000,30000,40000,50000,60000"
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,520
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,950Coins
    Ratings:
    +10,770 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I am not in a position to troubleshoot your code, but @yobuddy should be able to advise what SimTools can and can't accept as input.
  16. wimpo`

    wimpo` Member

    Joined:
    Jul 27, 2008
    Messages:
    89
    Occupation:
    metselaar
    Location:
    nederland, twente, vroomshoop
    Balance:
    178Coins
    Ratings:
    +5 / 0 / -0
    Yes with a 16bit decimal value output it does go from 0 to 65535, i get.

    Code:
    I received: TGT0,0,0,0,0,0
    I received: TGT0,0,0,0,0,0
    I received: TGT0,0,0,0,0,0
    I received: TGT0,0,0,0,0,0
    I received: TGT9945,9945,9945,9945,9945,9945
    I received: TGT32130,32130,32130,32130,32130,32130
    I received: TGT45899,45899,45899,45899,45899,45899
    I received: TGT52530,52530,52530,52530,52530,52530
    I received: TGT56610,56610,56610,56610,56610,56610
    I received: TGT58905,58905,58905,58905,58905,58905
    I received: TGT64260,64260,64260,64260,64260,64260
    I received: TGT65535,65535,65535,65535,65535,65535
    I received: TGT65535,65535,65535,65535,65535,65535
    
    TGT<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>S as output string in simtools engine.

    And this little snippet of code for hardware side.
    Code:
      
    if (Serial2.available() > 0) {
    int BUFFER_SIZE = 100;
    char buf[BUFFER_SIZE];
        int rlen = Serial2.readBytesUntil('S', buf, BUFFER_SIZE);
    
        // prints the received data
        Serial.print("I received: ");
        for(int i = 0; i < rlen; i++)
          Serial.print(buf[i]);
    
          Serial.println("");
      }
    
  17. wimpo`

    wimpo` Member

    Joined:
    Jul 27, 2008
    Messages:
    89
    Occupation:
    metselaar
    Location:
    nederland, twente, vroomshoop
    Balance:
    178Coins
    Ratings:
    +5 / 0 / -0
    every character number or comma seems to be a byte in this case.
    Code:
    T[0] G[1] T[2] 6[3] 5[4] 5[5] 3[6] 5[7] ,[8] 6[9] 5[10] 5[11] 3[12] 5[13] ,[14] 6[15] 5[16] 5[17] 3[18] 5[19] ,[20] 6[21] 5[22] 5[23] 3[24] 5[25] ,[26] 6[27] 5[28] 5[29] 3[30] 5[31] ,[32] 6[33] 5[34] 5[35] 3[36] 5[37]
  18. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,897
    Location:
    London
    Balance:
    11,610Coins
    Ratings:
    +458 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Thanks for the info

    But sim tools does not seem to be outputting anything at all

    Is it because the simtools version is demo and can only output 2dof ?

    I tried the protocol TGT<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>,<Axis1a>S

    Does the S tell simtools its a string ?

    Should we be using square brackets or < > ?
  19. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,160
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,139Coins
    Ratings:
    +5,036 / 16 / -0
    Hi @Gadget999,
    To get this: TGT10000,20000,30000,40000,50000,60000 you will use this: TGT<Axis1a>,<Axis2a>,<Axis3a>,<Axis4a>,<Axis5a>,<Axis6a>

    Nope, the S is just a end of string identifier is all.

    For output testing I suggest you use (a) Axis Output type
    upload_2022-7-18_9-46-38.png

    Keep in mind that while 16 bit does have 65536 possible entries, that the the zero counts as an entry, so the range is 0 to 65535 with 32,767 being the center value.

    Also, It looks like your sending data as decimal values, where if you send data as binary values, it will already be in the format your micro-controller will understand. And all 16bit inputs will be a formatted 3 chars.
    So the output would always be 3 chars for each input: TGT111,222,333,444,555,666

    And you can directly read each value in the micro-controller, as the input format is what a micro-controller understands. So if you read the 111 (axis1a) from the input (TGT111,222,333,444,555,666) it will already be the needed value in the controller with no translation needed.
    Hope that makes sense buddy?
    Chat soon,
    yobuddy
  20. wimpo`

    wimpo` Member

    Joined:
    Jul 27, 2008
    Messages:
    89
    Occupation:
    metselaar
    Location:
    nederland, twente, vroomshoop
    Balance:
    178Coins
    Ratings:
    +5 / 0 / -0
    No i have the demo version, so that shouldn't be a problem.
    If everything checks out, com port Baud speed etc. you should be able to receive data when output testing is turned on. And axis are assigned off course.

    The S is just for a easy end byte to check for.
    used here.
    Serial2.readBytesUntil('S', buf, BUFFER_SIZE);
    But this generally bad practice because readBytesUntil() is blocking the rest of the code when reading. At least with the arduino family.

    You should have something in place for the difference in array length with decimal. Or use Binary, in that case you get 2 bytes for each value. first byte X 256 + second byte is the value. in that case you could count up.
    with simtools binary you know how many bytes will be received because of the output format.
    TGT is 3 bytes[0][1][2].
    So value 1 would be
    (byte[3] X 256) + byte[4] = value 1
    value 2
    Byte[5] = ","
    (byte[6] X 256) + byte[7] = value 2
    etc..

    But you could also use start bytes and end bytes off course, because A == 65 ASCII And when you are checking for A and the value of the axis is 65 your code handles it like an A. So A(byte 65) would be bad. With decimal this problem is solved. if you use ascci values above 9. The total of bytes are different with values 0 or 65535. 1 byte or 5 bytes in this case. So then you would create a string so you can add the numbers until "," then convert your string to an int. Do this for every value.

    for simple testing you could use another uart and read with one and print with the other byte for byte.
    so something like

    if(Serial2.available() > 0)
    {
    Serial.print(Serial2.read());
    }

    this way you could find out how you want to approach it.

    this is some nice information on how to do it in an none blocking way.

    https://forum.arduino.cc/t/serial-input-basics-updated/382007/3
    Last edited: Jul 18, 2022