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

Simulated Wind using MonsterMoto and ArduinoUno

Discussion in 'SimTools compatible interfaces' started by SilentChill, May 15, 2015.

  1. 1/2 Acre

    1/2 Acre New Member

    Joined:
    Dec 1, 2016
    Messages:
    3
    Location:
    Philadelphia, PA
    Balance:
    264Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Apologies in advance for my ignorance, but does anyone know if this wind simulator can be used for FSX?

    Thx,

    Aaron
  2. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    If there is a dash for speed or rpm you can hook it upto that :)
  3. gskmr2

    gskmr2 New Member

    Joined:
    Oct 4, 2016
    Messages:
    2
    Occupation:
    IT Manager
    Location:
    Kent, UK
    Balance:
    - 94Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Hi there, I wonder if anyone knows whats going wrong with Game Dash on my systems. Here is the Arduino on Com7 running on Windows 7 x64
    COMMPort.jpg

    and here is the Com port showing in the output settings
    CommPortOK.jpg
    After saving and closing it, going back into the settings gives
    CommError.jpg
    and now all Com ports are missing except the one I chose
    CommMissing.jpg


    At this point I can go into the Arduino SDK and gain direct access to the serial command and set speeds manually (S010, S254, etc) and the Uno responds as required with no issues. but trying anything direct from Game Dash doesn't change anything.


    I have multiple Arduinos including a Mega2560 as well as an XP x86 machine but they both produce the same error.

    I have googled the error regarding the interface error and only found one other post that never had a reply.

    Thanks in advance!
    Gavin
  4. gskmr2

    gskmr2 New Member

    Joined:
    Oct 4, 2016
    Messages:
    2
    Occupation:
    IT Manager
    Location:
    Kent, UK
    Balance:
    - 94Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Hi again,
    After spending a good few hours on this it seems to be sorted - my testing using the Dash Output Tester didn't work, only by connecting to LFS managed to get it going!

    Gavin
    • Like Like x 1
  5. Guilherme Bastian

    Guilherme Bastian New Member

    Joined:
    Sep 26, 2016
    Messages:
    24
    Location:
    Brazil
    Balance:
    151Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    Arduino
    How can I change power mode to 31kHz PWM in the arduino code?
  6. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    huh ?
  7. Guilherme Bastian

    Guilherme Bastian New Member

    Joined:
    Sep 26, 2016
    Messages:
    24
    Location:
    Brazil
    Balance:
    151Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    Arduino
    the frequency the firt page code is using is creating coil shine. If we could change it to 31kHz it will stop the coil. However, this kind of frequency is only applied for server fans not blowers.
  8. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Sorry I dont know but MM's only operate at 20khz anyways so i dont know what your trying to do
  9. 1/2 Acre

    1/2 Acre New Member

    Joined:
    Dec 1, 2016
    Messages:
    3
    Location:
    Philadelphia, PA
    Balance:
    264Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    6DOF
    Thanks @SilentChill. From what I can tell the plugin does support it but maybe my question is "has anyone successfully used the wind with FSX?" I saw a previous post by someone trying but to no avail but the consensus was it was due to them using JRK and not the arduino. So I guess I am asking if anyone has already successfully used the wind simulator with FSX. THX!!!
  10. abs

    abs Active Member Gold Contributor

    Joined:
    Mar 3, 2011
    Messages:
    331
    Occupation:
    consultant
    Location:
    Montreal
    Balance:
    784Coins
    Ratings:
    +65 / 0 / -0
    My Motion Simulator:
    3DOF, SCN5
    hello , when I exit the game the fan start spinning like crazy . is there a fix other than unplug the usb?
    I run windows 10 on second pc . it used to work fine with xp on a second pc
  11. Avenga76

    Avenga76 Well-Known Member

    Joined:
    Jun 29, 2014
    Messages:
    518
    Occupation:
    Network Engineer
    Location:
    Auckland, New Zealand
    Balance:
    3,261Coins
    Ratings:
    +853 / 6 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Make sure you have the com ports set up in the GameDash and not the Game Enigne. That will cause that type of problem.
    • Informative Informative x 1
  12. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I am not sure but possibly we can use the shutdown in dash app to turn the motors off.

    On a side note I have been trying to tweak the code a little and I have changed the PWM frequency but unfortunately as we have used this as a shield I cannot figure out how to change the PWM frequency on pins 5 and 6 to anything other than the divisor of Timer 0. I have it set to 7khz which does get rid of the annoying whine but in its is a really high pitch noise which is loads better. I can also set it to 60khz but thats no good as it will just burn the MM out.

    @RufusDufus I know your a busy man but is there anyway to set pins 5 and 6 to 20khz I have found plenty of example code but I cant seem to get it to work.
  13. Avenga76

    Avenga76 Well-Known Member

    Joined:
    Jun 29, 2014
    Messages:
    518
    Occupation:
    Network Engineer
    Location:
    Auckland, New Zealand
    Balance:
    3,261Coins
    Ratings:
    +853 / 6 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Be really careful of fast PWM

    I have been testing it with the guy who wrote the iRacing Arduino code (Mathew Lees). You get really bad overheating using fast PWM on the blowers, like even with heat sink and fan you will hit thermal protection within a minute and the MM's will shut down. I lost my test mule MM testing fast PWM.

    Fast PWM works okay on server fans etc but not blowers.

    As a solution for the iRacing code we have set variables and options in the code so you can pick from 3 different PWM options depending what fans you are using.

    If you like I could ask Mathew if we can have permission to use his PWM code and we could see if we can integrate it in to the SimTools code, just be careful of overheating when switching faster
    • Informative Informative x 1
  14. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    As long as we stay within the limits of the MM's which is 20khz it will work fine I have been testing and 7khz works perfectly with my 2 RC motors at full speed with 7 blade fans. If I can get 15khz that would be ok too as it would get rid of the whine.

    Edit: The code needs to be in the arduino not in simtools
    • Informative Informative x 1
  15. Avenga76

    Avenga76 Well-Known Member

    Joined:
    Jun 29, 2014
    Messages:
    518
    Occupation:
    Network Engineer
    Location:
    Auckland, New Zealand
    Balance:
    3,261Coins
    Ratings:
    +853 / 6 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Yeah. It is in the Arduino code that we set the PWM for the iRacing program.

    We have these options in the iRacing Arduino code (We use a different program that just works with iRacing, it works the same as SimTools but it is just easier to setup and has more features for guys who just play iRacing). When using blowers With 4kHz you need heatsinks, 8kHz you need heatsinks and fans. Any higher than that on the blowers I use will cause overheating. I tested it at 12kHz and 15kHz when we were doing our testing and both causes my MM to overheat with the seaflo blowers, even with heatsinks and fans. With the RC motors you would probably be okay, we tried 12 and 15 on a server fan and it was okay, I think the blowers just backfeed too much emf or something because they really don't like fast PWM. (Note that the 31kHz option are for server fans connected directly to the Arduino)

    // pwmMode - sets the PWM frequency, valid options as follows:
    // pwmMode = 0 will use 980Hz PWM, default mode which will work with all fan types, will cause coil whine if using a MM.
    // pwmMode = 1 will use 4kHz PWM, might reduce coil whine for blowers, use heatsinks on the MM - check MM temp at a low fan speed.
    // pwmMode = 2 will use 8kHz PWM, might be OK for blowers with active cooling on the MM - check MM temp at a low fan speed.
    // pwmMode = 3 will use 31kHz PWM, use with caution - not for blowers with MM as it will cause very high temps. Check MM temp at a low fan speed.
    // server fans - should be able to use pwmMode = 2 or 3. If you are using the PWM control on the server fan, leave this at default 0.
    // if you have blowers with a monster moto, try pwmMode = 1 or 2 and check whether your monster moto temp at low speeds.
    int pwmMode = 0; // value of 0, 1, 2 or 3 - modes 2 and 3 will overheat a Monster Moto if used with blowers

    Even though you are using RC motors that would probably be okay at faster PWM, we just need to be careful about posting code that could cause overheating on some setups.
  16. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I would love to see the code how they are calculating the PWM for pins 5 and 6 as if you are just changing the Timer 0 settings they can only be 62.5khz , 7.8khz, 980mhz, 244mhz and 61mhz.

    Pins 5 and 6: controlled by Timer 0 in fast PWM mode (cycle length = 256)
    Setting Divisor Frequency
    0x01 1 62500
    0x02 8 7812.5
    0x03 64 976.5625 <--DEFAULT
    0x04 256 244.140625
    0x05 1024 61.03515625

    TCCR0B = (TCCR0B & 0b11111000) | <setting>;


    Any chance you can get the code for calculating the PWM you are using ?

    Edit: I have found out how to prescale and change Timer 0 :) don't understand it though lol :D
    Last edited: Dec 19, 2016
  17. abs

    abs Active Member Gold Contributor

    Joined:
    Mar 3, 2011
    Messages:
    331
    Occupation:
    consultant
    Location:
    Montreal
    Balance:
    784Coins
    Ratings:
    +65 / 0 / -0
    My Motion Simulator:
    3DOF, SCN5
    @ SilentChill How do I instruct to shut the motor in gamedash or dash app?thx
  18. MarkusB

    MarkusB Well-Known Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    552
    Location:
    Germany
    Balance:
    4,213Coins
    Ratings:
    +596 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    That was probably me (the one with the JRKs). And I got it working with FSX: I am using the RPM value provided by GameDash for driving the fans. So I am quite sure that it will also work with an Arduino.
    • Informative Informative x 1
  19. abs

    abs Active Member Gold Contributor

    Joined:
    Mar 3, 2011
    Messages:
    331
    Occupation:
    consultant
    Location:
    Montreal
    Balance:
    784Coins
    Ratings:
    +65 / 0 / -0
    My Motion Simulator:
    3DOF, SCN5
    a little update:
    I used XP 32 bit on a second PC to drive the gameengine and Gamedash for 2 12 fans using SilentChill code : it worked pretty well

    I switched to windows 10 x64 home edition when I accidently sc### the XP x32 partitition disk
    If I run gamedash via a network on the second PC (with W10), the fans spins like crazy when I exit iracing (only tested Iracing)
    Now when I run Gamedash (Fans) on my main PC all is OK

    Go figure what s wrong I suspect a software compatibility issue between gamedash when used with a network on a pc with W10 x64

    Just wanted to clarify things ....
  20. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,560Coins
    Ratings:
    +3,488 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I have tried messing with the settings and I cant get it to shutdown as I have the same problem when turning game manager on and off it makes the fans spin at full speed until I reset the Uno I will ask someone who knows as is above my knowledge ;)