In the interest of the smart factory, automatic production systems are always developing new technologies to increase productivity and safety. Numerous studies have been conducted on the automation of filling machines in the packaging sector. Specifically, in the dangerous chemical business, automatic liquid (drum) filling machines serve mostly for packaging goods into drums following the production process. With the majority of filling machines on the market today, the operator may simply adjust the injection capacity to the standard drum and open the drum lid to inject the product directly. But there's a challenge in accurately calculating the liquid's volume. If the liquid filling equipment is not calibrated correctly, problems might arise, such as overflowing the fluid or chemicals becoming exposed to the elements. In order to address the aforementioned problems, we present in this study a liquid level control injection nozzle device. The suggested automated injection nozzle has the ability to elevate the nozzle in accordance with the liquid level in order to eliminate bubble and inject the precise amount of fluid. We discovered through testing with the designed injection nozzle device that the goal value was surpassed for injecting capability, nozzle position, reaction time, and building data correctness. It is anticipated, therefore, that the invented filling machine would increase output and decrease human labor without endangering the chemical packaging sector.