Wind Sim with Ardui...
 
Notifications
Clear all

Wind Sim with Arduino UNO and PWM fans not working

5 Posts
2 Users
2 Likes
1,761 Views
(@gabriel-legnini)
Active Member
Joined: 1 year ago
Posts: 4
Topic starter  

Hello everybody. I've tried to google at many places and read all troubleshooting entries regarding this, but I have not found a solution to what I'm trying to do, so I come here looking for advice on how can I solve this.

I have bought the parts for a DIY Wind Sim, consisting of two PWM 12V fans, a 12V power supply and an Arduino UNO.

Today I went on with a first test by quickly wiring stuff and testing it with Simhub software. Went past a few hurdles but this is where I'm stuck now...

I'm testing stuff with only one fan. I'm using the following wiring diagram, which uses one PWM channel for both fans (I'm planning on using two, pointless to do otherwise IMO)


Uploaded the sketch from Simhub, configuring the PWM fans aspect with pin 9 as the output, disabled the optional relays and set min/max speed values at 0/255.

What's happening now is that without the PWM pin connected, fan spins up to max speed (to be expected), but when plugging it to the pin 9, it drops down to what I assume is the minimum speed of the fan, and it does not change. I have been trialling with the idle setting, configuring the output channel, and I can see on the parameters that the values do move, but it seems like the Arduino is doing nothing, not varying the PWM output. I assume that the sketch that Simhub writes it's fine and it's me doing something wrong meaning that the Arduino is not getting data from Simhub and therefor not moving the PWM signal. It does not respond inside a game either, even if it succesfully connected to the data from it. I see the TX/RX leds blinking constantly when Simhub is open, but I don't know if this means a thing.

The port assigned is COM4, I have asked Simhub to only scan that one. Have not change other settings like baud rates because I don't know if that would make things worse.

I would like to know if there is a way for me to check that the Arduino is getting the data from Simhub or not, how could this be solved, or if the conflict comes from another place I have not thought of yet?

Looking forward to answers, thanks in advance!

This topic was modified 1 year ago by Gabriel Legnini

   
Quote
(@gabriel-legnini)
Active Member
Joined: 1 year ago
Posts: 4
Topic starter  

An update on my situation.

So far I've done the following tests:

Used a sketch to trial serial outputs via Serial Monitor in Arduino IDE - Worked OK.

Used a sketch to trial PWM output, both with a fan and measuring the resultant voltage with a multimeter - Worked OK.

Checked and activated the plugins ShakeItMotors and ShakeItWind, both simultaneously and separatedly, and trialled activating the outputs at pins 5, 6, 9 and 10 in all possible combinations - at no point I ever got a signal out of those pins.

Tried a sketch where you use optional pins as relays for turning on fans, both direct and inverted logics - they never change, but on the latter there is 5V on those outputs. This points to the sketch is being written correctly, IMO.

Checked the logs and the hardware data on the Arduino tab inside Simhub, and all points to communications being established and working correctly, with data packages being sent and received with zero errors.

At this point, I'm suspecting that Windows may be blocking the data sending from Simhub towards the Arduino, even when the installer asked for firewall permitions and I said yes. This is what I will check next time I'm back on my computer. I don't know if this is an usual issue or not? I'm a Windows 11 user.

Would appreciate any feedback or thoughts on this matter. Thanks in advance!


   
ReplyQuote
(@chris99)
Eminent Member
Joined: 3 years ago
Posts: 18
 

Hi,

On the ShakeItWind plugin menus, have you set the "output configuration" tab for the Arduino or is it showing 'unused'?


   
ReplyQuote
(@gabriel-legnini)
Active Member
Joined: 1 year ago
Posts: 4
Topic starter  

@chris99 yes I did, tried setting it on every possible pin (although it should be on pins 9 and 10 for left and right signals I reckon). No response in any instance.


   
ReplyQuote
(@gabriel-legnini)
Active Member
Joined: 1 year ago
Posts: 4
Topic starter  

Posted by: @chris99

Hi,

On the ShakeItWind plugin menus, have you set the "output configuration" tab for the Arduino or is it showing 'unused'?

I found out what was happening, and it turns out you were right. And it was because I misinterpreted how the Output Configuration actually worked!

As there is the same number of outputs to be selected on these screens as the digital ones I have on the Arduino, I was tricked into thinking that if my outputs were through pins 9 and 10, I had to select outputs 9 and 10. Wrong! I had to select outputs 1 and 2! (or 3 and 4 in my current sketch, as I enabled both PWM types in the Arduino tool as I was troubleshooting).

By sheer chance I wanted to test everything with a multimeter, and I activated outputs 2, 5, 6, 9 and 10. Only pin 6 was outputting signal. It wasn't until I deactivated output 6 in Simhub and I still had the signal at pin 6 that it started to dawn on me what happened, and I feel stupid beyond belief, should have thought out better what the output selection screens actually meant.

Before this, I enabled several permitions of Simhub at Defender and Firewall that I found deactivated, but it did not change a thing. It's probably that it would have worked out of the box just like it was if I had nailed the output configuration out of the gate.

Gonna have some big slice of humble pie before bedtime and tomorrow I will continue work on building the whole system.

 

This post was modified 1 year ago by Gabriel Legnini

   
chris99 reacted
ReplyQuote
Share: