Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to measure the frequency of waveform with peak-to-peak value of 17V with 5 1 single chip microcomputer? Of course, the waveform contains negative voltage. ...
How to measure the frequency of waveform with peak-to-peak value of 17V with 5 1 single chip microcomputer? Of course, the waveform contains negative voltage. ...
Do you want to use a diode or something to measure the frequency? Save it. It's no joke when the frequency is high.

1. First, the signal is conditioned and shaped, and the amplitude is reduced to 5V peak-to-peak through proportional amplification. After 2.5V adder, it is compared with 2.5V reference voltage (voltage comparator) to form a square wave, and then the signal is shaped by two inverters to make the waveform more ideal.

2. Use the counter 74HC 16 1 pair 16 for modulo counting, and send the output value to the single-chip counter (C/T, external counting mode).

3. The sum of the external values of the counter read from the internal count value of the single chip microcomputer * 16+ is the frequency.

4. The signal frequency should be estimated in advance. If the frequency span is large, two channels, high frequency and low frequency, should be set. The low-frequency channel is calculated by periodic measurement method, and the high-frequency channel needs two or more stages of analog-to-digital 16 conversion when necessary, and then it is sent to the single chip microcomputer. Generally, 5 1 single chip microcomputer can easily measure the frequency range of 0. 1Hz- 10MHz.

The most troublesome thing is that the amplitude range of the waveform is very large, such as 10V to 10V, which is a headache.