How do I control another device (speaker or LED) with a PC fan?

May 01, 2021 Last reply: 5 years ago 15 Replies

I am controlling a speaker/LED with a PC fan. The speaker's tone and the LED's blink rate should be proportional to the speed of the fan. How do I do so? The fan looks like this:

formatting link


You need to down shift video frequency and up shift audio frequency. Easiest way is with a micro controller.

How fast do you want to blink the LED?

What frequency do you want to drive the speaker and what wave shape works for you?

What is the PWM frequency range and/or pulse width range?

What tools do you have available?

Very likely you can do this with a simple counter chip depending on the frequency ranges.

I should have asked for the details on the tach output since that measures the fan speed.

Should be pulse per revolution, or hundreds per second. So, one input counter and two output counters. Micro controller or FPGA if desired.

What's wrong with one counter? The tach output is most likely high enough it can be either used directly or divided down and the LED certainly will need to be divided down. Why use multiple counters? Maybe you are thinking of counters in an MCU? Too complicated.

Need to shift up for audio/speaker as well.

I expect you are making assumptions that are not obvious. It might be useful to explain them. Otherwise I don't think your statements are correct.

The OP said he wants tones, not just clicks. So, freq should be in the thousands' range. I don't care why he spec it that way. I am just giving solution as requested.

You have not explained why you need multiple counters. You do that a lot. You say something cryptic and don't explain yourself, but act as if you have.

Whatever. This is not important. The OP most likely is looking for someone to do his homework for him and won't make any more posts.

I said at the beginning: 1 counter to measure the input freq and/or pulse width, 1 counter to output lower freq for LED and 1 counter to output higher freq for speaker.

For example, the STM32F411 I am using now has 9 counters. Same cost whether you use 1 or 3 counters. You can do as many counters as you want with FPGA.

Unfortunately, a datasheet's not available:

formatting link
Most likely the fan operates at 1200 - 2800 RPM and its tach delivers two pulses per revolution into an open collector. The pulses are audible, at the lower end of the spectrum, from 40 - 90 Hz. And the tone's proportional to fan speed within the range. You can use the tach to drive a speaker, if the low frequency range is acceptable.

Danke,

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required