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

Ultraforce GS-4 DIY - Software

Discussion in 'DIY Motion Simulator Projects' started by Schluzu, Mar 7, 2014.

  1. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    Hello,

    my Name is Martin and i´m from Austria.
    I have built a GS-4 for the poor ones.
    I have used 10 Jumbo á 33kg Servos. 3/in each Bottom Plate and 2/Rear Plates.
    And a Teensy 3.1 to Controll the four Axis.
    My Problem is that Simtools start in the middle way at 0° and works between -90° and +90°.
    I have 2 Split the -90° to the left Axis , and +90° to the Right axis. I dont have a negative Way .
    I need nearly the full way to use the full torque of the Servos
    The same problem is on Throttle (only on the Axis X/Y) and Braking(only on the Axis R/L)
    Is there a any Range-Filter i dont see like these:
    (DOF1/Axis1/Surge/50 - 100%) (DOF1/Axis2/Surge/50 - 100%)
    (DOF1/Axis3/Surge/0 - 50%) (DOF1/Axis4/Surge/0 - 50%)

    [​IMG]
    Standart Position of all Plates should be flat. (not like this Pic)

    so i hope You understand what i mean.

    SRY for the bad English.



    Maybe theres a Way 2 change the Code

    #include <Servo.h>

    Servo myservo1;
    Servo myservo2;
    Servo myservo3;
    Servo myservo4;
    char kind_of_data;
    int valLSP = 15;
    int valRSP = 15;
    int valXSP = 15;
    int valYSP = 15;

    void setup()
    {
    myservo1.attach(6);
    myservo2.attach(7);
    myservo3.attach(8);
    myservo4.attach(9);
    myservo1.write(valLSP);
    myservo2.write(valRSP);
    myservo3.write(valXSP);
    myservo4.write(valYSP);

    Serial.begin(115200);
    }

    void loop()
    {

    while (Serial.available() > 0)
    {

    kind_of_data = Serial.read();
    if (kind_of_data == 'R' ) Read_RightServo();
    if (kind_of_data == 'L' ) Read_LeftServo();
    if (kind_of_data == 'X' ) Read_RechterServo();
    if (kind_of_data == 'Y' ) Read_LinkerServo();

    myservo1.write(valRSP);
    myservo2.write(valLSP);
    myservo3.write(valXSP);
    myservo4.write(valYSP);
    }
    }

    void Read_RightServo(){

    int RightServoPos = 0;
    delay(2);
    int RSP100 = Serial.read();
    delay(2);
    int RSP10 = Serial.read();
    delay(2);
    int RSP1= Serial.read();
    RSP100 = ((RSP100)-48)*100;
    RSP10 = ((RSP10)-48)*10;
    RSP1 = ((RSP1)-48)*1;
    if (RSP10 < 0 && RSP1 < 0){RSP100 = RSP100/100;RSP10 = 0;RSP1 = 0;}
    if (RSP1 < 0){RSP100 = RSP100/10;RSP10 = RSP10/10;RSP1 = 0;}
    RightServoPos = RSP100+RSP10+RSP1;
    valRSP = map(RightServoPos, 0, 255, 15, 165);//already testet (RightServoPos, 127, 255, 15, 165)
    }

    void Read_LeftServo(){

    int LeftServoPos = 0;
    delay(2);
    int LSP100 = Serial.read();
    delay(2);
    int LSP10 = Serial.read();
    delay(2);
    int LSP1= Serial.read();
    LSP100 = ((LSP100)-48)*100;
    LSP10 = ((LSP10)-48)*10;
    LSP1 = ((LSP1)-48)*1;
    if (LSP10 < 0 && LSP1 < 0){LSP100 = LSP100/100;LSP10 = 0;LSP1 = 0;}
    if (LSP1 < 0){LSP100 = LSP100/10;LSP10 = LSP10/10;LSP1 = 0;}
    LeftServoPos = LSP100+LSP10+LSP1;
    valLSP = map(LeftServoPos, 0, 255, 15, 165); //already testet (RightServoPos, 0, 126, 15, 165)
    }
    void Read_RechterServo(){

    int RechterServoPos = 0;
    delay(2);
    int XSP100 = Serial.read();
    delay(2);
    int XSP10 = Serial.read();
    delay(2);
    int XSP1= Serial.read();
    XSP100 = ((XSP100)-48)*100;
    XSP10 = ((XSP10)-48)*10;
    XSP1 = ((XSP1)-48)*1;
    if (XSP10 < 0 && XSP1 < 0){XSP100 = XSP100/100;XSP10 = 0;XSP1 = 0;}
    if (XSP1 < 0){XSP100 = XSP100/10;XSP10 = XSP10/10;XSP1 = 0;}
    RechterServoPos = XSP100+XSP10+XSP1;
    valXSP = map(RechterServoPos, 0, 255, 15, 165);

    }
    void Read_LinkerServo(){

    int LinkerServoPos = 0;
    delay(2);
    int YSP100 = Serial.read();
    delay(2);
    int YSP10 = Serial.read();
    delay(2);
    int YSP1= Serial.read();
    YSP100 = ((YSP100)-48)*100;
    YSP10 = ((YSP10)-48)*10;
    YSP1 = ((YSP1)-48)*1;
    if (YSP10 < 0 && YSP1 < 0){YSP100 = YSP100/100;YSP10 = 0;YSP1 = 0;}
    if (YSP1 < 0){YSP100 = YSP100/10;YSP10 = YSP10/10;YSP1 = 0;}
    LinkerServoPos = YSP100+YSP10+YSP1;
    valYSP = map(LinkerServoPos, 0, 255, 15, 165);
    }

    cu Martin

    Attached Files:

    • Like Like x 1
    • Informative Informative x 1
    • Useful Useful x 1
    • Creative Creative x 1
  2. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello Martin!

    A DIY Gseat is a very good project! I'm sure we will find a solution with you ;)

    In your code, can you take the absolut value of <Axis1>?

    Can you give more details about what you have and what you want to get?
    Mat
    PS: I'd like to see more pictures of your work!
  3. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    Hello again,

    now the code works, but the output bit Range at 8 Bits is to low for 4 axis.
    and if i change the Rate to 16 bit, then the Servos working not correct.
    what can i do?

    thx
    Last edited: Mar 8, 2014
  4. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    DSC_0019.jpg Seat from a Renault Clio RS
    DSC_0020.jpg The Servos from Hobbyking
    DSC_0021.jpg DSC_0022.jpg DSC_0023.jpg
    The Servos under the Seating Surface


    DSC_0024.jpg DSC_0025.jpg DSC_0026.jpg
    The Hinge on the Seating Surface


    DSC_0027.jpg The Servos on the Backrest

    DSC_0028.jpg DSC_0029.jpg DSC_0030.jpg

    DSC_0031.jpg DSC_0032.jpg The Linkage of the Backrest
    DSC_0033.jpg

    DSC_0035.jpg


    and the Power Supply is a Meanwell 5V/55A @5,8Volt
    • Like Like x 5
  5. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    ahh simtools supports up to 6 controller
    So i order 2 arduino nanos now.
    1 arduino per 2 axis is the easy way
  6. Nick Moxley

    Nick Moxley Well-Known Member

    Joined:
    Dec 13, 2013
    Messages:
    2,779
    Occupation:
    Owner/Operator- Moxleys Rantals
    Location:
    Winnipeg Manitoba Canada
    Balance:
    17,055Coins
    Ratings:
    +2,505 / 30 / -2
    My Motion Simulator:
    2DOF, 3DOF, DC motor, JRK
    Wow cool project man. Never thought of Turnigy's for big 1/4's before.
  7. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Very good looking! your pics are nice, thanks!
    Yes, it's very easy to configure 3 serial interfaces!
    So, if you can afford to buy to more arduino, you won't have to divide your bandwith by 3. :D

    For someone who would like to start a Gseat building ;), what advice would you give to him? what mistakes should he avoid to do?
    yours
    Mat
    Last edited: Mar 9, 2014
  8. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    The Servos are strong and fast enough @ 5,8v and they are cheap.
    if you dont have the weight like me (135kg / 297.7 lbs) i think 2 Servos for (190-200lbs) / Bottom-Plates are enough. The Hinges of the Plates should be at the Position where the most Weight pivoted is (depands on the size of the butt ;-)) 30mm Servo-Horns (inkludet by these Servos) are far enough. 5,5cm Travel-Way sounds not much, but on a chair this is enormous.

    Test the servos and their ways with a RC-Transmitter and adjust the Push Rods.......

    think thats all

    today i tested first time iracing with the seat, makes a lot of fun, but theres a lot of work to adjust Simtools and my code 2. and this will take much more days than today.............
    Last edited: Mar 9, 2014
  9. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Great! :thumbs

    Thansk for the information, I found them Turnigy TGY-S8166M

    the specs are weird. Torque isn't in kg/m and speed very very low: some mistakes I suppose. But if it suits you, it's certainly fine!
    Torque: 33kg
    Speed: .21 deg / sec


    The cost is 27$ per servo: x8=220$
    Maybe 3 wipers could do the job as well: bigger place needed but cheaper.
  10. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
  11. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    why only 3 wiper-motors?
  12. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Sorry! I meant 4.

    The Smolka are 120kg.cm and 48 RPM @35€
    That could be fine as well ;-)

    I'm eager to see your sim in action :-D
  13. yokoyoko

    yokoyoko Member

    Joined:
    Aug 7, 2012
    Messages:
    31
    Occupation:
    Test engineer - automobile industry
    Location:
    Germany - Bad Eilsen
    Balance:
    829Coins
    Ratings:
    +15 / 2 / -1
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino, JRK, SimforceGT
    @RacingMat I still think about this kind of project with wipers instead of servos too.

    @Schluzu very nice project. I have seen it in the virtualracing forum and I am sure you will get it running nicely.
    "wenn du Hilfe beim setup der profile brauchst können wir gerne mal telefonieren oder skypen"

    Sent from my RM-821_eu_euro2_248 using Tapatalk
  14. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Code is for only 8bit, lol contains some of my original code copied onto the other site, lol.
    Can easily be modified to support 16bit, but with several servos , more than 3 that code begins to lag badly, its why I wrote a new code here to drive servos more efficiantly. Is used often to drive servo models under simtools.

    @yokoyoko surprised to see a xsim moderator over here, Welcome back. I think wiper will be an overkill for this.
  15. Schluzu

    Schluzu New Member

    Joined:
    Mar 5, 2014
    Messages:
    27
    Balance:
    37Coins
    Ratings:
    +23 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    @eaorobbie
    i test your rc-model-code and it works really fast.
    the newer version v2 wont work 4 me, the servos only twitches around.
  16. yokoyoko

    yokoyoko Member

    Joined:
    Aug 7, 2012
    Messages:
    31
    Occupation:
    Test engineer - automobile industry
    Location:
    Germany - Bad Eilsen
    Balance:
    829Coins
    Ratings:
    +15 / 2 / -1
    My Motion Simulator:
    3DOF, DC motor, SCN5, Arduino, JRK, SimforceGT
    @eaorobbie
    Sure it is kind of overkill, but as racingmat said if you compare the price for big scale servos and for the wipers - it could be interesting. Specially if you have the wipers in stock

    Sent from my RM-821_eu_euro2_248 using Tapatalk
    • Agree Agree x 2
  17. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok makes sure Serial.print is comment out or the serial out it performs will lock up the comport, check what baud rate it is set at too. You can test it in the Ardunio Serial Monitor too before using it in SimTools.

    I have attached a code modified with the serial print lines commented out, let me know if it works and from reading through it , you should be able to add the other two servos too. If not let me know and I will rewrite it to run the 4 servos for you. And it runs at a baud rate of 9600, which you can change in code too, have tested it to 115200 too.

    Attached Files:

    Last edited: Mar 11, 2014
  18. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,236
    Location:
    Marseille - FRANCE
    Balance:
    20,962Coins
    Ratings:
    +2,089 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    @yokoyoko: yes, I've to choose DIY pedals or DIY Gseat...
    I'm stuck in the middle! and finishing my steptronic shifter first!

    I'll do some Gseat tries soon and come back to share with you, guys!
  19. Roadster2

    Roadster2 Member

    Joined:
    Apr 20, 2007
    Messages:
    170
    Location:
    UK
    Balance:
    1,194Coins
    Ratings:
    +42 / 2 / -0
    Hi Martin. Great project and leads me to look at what might be done with a Kirkey seat. Sure it's more expense but the total cost would be much less than a GS-4 and therefore available to a lot more sim racers. If you have time is it possible to sketch out a quick connection schematic of the Arduino controller boards and the servo's ? Looking forward to seeing updates on this post.
    • Agree Agree x 1
    Last edited: Mar 15, 2014
  20. Roadster2

    Roadster2 Member

    Joined:
    Apr 20, 2007
    Messages:
    170
    Location:
    UK
    Balance:
    1,194Coins
    Ratings:
    +42 / 2 / -0
    Searching the web I've come across some very useful info and some construction photo's on a sub folder of the old Ultraforcesim web site. Accessing the main page simply diverts you to the Simxperience web site but access to the sub folders is still available (at the moment anyway).

    http://www.ultraforcesim.com/pub/
    • Informative Informative x 2