Biogas is a chemical compound with the formula NH3, ammonia, one of which can be produced by cow dung. Cow manure needs to be taken care of so it does not interfere with human health. For this reason, a manure reservoir is needed to anticipate the spread of ammonia gas produced by the cow manure. This study aims to control cow dung using the Internet of Things through ultrasonic sensors and gas levels. A biogas control prototype tool has been made using the MPX 5700 sensor to detect gas pressure, the MQ-137 sensor to detect gas levels, and the HC-SR04 ultrasonic sensor combined with an active buzzer alarm to detect the level of fullness during filling. This prototype data processing uses Arduino Uno and Node MCU esp8266 as a link to the internet network to make it easier to send data. Then, the results are displayed on the website and the LCD. The solenoid valve component opens the gas channel cover and sewage channel. The results obtained from the aquarium water level obtained an average value of 7.8%, and it reached 2.44% for gas pressure. The ultrasonic sensor can automatically measure cow dung's filling height in the shelter. Moreover, the MQ137 gas level sensor is able to detect more than 25 ppm of the standard limit for spreading ammonia gas levels in the air. Keywords: biogas, cow dung, biogas control prototype, internet of things.