4-Pin Fan Simulator (not just a 555 timer, but with some intelligence)  - Page 1
Forum section: electronics / beginners

author: petreza
author_rank: Contributor
timestamp: April 18, 2021, 01:44:12 am
content: 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 ishigherthan 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 supplies3. Heat tolerant - mounting them might be a problem, they might have to dangle on top of motherboards wrapped in electrical tape4. Cheap - I would need a lot of these, so the cheaper the better.Thanks for your advise!

author: Ian.M
author_rank: Super Contributor
timestamp: April 18, 2021, 04:51:42 am
content: 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.

author: shaheansar
author_rank: Contributor
timestamp: April 18, 2021, 10:34:58 am
content: 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, andoutput 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.

author: David Hess
author_rank: Super Contributor
timestamp: April 18, 2021, 05:11:02 pm
content: 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.

author: petreza
author_rank: Contributor
timestamp: April 19, 2021, 09:50:05 pm
content: 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 - TACHO80% - 8000rpm75% - 7500rpm70% - 7000rpm65% - 6500rpm60% - 6000rpm55% - 5500rpm50% - 5000rpm45% - 4500rpm40% - 4000rpm35% - 3500rpm30% - 3000rpm25% - 2500rpm20% - 2000rpmOf 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.

author: ledtester
author_rank: Super Contributor
timestamp: April 20, 2021, 11:28:50 pm
content: QuoteI 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.