Abstract:In order to effectively monitor and control environmental factors and meet the development trend of large-scale and intensive farming, we design a pig house environmental monitoring system based on the Internet of Things. The system adopts STM32 single-chip microcomputer as the main control module, and uses ESP8266 wireless module to realize network communication, sensor module and relay control module. The sensor module is designed to monitor the light, temperature, humidity, PM1.0, PM2.5, PM10, carbon dioxide, ammonia gas, hydrogen sulfide, etc. in the pig house environment in real time. Environmental factors such as harmful gas concentrations, using the OneNet cloud platform to deploy servers in the cloud. The practical application results show that the real-time monitoring of environmental information can be realized on the Web side, and the pig house environment can be remotely adjusted by sending instructions from the host computer. The system can effectively protection of animal welfare, and will improve the automation degree of pig breeding.