With the continuous development of new energy technology, the photovoltaic system plays an extremely important role in people’s production and life, and new energy. As an indispensable part of a photovoltaic system, the battery voltage monitoring circuit plays a very important role. The voltage of the photovoltaic battery pack is usually relatively high. To ensure the safety of users and ensure that the controller is not affected by other adverse factors, this paper designs a voltage sampling circuit based on a high-precision linear optocoupler HCNR201. The detection circuit has strong electrical isolation characteristics and can monitor the voltage of two or more battery groups. In this paper, two groups of battery voltage monitoring using simulation and hardware test results proved that the voltage detection method has good linearity, and high accuracy, while the input and output of electrical isolation ensure user safety.