Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Bluetooth-Controlled Centrifuge with LCD Display and IR Remote

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Bluetooth-Controlled Centrifuge with LCD Display and IR Remote

Circuit Documentation

Summary

This circuit is designed to control a centrifuge using an Arduino UNO. The system includes an LCD screen for displaying information, a Bluetooth module for wireless communication, an IR receiver for remote control, a DC motor driver for controlling the motor, a relay module for switching, and a buzzer for alerts. The circuit also includes multiple pushbuttons for user input.

Component List

  1. Arduino UNO

    • Description: Microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. HC-06

    • Description: Bluetooth module for wireless communication.
    • Pins: RXD, TXD, GND, VCC
  3. LCD screen 16x2 I2C

    • Description: 16x2 character LCD display with I2C interface.
    • Pins: SCL, SDA, VCC, GND
  4. DC Motor

    • Description: DC motor for driving the centrifuge.
    • Pins: positive, negative
  5. 2 Channel Relay Module

    • Description: Relay module for switching high-power devices.
    • Pins: N.O. 2, COM 2, N.C. 2, N.O. 1, COM 1, N.C. 1, pin 7, pin 8, pin 9, pin 10, pin 11, pin 12, VCC+, VCC- (GND), IN 1, IN 2
  6. Buzzer

    • Description: Buzzer for audio alerts.
    • Pins: PIN, GND
  7. IR Receiver

    • Description: Infrared receiver for remote control.
    • Pins: DATA, VCC, GND
  8. L298N DC Motor Driver

    • Description: Motor driver module for controlling the DC motor.
    • Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
  9. Pushbutton

    • Description: Pushbutton for user input.
    • Pins: Pin 2, Pin 1, Pin 3, Pin 4
  10. 12V Power Supply

    • Description: Power supply providing 12V.
    • Pins: +, -

Wiring Details

Arduino UNO

HC-06

LCD screen 16x2 I2C

DC Motor

2 Channel Relay Module

Buzzer

IR Receiver

L298N DC Motor Driver

Pushbuttons

12V Power Supply

Code Documentation

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <IRremote.h>

IRrecv receiver(4); // تم تغيير بن الاستقبال إلى 4
LiquidCrystal_I2C lcd(0x27, 16, 2);

// تعريف أزرار التحكم
#define bt_set    A3
#define bt_up     A2
#define bt_down   A1
#define bt_start  A0

// المتغيرات الخاصة بالوقت والسرعة
int time_s = 0;
int time_m = 0;
int set = 0;
bool timerRunning = false;
bool buzzerActive = false;
int speed = 5; // السرعة الأولية (5 إلى 8)

// منافذ البازر
int buzzer = 6;

// منافذ L298N للموتور
#define motorENA 9
#define motorIN1 7
#define motorIN2 8

// منافذ الريلاي
#define relayMotorDriver 11
#define relayMotor 10

unsigned long previousMillis = 0;
const long interval = 1000;

// إعداد الاتصال التسلسلي مع HC-05
SoftwareSerial btSerial(2, 3); // (RX, TX)

void setup() {
  pinMode(bt_set,   INPUT_PULLUP);
  pinMode(bt_up,    INPUT_PULLUP);
  pinMode(bt_down,  INPUT_PULLUP);
  pinMode(bt_start, INPUT_PULLUP);
  pinMode(buzzer, OUTPUT);

  // إعداد منافذ L298N
  pinMode(motorENA, OUTPUT);
  pinMode(motorIN1, OUTPUT);
  pinMode(motorIN2, OUTPUT);

  // إعداد اتجاه المحرك
  digitalWrite(motorIN1, HIGH);
  digitalWrite(motorIN2, LOW);

  // إعداد منافذ الريلاي
  pinMode(relayMotorDriver, OUTPUT);
  pinMode(relayMotor, OUTPUT);
  
  // تهيئة جهاز الاستقبال للأشعة تحت الحمراء