I am working on a project to be able to manipulate FAN speeds. The fans are 4 wire samples and sitting in a nice Dell server.
For office use the server is great and noisy... However I would like to use it at home, so it needs to be great and SILENT.
Since it does not need to be a fridge inside I want to adjust the fan speed. this is not doable by software on the server and I have to create an alternative way.
This alternative way I would like to create in such a way that if for whatever reason the server gets hot it will be able to run at full power fans (airplane mode).
At this moment I have already written a routine to catch 5 fans rpm. This RPM is displayed through UART to me.
Now I need to do the tricky part, I need to create a TACH signal to the mainboard. As my topic title explains this needs to be of a variable frequency.
Normally this would be called a DDS (as far as I am aware atm). However this DDS needs to output 5 square waves at the same time.
The form of the square wave needs to be a pulse and the 0 for the remaining period. This is however not directly of my concern (details I will deal later with).
For now I am looking for the best way to extract 5 (6 actually if I include the frequency reading in it as well) frequencies from the timer to create different frequency for every fan.
For example 125Hz, 140Hz, etc.
I already made a sample code, which I did not test yet. But I would like to have some advice concerning the way forward.
Do I need to go with 6 phase accumulators like "t" in underneath example or do I need to go the modulo division way (from which I have no clue at the moment).
Furthermore all advice concerning my preliminary code is welcome. Normally I am programming Java, SQL and VBA so still learning every time I work with C
Removed due to changes made to source -> scroll down for a later post that holds actual code!