Arduino mail notifier circuit diagram

Here is a simple circuit diagram for an Arduino-based mail notifier:

Components:

Circuit Diagram:

Here is the circuit diagram:

  +---------------+
  |  Arduino Uno  |
  +---------------+
           |
           |  Digital Pin 2
           v
  +---------------+
  |  Red LED      |
  |  (Indicator)  |
  +---------------+
           |
           |  1kΩ Resistor
           v
  +---------------+
  |  Green LED    |
  |  (Indicator)  |
  +---------------+
           |
           |  2kΩ Resistor
           v
  +---------------+
  |  Buzzer (optional) |
  +---------------+
           |
           |  Mail Sensor
           |  (Reed switch or magnetic sensor)
           v
  +---------------+
  |  Power Source  |
  |  (USB cable or battery) |
  +---------------+

How it works:

  1. The Arduino board is connected to the breadboard.
  2. The red LED is connected to digital pin 2 of the Arduino board through a 1kΩ resistor. This LED will indicate when the mail has been detected.
  3. The green LED is connected to digital pin 2 of the Arduino board through a 2kΩ resistor. This LED will indicate when the mail has been delivered.
  4. The buzzer (if used) is connected to digital pin 2 of the Arduino board. When the mail is detected, the buzzer will sound.
  5. The mail sensor (reed switch or magnetic sensor) is connected to the Arduino board. When the mail is detected, the sensor will trigger the Arduino board to send a signal to the LEDs and buzzer (if used).
  6. The power source (USB cable or battery) is connected to the Arduino board.

Arduino Code:

Here is an example Arduino code that you can use to control the LEDs and buzzer:

const int redLedPin = 2;
const int greenLedPin = 3;
const int buzzerPin = 4;

void setup() {
  pinMode(redLedPin, OUTPUT);
  pinMode(greenLedPin, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
}

void loop() {
  if (digitalRead(mailSensorPin) == HIGH) {
    digitalWrite(redLedPin, HIGH);
    digitalWrite(greenLedPin, LOW);
    tone(buzzerPin, 1000, 1000); // sound the buzzer
  } else {
    digitalWrite(redLedPin, LOW);
    digitalWrite(greenLedPin, HIGH);
  }
  delay(1000);
}

Note: