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

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

Reply to
s7382
Loading thread data ...

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

Reply to
Ed Lee

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.

Reply to
Rick C

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

Reply to
Rick C

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

Reply to
Ed Lee

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.

Reply to
Rick C

Need to shift up for audio/speaker as well.

Reply to
Ed Lee

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.

Reply to
Rick C

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.

Reply to
Ed Lee

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.

Reply to
Rick C

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.

Reply to
Ed Lee

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,

Reply to
Don

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.