Thank you all for your great support.
I think I over complicated some things.
Currently I am looking more into low side switching devices.
If I'm not mistaken, there are plenty of "all-in-one" devices like the BV1LB028FPJ-C from ROHM.
With something like this I can completely ditch the mosfets/driver/flyback-stuff and focus more on the temperature measuring stuff.
As far as I understand these devices just need 5V and a PWM signal directly from the microcontroller.
Nope. Just heed the comments above about an appropriate flyback diode. Note that this is NOT the diode inside the MOSFET package! It's a separate diode that goes across the load (fan), anode of the diode to the drain of the MOSFET and cathode of the diode to the + terminal of the fan.
The main thing to take into consideration when PWM-ing fans is the frequency; you may have to play with this a bit to get the best performance (widest modulation range) and least amount of audible noise. You'll have to get creative with the Arduino's timer registers if you want to experiment with this - or simply use an ESP32 and use its "ledcwrite()" functionality, which allows you to set pretty much any PWM frequency you like.
I will work on a new schematic using a low side switch, flyback diode and the missing decoupling caps.
I had good results with the standard PWM frequency on my old design. The audible noise at 490Hz was of no concern when the car and the fan are running
But I will start experimenting with the prescalers once I will build the next iteration of the board.
I want to stick to the Atmega, because I got a little more experience with those.
Yeah, 490Hz may work fine; for some fans, it doesn't, but I think those are mostly the much smaller fans of the type you find in electronics and whatnot. Those appear to be commonly PWM-ed at 25kHz or so, which is at least in part due to the sound issue. However, I've had small fans perform very badly at low duty cycles in particular at lower PWM frequencies. I suppose the inertia of the big fan you're using helps in this regard.
Like you said, maybe the big fans don´t care about frequency as much. But the low duty cycle problem is why I have a variable called "PWMMin". That´s the minimum duty cylce required to start the fan, or overcome its inertia. This variable is tuned to the fan using a potentiometer on the board.
Yes, indeed; you always have this, but the minimum startup PWM duty cycle turns out to depend quite strongly on the PWM frequency, at least for the small fans I've used.
Also, note that the minimum startup duty cycle is a lot higher than the minimum run duty cycle, so you can throttle down quite a bit after the fan has started. If you want/need to run it as slow as possible of course; this is often not really a requirement.
It doesn't have to be difficult!
However, what I'm not sure about is whether the VN7004 you chose is suitable for PWM control. Look at the datasheet page 9, table 7. It seems somewhat slow. I haven't run the numbers on it, but I'm concerned that if you switch this rapidly, the dissipation in the device due to the voltage transient becomes a concern. The typical applications in the datasheet also don't suggest anything along the lines of PWM. Tying FR_DIAG to GND should prevent damage, but I don't see why you'd set yourself up to drive this thing into a thermal protection mode consistently.
I'd really just use a beefy N-channel MOSFET as a low-side switch. If it really has to be a high-side switch, use an appropriate P-MOS instead with a pullup circuit for the gate. Neither of these need to have the word "low side/high side switch" in the device name. Just a MOSFET with suitable ratings is fine.
That doesn't do anything. You don't need D4 if you're using a high-side switch. The way it's connected also makes it redundant.
Furthermore, I think you don't need R1 if you don't monitor the current, but I've not checked if you can leave CS floating. I suspect you can.
R2 I'd make a lot smaller; something like 160R. There's no need to form a problematic R/C filter with the input capacitance of the VN7004's INPUT pin.
I´m more of a mechanical guy, but I start to discover the possibilities using electronics
So sometimes I find it hard interpreting data sheets or choosing the right components for my applications. Thanks for all your help!
The values for the resistors are taken from the datasheet if the VN7004. There´s also written that it´s not allowed to leave CS floating.
I think you are right, but then I would need an additional clean power supply, because almost any MOSFET can´t be switched with only 5V. That´s why I decided to use something like the VN7004.
The diode is mentioned on page 21 of the datasheet. Am I missing something here?
Furthermore I will try to run the numbers and find out if it´s suitable for PWM control.
The enclosure will be dangling in front of the radiator, not inside the engine compartment. Possibly it will even get a heat sink.
I wonder why my old design is running for two years then.
Could you please give me some hints instead of constantly telling me that I´m doing something wrong without telling my why it is wrong. There´s nothing to learn here. I now that I am no expert, that´s why I ask for advice in this forum.
I want to stop you from doing something I'm sure won't work but I don't want to suggest a design unless I'm absolutely sure it will survive under your environmental conditions.
It takes time to search through a ton of data sheets looking for parts that you can actually buy and will fit your requirements.
This got me thinking:
Are you running the fan backward? If the vehicle is sitting still with the fan running, is the fan pulling air through the radiator from front to back or pushing it from back to front (backwards)?
Ok I totally understand that.
As I said the environment is rather cold. Well let´s say "not hot" like inside the engine bay.
The enclosure (with heat sink) will sit in front the radiator. So the enclosure will always get cool air. Either the car is driving so cool air will flow or the fan is spinning.
The fan will be drawing 30A.
As I said, I want to avoid a "conventional" mosfet so that I don't need 2 power supplies on my board (5V AND for example 12V for the driver).
Errrrm... You are right. The fan will never spin backwards, the wind from driving is spinning the fan in the same direction as if it is powered. Got a knot in my brain, sorry.
It doesn't matter if the fan is mounted in front or on the back of the radiator. The air must always flow in the same direction (so the same direction like if you are driving). There are sucking and blowing fans for each mounting position.