1. 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 Download Package Now!
  2. 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
  3. 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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

Fan Control in Assetto Corsa With GameDash and Pololu Maestro?

Discussion in 'Official Companion Apps' started by Roonster, Apr 16, 2014.

  1. Roonster

    Roonster Member

    Joined:
    Aug 22, 2009
    Messages:
    25
    Location:
    GTA Ontario
    Balance:
    609Coins
    Ratings:
    +11 / 0 / -0
    Hi,
    I would like to control speed on a DC fan in Assetto Corsa if possible.

    The DC Fan is being controlled by an RC motor controller and getting the control signals from the Pololu Maestro. I've been able to get the Pololu Maestro working with the Game Engine ok. I can move attached servos and control the DC fan speed with the test sliders.

    Now I would like to start testing with GameDash so that I can have the fan speed matching car speed.
    I think I have the Serial Output settings set right, but I do not know how or what to put in the popup Output Rules Box for Each Dash 1-20.

    I've attached a screenshot of the Interface settings in Game Engine, as well as a screenshot of GameDash.

    Are there documents available on the GameDash setup? I wasn't able to find any via search.

    I'd appreciate any tips.

    Thanks,

    Paul.

    gamedash setup.jpg


    Maestro settings work with game engine.jpg
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. eaorobbie

    eaorobbie Well-Known Member Staff Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,593
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    19,691Coins
    Ratings:
    +1,655 / 22 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok its a little involved to get running but once ya done it once its pretty easy.
    First we need to make sure in the Game Manager the dash has been selected. Pic below.
    16-04-2014 6-17-05 PM.png

    Ok now DashOutput is enabled we can fire the game up and variables will appear in the GameDash.
    You will notice that Dash 1 is Speed.
    Ok script needed will depend on the figure you want to send to the ard.
    Test the Game Dash and report back to me what the figure is pretty sure its the speed as is in KPH, don't worry this can be changed.
    Then we can move on.
  4. Roonster

    Roonster Member

    Joined:
    Aug 22, 2009
    Messages:
    25
    Location:
    GTA Ontario
    Balance:
    609Coins
    Ratings:
    +11 / 0 / -0
    Thanks Eaorobbie,
    Ok, Game Dash is connected now and is receiving data from the game. Speed data is shown in Dash 1.

    What script do I need in the output box to get an 0 to 100% RC servo signal relative to 0-300KPH speed.

    game dash connected.jpg

    Game Dash Output Settings.jpg
  5. eaorobbie

    eaorobbie Well-Known Member Staff Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,593
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    19,691Coins
    Ratings:
    +1,655 / 22 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok looks like Speed is coming in as KPH so the script should look like this.

    MATH * 0.85
    ROUND 0

    Now how did I work that out.
    Well you want 300 to equal 255 so we simply divide 255 by 300 which gives us 0.85, meaning 1kph is equal to 0.85 for the servo.
    Now the servo controller needs whole numbers and no decimals, so we need to round the figure to 0 decimals, Round 0.
    Test that mate everything else looks cool.
    • Informative Informative x 3
  6. Barry

    Barry Active Member

    Joined:
    Mar 20, 2014
    Messages:
    396
    Occupation:
    Web Developer
    Location:
    Northern Ireland
    Balance:
    3,795Coins
    Ratings:
    +247 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, JRK
    This is an awesome idea. I will have to definitely incorporate this into my system if I intend to have a bike on it. Airflow would be an essential extra in that case.
  7. eaorobbie

    eaorobbie Well-Known Member Staff Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,593
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    19,691Coins
    Ratings:
    +1,655 / 22 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Can be done with an ardunio uno too instead of an rc card and you can then use a mosfet and drive a much bigger fan too. Blow ya off the eat stuff.
    Would suit a bike sim for sure.
    • Like Like x 1
  8. Barry

    Barry Active Member

    Joined:
    Mar 20, 2014
    Messages:
    396
    Occupation:
    Web Developer
    Location:
    Northern Ireland
    Balance:
    3,795Coins
    Ratings:
    +247 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, JRK
    I have 3 huge fans I use for my garage which I never use. I'll repurpose them I think and stick some smaller blades to them and a cowl to narrow the air channel.
  9. eaorobbie

    eaorobbie Well-Known Member Staff Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,593
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    19,691Coins
    Ratings:
    +1,655 / 22 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    mmm DC or AC , DC fans are far easier to control. To control AC is expensive. Best I have seen is RC plane motors, very strong breeze.
  10. Barry

    Barry Active Member

    Joined:
    Mar 20, 2014
    Messages:
    396
    Occupation:
    Web Developer
    Location:
    Northern Ireland
    Balance:
    3,795Coins
    Ratings:
    +247 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, JRK
    Good point. They plug straight into the wall. I didn't think of that.
  11. Roonster

    Roonster Member

    Joined:
    Aug 22, 2009
    Messages:
    25
    Location:
    GTA Ontario
    Balance:
    609Coins
    Ratings:
    +11 / 0 / -0
    Eaorobbie,
    Thanks to your script I am now seeing the correct value (Speed*.85) in the Out value for Dash 1. But I still haven't been able to get any movement on a Servo, or Fan control.

    If I setup GameEngine with the settings below I can control a servo or speed control with the manual slider:
    engine setup s.jpg


    engine output tests.jpg

    Before I try to Test GameDash I change the Interface settings on Game Engine to Use COM1. There is nothing connected to COM1 but I will be using the Pololu Maestro on COM4 with GameDash and I don't think GameEngine and GameDash can have the same settings:

    engine output to com1.jpg

    I set the Game Dash Output Settings to Use Com4:

    Game Dash Output Settings.jpg

    I have tried getting Servo Movement without the game running and manually entering values in the test window. The Math part is working, but I cannot get any motion output:

    dash testing output no game running s.jpg

    I have also tried with the game running, Math still works right, but no motion output:

    game dash game running s.jpg

    Sorry forthe Data dump of screenshots but I figured I would try to provide as many details as possible.

    I am using a separate PC than the Gaming computer to run both GameEngine and GameDash.

    Any ideas on where to go from here?

    Thanks,

    Paul.
  12. eaorobbie

    eaorobbie Well-Known Member Staff Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,593
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    19,691Coins
    Ratings:
    +1,655 / 22 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok feel I might have missed something from the script looking at your game engine setting the output is required to be in binary.

    Try adding to the script:

    TOBIN

    Which will change the output of the integer to binary.
  13. Roonster

    Roonster Member

    Joined:
    Aug 22, 2009
    Messages:
    25
    Location:
    GTA Ontario
    Balance:
    609Coins
    Ratings:
    +11 / 0 / -0
    The data in the output window shows up in Binary now, still no movement on the RC output unfortunately.

    binary output-1.jpg
  14. PNG1977

    PNG1977 New Member

    Joined:
    Aug 22, 2016
    Messages:
    1
    Location:
    Berkshire, UK
    Balance:
    67Coins
    Ratings:
    +0 / 0 / -0
    Hello Everbody,

    I'm new to Simtools but a great little program, I am having exact same issues as above, I can get servo movement through Game Engine and the servo is kind of jittering as I pick up speed in game, but very very little movement.

    Can anybody help me get over this last bit?

    Thanks in advance



    Paul B