Frequency monitoring circuits are addressed in several varieties. A ''Zero-crossing detector '' is considered one of the most common methods due to its simplicity of design for periodic and regular signals. However, if the signal is aperiodic or irregular (contains a non-instantaneous zero period between pulses) zero-crossing cannot be used. In such cases a peak to peak frequency monitor is a desired alternative.

The peak-to-peak method is used with real-world analog signals, often originating from analog sensors. The design described in the following note uses a Dialog SLG46620V GreenPAK to calculate the low-end frequency for signals ranging from 0.5 Hz to 200 Hz and whose waveform width is between 100 -1000 ms. With a fundamental understanding of this application the peak-to-peak measurement of other analog widths and periods can be designed.

The GreenPAK SLG46620 IC comprises all parts of the peak-to-peak design. Thus, the IC is responsible for receiving an analog signal sample and storing identified peaks in an internal buffer. The GreenPAK is also responsible for comparing the measured time period between two peaks with internal thresholds to give a signal when these thresholds are exceeded.

The design is made up of one analog signal input and 4 outputs:

● PD: To give a pulse when the peak is detected.

● High PPM: Gives HIGH if the signal frequency exceeds the upper threshold.

● Low PPM: Gives HIGH if the signal frequency exceeds the lower threshold.

● Normal: Gives HIGH if the frequency is within the two thresholds.

The SLG46620V’s Analog-to-Digital Converter [ADC] macrocell provides a fit for peak signal detection. The SLG46620V, similar to other GreenPAK products, is a suitable choice when a low-power, cost-effective, small device is required that can substitute for a system of discrete ICs and passive devices. This unique blend makes the SLG46620 an ideal candidate for portable, cost-sensitive consumer products.

In this project, the general circuit is explained with the expectation that it will be augmented to fit a particular, real-world application. The results of the design utilize the GreenPAK Designer signal generator to test varied signals and display the corresponding output. Signals are generated at a higher and lower frequency than the values stored in the IC and the corresponding output for each case is displayed to confirm correct operation to the reader.

Below we described steps needed to understand how the frequency monitor has been programmed. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the device.

Design Overview

The detection process samples an analog signal using the ADC block, then stores it in an internal buffer. A new sample of the analog signal is then received and compared to the stored sample.

If the new sample's value is greater than the currently stored value, the analog voltage is increasing. The new sample is stored in the buffer and the next sample of the signal is received and compared. But, if the received sample equals the stored sample in the buffer, the signal is constant. At this point either it reached a short constant value but not reached the peak, or it has reached the peak, so the
peak state is only considered when the signal begins to fall.

If the next sample is smaller than the previous one stored in the ADC buffer, then a peak state is recorded. The process is repeated at another cycle to find the next peak. 

To calculate frequency, we calculate the time between two consecutive peaks, and this time is compared to certain thresholds that are pre-stored in the internal registers of the IC. If this time is greater than the higher threshold, the frequency is less than the allowed limit. If this time is less than the lower threshold,...

Read more »