2. Set the voltage following circuit. As long as this circuit is buffered and isolated, it can be guaranteed that the following circuit will not affect the voltage in front. The magnification of the voltage following circuit is always less than or close to 1 times.
3. If there is a negative voltage, it is necessary to use an operational amplifier circuit for bias processing (generally using an addition circuit) to make all voltages above 0V, that is, to become a positive voltage of 0-5V.
4. Send the processed voltage to ADC for sampling (the accuracy of ADC needs attention! ), the single chip microcomputer uses the data sampled by ADC to calculate the frequency and amplitude of the fundamental wave of alternating current, so that the waveform of this alternating voltage can be measured and the voltage can be calculated.