This circuit is designed for an egg incubation system using an Arduino UNO as the main controller. It features a DHT22 sensor for temperature measurement, a 5V relay to control a heating element (AC Bulb), a stepper motor for egg rotation, an LCD display for user interface, and pushbuttons for manual control. The system aims to maintain a set temperature for egg incubation, display the current temperature and heater status, and periodically rotate the eggs using the stepper motor.
+
, Out
, -
Normally Open
, Common terminal
, Normally Closed
, In
, GND
, VCC
VSS
, VDD
, V0
, RS
, RW
, E
, D0
, D1
, D2
, D3
, D4
, D5
, D6
, D7
, A
, K
GND
, VCC
, SDA
, SCL
, D6
, D7
, A
, K
, VSS
, VDD
, V0
, RS
, D2
, D3
, D4
, D5
, RW
, E
, D0
, D1
, LED_A
, LED_B
Pin 2
, Pin 1
, Pin 3
, Pin 4
pin1
, pin2
P
, N
220V Positive Pole (AC)
, 220V Negative Pole (AC)
, GND
, GND (DC)
, 12V-24V Output (DC)
12V+
, GND
D
, B
, C
, A
ENABLE
, MS1
, MS2
, MS3
, RESET
, SLEEP
, STEP
, DIR
, GND
, VCC
, 1B
, 1A
, 2A
, 2B
, VMOT
GND
, Output
, VCC
-
, +
+
, -
+
to 5V supplyOut
to Arduino UNO pin D5-
to GNDIn
to Arduino UNO pin D6VCC
to 5V supplyGND
to GNDCommon terminal
to 220V Positive Pole (AC) from POWER SUPPLY 12V 5AMPNormally Open
to AC Bulb P
pinGND
to GNDVCC
to 5V supplySDA
to Arduino UNO pin A4SCL
to Arduino UNO pin A5N
to 220V Negative Pole (AC) from POWER SUPPLY 12V 5AMP12V+
to 220V Negative Pole (AC) from POWER SUPPLY 12V 5AMPGND
to GNDVCC
to 5V supplyGND
to GNDSTEP
to Arduino UNO pin D9DIR
to Arduino UNO pin D81A
, 1B
, 2A
, 2B
to corresponding pins on Stepper Motor (Bipolar)VMOT
to 12V supplyGND
to GND of 12V supplyRESET
connected to SLEEP
GND
to GNDOutput
to Arduino UNO pin A1VCC
to 5V supply+
to VMOT
of A4988 Stepper Motor Driver Carrier-
to GND of 12V supply/*
* Projek Penetasan Telur Puyuh Menggunakan Arduino
*
* Deskripsi:
* - Menggunakan DHT22 untuk membaca suhu
* - Menggunakan LCD 16x2 untuk menampilkan suhu dan status pemanas
* - Menggunakan relay untuk mengontrol pemanas
* - Menggunakan stepper motor untuk memutar telur
* - Menggunakan potentiometer untuk mengatur kecepatan stepper motor
* - Menggunakan pushbutton untuk menambah/mengurangi suhu target dan
* menghidupkan/mematikan pemanas secara manual
*/
#include <Stepper.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>
#define STEPS 200 // Jumlah langkah stepper motor
#define DHTPIN 5 // Pin DHT22
#define DHTTYPE DHT22
// Inisialisasi Stepper Motor
Stepper stepperMotor(STEPS, 8, 9);
// Inisialisasi LCD
LiquidCrystal_I2C lcd(0x27, 16, 2);
// Inisialisasi DHT22
DHT dht(DHTPIN, DHTTYPE);
int suhuSet = 37; // Suhu target
bool pemanasOn = false;
// Pin pushbutton
const int buttonTambahPin = 2;
const int buttonKurangPin = 3;
const int buttonPemanasPin = 4;
const int relayPin = 6; // Relay untuk pemanas
const int potPin = A1; // Potentiometer pin
// Debounce variables
unsigned long lastDebounceTimeTambah = 0;
unsigned long lastDebounceTimeKurang = 0;
unsigned long lastDebounceTimePemanas = 0;
unsigned long debounceDelay = 50;
void setup() {
Serial.begin(9600);
pinMode(buttonTambahPin, INPUT);
pinMode(buttonKurangPin, INPUT);
pinMode(buttonPemanasPin, INPUT);
pinMode(relayPin, OUTPUT);
stepperMotor.setSpeed(10); // Initial speed
lcd.begin(16, 2); // Initialize the LCD with 16 columns and 2 rows
lcd.backlight();
dht.begin();
Serial.println("Setup complete");
}
void loop() {
//