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

Lesson SimTools v3 - 3D Wind Dash Example (with Arduino Sketch)

Discussion in 'Tutorials and Tips by the Developer' started by yobuddy, Jun 19, 2023.

  1. Jonasmb2

    Jonasmb2 New Member

    Joined:
    Jul 10, 2023
    Messages:
    4
    Balance:
    25Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi friends, I have a system like this assembled arduino uno+ motorshield v2 with the fans, in the simhub, they work perfectly, how can I make them work in game dash? Do I need to change something in the arduino programming? I did all the necessary configuration in game dash but without success.
  2. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    I am deep in skinning at the moment, but I will go thru this when finished and look for output errors.
    All the sketches I have seen seem a bit different thou, do you have a link to the sketch you are using?
    • Like Like x 1
  3. offman

    offman New Member

    Joined:
    Dec 15, 2021
    Messages:
    27
    Balance:
    10Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Hello, I fired the motorshield v2, just remains the arduino with this sketch

    Attached Files:

  4. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    614
    Location:
    brasil
    Balance:
    628Coins
    Ratings:
    +163 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Ok. Here we go:
    I just put
    Map 0 100 0 255
    Pad 3 0
    And it works. BUT
    Sounds like crazy fans.
    Not a regular 0-370 km/h ( f1 2023 ).
    Speeds increases so fast, on my wheel still at 80 km/h and simtools reach 200.
    I try to change numbers ( 0 150 0 300 ) etc but still so fast.
    I need to understand why it's like this, the old method using math round pad worked just fine (and still does) in v2.6.
    See:

    EDIT: ok, now i understand how it works. if i want a gradual speed from zero to maximum i have to simply put the same values on the lines !! that is, MAP 0 340 0 340 and below the PAD 3 0 to say how long the value should be and then it worked perfectly !!
    • Like Like x 1
    • Informative Informative x 1
    Last edited: Jul 21, 2023
  5. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    614
    Location:
    brasil
    Balance:
    628Coins
    Ratings:
    +163 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    O
    just put maximum speed of the car you are using, or approximate. but it has to be exactly the same as the input and output. this actually sets the fan speed equal to the object you chose to use. follow the EUREKA video
    • Like Like x 1
  6. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    Most of the fan sketches top out at 255 for input to be at 100% fan speed.
    So "Map 0 X 0 255" where x can be anything you want as top speed may work best.

    So, from your video clip
    Map 0 300 0 255
    Pad 3 0

    This will work the same I believe, as the sketches drop any input value over 255.
    Hope it helps,
    yobuddy
    Last edited: Jul 22, 2023
  7. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    614
    Location:
    brasil
    Balance:
    628Coins
    Ratings:
    +163 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    From what I tested, the only way to reach the maximum speed proportional to the speed of the fans, was to set the 2 equal values. for example I put 0 255 0 300 and the fans went crazy. accelerates and stops all the time, and when I brake the wind continues. same thing for any non-repeating value ( 0 200 0 200, 0 300 0 300, etc ). if I put 255 at the end, when I accelerate the fans jump from 0 to 100 in less than 1 second, like in the first video I posted.
  8. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    All map does thou is clamp the input between the first 2 numbers, and then scale the input to the second 2 numbers. Since the sketch does not allow numbers above 255, sending anything over that will be canceled out is all.
    Code:
    if (Speed > 255)
    Speed = 255;
    Please try these 3 commands:
    Math * 2.5 (the bigger the number the faster it will top out, * 2.5 should top out at around 100 mpg)
    Clamp 0 255 (keep it in range)
    Pad 3 0 (pad to 3 chars)

    Should do the same thing I believe.
    Chat soon!
  9. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    614
    Location:
    brasil
    Balance:
    628Coins
    Ratings:
    +163 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Bad News. Motion, vibe, dash only works on TIMELAP mode. Today i try Grand prix, or some other modes, and all movements, wind, Shakes are crazy. :(
    EDIT - 04:25 - IM STILL TRYING :)
    If i put vibe and dash OFF, motion works ok.
    question: its mandatory to put 4123 on "UDP RELAY SETTINGS" TAB? ( the ones with "wifi" symbol at top left )
    by the way, motion works within this numbers on it, vibe and dash still on the same errors:
    speed on 25400 rpm all the time, wind and another dashs still at number"0" or random crazy numbers
    Made another video
    • Informative Informative x 1
    Last edited: Jul 22, 2023
  10. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    No, you would not want to do this, as the game is already sending to SimTools thru port 4123.
    So if this is done, then every packet sent to SimTools gets caught in a loop re-sending the packets back to itself over and over.
    You would only use UDP Relay to send to a different app, it's not needed when just using SimTools.

    If it works in one game mode, and not in another, then unfortunately I would look at the game as the problem.
    We have found other problems relating to the telemetry in 2023, like telemetry still being live when in the garage. Maybe make sure that udp relay is off and not used, then maybe run the test again.
    Please let me know how it goes.
    Take care,
    yobuddy
  11. paulopsx2

    paulopsx2 Active Member

    Joined:
    Apr 2, 2016
    Messages:
    614
    Location:
    brasil
    Balance:
    628Coins
    Ratings:
    +163 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    Yeap, i dont use UDP relay.

    the only way i found to make it all work was to leave the simtools on the motion platform, and the simhub for the wind and shakers.
    Thanks anyway
  12. offman

    offman New Member

    Joined:
    Dec 15, 2021
    Messages:
    27
    Balance:
    10Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    hello. Ok, I'm struggling. I started from zero, reinstalled my arduino with motorshield v2, I followed all the instructions. The fans work with the schetch but not with simtool 3...I provided all the shit can you correct me?

    Attached Files:

  13. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    @offman,
    Instead of 'S<Dash1>' for interface output, give S<Sp1> a try.
    I get that value from here
    upload_2023-7-28_16-58-57.png
  14. offman

    offman New Member

    Joined:
    Dec 15, 2021
    Messages:
    27
    Balance:
    10Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform
    eeeeeeeeeeeh yes!!!! finally, after a relentless struggle, my windsim is finally working!!! Thank you all for helping me! Thank you yobuddy!!!!!
    • Winner Winner x 2
  15. hansvdm

    hansvdm Member Gold Contributor

    Joined:
    Sep 21, 2023
    Messages:
    57
    Occupation:
    Freelance
    Location:
    leiden Netherlands
    Balance:
    107Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    is there a replacement for the rfp30n06le it is very hard to find online (at least in The Netherlands) would this work
    RL 530N or
    IRFZ44VPBF ?
  16. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    Any N-Channel mosfet should work I believe (being it can handle the power required by the fan).
    Take care,
    yobuddy
    • Like Like x 1
  17. hansvdm

    hansvdm Member Gold Contributor

    Joined:
    Sep 21, 2023
    Messages:
    57
    Occupation:
    Freelance
    Location:
    leiden Netherlands
    Balance:
    107Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I am using Race room experience and 1 fan start to blow when,I start the dash (Sim V3) at Medium speed. When I start driving 1 fan is responding the other keeps blowing a the same speed. I have changed the pins to make sure that there is no fault in the circuitboard. Any idea?

    @early_m @yobuddy

    Thanks

    Hans

    [​IMG]
  18. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    What does your SimTools v3 configuration look like?
    Are you using S<Sf1><Sf2> for output?
    Chat soon!
    yobuddy
  19. hansvdm

    hansvdm Member Gold Contributor

    Joined:
    Sep 21, 2023
    Messages:
    57
    Occupation:
    Freelance
    Location:
    leiden Netherlands
    Balance:
    107Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    yes using S<Sf1><Sf2> and 1 fan isworking correctly higher speed fan blows harder and when I stear left rigt the fan goed faster/slower. But the other Fan is not responding, blows at 1 speed and when I stop the car the fan keeps on blowing. The Mosfets are connected to pin 9/10. when I change the sketch the opposite happens between te fan's.
  20. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,247
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    48,790Coins
    Ratings:
    +5,068 / 17 / -0
    Ok, so I would think that the hardware is working correctly.
    Please try these 2 tests, please use S<Sf1><Sf1>, and then S<Sf2><Sf2> see if you get the same result.