Go Down

Topic: Frequency Generator w/Arduino (Read 5760 times) previous topic - next topic

Sluice

Mar 16, 2013, 06:41 pm Last Edit: Mar 16, 2013, 06:52 pm by Sluice Reason: 1
Now I know this topic has been post many a time before but never anything quite like what I wanted.
I want to be able to generate a frequency of 20Hz-30Hz. I want it to be adjustable by a pot.
Then I want to hook up a speaker to Arduino that will play the different frequencies.

Can I see some code, maybe, please?
Oh, an can anyone show me the code how to make a 18000 Hz generator too?

Thanks!

Grumpy_Mike

Quote
I want to be able to generate a frequency of 20htz.-30htz.

what is a htz?
I know what a Hz is an a KHz but I haven't come across a htz.

Quote
Then I want to hook up a speaker to Arduino that will play the different frequencies.

IF you mean Hz then what is the point 30Hz is sub audio is it not?

Sluice

Sorry yeah I mean Hz. That's ok. I'm not going to be hearing it. It's for an experiment.
I also want to be able to make it play at 18000 Hz as well.

retrolefty


Quote
I want to be able to generate a frequency of 20htz.-30htz.

what is a htz?
I know what a Hz is an a KHz but I haven't come across a htz.

Quote
Then I want to hook up a speaker to Arduino that will play the different frequencies.

IF you mean Hz then what is the point 30Hz is sub audio is it not?


Not. Hi-Fi standard frequency range is usually stated as 20Hz to 20KHz.

http://en.wikipedia.org/wiki/High_fidelity

Quote

Audio equipment must be able to reproduce frequencies high enough and low enough tbe realistic. . The human hearing range, for healthy young persons, is 20 Hz to 20,000 Hz. [11] Most adults can't hear higher than 15 kHz.[9] CDs are capable of reproducing frequencies as low as 10 Hz and as high as 22.05 kHz, making their frequency range adequate for reproducing all the frequencies that people can hear.[9]

Grumpy_Mike

Quote
Not. Hi-Fi standard frequency range is usually stated as 20Hz to 20KHz.

Yes I know but can you actually here it? There is a lot of rubbish in the hi-fi world.

Quote
I'm not going to be hearing it. It's for an experiment.

Is it that one where you "stop" a stream of water?

Do you need a sin wave or square wave? If it is a sin wave then you need an external D/A or filter on a PWM output.

retrolefty


Quote
Not. Hi-Fi standard frequency range is usually stated as 20Hz to 20KHz.

Yes I know but can you actually here it? There is a lot of rubbish in the hi-fi world.

There sure is, mostly by ignorant users and unscrupulous sellers that feed off them. However the industry that supports the standards and manufactures that publish performance specifications of their products do faithfully report using real world measurements using standardized testing methods, and 20Hz is used as the lower end value by most quality equipment, some will rate even lower frequency response. Some go down to 0 frequency as some designs can be run in pure DC coupled mode. Flat response from 20Hz to 20Khz has been a basic Hi-Fi standard for many many decades, many quality pre-amps, amps, and receivers can do better. Speaker performance is where the biggest problem lies in trying to get such accurate flat response, and is the limiting part of any quality sound system. 
Lefty


Quote
I'm not going to be hearing it. It's for an experiment.

Is it that one where you "stop" a stream of water?

Do you need a sin wave or square wave? If it is a sin wave then you need an external D/A or filter on a PWM output.

Sluice

I just want to know how to make a sine wave of a frequency of 24 Hz.


retrolefty


I just want to know how to make a sine wave of a frequency of 24 Hz.


Well a arduino is only capable of producing square wave outputs, no sine waves, is that a problem?

Lefty


dc42

Or buy one of these http://www.ebay.co.uk/itm/New-AD9850-module-modest-capacity-AD9851-DDS-Function-Generator-up-to-40MHZ-/181094962939?pt=UK_BOI_Electrical_Test_Measurement_Equipment_ET&hash=item2a2a19d6fb (available from many different eBay suppliers) and connect it to your Arduino (not forgetting resistors to convert from 5V to 3.3V).
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up