Pages: 1 2 [3] 4 5   Go Down
Author Topic: Read a freqency from an analog pin  (Read 3545 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can make for me a correct program with this library?

Yes, if you pay me.  £100/hour.  Will it do what you want?  Who knows?  We still don't really know what you want it to do.  Do you really know what you want it to do?
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to read frequency. It's simple.  smiley-eek
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What do you want to read frequency using?  What is the form of the signal?  What is the range of frequencies you are interested in?  What do you want to do with those frequencies when you have read them?
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A microphone read frequences. If sound is below, blink  a led. If sound is sharpen , blink another led. That is all.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What amplification have you got between the microphone and the Arduino?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Edison Member
*
Karma: 33
Posts: 1481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is not that simple. A microphone reads *all* frequencies. If you know there is only *one* frequency, you can amplify the signal to clip and become a square wave and use the pulse measurement technique mentioned earlier. If the signal is buried in noise, you might have to use an FFT to resolve it.
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A microphone read frequences. If sound is below, blink  a led. If sound is sharpen , blink another led. That is all.
You still haven't answered our questions.

What are you getting the signal with?
 - Please provide schematic

What is the format of the signal
 - Oscilloscope traces would be best, or describe the signal in detail

What frequencies are you interested in?
 - Is the signal a single frequency (sine wave), and what is the minimum / maximum frequency?
 - Is the signal a composite signal, and you are interested in a "peak" frequency within the background noise?  If so, what is the minimum / maximum frequency?

Until you provide this basic information we cannot help you.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Full Member
***
Karma: 4
Posts: 187
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't need the full code. I want only a line , wich read frequency...
Please help. 

Try this
http://interface.khm.de/index.php/lab/experiments/frequency-measurement-library/
http://www.arduinoos.com/wordpress/?p=1022 smiley-cool
Logged

From Idea To Invention

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The microphone is connected to Analog 0. Max frequency is 20 Mhz. I separe in 2: "<1Mhz" and ">1Mhz" . Then i have 2 LED's. If first conditional is true, blink first led. If second condisitonal is true, blink the second led.  smiley-lol


Thanks in advance.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The microphone is connected to Analog 0. Max frequency is 20 Mhz. I separe in 2: "<1Mhz" and ">1Mhz"
Please, get real.

Everything will go in the <1MHz category.
« Last Edit: November 15, 2012, 07:42:14 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5757
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The microphone is connected to Analog 0. Max frequency is 20 Mhz. I separe in 2: "<1Mhz" and ">1Mhz" . Then i have 2 LED's. If first conditional is true, blink first led. If second condisitonal is true, blink the second led.  smiley-lol

You have a microphone that works up to 20mHz? How much did it cost you?
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You have a microphone that works up to 20mHz?
Normally, that would be a seismometer, and we would say "down to"   smiley-cool
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You have a microphone that works up to 20mHz?
Normally, that would be a seismometer, and we would say "down to"   smiley-cool

I think he means megahertz, not millihertz smiley-razz
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Values are fictive. I want to separe 2 frequences. (frequences from microphone)  smiley-eek
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 37
Posts: 1096
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at this, a library and examples:

http://www.avdweb.nl/arduino/hardware-interfacing/frequency-period-counter.html
Logged

Pages: 1 2 [3] 4 5   Go Up
Jump to: