Challenges including difficulty in cleaning and low measurement accuracy widely exist in traditional methods for measuring moisture in crude oil. In order to solve these problems, a capacitance measurement device that combines PCAP01 and STM32 has been designed. PCAP01 is employed as the processing core of the sensor, which significantly enhances the measurement accuracy of capacitance-based methods. As to STM32, it plays a critical role in data acquisition, signal processing, and data transmission. Besides, the capacitancebased device contains two symmetric half-cylindrical electrode plates that are closely attached to the outer wall of the cylindrical glass vessel, where the crude oil sample to be tested is contained. This design prevents the direct contact between the liquid sample and the electrode plates, thus eliminating issues related to cleaning difficulties. Time-frequency domain expansion is presented to realize the fit between moisture and the capacitance. Experimental results indicate that the designed system delivers a high accuracy across the entire 0-100% range.