I´m pretty new to the forum (as you will see by my limited electronics knowledge) and I have a wierd problem when trying to control some automotive fans at variable speed. The fans each have an internal micro controller that you control with PWM by switching is signal wire (24V rails in the diagram) to ground at 90Hz. The small circuit I designed is just supposed to switch the 4 24V signal wires to ground at the same rate as the 4 TTL level PWM signals from my aquisition system(the signals are synchronous).
This circuit is working perfectly when all the fans are running at the same speed(when all the PWM signals have the same duty cycle). But when I try to control the fans so they run at different speeds, they will not run at different speeds and instead all run at the speed corresponding to the highest duty cycle.
For the circuit depicted above, even though I only want the left MOSFET to be switched at a dutycycle of 50% while the others get a dutycycle of 10%, they all seem to be switched so they get a dutycycle of 50%.
After some thinking I realized my mistake, because even when the three lower duty cycle signals are low, the leftmost one (which is still high becasue higher duty cycle) will set the gate voltage of all the transistors to high through the ground rail (right?). As I see it, there´s two solutions to this.
The first one is that maybe there´s a grounding issue, as I didn´t ground my signal generator (Dewesoft Sirius STG-8) to the rest of the circuit. (before you say I should try this before asking, I have very limited access to the hardware mentioned because of high demand).
The other option is that my circuit is lacking, so I made a diagram for an improved version with resistors to protect the mosfets and diodes to hopefully prevent channels from controlling each other
Will it be enough to just ground my signal generator or should I start building the new circuit, and if I build a new circuit, is the one depicted in the diagram adequate?
Any help greatly appreciated!
EDIT WITH CLARIFICATIONS:
My circuit has NOTHING to do with switching the power to the fans, my circuit is only switching the signal wire to ground. When the signal wire is connected to ground, the fan ECU interprets it as a high PWM state, and the opposite is true for when the signal wire is not shorted to ground.
Every MOSFET has a separate TTL level PWM signal driving it. Please keep the language as non technical as possible, my electronics background is limited!