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:
- posted
2 years ago
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:
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:
Danke,
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.