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

Using plugins to drive servo motors

Discussion in 'DIY Motion Simulator Projects' started by hugso, Oct 6, 2013.

  1. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Do you use some firewalls or antivirus? They can to block UDP packets. Can you temporarily disable all protection and check again. And by the way, check is in "Single Missions folder" exists script files with extension *.cs
  2. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    I now only use Microsoft Essentials anti virus, after having problems with my previous antivirus some months ago. It works really well and tells me if something is being blocked. In the single missions folder in IL2CoD there are several files with .cs Could this be a problem?
    • Like Like x 1
  3. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    No, it is not a problem. It's right. Can you test SimTools with Live For Speed? Plugin for this game also use UDP packets. And (sorry for my question) are you shure that you fly "Single Mission" in CoD( for example "free hunt" )?
  4. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Hooray! You have cracked it! If I go to Single missions and fly a preset mission the servos move beautifully. But, not so good, if I go to a single mission I have made myself in FMB then there is no data. This is a great step forward, thank you for your help. I am so grateful.
  5. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Ok, hugso. As I say the plugin for CloD run only for Single Mission yet. But I hope it will be work with other missions to (later)
    • Like Like x 1
  6. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    That would be brilliant! Thank you all so much for your help.
  7. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Following yesterday's great success I have been having experimenting with SimTools. It is simply brilliant. So many adjustments which can be made. I am delighted to see there is washout back to centre available. Is it possible to make this movement faster? In a flight sim this needs to go back to centre from maximum in about 2 or 3 seconds when used for heave. At present I use an oil-filled piston to achieve this mechanically, but if I could do this with SimTools it would simplify my set-up.
  8. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    mmm have you trialed the washout yet. I actually dont use it on my sim , but its a race rig, only a simple seat mover, I threw together in a hour.
    Increase the value to make it quicker.
    Ok looks like i need to mod the servo code to add more servos for you guys.
    Let me know what is needed ie how many more servos and what force name.
    Aswell you can mix other forces in the axis assignment too. IE can add a bit of surge to the Roll axis to simulate a sway movement, or in pitch axis to simulate a surge movement.
    So let me know how many more servo's you wish to control.
  9. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Tried the washout on one of the axes this am. Slid the servo over fully in Output Testing and it slowly washed out back to centre. I would like to use washout with heave and it needs to washout back to centre in about 2 or 3 seconds. What value where do I increase?

    To make my sim fully operational I need heave and sway in addition to the pitch I already have. The roll which I have at present is not suitable for a flight sim as it gives a motion which is too delayed to feel right and also as you go over the top of a roll and are upside down it suddenly switches over to the opposite way. I tried this when first developing my sim and I found if I used the position of the ailerons to move the roll axis it feels great. If it is not possible to get the aileron position to move a servo then I can use sensors in my control column to do the job. One thing I would really like is airspeed. A servo which moves from one extreme to the other from 0 to about 400mph. This both de-activates the roll motion when the plane is on the ground and also moves a control which makes the control column firmer the faster you go.
  10. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok Ailerons would have to be added to a plugin so would airspeed in order for you to be able to use them. Ok heave can be added into the code if you need this as a servo and can be run on a separate axis.

    Ok added heave as a separate axis in Ard UNO code, signal wire is plugged into pin 6.
    You will need to Heave to the axis assignments in Axis3.
    Now the new interface output will be P<Axis1>~R<Axis2>~H<Axis3>~ or just add H<Axis3>~ to the end of what you have.
    Now for the others Ailerons and Airspeed we need to have that added into the plugin as Extra forces where we can actually add in 3 more values, but needs for the plugin to edited, not sure if Dash Data for the game has been sorted in DCS.

    Attached Files:

  11. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok managed to add Air Speed from the indicated Air speed should be knots added as Extra1 DOF, but i need to wait for dcs world to finish downloading to test it, but cant find the ailerons in dcs lua info, does your mate know what that's called.
    Well I will let you know tomorrow night once download is finished and I have installed and tested it.
    See how I go.
  12. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    eaorobbie you are a star! Again. And such quick service! Now got Heave working in CoD, will try DCS in a mo. Heave really is the most important of the motions for my gSeat. The aileron position I can manage without (I have already installed a Hall Effect sensor in my control column and this will drive a servo for roll. I know this works). It is quite possible that aileron position is not available. The airspeed is the one which any flight sim would like to have and it will make my rig do everything it was capable of. Oh no, I forgot, a sway servo would finish everything. (I do not have actuators for surge at present. Rather a big job to add them, but could be done. Not as important in a flight sim of WW2 era as in a racing car sim I guess). I cannot thank you enough for all this.
  13. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Just tried DCS, but Heave doesn't move the servo in game. Pitch and Roll work fine but no Heave. It does work in IL2.
  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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok not sure on that one, Heave values changing in Tuning Centre?
    Is Heave add as Axis 3 in Axis Assignments for DCS.
    Got my DCS up and running tonight. With Air Speed as Extra1.
    Check the Min Max values and the Axis Assignments.
    Anyway here is a new plugin just for you not sure if we should mark this up as a Resource.
    Has AirSpeed as Extra1 DOF Output, tested. Matches screen output from what I could workout. Please note there is no Min Max set for Extra1 you will need to set that in the tuning centre.

    Let me know if I got it right, mm now to mod the Ard code for you.
    I will add 2 more Servos Airspeed as A and Sway as S.

    Attached Files:

  15. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok now added them all in to the Ard.
    New output will be P<Axis1>~R<Axis2>~H<Axis3>~A<Axis4>~S<Axis5>~

    Attached Files:

  16. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    oops beware code wont be right for the other game now, might have to have 2 seperate ones , unless prilad can do the same as i have done to DCS for you and put airspeed into Extra1.
  17. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Thanks eaorobbie, that is brilliant. Getting my sim working in these games is a dream coming true. I am away from home until Sunday pm. Will try it out then.

    Tried Heave again in DCS this am before we left and no movement of slider in Tuning Centre. Pitch and Roll fine and all 3 work in IL2CoD. Will double check DCS axis assignments tomorrow.
  18. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    well heave in a lot of games can be a tricky, I would lower the min max setting till I found a movement that was need in order for the rig, you might find what is set is too high.
    Tune the game a little more, dont do a landing for heave, maybe a mild take off.
    Higher the value the less the resulted movement will be.
    Its all there for ya, enjoy.
  19. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    Back home now. Heave did work all along, but such tiny movements barely visible. I need to alter some settings somewhere. (?).

    Installed new hugso 5 servo into Ard. All servos move in Output Testing. New DCS Plugin zip from Saturday installed into SimTools Plugin Updater and patched into DCS with Game Manager. No Servo movements and no sliders moving in Virtual Axis when flying. Re-installed previous DCS plugin and now all servos move except Airspeed on Extra 1. I have uninstalled and re-installed plugins several times with the same result. We are nearly there...
  20. hugso

    hugso Active Member

    Joined:
    Sep 17, 2013
    Messages:
    140
    Location:
    Glos UK
    Balance:
    611Coins
    Ratings:
    +51 / 1 / -0
    My Motion Simulator:
    Arduino, Motion platform, 4DOF
    More tests this am. Have now got Heave to have decent servo movements by using Tuning Center capture Min Max and flying around fairly normally for a few minutes. Works great. Then flew around a while watching the servos moving (can still only use the first DCS plugin at present so only Roll, Pitch and Heave). After a short while Game Manager shut itself down. I restarted Game Manager and there was no movement of servos with sliders in Output Testing. I tried to reload hugso 5 servo prog into Ard but got "cannot find ComPort 3" message. I unplugged and replugged USB and reloaded hugso 5 prog into Ard and all OK. Was something overloading and causing the progs to shut down? I did this twice to see if it was a one-off glitch, but the same shut-down happened. Sorry to be a pain. This is gonna be great with a bit more tweaking I am sure.