DIY 2.5Ghz counter with AVR

Counters that can go into gigahertz range can be pretty expensive so you might want to consider DIY solution if your measurements are not critical. Of course since we are dealing with extremely high frequency the quality of the build depends highly on your skills. Care must be taken with PCB manufacturing, component placement, screening and shielding, noise sources, etc.

This is a project of a counter built around AT90S8535 microcontroller and it measures both the frequency of the input signal and it’s strength. The values are display on a LCD, the signal strength is shown dBm units and as a bar-graph. Also you can use it with an external 10Mhz clock, in this mode on LCD will be displayed the letter “E”   in the left upper corner and “I” when internal clock is used.

Since AVR microcontrollers have synchronous counter input, the law says the maximum input frequency should not exceed half the clock frequency. Even so 2.5Ghz is way too high for the microcontroller to handle, so a prescaler that divides that frequency to a measurable one is needed. The input impedance of the prescaler is set to 50 ohms, the signal is amplified by 20dB and then fed into a two way splitter. One way goes to the Analog Devices AD8314 log-detector for signal strength measurement.

The other way goes to the first divider, MC12095, set to divide by 2. Putting pin 6 (SW) to ground would set the dividing factor to 4. MC12095 can accept 2.5Ghz input frequency. The output resistor increases output power and keeps impedance at 50 ohms, the parallel 2pF capacitor is for impedance matching. The next divider, SAB6456 can be set to divide by 64 or 256, in our case 64 is used by leaving pin 5 (MC) unconnected.

The divider’s output is then gated with nand gates and reaches a 4020 counter. AVR counter works on 16 bits and with 14 bits from the 4020 we get a 30 bits counter. The source code for the microcontroller is writen in Bascom and you can find it in the link for download. A test is presented with a 500Mhz signal but i was  curious if it can really go far up to 2.5Ghz. Let me know if you build it and test it.

DIY 2.5GHz Counter with AVR: [Link]