Radiofrequency ablation is a minimally invasive procedure in which tiny radiofrequency electrodes are implanted into the diseased tissue under the guidance of medical imaging (X-ray imager, CT or ultrasound), and neutral electrodes are attached to the skin of the body to carry out radiofrequency ablation, which is carried out by forming a circuit through the human body to the diseased tissue. At present, RF ablation can be applied to lung tumors, liver tumors, kidney tumors and certain heart diseases. The core component of tumor RF ablation surgery equipment is RF power source, which is a fixed frequency sinusoidal AC output signal with a frequency of 400-500Khz. The detection technology of RF voltage is extremely important, which determines the accuracy of RF ablation energy output and energy control. In this paper, we use STM32 microcontroller as the core of acquisition and control, and propose a simple and practical sampling method with high accuracy. Moreover, we have realized to control the voltage measurement error below 1% by using the error curve fitting method for software calibration.