Arduino mail notifier circuit diagram
Here is a simple circuit diagram for an Arduino-based mail notifier:
Components:
- Arduino Board (e.g. Arduino Uno)
- Breadboard
- 2 x LEDs (red and green)
- 2 x Resistors (1kΩ and 2kΩ)
- 1 x Buzzer (optional)
- 1 x Mail sensor (e.g. reed switch or magnetic sensor)
- 1 x Power source (e.g. USB cable or battery)
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:
- The Arduino board is connected to the breadboard.
- 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.
- 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.
- The buzzer (if used) is connected to digital pin 2 of the Arduino board. When the mail is detected, the buzzer will sound.
- 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).
- 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:
- You will need to modify the code to match the pin connections and the specific mail sensor you are using.
- You can adjust the delay time in the code to change the frequency of the LED blinking.
- You can also add more features to the code, such as sending an email or SMS notification when the mail is detected.