Author Topic: 4-Pin Fan Simulator (not just a 555 timer, but with some intelligence)  (Read 363 times)

0 Members and 1 Guest are viewing this topic.

Offline petreza

  • Contributor
  • Posts: 38
  • Country: us
A kindergarten project, I am sure.

How can I simulate an attached 12V fan to the sensor of a PWM fan controller? The simulator should also run on 12V to keep things simple.

I need it for my homelab - a personal collection of old servers and datacenter network switches and routers, mostly for educational purposes. The problem is that equipment like this comes with these small, insanely loud fans. When I replace the fans with larger and quieter ones, the fan controller senses that something is off and I start getting annoying warnings, or temperature sensors stop working, or some of the equipment might refuse to boot.

I have tested attaching a 555 timer to the sense wire of the 4-pin fan connector and running the timer at the highest pulse rate which I was able to detect with a multimeter (and a hairdryer : ) This usually works because when the sensor senses a pulse rate that is higher than what it expects for the PWM signal it sends, it usually doesn't mind. However I want to build something which closely mimics the fan that was previously attached.
I am sure that there are many different options available. The input is a PWM signal and the output is a corresponding timer signal.
The device should be some combination of these:
1. Simple - no complicated programming environment etc.
2. Small - I might have to squeeze these in tight spaces - like inside of packed power supplies
3. Heat tolerant - mounting them might be a problem, they might have to dangle on top of motherboards wrapped in electrical tape
4. Cheap - I would need a lot of these, so the cheaper the better.

Thanks for your advise!
« Last Edit: April 18, 2021, 01:48:25 am by petreza »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 10094
Assuming your replacement fans have a tacho output, what you need is a rate multiplier circuit to increase the RPM signal to match that of the faster fan.  It would be possible to use a F=>V circuit controlling a VCO, but that certainly wouldn't be small.   Probably the way forward is a low pin count 8 bit MCU, powered by a small package 5V regulator (or possibly a dropper resistor and shunt Zener), driving a small N-MOSFET to provide the open drain output signal.   The firmware will measure the interval between input pulses, and calculate a new smaller interval with which to generate output pulses.  Due to your desire to avoid programming at point of use, the multiplication factor should either be set by jumpering pins, or be variable, controlled by a preset feeding an ADC input.

Which processor to use depends on what toolchains you have and are familiar with.  Ideally it should have independent input capture and 16 bit PWM (or a NCO) so you can off-load the period measurement and output pulse generation to hardware so the main loop doing period recalculation and update doesn't have to be hard realtime. 
« Last Edit: April 18, 2021, 04:53:49 am by Ian.M »
 

Offline shaheansar

  • Contributor
  • Posts: 29
  • Country: in
If you want all of that, you'll pretty much have to do it in code. It's not that difficult though. Just take the tacho output of your fan and filter it through a low pass filter. The ADC of your micro can then be used to measure the speed, and
output a frequency that you think is what the original fans put out. Of course, as the above guy said, you'll want an open drain or open collector output. As for the 5V, if it's a motherboard, you should be able to get 5V from mainboard.
Measure the different supply rails, and just solder the MCU's Vcc pin to it. Make sure to bypass it well.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 12882
  • Country: us
  • DavidH
The PWM output can be averaged to convert it to a voltage or current.  Then the current can be applied to the summing node of a simple hysteretic oscillator to make a variable frequency output.
 

Offline petreza

  • Contributor
  • Posts: 38
  • Country: us
Thanks for the suggestions! I will look into it.
I am sure this is very simple stuff, but I am not an electronics guy (yet: ), so it is over my head. (hence posting in the Beginners forum)

It was suggested that I use the tacho output of the new fans as input for the circuit. Is it guaranteed that two different model fans' tacho will always react in proportion to the changing PWM signal? I just replaced a power supply fan - SanAce40 0.49A - with a Noctua A4x20 0.05A fan - both 4-pin. The system works but I lost a bunch of temperature readings. Shortly after bootup the system spins up the fans to full blast then steps them down back to the minimum setting that I have given it. There are maybe 10-12 steps from top to bottom. On each step it waits approx. 7-8 seconds. I am guessing it is checking the tacho feedback on each step. I am afraid that a different fan might not follow in a straight proportion the same spin-down curve. So for each type of fan replaced, I will have to build a table of input-to-output values. Say the limits are 80%-20%:

PWM - TACHO
80% - 8000rpm
75% - 7500rpm
70% - 7000rpm
65% - 6500rpm
60% - 6000rpm
55% - 5500rpm
50% - 5000rpm
45% - 4500rpm
40% - 4000rpm
35% - 3500rpm
30% - 3000rpm
25% - 2500rpm
20% - 2000rpm

Of course, in real life there wouldn't be such a straight correspondence between PWM-TACHO.
It would be great if the "simulator" had a (micro) USB port, which exposes some storage space when connected to any random computer. Then all I have to do is transfer a TXT file with values like the ones above. This eliminates having any special software installed, once the device is programmed.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 1532
  • Country: us
Quote
When I replace the fans with larger and quieter ones, the fan controller senses that something is off and I start getting annoying warnings, or temperature sensors stop working, or some of the equipment might refuse to boot.

I think you'd be better off figuring out why you don't get any temperature readings when you swap out the fans and find out how to configure the software or BIOS settings which are producing the warnings. All of that stuff has got to be configurable.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf