Water quality testing starts with sampling. Traditional methods may cause water quality properties to change due to the limitation of sampling methods. In addition, it is difficult and risky to take samples in parts of special terrain, such as ravines and swamps, where manpower is difficult to reach. To this end, we combine a single-chip machine STM32-based sampling device with a UAV that can span complex terrain to solve the above problems. The characteristics of water quality without human intervention and equipment automation are of great significance.