Reading PWM, creating RPM signal

Hello,
I'm trying to make PC fan controller for my cheap case with cheap fans. Fans are 2 wire DC and not able to be controlled with PWM because they whine when lowering RPM with PWM module.
So I want to stage them. I want to read PWM signal from motherboard and use it to turn on fans sequentially. Then I want to feed motherboard with "fake" RPM signal so it has feedback.
I took photos of my cheap oscilloscope to show what kind of signals I deal with - 2 RPM signals, 2 PWM signals (but can't upload all of them.) I'm using Arduino Nano Every.

My question is - what components to buy and what code for signal handling to use?



Last photo:

So, you say the fans ‘whine’…
Have you tried changing the PWM frequency? not the duty cycle…

Casual observation, the scope traces suggest the control is on the ‘low side’ of the fan motors. ( except the 12,5%) !?

I don't think so, I tried using HW-532B module with LR7843 and it worked with different fans but not with the ones I want to control.

Regarding the oscilloscope - I'm not sure if I measured it right, I used stock Intel cooler fan to measure the signals I'm working with.

2-pin fans are commonly controlled wit 30Hz PWM.
That can give a bit of knocking at lower speeds, but that's less anoying than a whining sound.
Try bit-banging a 30Hz PWM signal.
Leo..

What is this "motherboard"?
Does it have the standard 4 pin fan connector?

I also had a whining cheap fan in my project. Lowering the PWM frequency solved this.

Yes.

Hardware wise you won't need anything more than a pull-up resistor for the PWM signal and a single NPN transistor with base resistor for for the tach output.
Software seems to be somewhat complicated and out of my scope.

Then buy some 4-pin fans and let the PC control the fans.
All modern PCs have BIOS settings to control the fan automatically with adjustable curves, to set the optimum speed according to cooling needs.
Having to do that manually is "sooo last century".
Leo..

Fans do have a (<50000 hour) lifespan.

Another trick for a 2-pin fan is to wire it between 12volt and 5volt.
It will then get 7volt and runs at half speed.

This thread went little off topic. For now, I don't care about fans, I just want to get the signals to work. So as title of this thread says - reading PWM signal, creating RPM signal.

Check out these Arduino functions:

pulseIn()

map()

tone()

I'm not sure tone() will be suitable. On many types of Arduino, the lowest frequency it can produce is 31Hz (~1800RPM). But I don't know what the minimum frequency is on Nano Every.

Apparently no one here really knows how.

Sounds like a job for Esp32 with dedicated peripherals for this.

I use an 328P MCu to read the RPM from a Fan and send a double of this to feed into the motherboard, This was to use low speed fans on a board with stall detection that I could not disable.

Fan running at 750RPM reports as 1500 ish under the bios as exected.

I am using Timer1 on the 328 to generate the RPM feedback since its a 50% duty signal.

I'll look for the files if you think it'll be any help.

May I ask you how to connect NPN transistor with arduino? I tried with 2N2222A and BC547B and with some different values of resistors but from what I measured I did something very wrong and measured around 44 volts peak to peak so I have no idea what I'm doing.

Please post the code here, right now everything helps.

This is for the simulated fan tach output you connect to the motherboard.

For the PWM input to the Nano just use a 10K or 5.1K pullup resistor to 5V.

So after some time I managed to create RPM signal, I just had to use two NPN transistors to get 0 RPM to be 0V. But controlling the fans got difficult. Using PWM module to control create more noise, even with 30 Hz. So I tried variable 0-10V voltage module, and it works, but i need to somehow get to 12V, and from what I looked up, that as module is not sold.