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. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Sounds great and glad it all worked out!

    I suspect the case fan didn’t like the PWM on its power. A different fan might work but hard to say in advance. Something else you could try would be to decrease the PWM frequency. The power the fan sees might be turning on and off too fast for it to initialize and start running. A lower PWM frequency might let it work. As you lower the PWM frequency, the fan might start running at higher PWM/wind fan values just because the pulses might be long enough for the fan to initialize and start running.
  2. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,568Coins
    Ratings:
    +1,831 / 32 / -1
    The case fan is a brushless motor. They require a minimum voltage (pwm) before they will start functioning. From my experience, after they start spinning the speed only increases a little bit with more voltage.
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,461
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Glad you got it sorted.

    Clone MMs are notorious for quality control problems: https://www.xsimulator.net/community/faq/monster-moto-testing-before-use.158/
    • Agree Agree x 1
    • Informative Informative x 1
  4. hannibal

    hannibal Active Member

    Joined:
    Sep 29, 2018
    Messages:
    677
    Balance:
    4,489Coins
    Ratings:
    +297 / 4 / -0
    My Motion Simulator:
    6DOF
    i had same experience... the first wind simulator i made worked perfect. i decided to make secondary unit... but it was working perfect after the 3rd monster moto i used.
    • Informative Informative x 1
  5. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    I tried it. But had no successes. Do I just copy your sketch and select all in the IDE Software, delete that and load your code up - or do I have to leave any lines (if so which lines are they) and then insert your code?

    It'd have another question: @SilentChill and others who succeeded with this kind of wind sim.
    Do I have to solder all the pins when the ard has the MM as a backpack or does it work by just sticking it to the sticks?

    Thank you for helping me another time.
    And sorry I am not active in the forum right now because I am remote schooling my son for a while. I'll be back :)
  6. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    @ART FLY - try the code posted just above my post in that other thread. (link removed) (See this post instead: https://www.xsimulator.net/communit...rmoto-and-arduinouno.6876/page-33#post-213758)

    It could be formatting got involved. dutiti posted what he used back to the forum and it worked for him. I swap between Linux, Windows, and MacOS and I’ve seen where array indexes get interpreted as an italic formatting command since I tend to use i as an array index a lot and was digging back into the code the other day to add a new routine and somehow all my array indexes had gone away.

    If you are familiar with array indexing, you might try looking through the code and see if any indexes are in what you compiled. There should be a fair number of them. But if you see them there could be another issue. Maybe I left out specifying a library or something.

    But try the code in dutiti’s post and see if that works. And yes - it’s a full replacement. Start a new sketch with just the new code and see if it will compile. You want to keep a copy of the previous code you were using just so you don’t lose the functionality until we sort this. If it doesn’t compile, PM me the compiler errors and I’ll see what I can find out. The code works but maybe something is getting lost in translation.
    Last edited: Feb 21, 2021
  7. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Thanx and hi my dear @Zed,
    so cool you try to get my vents going, when I try the "dutiti"-sketch Icontinously get the error message as can be seen on the picture. what do you consider?
    I am happy with any feedback - and sorry I do not yet have any idea of coding :(
    Later mate,
    cheers ART FLY


    Wind_dutiti_error_compiling.PNG
    Last edited: Feb 20, 2021
  8. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    @ART FLY - this might just be the compiler has gotten more picky about proper syntax. I’m not certain though. Today is a busy day for me so I won’t have time to look at it until tomorrow but I will. We’ll get you going. Looks like the array indices are fine so it’s not that. It looks like I just need to declare the functions properly but won’t know until I dig in and do some testing. Regards!
    • Friendly Friendly x 1
  9. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Man that sounds great. Have a good working day. I wanted to test if it is my Arduino Uno that does not function right. So I wanted to swap it for another but I could only find anaruino Uno Leonardo. That made me mad and I turned around intensely and with my elbo I hit my last Uno that felt to the ground an popped of th whole USB connector . Aaaaarrrrghhh!!!!
    Iordered 3 new arduinos now. Might we be able to succeed with the Leonardo board too? If not you have at least a week befor you post gentle help for me again Thank you !!!!!

    P.S.: on the pictures you can see what I use as hardware. It is two of those blowers.
    I tried @SilentChill s code, which loades up with no problem but the is no action wit it. I tried your custom code and I tried utiti's code. Both don't compile or load up. I chose the right COM port for working with the IDE utility.
    Later, Your ARTi

    Attached Files:

    Last edited: Feb 20, 2021
  10. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    @ART FLY - I attached a zipped .ino file that I just compiled and tested on my wind system. It supports the standard S commands - e.g. S000, S128, S255. It also supports R and L commands if you want to try those. It should be compatible with the MM setup and this code should at least compile. I don't know why you were seeing the error but with posting the .ino (what I probably should have been doing all along), hopefully nothing can get misinterpreted or whatever was going on.

    You can use the Arduino development environment “monitor” utility to test the fans. Commands are 4 characters, zero padded. Once connected up, enter S000, S005, S050, S150, etc. Same for R and L individual motor commands. Just swap the letters. Command format is the same besides the S, R, or L.

    Edit - version 02-23-2021. Added an IDLESPEED define that is set as by default to 0. Set it to any speed between 0 and 255 inclusive and your fans will wake up at that speed on power up or Arduino reset. Normal S, R, and L commands will take over as soon as they are received. This just helps with comfort in VR with and with plugins that don't support wind.

    Attached Files:

    • Winner Winner x 2
    Last edited: Feb 27, 2021
  11. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yippie :thumbs what great news on a Monday morning at 6.25 am!!!
    I will try out the new code tonite. If it doesn't work I will wait for my new cards to arrive and than go for it again. I am confident it might work.
    Thank you very much for your work
    and encouragement hug:
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,461
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,596Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Added to the FAQ Wind Sim section with credit to yourself: https://www.xsimulator.net/community/faq/fans-wind-simulation.67/
    • Like Like x 2
    Last edited: Feb 23, 2021
  13. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    @noorbeast - sounds great! I want to acknowledge what @SilentChill, Avenga76, and others did to get the code going. I appreciate them leaving the code open to modification. Just looked and it looks great! Thanks! :thumbs

    I added a version number for this fork since it is solidly forked from the original software. I still need to get the full off and full on PWM bit going to help with acceleration and deceleration when the fans are at significantly different RPM than commanded but this will only work with fans with tachometer outputs that the Arduino can read (like the TerraBlooms, for example). So that’s still in progress but I’ll see if I can make that code work in either application, with or without tach inputs.

    @ART FLY - no problem and hopefully this works for you. Try out that monitor utility and see what you think. Should make it really easy to test the fan setup. Please keep us posted. Cheers!
    • Optimistic Optimistic x 1
    Last edited: Feb 22, 2021
  14. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    We step forward ... a little :rolleyes:

    I could upload the new code. I had to do the upload process two times but than it said Upload done. So I tried that serial monitor utility in the IDE Tools Tab without success. I started Assetto Corsa (ASC) and I tried it with Game Dash. ASC was selected in Game Engine, Game Manager and Game Dash. 'Tried Math without Math. I tried with 1. - tried with Math * 3 and with 5 no wind ... Game Dash was always showing speed, rpm and so on.
    So I tried with IP. I had it on my PCs IP but no wind. Than I changed IP to 127.0.0.1 also no wind.

    What else can I do to make the fans move :(

    @Zed and @noorbeast I send you some setup picts.
    Maybe I have a mistake there which you detect but I do not see.

    Capture1.PNG Capture2.PNG

    Again Thank you very much for the code that succeeds uploading :thumbs
    Last edited: Feb 22, 2021
  15. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Well, that’s progress. But I’d like to get the serial monitor working since that will let us know if the Arduino is working properly.

    Here are a couple of images from the Arduino IDE with that program loaded and making sure I'm talking to the board. Your com port may be different. I just want to make sure your displays are just like this because the serial monitor should shoot commands to the board reliably - if it's a good board. If your same menus both look like this (aside from comm number), it's probably the board. The S100 is what I typed.

    PortnBoard.png Talking.png
    • Like Like x 1
  16. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Must be the board. I tried what you show in those picts but without success. I am waiting for new ARDs which will be UNO. They are already in the shipping.
    I believe this Thread gives much a hand for what you can try to dimimuish mistakes on the way to a working wind sim that we should continue once I have my new boards.
    Great picts thank you! Later ;)
  17. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    I’m really amazed at all the problematic counterfeits out there. Luckily I’ve never had to deal with them but maybe loading code sorts them out. With the code compiling, it should load right on and you should be able to control the fans together and separately using the S, R, and L versions of commands. And the code as supplied in that zip file will try to run your fan(s) at low speed until it gets any other valid command. Just a reminder so it doesn’t surprise you when you first load the code or power on or reset afterwards if you don’t change the initial setting value.

    Thinking about it, I should have created a constant to hold the initial value and set it to 0 as default. Anyone who wants idle speed can change the constant. That way nobody gets surprised. Will rev the code and repost in the previous post... (Done!)
    Last edited: Feb 24, 2021
  18. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    @Zed .
    Did you always solder the pins from the arduino to the monster moto shield ? I never did.
    And which pins do you really need. I always put on as many as possible to stick to the monster moto shield!?? Incorrect?
    Pretty desperate at the moment because I received my new uno-arduinos just half an hour ago ... it does not freaky work.
    So again check what the monsters do?
    I have a volt-meter but how do I check.
    I watched @SilentChill s video. But I could not understand/really hear ... as often what that master importantly says in his videos.
    HELP please !!!!
  19. Zed

    Zed VR Simming w/Reverb Gold Contributor

    Joined:
    Apr 4, 2017
    Messages:
    1,044
    Location:
    USA
    Balance:
    5,828Coins
    Ratings:
    +1,042 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    The pins get soldered into the MM and press into the Arduino sockets. You shouldn’t need to solder them into both the MM and Arduino. If you got an Arduino version with no sockets already soldered in, you may want to get sockets and solder them in yourself. You want secure electrical connections but still able to separate the boards in case a part gets blown.

    I just looked back at that one photo above and none of the pins are soldered into the MM board. If you are still running like that, you need to fix that. That will never be reliable because those holes in the MM are bigger than the pins. Odds are many or even most pins are not making good contact. I missed that just glancing at it. You should never run circuits like that. It could even lead to dead boards since you can have circuits with power but no ground, signal but no ground or power, or any odd combinations. These things can work well and be reliable when built properly but you can kill boards if not properly connected. Sorry I missed that, and no guarantees that anything died. It could all be fine. But it’s risky to connect boards like that --or not connect them as the case may be. Solder the pins in the MM. You also don’t want to make or break connections when power is applied unless you know what you are doing and accepting the risk. That MM is powered up with possibly flaky connections so any movement could change things under load.

    As to how many pins to use, I usually put pins in all the connector holes in these applications. It’s overkill but makes for a secure press fit of the two boards and doesn’t accidentally omit critical connections. But I don’t use an MM board with the TerraBloom fans on my rig. I started with one and it had all pins filled, though. Now I just use individual pin connections between the Arduino and a level shifter board but I only need power, ground, and PWM outputs. No direction signals are needed for me but they are with the MM since that is frequently used in robotics applications. The MM has some extra connections that are required besides PWM - like direction for each bridge chip - but there may be more. You would need to check a MM schematic to see what pins are at least wired in from the pin headers and make sure those are connected if you don’t want to populate them all.

    Can you be more descriptive of what doesn’t work? Could you compile and load the firmware? Could you send commands using serial monitor even though the fans may not have run? Just saying things don’t work forces me to have to ask questions shotgun because I don’t know what step is failing for you so I have to cover all bases and all possible problems since there is nothing to localize what is wrong. Photos of your setup, screen grabs of error messages, etc, can also really be helpful.
    • Winner Winner x 1
    Last edited: Feb 23, 2021
  20. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    There were are I guess.
    I never soldered anything.
    I will try and give back to you.
    Thanx, ARTi Baby :)