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

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,558Coins
    Ratings:
    +3,487 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Nice work dude and thanks for sharing.

    I had the discussion with @Avenga76 about releasing a new code with the pwm libraries but because of disabling the timer and the chance for people to melt their MM's I didn't bother.

    However with what you have done with diode and caps seems pretty good to me if it stays as cool as you say it does.

    It will help a lot for those with the whiny noisey seaflos :)
  2. T.m

    T.m New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Balance:
    68Coins
    Ratings:
    +6 / 0 / -0

    Well, my pleasure. I hope when avenga catches up he will try diodes on Seaflos and TMCs to confirm asap.
    • Like Like x 1
    • Agree Agree x 1
  3. T.m

    T.m New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Balance:
    68Coins
    Ratings:
    +6 / 0 / -0
    //e: I can edit posts now and made the change in the above one.
    Last edited: Feb 8, 2017
  4. 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
    I am also using fans for blowing wind around my nose, but I run them with a JRK 12v12 board.
    Yesterday, after upgrading SimTools and GameDash, I I tested them with NLR2, and also my fan motors were stuttering. It sounded very similar as in your video, @T.m.

    In my case, the reason seemed to be that I also had configured this fan control JRK board in GameEngine, and not only in GameDash. It was just configured in the Interface Settings, not in the Axis Assignment.
    After removing this JRK board from GameEngine, the fans are running smoothly.
  5. T.m

    T.m New Member

    Joined:
    Mar 30, 2015
    Messages:
    6
    Balance:
    68Coins
    Ratings:
    +6 / 0 / -0
    Unfortunately I can't relate since I don't run xsimulator. But it would be interesting to investigate the cause of the stutter in this case to draw some parallels.
  6. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0
    Reducing the coilwine of the seaflows would be great.
  7. 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
    Hey, @T.m I'm back from my Aussie trip now so I will be doing my own testing on the scope tomorrow. I will let you know how I get on. I have brought a whole bunch of caps and diodes so I will see what results I can get.
    • Like Like x 1
  8. 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
    Okay, so I had a really good day of testing on the scope. I learnt a whole bunch and I have fixed the stutter problem, even my only dud Seaflo's are working fine now.

    The TL-DR is that the schottky diode and cap did very little to help the waveform or the stutter, the trick was to install some inductors and that blocked all the back feed voltage.

    The long story and my results.

    My first test was just to get a baseline of what is happening.

    I set the blower up like this. Just connected directly to the MM

    [​IMG]

    This is what I saw on the scope.

    [​IMG]

    It should be a nice square wave with as the PWM was set to 40%, instead you see this weird jump up to around 6V when the fan motor must be inducting, and you are also seeing spikes.

    Next I installed the diode like this

    [​IMG]

    At first I thought it had fixed the initial high spike I was getting but I still had that 6V back feed type thing going on and the stutter was still there.

    [​IMG]

    I did some more captures and then I captured the first stutter so I could see what was really happening.

    [​IMG]

    I could see that it was clearly an over voltage protection problem, sometimes that initial spike jumps up over 17V and the over voltage protection kicks in.

    [​IMG]

    The MM goes in to protected mode but when it switches on again it gets hit by another 17V jolt and goes in to protected mode again.

    I next tried installing a cap to see if that would make any difference to protect against these voltage spikes.

    [​IMG]

    With that cap and diode in place I was still getting the stutters, I managed to capture a spike that was almost at the voltage protection limit so you can see what the spikes look like.

    [​IMG]

    But still it would go in to a repeating cycle of 17V spikes even with the diode and cap installed.

    [​IMG]

    At this point I was sure it was these voltage spikes causing the stutter so I did some more testing with and without the diode and caps and it had no impact on the stutters. Here is a video of it happening in real time.




    My next test was to they limiting the current with a bank of resistors that I could jump in and out of circuit so I could play around with the resistance.

    [​IMG]

    If I really clamped down the current then the spikes looked better but I still have that back feed voltage.

    [​IMG]

    As I increased the current then the spikes came back, the other line in this photo is the current so it draws a lot of current when the MOSFET is switched on but not when the stutter is happening so I could rule out over current and focus on over voltage.

    My next plan of action was to try some inductors to see if I could block the backfeed. I started off with 100 microhenry and that helped but I was still getting some back feed so I went up to a 475 microhenry 5A inductor like this

    [​IMG]

    Then the wave looked perfect and there was no stutter at all, even on "Old Sparky" (That faulty Seaflo that I showed in my videos)

    [​IMG]

    I connected my scope up to the other side of the inductors to get a gauge of what it was blocking and this is what I saw, up to 30V spikes

    [​IMG]

    So here is a before and after installing the inductors

    Before

    [​IMG]

    After

    [​IMG]

    I also tried it with and without the caps and diode, the cap and diode made almost no difference, here is the setup with the 100 microhenry plus cap and diode.

    [​IMG]



    And in other exciting new it almost completely removes the coil whine!!!!!! here is a video. I start with the inductors in circuit then I one by one put them back in to circuit. You can hear there is no coil whine when they are both in circuit, then as I bypass each one then you will hear the coil whine get louder. After a few seconds I put both inductors back in to circuit then the coil whine goes away.



    The only downside is that there is a small hit in fan speed, it is proportional so there is no loss of speed at 100%, at 90% it is marginal and you start to notice it is a little slower at 50% or lower. The benefits far outweigh the drop in speed.

    So from my testing I have found that the inductors are the key and there is not much benefit running the caps and diodes as well so just the inductors should fix the stutter for you Thomas.

    Thomas, as for the faster PWM, the stutter is still there at higher PWM frequencies but you just can't hear them. I would suggest running it with the inductors and see how the stutter and noise goes. I am really happy with the results.

    I am going to design a little 3D printed enclosure for my inductors then I will start selling them as a recommended option for the wind simulators I sell.
    • Informative Informative x 5
    • Like Like x 2
    • Winner Winner x 1
  9. 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
    My results from today's testing.

    The temperature testing.

    With the inductors in place I was getting a steady 40 degrees with NO HEATSINK at 980Hz, 4KHz and 8KHz. The voltage backfeed was the cause of the overheating at higher PWM frequencies and now that that has been removed by the inductors then there is no overheating issues.

    I also tested it with the diode and cap and they made no difference to the temperatures, the inductors are blocking 100% of the noise so the diode and cap isn't needed at all, the inductors alone fixes everything.

    [​IMG]

    @Thomas. I didn't want to try your bridging pin 5 and 6. I tried this when I was helping Matthew with the Fanboi code but I want to have a standardised layout for these wind simulators so they will be compatible with all software, I don't really want to split them down the middle and have some wind simulators that are using standard stacked and others that are using stacked with pin 5 & 6 bridged. Plus there is upcoming software that might take advantage of having separately controlled fans, and if you bridge pin 5 and 6 then you lose the "Stereo" ability

    Running them at 8KHz with the inductors they sound really quite. The coil whine video I posted above was at 980Hz so it is even quieter at 8KHz.

    Wind speed test.

    I found something really interesting when I plotted the wind speeds with the different inductors on. I did my testing with my Anemometer strapped to the front of a new Seaflo. My testing regime was to increase the PWM speed by 10%, wait for the wind speed to stabilise, take a reading, then increase the wind speed by another 10% and repeat until I got to 100%

    [​IMG]

    Without the inductors (The blue line) the ramp up wasn't very linear, It started off much faster but then the middle section flattened out. This means in game then you don't have as much difference between say 60% and 80%. With the 100uH inductor (The orange line) I saw that it was a bit more linear, it still started off a bit fast at lower PWM and still flattened off in the middle before reaching the same top speed as without an inductor. Next I repeated my tests with the 470uH inductor (The grey line) and the fan speed curve was perfectly linear and still reached the same top speed!!

    [​IMG]

    This is great because it means that the blowers will ramp up perfectly linear. I had tested the fan curve like this back in the day and I didn't think there was any way that I could make it linear but these inductors have solved that also.

    So in summary, the inductors fixes the stutter, fixes the coil whine, fixes the overheating at higher PWM and fixes the linearity of the wind speed.

    [​IMG]
    • Winner Winner x 5
    • Informative Informative x 2
    Last edited: Feb 12, 2017
  10. Nick Moxley

    Nick Moxley Well-Known Member

    Joined:
    Dec 13, 2013
    Messages:
    2,779
    Occupation:
    Owner/Operator- Moxleys Rantals
    Location:
    Winnipeg Manitoba Canada
    Balance:
    17,055Coins
    Ratings:
    +2,505 / 30 / -2
    My Motion Simulator:
    2DOF, 3DOF, DC motor, JRK
    You rock buddy. :cheers
    • Agree Agree x 1
  11. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0
    That's awesome news @Avenga76 hug:

    We you be posting a a full schematic and can we expect a new arduino code so we can start using this Richard?
    Last edited: Feb 13, 2017
  12. 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
    Thanks buddy!!
    You can start using it now. Even at the standard 980Hz it makes a huge difference, if you want I can have a talk to Matthew Lees who wrote the iRacing Fanboi code and ask if we can borrow his code for allowing different PWM settings (980Hz, 4KHz, 8KHz etc)

    Not much of a schematic needed. Just put a 470uH 5A+ inductor on each of the wires going between the MM and the blowers

    Like this

    [​IMG]
  13. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,558Coins
    Ratings:
    +3,487 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I have already made the code its pretty simple its not copying anything as it is just part of using the PWM library;)
  14. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0
    Awesome news guys :cheers

    The coil wine is driving my wife crazy:grin

    I immediately did some research where to get these inductors.

    Are these the rights specs, since they are relatively expensive here and i have order 8 of them:


    Imax: 5A
    DC-load: 470µH
    ohmic v.: 109mohm
    InnerØ wire: 48mm
    OuterØ wire: 22mm
    Diameter: 20mm
    O-load: 736µH
    AC-lpad: 1590µH
    energy: 11750µJ
    wire: 0.9mm²
    type core: T184-26

    [​IMG]hebergeur d image
  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
    Are you going to have the cool thing that he has that lets you define the PWM really easily?

    Code:
    // 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 = 2;        // value of 0, 1, 2 or 3 - modes 2 and 3 will overheat a Monster Moto if used with blowers
    Yeah, those look fine. If you have only running 2 blowers then you only need 4 of them as per my awesome M$ Paint drawing.

    Here is the start of my prototype for the suppressor unit.

    This model will be a stand alone upgrade so you can just plug it in to an existing wind simulator. This will sit inside a 3D printed enclosure that I will design and print over the next couple of days. I will be selling these as a stand alone fully assembled unit if anyone doesn't feel comfortable building their own. When I am all finished I will update my wind simulator sale page and put some pricing up.

    [​IMG]

    This particular one has quick connects that means it will just plug in to any of my existing wind simulators I have sold, or any other that is using these type of connectors (I specifically used these connectors to future proof myself for an upgrade like this) For new simulators I build I might prewire them in directly to the fan leads.

    [​IMG]

    It then sits in between the controller box/MM and the blower (Imagine it is in a nice enclosure though)

    [​IMG]

    Now on to the construction of the suppressor controller. The 2 inductors are mounted on to a blank prototyping board

    [​IMG]

    The ends of the inductors are soldered directly to the wires.

    [​IMG]

    They are then heatshrunk and bent flush with the board, these wires will exit out the side of the box like on my controller box. The 2 drilled holes will be for mounting in to the enclosure.

    [​IMG]

    I also use a little hot glue to make sure there is no wiggle room.

    [​IMG]
    • Informative Informative x 1
  16. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,558Coins
    Ratings:
    +3,487 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Great stuff dude I've ordered some inductors to slap on mine to help with the heat.

    I will be copying his code if I put that in ;) I had just set mine to 8khz but I could do it with the options also so anyone can choose.
  17. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0
    Thanks mate,

    I need 4 for my DIY wind simulator and another 4 for the wind simulator of my friend.
    This is a huge development, can wait to try it.

    Edit:

    Seems i'm gonna have trouble to find a 470uh 5a inductor. The one i posted is from velleman, but they stopped making them. The only one i can find is in australia, but that too far for us guys from europe. Ebay search didn't turn up anyting either. If anybody could help me out, i would be really gratefull

    Can i use 2x 470uh 2,5a inductors (paralel) for each 470uh 5a instead?
    Last edited: Feb 13, 2017
  18. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0
    @Avenga76

    Richard, since the 470uh 5a inductors are unavailble in my country can i also use these?Am i correct to assume that they will perform between the 100uh and 470uh in linearity?

    http://www.velleman.eu/products/view/?id=1131

    DEPARASITE SELF 220µH 75mohm - 5A
    Specifications
    • Imax: 5A
    • L @ 5A: 220µH (±20%)
    • L @ 0A: -
    • Dc resistance: 0.006 ohm
    • turns: 48T
    • dimensions:
      • A: 32mm
      • B: 15mm (±3mm)
      • D: 16mm
      • E: 0.9mm (±0.05mm)
      • F: 1.5mm
    • operating temperature: -20°C to 80°C
  19. manzes82

    manzes82 New Member Gold Contributor

    Joined:
    Jan 11, 2016
    Messages:
    17
    Location:
    Germany
    Balance:
    - 91Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Useful Useful x 1
  20. HoiHman

    HoiHman Active Member

    Joined:
    Feb 1, 2015
    Messages:
    211
    Occupation:
    Mechanic
    Location:
    The Netherlands
    Balance:
    331Coins
    Ratings:
    +143 / 1 / -0