Welcome, Guest
Username: Password: Remember me

TOPIC: Audio: Frequency Detector

Audio: Frequency Detector 4 months 1 week ago #1867

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 695
  • Thank you received: 146
  • Karma: 41
This frequency detector code is originally developed by Nicole Grimwood. All credit to her.
You can find all the info and details about this code on www.instructables.com/id/Arduino-Guitar-Tuner/

There are several codes online to detect frequency using Arduino, this is the best I have found so far, but I am sure that are many more around.
It works pretty well up to 500Hz, after that is not that good the original code gives you the reading through the serial port, it would be interesting to compare the screen and the serial output.

There is an online frequency generator here:
www.szynalski.com/tone-generator/

I had modified the original Nicole code to represent in the 16x16 LED display the frequency read in the A0 input.
  • If the read is not accurate, try using the Gain potentiometer (if the signal is too big or too small the program will misbehave)
  • Make sure that you have a good power supply. I have found that sometimes does not work properly if running on USB power. I guess that you can create some ground loops that make the system unstable
  • There is a "counter" variable in the code that can make the code work differently
    if (counter==20)
    . It delays the display representation, you can experiment changing it to a different value
    if (counter==50)
    or
    if (counter==10)
    etc
  • The detected frequency can be also read in the serial monitor

Hope you enjoy it!

File Attachment:

File Name: frequency_detector.zip
File Size: 8 KB



freq_detector.jpg
Last Edit: 3 months 6 days ago by Ray.
The administrator has disabled public write access.
Time to create page: 0.630 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio