Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

89 views
Skip to first unread message

s7382

unread,
May 1, 2021, 3:53:53 PM5/1/21
to
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: https://i.stack.imgur.com/kjAMj.png

Ed Lee

unread,
May 1, 2021, 4:04:47 PM5/1/21
to
On Saturday, May 1, 2021 at 12:53:53 PM UTC-7, s7382 wrote:
> 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: https://i.stack.imgur.com/kjAMj.png

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

Rick C

unread,
May 1, 2021, 4:35:38 PM5/1/21
to
On Saturday, May 1, 2021 at 3:53:53 PM UTC-4, s7382 wrote:
> 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: https://i.stack.imgur.com/kjAMj.png

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.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
May 1, 2021, 4:36:47 PM5/1/21
to
On Saturday, May 1, 2021 at 4:35:38 PM UTC-4, Rick C wrote:
> On Saturday, May 1, 2021 at 3:53:53 PM UTC-4, s7382 wrote:
> > 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: https://i.stack.imgur.com/kjAMj.png
> 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.

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209

Ed Lee

unread,
May 1, 2021, 4:41:49 PM5/1/21
to
On Saturday, May 1, 2021 at 1:36:47 PM UTC-7, gnuarm.del...@gmail.com wrote:
> On Saturday, May 1, 2021 at 4:35:38 PM UTC-4, Rick C wrote:
> > On Saturday, May 1, 2021 at 3:53:53 PM UTC-4, s7382 wrote:
> > > 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: https://i.stack.imgur.com/kjAMj.png
> > 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.

Rick C

unread,
May 1, 2021, 5:39:26 PM5/1/21
to
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.

--

Rick C.

-- Get 1,000 miles of free Supercharging
-- Tesla referral code - https://ts.la/richard11209

Don Y

unread,
May 1, 2021, 6:03:19 PM5/1/21
to
On 5/1/2021 12:53 PM, s7382 wrote:
> I am controlling a speaker/LED with a PC fan.

What is your goal in doing so?

> The speaker's tone and the LED's blink rate should be proportional
> to the speed of the fan.

Why?

> How do I do so? The fan looks like this: https://i.stack.imgur.com/kjAMj.png

Place a microphone close to the blades of the fan so that it "hears"
the chopping of the air passing through the fan blades.

Place the LED behind the blades so that it is visible through
the blades of the fan. Wire teh LED to be on, steady.

This solves your *stated* problem.

[Learn to better express your problems!]

Ed Lee

unread,
May 1, 2021, 6:09:42 PM5/1/21
to
Need to shift up for audio/speaker as well.

John Doe

unread,
May 1, 2021, 6:11:58 PM5/1/21
to
The poster explained what it wanted. An audible tone output that
corresponds to the fan speed. A visible blinking LED that corresponds to
the fan speed.

The poster even gave a link to the fan inputs so everybody knows it's
controlled by a pulse width modulator...

--
Don Y <blocked...@foo.invalid> wrote:

> Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
> From: Don Y <blocked...@foo.invalid>
> Newsgroups: sci.electronics.design
> Subject: Re: How do I control another device (speaker or LED) with a PC fan?
> Date: Sat, 1 May 2021 15:03:15 -0700
> Organization: A noiseless patient Spider
> Lines: 22
> Message-ID: <s6kj71$fj5$1...@dont-email.me>
> References: <a3ef7ada-bcdb-4266...@googlegroups.com>
> Mime-Version: 1.0
> Content-Type: text/plain; charset=utf-8; format=flowed
> Content-Transfer-Encoding: 7bit
> Injection-Date: Sat, 1 May 2021 22:03:14 -0000 (UTC)
> Injection-Info: reader02.eternal-september.org; posting-host="e7edcc528bc140b1fe96cf5a85da1405"; logging-data="15973"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1/1eEfz5dSSgVXco1OzMR6k"
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
> Cancel-Lock: sha1:ZXrFeBNZD2U4XUVo9ARVNplEcfg=
> In-Reply-To: <a3ef7ada-bcdb-4266...@googlegroups.com>
> Content-Language: en-US
> Xref: reader02.eternal-september.org sci.electronics.design:631637

Rick C

unread,
May 1, 2021, 6:26:12 PM5/1/21
to
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.

--

Rick C.

-+ Get 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209

John Doe

unread,
May 1, 2021, 6:27:08 PM5/1/21
to
Ed Lee wrote:

> gnuarm.del wrote:
>> Ed Lee wrote:
>>> gnuarm.del wrote:
>>>> Rick C wrote:
>>>>> s7382 wrote:

>>>>>> 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:

>>>>>> https://i.stack.imgur.com/kjAMj.png

>>>>> 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.

If there is voltage output somewhere, it can be connected to a voltage
controlled oscillator (like the CD4011) for the momentary-on speaker.

Ed Lee

unread,
May 1, 2021, 6:30:52 PM5/1/21
to
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.

John Doe

unread,
May 1, 2021, 6:39:50 PM5/1/21
to
*CD4046B

Edward Hernandez

unread,
May 1, 2021, 6:54:03 PM5/1/21
to
Has anyone else noticed that the "John Doe" user has a Dr. Jeckyl/Mr.
Hyde personality disorder.

When the "John Doe" user is operating in "Dr. Jeckyl" mode, it knows
fully how to quote, trim, and answer:

Message-ID: <s6klbg$vo1$1...@dont-email.me>
> *CD4046B

But, when the "John Doe" user toggles into "Mr. Hyde" mode, it becomes
a troll that inserts a shit load of excess headers and the untrimmed
article into a massively oversized signature while also incorrectly top
posting (extra character inserted below to avoid triggering any 'sig
detectors'):

Message-ID: <s6kjn8$l1e$1...@dont-email.me>
> The poster explained what it wanted. An audible tone output that
> corresponds to the fan speed. A visible blinking LED that corresponds to
> the fan speed.
>
> The poster even gave a link to the fan inputs so everybody knows it's
> controlled by a pulse width modulator...
>
> -/-
> Don Y <blocked...@foo.invalid> wrote:
>
> > Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
> > From: Don Y <blocked...@foo.invalid>
> > Newsgroups: sci.electronics.design
> > Subject: Re: How do I control another device (speaker or LED) with a PC fan?
> ...

Rick C

unread,
May 1, 2021, 7:39:07 PM5/1/21
to
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.

--

Rick C.

+- Get 1,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209

Rick C

unread,
May 1, 2021, 7:41:18 PM5/1/21
to
On Saturday, May 1, 2021 at 6:54:03 PM UTC-4, Edward Hernandez wrote:
> Has anyone else noticed that the "John Doe" user has a Dr. Jeckyl/Mr.
> Hyde personality disorder.
>
> When the "John Doe" user is operating in "Dr. Jeckyl" mode, it knows
> fully how to quote, trim, and answer:
>
> Message-ID: <s6klbg$vo1$1...@dont-email.me>
> > *CD4046B
>
> But, when the "John Doe" user toggles into "Mr. Hyde" mode, it becomes
> a troll that inserts a shit load of excess headers and the untrimmed
> article into a massively oversized signature while also incorrectly top
> posting (extra character inserted below to avoid triggering any 'sig
> detectors'):

Yes, we all know about the troll. That's why mostly people don't reply to his posts. Well, the smart ones anyway. It is very, very seldom he says anything that is worth reading.

--

Rick C.

++ Get 1,000 miles of free Supercharging
++ Tesla referral code - https://ts.la/richard11209

Ed Lee

unread,
May 1, 2021, 7:44:45 PM5/1/21
to
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.

Don

unread,
May 1, 2021, 8:31:58 PM5/1/21
to
Unfortunately, a datasheet's not available:

https://community.intel.com/t5/Processors/cpu-fan-E97378-001-data-sheet/m-p/1269715/highlight/true#M50596

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,

--
Don, KB7RPU, https://www.qsl.net/kb7rpu
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.

Rick C

unread,
May 1, 2021, 8:32:08 PM5/1/21
to
WHY DO YOU NEED MORE THAN ONE COUNTER?

Saying you need three counters does not answer any question I have asked. One assumption that I already said was not needed is the use of an MCU.

https://www.ti.com/lit/ds/symlink/cd4020b.pdf?ts=1619861956697&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FCD4020B

CD4024BE about $0.25 each No programming, no coding, just wire it up.

It will require something to drive the LED and speaker since the IC doesn't have enough current drive on the I/O pins. So toss in a couple of 2N7002 and a capacitor to make the speaker AC coupled.

--

Rick C.

--- Get 1,000 miles of free Supercharging
--- Tesla referral code - https://ts.la/richard11209

Ed Lee

unread,
May 1, 2021, 8:35:14 PM5/1/21
to
How do you generate a tone with this counter, proportional to the input?

Rick C

unread,
May 1, 2021, 9:28:29 PM5/1/21
to
Each output is the input frequency divided by a power of two. I believe he means proportional in frequency, not volume. Or as someone has indicated the tach signal itself can be used directly.

The OP has given very little info to work with.

--

Rick C.

--+ Get 1,000 miles of free Supercharging
--+ Tesla referral code - https://ts.la/richard11209

Ed Lee

unread,
May 1, 2021, 10:18:02 PM5/1/21
to
But what if he want input frequency multiple by some scaler. For example, a few hundred hertz input generating a few thousand hertz tone.

> The OP has given very little info to work with.

Yes, we will have to wait.

Ed Lee

unread,
May 1, 2021, 10:31:17 PM5/1/21
to
For instance, typical CPU fan spin at 5000RPM, or 80 Hz. Typical touch tones are around 1KHz. So he might want frequency multiplier of 10 to 20.

> > The OP has given very little info to work with.
> Yes, we will have to wait.

He just posted another question regarding musical tones, which are in the kHz range as well.
0 new messages