Project tutorial
DIY 6.5MHz Frequency Meter with MAX7219 7-Segment LED Module

DIY 6.5MHz Frequency Meter with MAX7219 7-Segment LED Module © GPL3+

A very simple but useful device for your lab.

  • 6,113 views
  • 1 comment
  • 13 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
Max 7219 8 digit 7 Segmend Led module
×1
Fairchild semiconductor pn2222abu. image
General Purpose Transistor NPN
×1
Fairchild semiconductor 1n4148 image
1N4148 – General Purpose Fast Switching
×3
4 resistors
×1
Capacitors
×1

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

A frequency meter is an instrument that displays the frequency of a periodic electrical signal. The video shows such an instrument where the value of the frequency is displayed on a 7-segment LED display in retro style, which is also very noticeable.

It can measure the frequency of signals with rectangular, sinusoidal and triangular shapes. Its measurement range is from a few hertz to 6.5 Megahertz. The code is simple thanks to "FreqCount" and "LedControl" libraries. The device consists of several components:

- Arduinio Nano microcontroller

- Shaping amplifier board

- 8 Digit 7 Seg Display

- and input jack

if (typeof(lightBoxImages) == 'undefined') { lightBoxImages = {}; } lightBoxImages['914a434e3e'] = [{ URL: 'https://hackster.imgix.net/uploads/attachments/1223753/dscn2639_feAGUBjjam.JPG?auto=compress%2Cformat&w=1280&h=960&fit=max', caption: '', type: 'image' }];

If we measure the frequency only on rectangular signals, then the input circuit (shaping amplifier) can be omitted, in which case we carry the signal directly to the D5 pin of the Arduino. The instrument is very precise in the whole range, and we can also calibrate the frequency meter with the simple procedure described below:

In the Arduino libraries folder find the FreqCount library,

in the FreqCount.cpp file find the lines:

#if defined (TIMER_USE_TIMER2) && F_CPU == 12000000L

float correct = count_output * 0.996155;

and replace them with:

#if defined (TIMER_USE_TIMER2) && F_CPU == 16000000L

float correct = count_output * 1.000000;

where 1.000000 is your correction factor, the

correction must be carried out by applying 1 MHz to the input of the frequency meter.

After changing the file, upload a new sketch to the Arduino board. Finally, the frequency meter is built into a suitable plastic box and is another useful instrument in the electronic laboratory.

Code

Arduino CodeC/C++
#include <LedControl.h>//https://github.com/wayoda/LedControl/archive/master.zip
#include <FreqCount.h>//https://github.com/PaulStoffregen/FreqCount/archive/master.zip
LedControl lc = LedControl(12,11,10,1);// DIN(12), CLK(11), CS(10)

unsigned long f;
byte fq[7],pd=false;

void setup() {
  lc.shutdown(0, false);
  FreqCount.begin(1000);
  lc.clearDisplay(0); 
  lc.setIntensity(0,8); 
}

void loop() {
  if (FreqCount.available()) {f = FreqCount.read(); }
  lc.setRow(0,7,0x47);
  fq[6]= f/1000000%10;
  fq[5]= f/100000%10;
  fq[4]= f/10000%10;
  fq[3]= f/1000%10;
  fq[2]= f/100%10;
  fq[1]= f/10%10;
  fq[0]= f%10%10;
  for(int i = 0;i < 7;i++){
  lc.setDigit(0,i,fq[i],pd);
  }
}

Schematics

Schematic
Schematic wk38r2s5av

Comments

Similar projects you might like

DIY Simple Frequency Meter Up to 6.5MHz

Project tutorial by Mirko Pavleski

  • 12,327 views
  • 6 comments
  • 19 respects

DIY Simple Autorange Capacitance Meter (10pF-10000microF)

Project tutorial by Mirko Pavleski

  • 10,864 views
  • 9 comments
  • 20 respects

DIY Autorange Ohmmeter

Project tutorial by Mirko Pavleski

  • 6,305 views
  • 1 comment
  • 12 respects

DIY FFT Audio Spectrum Analyzer

Project tutorial by Mirko Pavleski

  • 20,927 views
  • 2 comments
  • 21 respects

DIY Audio Signal Spectrum Analyzer

Project tutorial by Mirko Pavleski

  • 5,083 views
  • 0 comments
  • 10 respects

DIY Miliohmmeter for Measure Low Value Resistances

Project tutorial by Mirko Pavleski

  • 4,579 views
  • 1 comment
  • 11 respects
Add projectSign up / Login