A short and simple post, which might come in handy for others in need of such an adapter. I’ve recently had a need to connect a 12V DC fan which has a RPM output (rotation speed measurement) to a device which was expecting a locked rotor signal instead. Since I needed this “right now”, and this is a very simple circuit after all, I’ve simply used whatever parts I’ve had laying around in the junk box to implement this. I’d like to share the schematic and explain the circuit, for these who might need such a circuit as well.
The instrument I had was a TP-Link POE switch which has an internal 40mm fan. Its quite loud, too loud for it to be tolerable in my use case. I’ve modified it in the past with a series dropper of a few volts, but this wasn’t enough. The air flow dropped noticeably, but the noise didn’t drop sufficiently. By the end of it all I’ve decided to go with a Nocuta NF-A4x20 fan, which is an excellent option, it so quite you can barely hear it. The air flow is quite similar to what I’ve had after adding the series dropper, so I knew there’s no overheating problem with such an air flow.
Only problem is the Nocuta fan has an RPM output (signals the speed of the fan by the frequency of the signal at this pin), while the switch was expecting a locked rotor signal (low when all is good, high when the fan is stuck/locked). While the switch did work, I wasn’t happy with this situation, as the switch was constantly reporting ok/fan warning depending on which state it sampled at that specific moment. What’s worse, there’s now no real information about the state of the fan if it did get locked (there’s some chance it would work, but just as probable that it will be missed).
I’ve put together a small circuit from the parts I’ve had at the moment, the schematic is redrawn in figure 1 below. This assumes a 7V-12V VDD rail (speed control is done by means of VDD in this case), but the circuit worked just fine from ~3V (below which the fan stopped rotating), all the way up to 24V (tested with a different fan).
The circuits function is to have an output value of ~0V when the fan is rotating (input signal is toggling), and VDD (pull-up is done outside this adapter circuit, so I didn’t add an internal pull-up resistor here) when the fan isn’t rotating (input stuck at some DC value, no matter what the value is from GND to VDD).
The input signal from the fan is on the left side connected via J1, R1 acts as a pull-up resistor for the input pin. Exact value of R1 isn’t important, it should be lower than the remaining resistors by a notable margin to minimize their loading effect, and not too low to consume a significant current at the input via the fan control signal. Something on the order of 2.2K-10K is most likely good enough in any case, with higher values used only if the supply voltage is higher.
R3/R4/C1 form a low-pass filter (LPF). R4 could in theory be omitted, as it isn’t really needed for this function, but since I had to make sure the CM voltage at the inputs to the comparator is low enough even with lower VDD, I’ve added this voltage divider. Use of another comparator might remove this requirement. R2 is added to insert a small DC offset to the circuit. Combined, these 4 elements, will generate a voltage with little ripple due to the LPF function, whose DC value can be found by the expression below.
R5/R6/C2/D1 form a peak detector (minus one diode drop), and a divider by 2, to keep the CM input to the comparator used here at the allowed range across all VDD values expected here. C1/C2 don’t have to be identical in value, they should just be large enough to have sufficiently low ripple within a PWM period of the fan connected to it. If you use typical 40mm-120mm fans, the values above should match. If you have fans with extremely low RPM, the capacitor values can be increased further.
Lets consider the operation of the circuit assuming fan is rotating, and the input is toggling. For sake of simplicity lets assume 50% duty cycle, but the argument holds for different values, with a shift in amplitudes at the output. Lets also assume 12V VDD, but again, this is only to put a number for simplicity, same calculation can be done in all cases.
The output of the left part of the circuit (connected to pin 3 of U1) will be at 0.5*12/2+12*220K/(220K+2*4.7M) = 3.27V
The output of the peak detection (connected to pin 2 of U1) will be (assuming 0.7V diode drop, and a divider of equal resistors as drawn):
(12-0.7)/2 = 5.65
This would cause the comparator to pull its output low, which would mark a running fan for the locked rotor detection at the instrument using/controlling the fan.
Now let move to the case where the fan is stuck. This means there are no toggles at the input. In this case, lets assume the two extremes, its either marking a constant 0V or 12V at the input signal.
Lets start with 0V.
Pin 3 of U1 will see:
0*12/2+12*220K/(220K+2*4.7M) = 0.27V (showing why we’ve added R2 to the circuit).
Pin 2 of U1 will see 0V.
This would cause the output of the comparator to go high-Z pulled high by the external pull-up resistor, marking a locked rotor state.
If we run the same calculation with 12V we would get:
Pin 3 of U1 will see:
1*12/2+12*220K/(220K+2*4.7M) = 6.27V
Pin 2 of U1 will see:
(12-0.7)/2 = 5.65
Again, the differential input is positive, causing the output to go high, marking the locked rotor state.
I’ve used LM393 for U1, as that is the only comparator I’ve had on hand at the moment which is cheap enough to throw at this circuit without giving it a second thought. It has 2 comparators in a single package, so U1B could be used to mark the state via an LED, or any other function you choose to. If you have other comparators on hand with Input CM range going all the way to VDD, you can simply the circuit. In such a case you can remove R4, and short R5 saving 2 resistors, and another minute of soldering.
I’ve assembled the circuit, tested it on the bench to make sure it all works as expected, before chopping it down to size and covering it with a blob of JBweld to hold it in place an make sure it doesn’t short to the instruments metal case.
A final test with the instrument running, stopping the fan by hand multiple times, confirmed correct detection of the running/locked rotor state.
Goodday,
I do have the exact same problem with an TL-Sg1016pe switch. Blinking fan light with other fan connected.
Do you know if this boards are already available for sale?
Yours,
Stefan
This is only a schematic that was shared, I have no plans to offer this as a pre-made PCB. The circuit is simple and compact enough to be put on a small breadboard.