Guinea pig breeding is an important livestock activity in Peru, since its consumption provides great nutritional value to humans; however, its production has been affected mainly by two factors: first, the lack of hygiene in the guinea pig sheds generates salmonella, which enters the guinea pig's body through the consumption of contaminated food and generates a rate of mortality from 15% to 18%; secondly, the excesses of temperature in the environment generate stress in the guinea pigs, where they end up dying and therefore the offspring are affected. For these two reasons, the automated design of a cleaning machine and an environmental temperature controller for guinea pig sheds was proposed, with the aim of optimizing the time of farmers and obtaining an ideal habitat for raising guinea pigs. The results obtained from the system are the programming and simulation of the cleaning machine through the Factory 10 software, where the process ends with the storage of its excrement, which can then be used as fertilizer; On the other hand, a temperature controller was established that ranges between 24 degrees C and 26 degrees C, which were determined as ideal temperatures of the environment in which guinea pigs should be raised, said implementation was carried out through programming and simulation in the LabVIEW software.. Then, this research presents a novel solution to the various problems mentioned above.