A low-cost smart egg-incubator

Received Nov. 6, 2021 Revised Jan. 16, 2022 Accepted Jan. 27, 2022 Abstract Poultry is one of the most consumed agricultural produce in Ghana. Because of this high demand, the problem necessitates efforts to maximize the yield of poultry production in the country. Relying on natural means of hatching eggs to increase poultry production is inefficient thus the need for technologies that will aid in maximizing the yield. Artificial means of solving this problem have brought about the invention of the incubator. Although this has helped in large-scale incubation, incubators in the market are very expensive which makes Ghanaian poultry farmers find it difficult to purchase. This project investigates the design and implementation of an affordable, automated incubator for local poultry farmers. It is aimed at designing a low-cost smart incubator to ensure the maintenance of the optimum environmental conditions necessary for hatching eggs. These conditions: Ventilation, Temperature, Relative Humidity, regular positioning, and eggs turnings are kept at their optimal values to efficiently increase the hatchability rate. Temperature and humidity sensors are used to read temperature and humidity values inside the incubator respectively. These values are sent to a microcontroller which then coordinates other parts of the incubator to execute automated tasks. A mobile application is integrated with the incubator for the communication of important information to the poultry farmer.


Introduction
In Ghana, the demand for poultry meat is about 400.000 mt and the local production is just about 57.871 mt. The country's poultry meat import is currently about 180.000 mt (over USD 300 million annually) leaving a national demand shortfall of 162.129 mt. [1]. In the 1960s, the Government of Ghana (GoG) undertook an initiative to promote commercial poultry production. This resulted in the industry supplying about 95% of poultry meat and eggs in the country. Due to irregular supply of day-old chicks and outbreak of poultry diseases, growth was initially slow and broiler production has experienced a steep decline from 80% in 2000 to 10% in 2010 according to GoG sources [2]. Considering the high poultry meat import bill and the continuous decline in poultry production locally, the necessity arises to develop competitive and efficient means that will revitalize poultry farming and increase local production to reduce import bills and to contribute to employment creation. Broiler meat production has been identified as the fastest way to reduce meat imports. Rearing for Food and Jobs (RFJ) was initiated by the GoG in 2019 purposely for self-sufficiency in meat production. About GH₵500 million (USD 87 million) has been invested to support broiler production revitalization according to Ghana's Agricultural Development Bank [3]. Artificial incubation technologies must come into play if this broiler production revitalization exercise is to yield effective results. Artificial incubators are used to hatch a larger number of eggs at a time. This increases the supply of day-old chicks, but these incubators are not widely used in Ghana. They are used by a few major poultry organizations. The available incubators are mostly too expensive for the local farmers. This paper focuses on the design of a low-cost automated egg incubator (digiIncubator) which is highly efficient with a high hatchability. The project aims to maintain temperature and relative humidity at optimum values within the incubator chamber to achieve a higher hatchability rate. The relationship between heat and temperature is used to model the system. The system is well ventilated, while proper and periodic turning of eggs on all levels in the incubator chamber is ensured. Electricity is used to provide heat in the incubator by mean of electric bulbs.

Related works
In artificial incubation an Egg Incubator is used to provide the conditions that the brooder hen in nature gives to the eggs it broods on. These conditions need to be reproduced to nearly the same levels for the fertile eggs in the incubator to develop and hatch [4,5]. According to [6] and [7], conditions that need to be controlled to ensure proper incubation of a fertile egg are temperature, humidity, turning of eggs and ventilation. The idea of artificial incubation has always been practiced by human beings since the time of the Egyptian empire and Chinese dynasties around 200BC [8]. During this time, the type of incubation used was manual which meant it was totally depended on human beings. Temperature changes were affected in the incubator by moving the eggs, adding additional eggs to use the heat of embryological development of older eggs, and by regulating the flow of fresh air through the hatching area. Shittue, Muhammad and Jimoh [9] used dht11 sensor in reading the temperature and humidity of the ambient. The dht11 is known to be an inaccurate temperature and humidity sensor as it is incapable of sensing fractional changes in temperature, thus for a system like the incubator which needs accuracy in temperature and humidity reading this sensor is not suitable [10]. Despite this, they had good ventilation system. The system has a mechanical and an electronic part. The mechanical part angularly tilts the egg trays up and down alternatively and hourly, using a dc motor and limit switch sensor for angular movement control. The electronic part comprised of the microcontroller, sensors, and LCD display. Data from the sensors were processed by the microcontroller and the various control elements were activated to moderate the conditions in the incubator [11] used image recognition to detect the fertility of eggs. Cameras used in capturing images increased the cost of the incubator. The incubation process was autonomous with respect to humidity and temperature control. An Arduino microcontroller interfaced and coded with LabView software was used. [12] worked on designing a smart incubator in which they used a nodeMCU as the wireless communication module for logging the necessary data to the cloud. It was realized that incorporating an incandescent lamp as the heat source reduced substantial power consumption as against using an electric heater. High efficiency fans were used to circulate the heated air within the chamber to maintain even temperature. A humidifier was used to maintain the pre-set humidity in the chambers of the incubator structure. A standard, widely available 16x2 LCD display unit was integrated into the electronic module that was used as a display unit. The outputs from all the sensors were connected to the heart of the incubator, which gave the command to power on or off the desired peripheral connected to it, as deemed fit. A redundant battery was also connected as a power backup during electrical power failures. IoT and nodeMCU were used to integrate on the smart phone that provided the overall monitoring and configuration to the user.

Digiincubator system architecture
As shown in figure 1, the system architecture has three main parts: Smart Incubator (SI), the server (SVR), and the mobile software application (digiINCU). The SI is the whole incubator with sensors, microcontroller, and wireless communication modules. These components are grouped as a unit, making the embedded hardware. The sensors are responsible for collecting the system essentials, temperature, and relative humidity of the incubator chambers. These sensors read the temperature and relative humidity values and send the values to the microcontroller. The data received from the sensors is sent to the server via the wireless communication medium to be displayed to the user on the mobile software application (digiINCU). The microcontroller sends processed data to LCD for display. With this data, the microcontroller sets other working limits within which the incubator works optimally. The SVR is the point of communication between the incubator and the digiINCU. The server acts as the data storage and exchange point between the hardware and mobile application. The digiINCU retrieves data sent from the incubator to server and makes same available to the user. Via the digiINCU a user can remotely control the activities of the SI when deemed necessary. The data is then sent to the microcontroller to use in regulating the system parameters.

DigiIncubator hardware block diagram
The digiIncubator hardware block diagram illustrates the interconnection of the various hardware components that function together to accomplish the incubation process. At the start of the system by pressing the power button, the power from the source is regulated by 12volts AC/DC converter to prevent excessive power supply to the microcontroller. The LED comes on to indicate that the system is powered up and ready. To select the type of egg to incubate, the user of the hardware uses the keypad to input the desired selection. The preset optimal environmental parameters associated with the selected egg type are then set. The DHT22 sensor, used to read the humidity and temperature of the atmospheric conditions of the incubator's ambient, reads these values and sends the data to the microcontroller. The microcontroller use the received data to perform logical operations based on which it regulates the relays connected to the electric bulbs, electric fans and the electric motor. The electric bulb is turned on when the temperature within the incubator chambers is below the optimum temperature for the particular egg being incubated and is turned off in the reversed situation based on the signal from the microcontroller to the connected relay. The electric motor is turned on and off periodically to supply the torque required by the turning mechanism to turn the eggs. To ensure that the air within the incubator is evenly spread and the relative humidity uniform, electric fans are installed in the incubator. The data collected by the sensors together with other operating data and alerts, are sent by the microcontroller via a wireless module to the mobile application of the user's smart phone. The data is also displayed on the LCD to a user near the incubator system setup. Fig. 2 depicts graphically, the block diagram of the incubator system.

DigiIncubator system workflow
The system workflow as shown in Fig. 3 is the sequential stages that the incubator system goes through to accomplish its desired purpose of hatching eggs. When the system is turned on the type of egg to be incubated is selected by the user via the mobile application or by using the keypad on the digiIncubator, the necessary parameters associated with the selected egg are then sent to the microcontroller and the incubation begins. Two workflows, the Sensor Workflow (SWF) and the Timing Workflow (TWF) are then initiated simultaneously.

Sensor workflow (SWF)
As shown in Fig. 4, the temperature and relative humidity data read from the incubator's ambient is compared with the optimum values associated with the particular type of egg being incubated. For instance, the optimal values for chicken eggs are 37.8℃ and 60% relative humidity. When the temperature read by the sensor is lower than the optimum temperature value, the electric bulbs are turned on to supply heat to increase the temperature within the incubator otherwise the electric bulbs are turned off to prevent further heating and to lower the temperature. Likewise, a check is performed to determine whether the read relative humidity is less than the optimum relative humidity. When the read relative humidity is less, an alert is sent to the user to request the addition of water to the water-bowl. The collected ambient data is sent to the mobile application on the user's smart phone. In the timing workflow (TWF), as shown in Fig. 5, the number of days required to incubate the selected type of egg is sent to the microcontroller when the egg is selected. The electric fan is turned on and a timer to regulate the periodic turning of the eggs is set. A check is performed to determine if the time equals turn-time. If this condition is true, the eggs are turn and the time is reset. A check is also performed to determine if the number of days of incubation equals the number of days required for the incubation process. If this condition is true, the fan is turned on and the incubation is halted otherwise, the system continues operation and the checks are repeated.

DigiIncubator system design
The digiIncubator system is modularly designed. Each part is separately designed and the individual parts are later put together to form the complete incubator system. The individual parts of the incubator ie. Tray support, Door panel, Back panel, Side panel, Top and Bottom panels and their functions are as described in table 1. The digiIncubator system was designed with wood and this helped achieve low heat loss thus saving energy, ensuring proper ventilation, and making it low cost. The tray support is considered as the skeleton of the incubator structure. It is the frame that supports the trays on which the eggs are placed in the incubator chamber and is made of a vertical frame to provide stability, tray holder to hold eggs during incubation, nobs which connect the trays to the vertical frame and a moveable bar which connects the tray holders together for the movement.

Door panel
The door panel is the opening and close to the incubator structure. It has a transparent window which is made from any transparent material which has the capacity to withstand heat energy for long hours. The transparent window enables sight into the incubator during incubation without having to open the incubator. It has a position for locker to lock the incubator from outside interference. The transparent window enables sight into the incubator during incubation without having to open the incubator. It has a position for locker to lock the incubator from outside interference.

Back Panel
The back panel is intended to cover the dimensions of the tray support, the wedges on the side panels and the thickness of the side panels. It has perforations for proper ventilation of the incubator.

Side Panels
There are two side panels, respectively, the left panel and the right panel to enclose the sides of the incubator structure. There are two wedges (labelled A) on both the left and right panels. These wedges support the tray support structure and creates a space between the tray support and each side panel.

Top and Bottom Panels
These panels enclose the top and bottom of the incubator structure. The top and bottom panels are of the same design and dimensions. They are thick pieces of wood.

DigiIncubator electrical wiring
As shown in Fig. 11, the digiIncubator electrical wiring depicts how the various electrical components are connected in the incubator. It basically illustrates how electrical power is supplied to the electrical components. This diagram gives an overview of how the power supply from the main source is distributed to the electrical components based on the power rating of each component.

H = I 2 x R x t. (1) The amount of heat energy generated is given by the electrical power dissipated for time t as H = V x I x t = P x t (2)
From, the Joule's equation of electrical heating, it is realized that the higher the voltage and resistance rating of the heating element of choice, the more effective it is to attain the optimum temperature required for the incubation of fertile eggs.

DigiIncubator mobile application software (digiINCU)
The digiINCU mobile application software allows the farmer to monitor the incubation process remotely, at anywhere and at any time desired. The requirements of the mobile application were inspired by the objectives of the project. The functional requirements of the digiINCU mobile application give a detail description of what the application should do. This section presents the user requirements and other requirements others. The functional requirements of the digiINCU mobile application software are as follows: • Provide a login functionality to the farmer.
• Display a dashboard of successfully logged in users.
• Display any other information about all the incubators associated with the system.
• Provide QR -code for logged in users who have not yet added any incubator and others wanting to have multiple incubators. • Provide database logging functionality for users. The non-functional requirements of the digiINCU are: • Performance: This refers to how fast the mobile application respond to user inputs.
• Security • Ease of use. Fig. 12 depicts the digiINCU Software usecase diagram. When a user successfully logged in, the user is redirected to the home screen only if he already has some registered incubator(s). Otherwise, he is redirected to the 'Add Incubator' screen which shows the QR-code scanner for the QR-code provided on the incubator. As shown in Fig. 13 at the start of the digiINCU mobile software application, the application checks for the authenticity of the user. If the check fails, the user is directed to login but if successful user is allowed access to the application. The authenticated user is redirected to the home screen if he or she has registered some incubator(s) already but if the user has not added an incubator yet, the person is redirected to a screen where he is presented with a QR-code scanner. He can then scan the QR-code provided on the incubator. After a successful scan of the code, he is then presented with the home screen of the application where he has access to all the details of the incubator. The user monitors the incubators from the application's dashboard and can logout any time deemed necessary. Figure 13. digiINCU activity diagram

Test and evaluation
The digiIncubator test setups are as shown in figures 14-16. The system was powered on and left for some hours. During the period of testing, the setup was analysed for accuracy in measurement of its ambient, its ability to regulate its internal environment to desired levels, the ability to turn-on on its own, the ability for it to log data to the cloud and its ability to receive commands from a user with the digiINCU mobile software application. Figure18. Sign in page with Google Oauth Figure 19. Add incubator screens A single mobile application could be used to monitor multiple incubators used by a farmer as shown in Fig.20. By the operation of the system, anytime there is a change in the temperature or humidity of the incubator ambient, an HTTP post request is sent to the cloud. This request contains the recent data changes in incubator system. Data representing values of the incubator ambient are retrieved by the digiINCU mobile software application in real time. The table 2 shows sample data sent to the cloud platform via ThingSpeak during the testing period. The ambient conditions recorded by the system is shown in a form of graphs in Fig. 21.

Conclusion
This project was initiated to solve the issue of expensive egg incubators in Ghana. It was observed that the expensive incubator problem prevented many farmers from patronizing incubators to increase the number of eggs that are hatched in their farms. This paper researched, implemented, and tested an efficient incubator that is less expensive and smart. The system proved smart by being able to monitor, report and automatically regulate its internal environment within the required limits without the farmer's presence and periodically turn eggs inside of it as such, ensuring that the eggs were well incubated thus producing high hatchability. In all this, the price of the incubator remained low as compared with incubators in the market. This work contributes to the Sustainable Development Goal (SDG) Number 2'. Future works on this would investigate adding an ecofriendly and cheap power source such as solar power to the system so that farmers in areas with unstable power supply can use it.