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 Now a Download Plan!
  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. 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

wind simulator

Discussion in 'DIY peripherals' started by bruce stephen, Apr 1, 2016.

  1. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,293
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,092Coins
    Ratings:
    +1,233 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    i copied this from iracing forums but it looks interesting.http://members.iracing.com/jforum/posts/list/3317201.page

    "I have just managed to get a working wind simulation set up going. This is based on a few threads but it is essentially Bredo Oeveraas's C# code sli app and also his arduino codehttp://members.iracing.com/jforum/posts/list/3220252.page, which is in turn based on stuff fromhttp://fergotech.net/diy-wind-simulation/
    I therefore take no credit for any coding creation, this is just a dummies guide to how I got it working.
    Also a lot of this is repeated from previous threads so I'm mostly just collating the info with some tit bits I discovered that we're not spoken about before(probably as they seemed obvious to the clevererer people).

    Things you'll need:
    1) Arduino uno
    2) Usb printer lead for Arduino
    3) PWM computer fans(how many up to you). I got Arctic F12 PWM's as they we're fairly cheap but stated 74cfm airflow (which was the highest I could find at that price). **Interesting stuff about airflow further down**
    4) A 12v PSU with enough amps to drive however many fans you buy
    I personally went for a 12v 2A one as I've started with 4 fans at 0.24A so that should be enough for them and a few more if I decide to add them.
    5) A project box for the Arduino( which I haven't got yet) just to protect/keep it in.
    6) Some leads to make connections. I ordered some pre crimped jumper leads, male to female. Ebay 40no for 99p delivered, bargain.
    7) Something to connect wires together. I'm a splice n tape kinda guy but I've opted for some screw type connector blocks this time.
    8 ) Cardboard (to make fan funnels)
    9) And as always with any making of anything, a roll of duct tape.

    As for the programs, I'll post below what I got working when I get on my other computer.

    Right lets get to it.
    I was only concerned for now, with getting wind from the front, so that's all this tutorial will get you.
    I also didn't bother with the Pot to adjust minimum speed as Bredo had. But I might be adding that in sometime.

    Wiring
    Connect the PSU 12v live to the live on the fan/s (check online for your type of connection as the colours differ sometimes, mine was
    yellow live, black ground and blue PWM, the other wire is not required for this project).
    Connect PSU 12v ground to the ground on the fan/s AND to a ground on the Arduino, as they need a common ground.
    Connect fans PWM input to arduiono pin 10 ( I had it in 11 first thinking any of 9,10,11 would work but Bredo's code uses pin 10 for front).
    The good thing about the fans I'm using, and possibly for other makes, is that they have in/out connectors on them so you can daisy chain them together. This 'Does Not' mean they are in series for those like me that thought it did. They are in parralel as it's live to live, ground to ground.( I told you at the start 'Dummies guide')

    As I am not using the Pots to control minimum speed for now, I needed to connect the Arduino Analog 0 and Analog 1 pins to the Arduino ground pins. If this isn't done the fans will just spin constantly under full power.
    You Don't need the transistor that Fergo had either with Bredo's setup as the speed is all controlled via PWM.

    I think that's all the wiring, onto the coding.

    Where do I put these files you have given us you say. Wherever you want.
    I personally put the windsim app into mydocuments/iracing then added a shortcut on my desktop.
    The sli app C# thingy I put all of that into the programs/iracing folder but I don't think it matters.

    I tried to use Bredo's code with the latest version of Arduino's IDE 1.7 but it kept throwing up error codes so I went to Arduino's site and got ver 1.05 which Bredo said he used to do the code.
    Now when I tried to upload the code to the arduino it still came back with errors every time it found anything to do with LCD screen stuff.
    I pressume this is because Bredo was using this for other things, so all I did was delete any offending code that got highlighted until the code went through.
    My edit of this code is below. You can get the original from the Bredo's link above.

    So, you open the Windsim Arduino app and upload the program to the Arduino. (Go to device manager to find out the com port your Arduino is connected to and change the port in the Arduino IDE program. One of the dropdown menu items along the top)
    I believe this is the only time you need to use the WINDSIM app, just to get the code into the Arduino.
    On to the sli app.
    This is the bit that translates stuff from iracings sdk to the Arduino (I believe, like I said I'm a dummy too)
    If I remember correctly Bredo's sli app autodetects your com port so you don't need to change anything for it to see your Arduino. Though you can change port in the app itself if it's not on yours. Once again I added a shortcut on my desktop of the actual SLI exe which is in the folder Client\iRacingSLI\bin\Release\iRacingSLI.exe(wherever you put it)

    Once you have it all set up it's just a case of starting iracing and starting the sli app and off you go. Don't know if it matters which way round you start things. I won't go into detail about what Bredo's version of the sli does. If you want that info use the link to his thread above.

    Now you have the fans running(hopefully) you might notice the effect is a bit weak and the air isn't coming at you with much pressure.
    Now seeing other peoples set ups with the fans I noticed they had put funnel type pipes to direct the air towards them.
    So (this is where the cardboard comes in) I fashioned a tube/ funnel out of cardboard (cat food boxes to be precise) and duct tape to try and amplify/direct the air towards me.
    FAIL.
    Next to useless is how I'd describe it. The air just came out the end in all bloody direction except towards me.
    This is where I did some searching on t'internet about fluid dynamics( yes air is a fluid, who knew, not me[​IMG]).
    Now as the air has been spun by the fan it's coming out the end of the funnel all vortexed up to f**k (technical term) so you need to do some Flow Straightening. If you google wind tunnel flow straightener you'll see different sorts, the best version I believe is the honeycomb type which can be made using an array of straws glued together.
    At this stage I feel that's a bit over kill for me so I opted instead for the blade type as the picture shows (once again good old cardboard and duct tape).

    O!M!G! what a difference, it was like I'd just turned on another 2 fans.Edit over stated that a bit. more like 1 extra fan.I've actually only just got my set up working so have only done this funnel/straightening to one fan so far. Cannot wait to get 4 fans going with that improved output.
    Anyway I think that's it. I'll edit this post to reflect anything else I think of or to add/amend anything the clever people say that i've done wrong.
    So expect a lot of edits.
    Hope this helps out anyone who needed just that little bit more detail.
    Oh and don't ask me about the code. My programming skills stopped at making the zx spectrum in John Lewis dept store print 'wanker' repeatedly down the screen. That was a proud moment for my mum.[​IMG]"
    • Like Like x 3
    • Informative Informative x 1
    • Useful Useful x 1
  2. Ads Master

    Ads Master

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

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    16,387Coins
    Ratings:
    +1,819 / 32 / -1
    Thanks for sharing but in my opinion attempting to use and control computer fans with arduino’s for wind makes things much more complicated than is necessary since most of them use brushless motors. Not all computer fans are the same either and you need to use at least the three-wire type fan to get full control if its brushless.

    Furthermore, computer fans don’t put out a large volume of air to start with. And the ones that are capable of putting out 74cfm are loud sob’s (around 55db). I know because I currently use them to cool my motors with. Thankfully, I have speakers right at my ears so I don't hear them when I'm driving.

    I use two 12vdc dual squirrel cage fans (blowers) myself for wind that put out something like 740cfm each. I can’t even imagine how loud and annoying the equivalent would be using twenty 74cfm computer fans. But even that is nothing close to simulating real wind volume and pressure at higher vehicle speeds but that would be overkill anyway.

    Here is a good deal for the equivalent of what I use except they are 24vdc.
    http://www.surpluscenter.com/Electr...SPAL-006-B45-22-DUAL-WHEEL-BLOWER-16-1511.axd

    Ps I'm not a member of iRacing's forum so I was unable to view those links.
    Last edited: Apr 2, 2016
  4. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,293
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,092Coins
    Ratings:
    +1,233 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    thats why i posted the article for you to read here...................o_O

    the induction blowers , like the link you you posted, work well to move air but are not pwm so im not sure what that has to do with this post. I have fans here if thats what i was looking for. i have multiple induction type blowers here (heating and cooling repair) that look similar to the one you posted both single and dual turbine. if i just wanted to move large amounts of air i have a few full size 120v furnace blowers (squirrel cages) that will produce over 800cfm each.

    But if i used a couple of these babies http://www.ebay.com/itm/DELTA-BFB10...ffType=OrderSubTotalOffer&_trksid=p5731.m3795
    • Like Like x 1
  5. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,163
    Location:
    Oklahoma City, USA
    Balance:
    16,387Coins
    Ratings:
    +1,819 / 32 / -1
    I certainly didn’t mean to offend if that’s the case @bruce stephen.

    So did you post the information from both links to the iRacing forum because I have no way of knowing if I missed something?

    is because its titled, “Wind Simulation” and it doesn’t specify it has to be PWM. Besides, mine are PWM with the required h-bridge to drive them from an arduino.

    It was also, “in my opinion” that more volume and pressure is better but I didn’t say you had to like or agree with it! ;)

    As far as the fan you linked to goes, I couldn’t find where it states its CFM but since it pulls 6 amps it must be at least 200. They are just a squirrel cage blower too except brushless with built in PWW control. So you just need a power supply to run them and the ones I linked need a power supply and an h-bridge. Not much difference really except the code to drive them may be a little different.
    • Informative Informative x 1
  6. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,293
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,092Coins
    Ratings:
    +1,233 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Not offended really. Sry if my reply seemed short. When I posted this I was looking for more stuff to add to the immersion. Yeah none of those fans list cam but I did notice the amps and figured they would be big enough. I ran across this but I really doubt with all the projects I currently have going on that I'll actually build one anytime soon.
  7. robertsmania

    robertsmania New Member

    Joined:
    Aug 17, 2016
    Messages:
    2
    Location:
    San Diego
    Balance:
    290Coins
    Ratings:
    +5 / 0 / -0
    I did a similar project and wanted to share the flow straighteners that I made. I used the frames from 120mm fans and cardboard tubes. I was shocked at how much better the air flow was. A friend with a 3D printer has offered to help make more professional looking versions but honestly the cardboard prototypes work really well. image.jpeg image.jpg
    • Creative Creative x 2
    • Like Like x 1
  8. robertsmania

    robertsmania New Member

    Joined:
    Aug 17, 2016
    Messages:
    2
    Location:
    San Diego
    Balance:
    290Coins
    Ratings:
    +5 / 0 / -0
    I wanted to share a few more things that I learned doing my project.

    PWM Frequency:

    The fan speed is controlled via Pulse Width Modulation - either on the two wire leads of a fan or on the control line for a fan specifically designed to accept a PWM signal. It basically sends a signal of pulses to the motor rather than setting an analog voltage. The frequency is also called the duty cycle and different motors/fans work best with different values. Check to see if the datasheet for your fan specifies the PWM frequency or duty cycle that its designed for.

    I'm using the Adafruit v2 Motor/Stepper/Servo Shield. Its an easy board to work with and has some nice features, particularly in terms of adjusting the PWM frequency.

    I found that the PWM frequency can make a big difference on fan motor noise and general efficiency. The fans I'm using are pretty standard 2 wire 120mm 12V DC fans. The motor shield's default PWM frequency of 1600Hz did work, but the fans would make a sort of clicking sound particularly at slower speeds. I found some reference that suggested that for DC fans, much lower PWM frequencies in the range of 25Hz-200Hz were appropriate. I made a quick Arduino sketch to cycle through various ranges and found that my fans were quiet and smooth across the speed range right at 30Hz.

    Your mileage may vary, but I recommend experimenting with the PWM frequency to find one that works well with your fans. And if you are using PWM fans and driving them on the control line, certainly check the data sheet and make sure that the frequency you are using is in their range.

    Serial Data - 9600 Baud Limitations
    This was my first Arduino project and the first time I've really done anything with real time serial communications. The examples I started with all used 9600 Baud as the default serial communication rate - and that is generally fine, but its important to realize the limitations of that speed and what happens if you try to send more data than it can handle.

    9600 Baud can support 960 bytes per second, and if the data we are getting/sending from iRacing is coming in 60 times per second, that really only comes down to 16 bytes per cycle.

    When I started, I was pretty liberal with sending string data back from the Arduino to my PC program to help me understand what data was getting across and what was happening. It was easy to accidentally send too much data and when that happened, the Serial.read() calls on the Arduino would start getting incorrect data and the fans would go haywire.

    It took me a while to realize the problem really came down to how much data was being sent and not logic errors in the programs. At whatever baud rate you run, there is a per cycle limitation. Its important to keep that in mind and not send too much data.

    Mounting
    I bolted the two fans on either side of two steel strips I got from the hardware store. I bent them in such a way that they are flat at the base and slide under the steering wheel mount on my G25. Adjusting the gap between the front and rear strip change how much tension there is between them and although there is certainly still some flex they are pretty sturdy and hold the fans securely.

    KR_WindSim_04.jpg KR_WindSim_03.jpg
    • Like Like x 2
  9. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,293
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,092Coins
    Ratings:
    +1,233 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    Very nice addition. Some good info there @robertsmania. @SilentChill has a fan project also. I believe he uses gamedash to drive it.
  10. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,601
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,003Coins
    Ratings:
    +3,429 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Yeah just use the game dash version I made its far far simpler than all this lol

    Also the one I did works with any game that has a speed game dash output.
    • Agree Agree x 2
    • Like Like x 1
  11. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    @SilentChill: I am right now in the process of adding fans to my sim. Yesterday I connected the first one to one of my JRK 12v12's, and it was a matter of 10 minutes to get it working with No Limits 2. That was because speed is easily available in SimTools.

    Now I want to use the fan for MS Flight Simulator X. For this purpose I installed Game Dash and followed the steps given here:
    https://www.xsimulator.net/community/marketplace/game-dash.76/

    But what then? After starting FSX (step 5) I see "Speed" and "RPM" appear in the Game Dash settings, but how do I link one of these parameters to my JRK?
    I guess the needed information - ideally a step-by-step instruction - is somewhere around here. So if you could point me into the right direction / to the right site, this would be much appreciated.

    Thanks a lot,
    Markus
  12. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,601
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,003Coins
    Ratings:
    +3,429 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
  13. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    @SilentChill: Thanks a lot for your immediate reply.
    Obviously I am missing some very basic things, because my fan does not get powered via Game Dash.
    It works perfectly via SimTools for NLR2, but I don't get it running with Game Dash for FSX.

    Here is what I did:
    1. Install Game Dash
    2. Start Game Engine
    3. Start Game Manager
    4. Within Game Manager, select the game FSX_P3D, click the button "Dash" and activate the check box "Enable Dash Output".
    5. Start Game Dash
    6. Start FSX
    7. Within the Game Dash settings, select the game FSX_P3D and click onto the pencil right beside Dash2, which is labeled "RPM" in FSX.
    8. Enter the 3 rows you are also using (MATH*5 etc.) and press Save
    9. Game Dash Output Settings "per game": Enter the same settings as I did for the 2 other COM ports within Game Engine
    10. In the Game Dash output settings, enter COM6 (which is my fan COM port), 9600, 8, None, 1. These are the same settings I am also using in the SimTools Game Engine.
    11. Start a flight within FSX and increase the thrust
    Nothing happens with the fan.

    As I said, I am probably missing something very simple, since I don't have any understanding yet of how Game Dash works together with Game Engine.

    Any ideas?

    Thanks a lot in advance,
    Markus
    Last edited: Sep 2, 2016
  14. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,601
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,003Coins
    Ratings:
    +3,429 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Are you getting speed values coming through in game dash ?
  15. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Yes, in the Game Dash window (the one with the pencils at the right side of the different dash fields) I see the speed and RPM values. Both change when I push the throttle of my HOTAS device.
  16. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,601
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,003Coins
    Ratings:
    +3,429 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Hmm strange as it should work exactly the same way as it does for nolimits2 as long as you have the data which you have, then it should work
  17. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    @SilentChill: Well, the difference is that I don't use Game Dash for NoLimits2. Instead I just use the "Extra1" value that is available directly within Game Engine. And that works perfectly.
  18. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,601
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,003Coins
    Ratings:
    +3,429 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Ahhh and your using JRK's ? If so like I said before the fan code I did is only for Moto monsters
  19. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Yes, correct, I'm using JRKs.
    Thank you anyway for your effort, @SilentChill.
    By the way, it were your rollercoaster videos that inspired be to add wind to my sim. :)
  20. bruce stephen

    bruce stephen Hammer doesnt fix it, must be electrical

    Joined:
    Jun 7, 2015
    Messages:
    1,293
    Occupation:
    general contractor
    Location:
    michigan
    Balance:
    9,092Coins
    Ratings:
    +1,233 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform, 6DOF
    chinese motos are very cheap. jrk for this application seems an expensive way to go. ard and 2 monsters less than 20usd. plus shipping and customs depending on country.
  21. MarkusB

    MarkusB Active Member Gold Contributor

    Joined:
    Jun 30, 2015
    Messages:
    539
    Location:
    Germany
    Balance:
    4,080Coins
    Ratings:
    +554 / 2 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Hi Bruce,
    thanks a lot for your suggestion, but replacing my (already existing) three JRKs is not an option for me. Two of them do already work perfectly on my 2DOF sim. It is just the configuration of the third one that I want to use for wind which causes problems.
    So what I am looking for is just a solution for this configuration issue.