Please help me with the wiring(Mosfet, resistors) to control a systemair K 200 EC fan with a esp32. FanInput: 0-10VDC,pwm

well through a resistor to a pwm cabable GPIO, I think :wink: And there we have the resistor.
But what is the difference to the optocoupler?

Since my IC4N35 Opto seems a bit small, take your mosfet approach?
But the opto approach got good feedback in that german topic.

Is this a good breakdown of the difference?(chatgpt)
btw chatgpt validated your approach, and said both are valid. That resolves my confusion and worry a bit.

Conclusion

Both approaches will work for your fan:

  1. The MOSFET approach is simpler, cheaper, and supports higher switching speeds.
  2. The optocoupler approach adds isolation, which is useful for protecting your ESP32.

Since the fan provides its own 10V source (terminal 4), the MOSFET approach is likely optimal for your case.

Apparently, the input of the fan takes a potmeter or PWM, user's choice.
For a proper control you’ll need to switch the high side, which can't be done with 1 mosfet. You’ll need either 2 mosfets or 1 mosfet and a optocoupler. But the optocoupler is quite capable of handling such a low current, you can skip the mosfet.

That is a typical AI response. It actyally doesn't know if either would work and if they did which one is optimal.

Wow the first wiring diagram, thank you very much.
In actuality I have 10x the IRLB8721 and only 1x 4N35 Optocoupler. :see_no_evil: :crazy_face:
As understood, the solution with the one mosfet by ledsin, is switching the low side.
Which works, but is NOT optimum?
What does that mean? Why two mosfet solution better?
I saw that the converter boards pwm to 0-10V also have two mosfets on them if not mistaken.
Ordering more parts, will take til lafter the weekend, and I would like it running before that.
I can make it optimum later, also need to understand your approach better first.

For now I was planning on testing ledsyns solution first.
I got it confirmed by two AIs, and we agreed to test with the 10k resistor first Gate->GPIO.

Here is the last version:

And to be extra safe, I can NOT connect the Mosfets source to control of the fan yet, but check with multimeter if voltage corresponds to the duty cycles. And let the poti connected, at 50%, so my fan does not run on 100% when control is not connected, and also to be super safe, by having a control signal at all.

A flyback diode to protect the fan is not needed, as the fan internally prob has one, and currents are two low for any risk.



Is this so far correct to test?? :crazy_face: or will it create nuclear fusion?
From there one I could tackle the more optimal setup, you described.

Well it said, that both works.
"and likely is the best solution" is better than "IS the best solution"(since it never has all variables to make that call)

but anyway, can I test it like in my last post, and initially proposed by ledsyn, with only the added 10k resistor part by me. 10k to be safe for the esp32, when the mosfets gets to warm I can still go lower.
Since I read a lot from you, I would totally trust your solution.
For a simple, first setup, my last post was correct so far?
stitech suggested a "better" approach,...that I do NOT understand yet, or the advantages.

Don't know. There is no schematic in your last post.
Also I don't see any MOSFET mentioned that will work with 3.3V I/O

haha you did that on purpose. I know it's not the proper way to draw that.
But maybe text would suffice?

  • Fan connection 4 (red) = 10V = goes to MOSFET drain
  • Fan connection 3 (yellow) = control = connects to MOSFET source
  • Fan connection 2 (blue) = GND = connects to ESP32 GND
  • ESP32 PWM pin through 10kΩ resistor = goes to MOSFET gate

In reality it's actually pretty simple :sweat_smile:

If you have a MOSFET that has an max Rds(on) at 3.3V or less, it could be.

1 Like

Well the mosfet is a different topic. I researched this before, and i bought several IRLB8721.

  • Gate threshold voltage: 1.3V-2.5V
  • Max drain-source voltage: 30V
  • Low RDS(on): 8.7mΩ

It is also not optimum, but the perfect mosfet to find is a topic for itself it seems.

That's at Vgs = 10V
What is the max Rds(on) at 3.3V?

Well we both know you already know the answer.
But here for completness:

Drive Voltage (Max Rds On, Min Rds On) 4.5V, 10V
Rds On (Max) @ Id, Vgs 8.7mOhm @ 31A, 10V
Vgs(th) (Max) @ Id 2.35V @ 25µA
Gate Charge (Qg) (Max) @ Vgs 13 nC @ 4.5 V
Vgs (Max) ±20V
Input Capacitance (Ciss) (Max) @ Vds 1077 pF @ 15 V

This one and the IRLZ44N were mentioned most in all the topics I read. They are NOT really 3.3V, but close. And people said they work most of the time, but some mosfets(rare) can not work.
I did research the whole day, but did not found a better solution.
Not even sure, why. Shouldn't there be a commonly used mosfet for the esp32 3.3V logic?
But when searching for that, the IRLZ44N gets recommended, weird.

These are the parts I have:

  • IRLB8721
  • SN2222 Transistor.
  • IC4N35
  • IC74HC595
  • capacitators
  • resistors
  • 1N4007 Diode

There are probably 100s but none are through hole. The biggest SMD part would probably be an SOT23-3

Oh right I remember. That's why I decided against them. Still havn't slept, have searched the half day yesterday, and the whole night for a connection.
I just confirmed the average Voltage my esp32 gives out as pwm. 1.6x V for 50% and 100% @ 3.29V.
Connections are all ready.
Still not connected yet.
Waiting for a final go from you.

Maybe that already was it, but just to make sure...lol.

Also I will NOT connect the controlcable to the fan yet, only ground and 10V, and check with multimeter first, if mosfet gives correct voltages @corresponding duty cycles.
I leave the potentiometer board connected for now, so the fan doesn't run @100 when testing, and fan has a control at all.(Probably defaults to 100% when no signal)

This is all I got.
I think I test it when waking up, and having a clear head. :face_with_spiral_eyes:

I don't know about everybody else but I need to see a schematic?

hehe...You do that on purpose, to make me learn how to draw a wiring diagram, or was thaT serious? :see_no_evil:

How about good 'old letters? :crazy_face:

  • Fan connection 4 (red) = 10V = goes to MOSFET drain
  • Fan connection 3 (yellow) = control = connects to MOSFET source
  • Fan connection 2 (blue) = GND = connects to ESP32 GND
  • ESP32 PWM pin through 10kΩ resistor = goes to MOSFET gate

power esp32 is via usb, power of fan is its own 230V obviously.

That was serious. If you can't draw a simple schematic, then I'm not sure if you know the difference between gate, source, drain.
Also still don't know what MOSFET you are using.

  • IRLB8721 as already stated.

haha, it was reason one :joy: ... I knew it.
Ok Mr P. I will attempt my FIRST wiring diagram, thank you for the lesson.
I am obviously NOT tired enough...lol :rofl:

give me a few minutes...(hope will not be hours)

I prove I am "worthy"....

There is no hurry on my part. I prefer you take your time and do this right.
I'm sure you don't want to destroy your expensive fan.

I expected something like this, you are clearly not giving your first lesson :wink:


I used www.circuit-diagram.org.

  • The chopped up 3.3V Signal comes from my esp32. Average Voltages confirmed corresponding to the duty cycles.

  • It goes through a 1k resistor to reduce any backpropagating energy. Some say 330ohm would be enough, but 1k is more on the safe side. the higher the resistance, the slower the MOSFET switches, but gets hotter. So when working, and getting to hot, I can step down.

  • It ends at the gate, which opens drain->source, when threshold is reached.(In this case 3.3V)

  • When the drain-source opens, energy flows from the source to the drain. In this case the 10V from the fan output, to the control line of the fan.

So my chopped up(Pulse modulated) 3.3V , gets transformed to a choppped up 10V signal.

  • And lastly: Everything goes up in smoke, right?