Home > Other >Special Application Circuits > How to Design an Automatic IoT Egg Incubator Using ESP8266

How to Design an Automatic IoT Egg Incubator Using ESP8266

Source: InternetPublisher:super_star Keywords: Internet of Things Incubator ESP8266 Updated: 2024/12/24

Basically, it is similar to the type of incubator that can replace poultry and automatically hatch eggs. It will help farmers to automatically hatch eggs without the need for human intervention by maintaining physical quantities such as temperature and humidity at the required levels so that the eggs can grow and hatch without the presence of the mother.

Furthermore, incubators not only significantly increase poultry production but also help increase the regularity of income, allowing farmers to transition to possible rural entrepreneurship.

This project uses Cavy IoT-DevBoard (firmware) and CavyIoT platform as a service.

With the help of the control panel, we can

Monitor real-time sensor data in graphs, charts, and gauges .

Controls all incubator operations.

Set up triggers to automatically process incubators from a remote location.

All operations of the incubator were recorded for further analysis.

Convert log files to PDF and JSON formats.

AUTO and MANUAL operating modes can be selected.

Prerequisites:

Register an account on the CavyIoT developer website.

The ESP8266 board is installed in your Arduino IDE.

If you have not registered, please register your account at https://www.developers.cavyiot.com with your valid email ID , it is free. After successful registration, you will get an email verification code at the registered email address within five minutes. Log in with your registered username and password. And verify your email. After verification, you will get a free Demo device, which is valid for 1 month. (You can see the Demo device in your customer area)

Follow this step if you don't have the ESP8266 board installed in your Arduino IDE. The ESP8266 community has created a plugin for the Arduino IDE that allows you to program the ESP8266 using the Arduino IDE and its programming language. Launch Arduino and open the Preferences window. Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. Open the Boards Manager from the Tools > Board menu and find the esp8266 platform. Select the version from the drop-down box. Click the Install button. Don't forget to select your Node MCU 1.0 (ESP-12E module) board from the Tools > Board menu after installation.

The project consists of 4 steps

first step

About how to flash the CavyIoT firmware using Arduino IDE in NodeMCU to convert it into a CavyIoT-DevBoard.

Step 2

Describes in detail how to:

Connect CavyIoT-DevBoard with Arduino.

The data of sensor DHT11 and servo angle are sent to the server through Dev-Board.

Upload the IoT- Incubator.ino sketch.

Step 3

How to control the device from the control panel and how to set up automation triggers.

Step 4

Complete the project with the shell arrangement.

Let’s get started now!

Step 1: Flash the firmware over the Internet using http-update.

Download the library file. Do not unzip the downloaded library, keep it as is.

In the Arduino IDE, navigate to Sketch > Include Library > Add.ZIP Library. At the top of the drop-down list, select the Add.ZIP Library option.

Then select the downloaded ZIP file and click Open.

Go back to the Sketch > Include Library menu. You should now see the library at the bottom of the drop-down menu. It is ready to use in your sketch. The zip file will be expanded in a libraries folder in your Arduino sketch directory. The library will be available for use in sketches, but for older IDE versions the examples for the library will not be exposed in File > Examples until the IDE is restarted.

Upload the ESP8266-httpupdate sketch In the Arduino IDE, navigate to File > Examples > CavyIoTdevelopmentBoard-master > ESP8266-httpupdate and open this example sketch.

Then select the board and COM port correctly . In this example, select NodeMCU.

poYBAGL1-l-ADHkUAAIJ7d74gR4175.png

Don't forget to select your "NodeMCU 1.0 (ESP-12E Module)" board

Before uploading the ESP8266-httpupdate.ino sketch, you will need to replace the Wi-Fi SSID and password with your own.

After finishing uploading open the serial monitor (Baud Rate: 9600, NL and CR) and reset the NodeMCU and wait for 2 minutes for flashing to finish. You will see the output on the serial monitor as shown below:

poYBAGL1-luAXnFqAAG_ulPTOL0535.png

poYBAGL1-liAfxr2AAOS0m5v4PI808.png

Now have your own CavyIoT-DevBoard!

Step 2: Interfacing with Arduino

Arrange the circuit as shown below.

poYBAGL1-lKAZ8J_AAKHXsw35hM707.png

IoT Incubator Circuit Connection

Circuit Description:

Arduino, development board connection

Arduino pins 10, 11, 13 are connected to Tx, Rx, rst of the development board.

Arduino, Sensor and Servo Connections

Arduino Pin 9 is connected to the servo control.

Arduino Pin 8 is connected to the data pin of DHT11

DevBoard, four-channel relay connection

Development board index pin 0 (D2 of NodeMCU) to IN1 of relay board

DevBoard Index Pin 1 (D5 of NodeMCU) to IN2 of Relay Board

Development board index pin 2 (D6 of NodeMCU) to IN3 of relay board

DevBoard Index Pin 3 (D7 of NodeMCU) to IN4 of Relay Board

Relay connection

Relay 1 controls the bulb 100W (heat source)

Relay 2 controls the humidifier

Relay 3 controls the fan

Relay 4 controls Ex-fan

power supply

Arduino UNO (5V via USB)

Development Board (3.3 V)

Relay Board (5V)

Light bulb 100W (240 V AC power supply), via Relay1

Humidifier (240 V AC power) via Relay2 (assuming this has a built-in adapter)

2 PC fans (12 V DC 1 Amp) via Relay3 and Relay4 one for air intake and the other for exhaust.

Note: The power supply for the NodeMCU and Realy Board is shown in the schematic as being driven by the Arduino for convenience, but I recommend using a separate power supply to avoid USB power load.

Don't forget to replace your Wi-Fi SSID and password and CavyIoT credentials in the sketch.

Open the serial monitor and look at the output. If it looks like this, the device you made is working fine. (Reset the Arduino UNO if needed).

pYYBAGL1-kyAQnQHAAFbkI4YC2I401.png

Arduino Serial Output

Login to CavyIoT and operate from control panel. Check all buttons weather they are working properly.

To check the servo functionality, I recommend checking the one minute servo router timer by uncommenting lines 23, 80, and 81.

Incubator control panel

poYBAGL1-kiAKQHBAAIMevBHlDw652.png

control Panel

Step 3: How to set up automation triggers.

pYYBAGL1-kSACcvlAADHHgA-7tU886.png

The menu appears after clicking the Set Trigger button

Select the sensor, condition from the menu and enter the value for the desired action. You can set up to four triggers to automate. It's easy.

Click on Save button to save the settings and the result will be as follows within a minute. on the screen in the client area.

poYBAGL1-kCASZDMAAEaIK4jzgA988.png

Now switch to automatic working mode and sit on the chair to see how the control works automatically. If the temperature rises, place a DHT11 sensor near the bulb to heat it and the bulb will automatically turn off. This ensures that the CavyIoT trigger is working on the server.

One important feature of the DevBoard that we are going to learn about is the log file of all actions! To do this, you have run the circuit for an hour or two to test it. After that remove all connections to the DevBoard from the Arduino. Unplug the Arduino from the USB.

How to download log files from CavyIoT DevBoard.

Connect the B pin of the DevBoard to ground (D0 of the NodeMCU).

Plug the DevBoard's USB cable into your computer.

And restart Nodemcu.

Open the Serial Monitor

poYBAGL1-jyAFEamAAGv4VOurLw776.png

The DevBoard local server is started.

Now connect to the hotspot password admin@123 created by CavyIoT DevBoard to provide log files.

After connecting, browse to the url http://100.100.100.100

pYYBAGL1-jeAaHVOAABy3doa6lY660.png

Download the log file from the download link and save it to your computer. This log file is in CSV format. You can print it, convert it to JSON/PDF format for analysis, etc. You can use the online tool CSV to PDF on your dashboard.

The output of CSV to PDF converter looks like,

poYBAGL1-jOATG8NAAJeUYLwc-g931.png

CSV to PDF/JSON

So far, the content about Dev-Boards includes

How to download the firmware

Interfacing with Arduino

How to download log files.

Step 4:

Complete the project. Make the arrangement shown below in the wooden box.

pYYBAGL1-i6AKIwvAAHUm114Uew339.png

In this arrangement, two compartments were made, the right one for the "Egg Tray Router Assembly",

The egg tray router mechanism is equipped with a servo motor.

The exhaust fan is to control overheating. This exhaust fan can be controlled through the control panel.

DHT-11 sensor.

In the left row,

A 100-W light bulb was used as the heat source.

humidifier

The PC fan (permanently on) is used to circulate air to evenly distribute temperature and humidity in the egg tray chamber. (Note: not shown in the circuit)

To minimize heat and moisture leakage from the incubator, there is a fresh air inlet at the bottom of the box.

The following figure shows the principle of the egg tray mechanism:

poYBAGL1-iiAR2hUAAFO6QaNTfI755.png

Incubating eggs are placed in the setter tray with the air cell facing upward and are regularly turned 90° or 45° on either side of the long axis of the egg. Historically, the arguments for frequent turning of eggs have been (1) poor temperature distribution in the albumen and yolk and/or (2) the risk of the embryo and extraembryonic membranes adhering to the inner shell membranes.

Therefore, turning the eggs is essential during days 0-10, when the early extraembryonic yolk sac membrane and subembryonic fluid are being formed. The recommended frequency of turning the eggs is 4 times a day.

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号