PC Fan RPM sensor?

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
So I am messing with a PC fan and the RPM sensor, I might want to use it for a propeller clock project.

I am powering the PC fan with my bench top power supply at 12V. I placed my scope probe on the RPM sensor pin

And I get this.

NewFile1.png

What are those spikes? How can I eliminate them?

From what I read, you need to pull that senor pin high but it looks like that is not the case.
 

ronv

Joined Nov 12, 2008
3,770
Only a guess. I think they may just be using the coil voltage and the spike is the inductive kick. You could run the signal thru a resistor and then clamp it at 12 volts with a zener or a diode clamp to +12.. Then feed that to your logic.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Only a guess. I think they may just be using the coil voltage and the spike is the inductive kick. You could run the signal thru a resistor and then clamp it at 12 volts with a zener or a diode clamp to +12.. Then feed that to your logic.

Wouldn't I clamp at 5V? That is the voltage I want to feed into my pic.
 

Reloadron

Joined Jan 15, 2015
7,501
Years ago when I experimented with this stuff I used a 10K pullup resistor on the fan speed output. Pretty sure the tach out signal is open collector. I also think the output is two pulses per revolution. Your pulses look to have hign frequency accentuation on the leading edges. Are you using a scope probe and is the vertical coupling set to AC or DC? If you are using a probe like a 10X probe you may want to check the probe compensation.

This is an old dead web page and while a mess it does have whats left of some of my images from when I experimented with fans and fan speed control years ago. The page is no longer even a part of the web but sitting on the server. You may find something in the mess. :)

Ron
 

Reloadron

Joined Jan 15, 2015
7,501
I see I missed a few post while I slowly typed. If you want 5 volt pulses run the fan on 12 volts and use a 10K pullup but apply 5 volts on the pullup resistor. You have 5 volts from the PIC correct?

Ron
 

ronv

Joined Nov 12, 2008
3,770
You could try slowing it down with your finger. If the amplitude goes down it is probably just a back emf sensor.

Me to. But it looks like he already has 10 or 11 volts.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Years ago when I experimented with this stuff I used a 10K pullup resistor on the fan speed output. Pretty sure the tach out signal is open collector. I also think the output is two pulses per revolution. Your pulses look to have hign frequency accentuation on the leading edges. Are you using a scope probe and is the vertical coupling set to AC or DC? If you are using a probe like a 10X probe you may want to check the probe compensation.

This is an old dead web page and while a mess it does have whats left of some of my images from when I experimented with fans and fan speed control years ago. The page is no longer even a part of the web but sitting on the server. You may find something in the mess. :)

Ron
This must be an older fan. It has a blue wire and most fans have a yellow wire. If I add a 10K pullup, I get a small signal riding on 5V along with the higher voltage spikes.

I did find a circuit that runs the output through a 2n2222 and clamps that output with a 5.1v zener.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
I see I missed a few post while I slowly typed. If you want 5 volt pulses run the fan on 12 volts and use a 10K pullup but apply 5 volts on the pullup resistor. You have 5 volts from the PIC correct?

Ron

I just want 5V out. I don't want those spikes to fry my pic.
 

Reloadron

Joined Jan 15, 2015
7,501
I just want 5V out. I don't want those spikes to fry my pic.
Yeah, they were old fans also 3 wire fans. I did that about 10 to 12 years ago. The tach out was white and on some fans yellow. The newer fan specification reads:

Pin Function Wire Color
1 GND Black
2 12 V Yellow
3 Sense Green
4 Control Blue

I understand the spikes that concern you. Earlier I asked if with your scope you were using a probe and if the probe was correctly compensated to the scope's vertical input channel? The spikes may be a result of high frequency accentuation in how the scope probe is coupling the signal to the scope. In other words what you see on the scope may not be what you actually have.

Ron
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Yeah, they were old fans also 3 wire fans. I did that about 10 to 12 years ago. The tach out was white and on some fans yellow. The newer fan specification reads:

Pin Function Wire Color
1 GND Black
2 12 V Yellow
3 Sense Green
4 Control Blue

I understand the spikes that concern you. Earlier I asked if with your scope you were using a probe and if the probe was correctly compensated to the scope's vertical input channel? The spikes may be a result of high frequency accentuation in how the scope probe is coupling the signal to the scope. In other words what you see on the scope may not be what you actually have.

Ron
I am using a 1x probe DC coupled.
 

Reloadron

Joined Jan 15, 2015
7,501
Well the 11 volts makes sense but the spike doesn't. These fans generally use two hall effect sensors and output two pulses per revolution. The hall sensors generally drive a NPN transistor which is open collector. I have heard of open drain but never saw it. Since the probe is X1 the spike should not be caused by a compensation issue. If you have a X10 probe you may want to try it and set the vertical gain for 0.5 V/Div and see if the spike still exist. You can also try AC coupling and while that will not show any DC offset let's see how the pulses look.

Ron
 

ronv

Joined Nov 12, 2008
3,770
I think I have seen this before. The coils are tied to +12 and the bottom side switched by a NFET rated at like 20 volts. When the FET turns off the inductive kick goes high and the FET goes into avalanche breakdown clamping it. The rest of the signal is motor back emf on the open coil. If you slow it down the 11 volt part will drop. Right now it looks like 2500 RPM. At 1250 it would be 5.5 volts. I think you can just run it thru say a 5k resistor and clamp it with a little schottky diode.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
This is with 10X and AC coupling. My scope compensates display for the 10x setting.

NewFile0.png

Looks like the spikes are still there.

Not a big deal, I could always get another fan. Just curious as to wahy this is occuring.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
I think I have seen this before. The coils are tied to +12 and the bottom side switched by a NFET rated at like 20 volts. When the FET turns off the inductive kick goes high and the FET goes into avalanche breakdown clamping it. The rest of the signal is motor back emf on the open coil. If you slow it down the 11 volt part will drop. Right now it looks like 2500 RPM. At 1250 it would be 5.5 volts. I think you can just run it thru say a 5k resistor and clamp it with a little schottky diode.

You can tell the RPM just by looking at the voltage??

I would connect the anode of the diode to ground? Won't I need a zener? Or at least a voltage divider?
 

Reloadron

Joined Jan 15, 2015
7,501
I think I have seen this before. The coils are tied to +12 and the bottom side switched by a NFET rated at like 20 volts. When the FET turns off the inductive kick goes high and the FET goes into avalanche breakdown clamping it. The rest of the signal is motor back emf on the open coil. If you slow it down the 11 volt part will drop. Right now it looks like 2500 RPM. At 1250 it would be 5.5 volts. I think you can just run it thru say a 5k resistor and clamp it with a little schottky diode.
I tend to agree with Ron. The fan speed is being controlled by PWM with the low side switched. I guess if really curious you could remove the fan power and just power the fan from 12 VDC without any PWM and look at the tach output using an external pullup and see what you get. Beyond that I would do as Ron suggest. I never saw it but Ron's explenation makes good sense to me.

Ron
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
I tend to agree with Ron. The fan speed is being controlled by PWM with the low side switched. I guess if really curious you could remove the fan power and just power the fan from 12 VDC without any PWM and look at the tach output using an external pullup and see what you get. Beyond that I would do as Ron suggest. I never saw it but Ron's explenation makes good sense to me.

Ron

Fan is not being controlled by PWM. Just straight 12V.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

The 10X scope probe has a very high input impedance.
Try to put a resistor as load on the RPM connection to ground.
A value of 1 - 10 K and see if there is any difference.

Bertus
 
Top