Build Simple Frequency Meter Using Arduino

A frequency measurement tool or better known as frequency meter can be easily created using the Arduino. In fact, you simply take the time 5 minutes only to make it. The materials required just  Arduino board and a little jumper cable for the experiment. Great if you have a Frequency Generator create test the tool.

First, please download the frequency meter library here http://interface.khm.de/wp-content/uploads/2009/01/FreqCounter_1_12.zip frequency meter. Extract the file and copy it to the folder C:\Program Files\Arduino\libraries. Next, open the Arduino IDE (download at www.arduino.cc) and upload the following sketch to the Arduino board.

Frequency Meter Arduino Sketch


#include <FreqCounter.h>

unsigned long frq;
int cnt;
pinLed int = 13;

void setup () {
  pinMode (pinLed, OUTPUT);

  Serial.begin (9600); // Connect to the serial port
  Serial.println ( "Frequency Counter");

}

void loop () {

   FreqCounter :: f_comp = 10; // Cal Value / Calibrate with professional Freq Counter
  FreqCounter :: start (1000); // 100 ms Gate Time

  while (FreqCounter :: f_ready == 0)

  frq = FreqCounter :: f_freq;
  Serial.print (cnt ++);
  Serial.print ( "Freq");
  Serial.println (frq);
  delay (500);
  digitalWrite (pinLed,! digitalRead (pinLed)); // Blink Led

}

Subsequently connect the frequency source to pin 5 Arduino (see Arduino board then find label '5'). This pin is exclusively dedicated to the purposes of measuring frequency when using library FreqCounter.h. You need to note that the voltage level of the source frequency (frequency generator) should not be more than a working voltage of 5V as Arduino’s technical specs.

Finish. Very fast, right? :D. For view the frequency measurement results, simply open the Serial Monitor window via Tools | Serial Monitor menu in Arduino IDE. Then you wil read some value that corresponding with frequency measurement. I use this simple frequency meter to measure the frequency of electricity at home. The trick is very simple. From home electricity socket, derived it using a 12V transformer and then rectified by a diode just to get a half-wave rectifier. Next go to the resistor voltage divider to get the maximum voltage level of 5V, then insert into pin 5 Arduino. This simple circuit can also be used to test the frequency meter above if you do not have a frequency generator. Roughly the circuit is….

Electricity Frequency Generator Driver

So, this is the end of this brief tutorial, hopefully useful for you. It’s important to say, hat the key to the rapid manufacture in Arduino project is the large library that spread on the internet (e.g. frequency meter library for experiment above). You simply utilize and modify as necessary according to the needs of your project. For beginners / students, it will be pretty easy to learn Arduino and all of its function, and for the professionals will accelerate target achievement of a project.
Previous
Next Post »