Arduino Mega 2560-Based Interactive LED and 7-Segment Display Controller with Pushbuttons and Buzzer
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Mega 2560 microcontroller interfaced with multiple pushbuttons, LEDs of different colors, a 7-segment display, a 74HC595 shift register, resistors, and a buzzer. The circuit is designed to demonstrate basic input and output operations, including button presses, LED control, and display management.
Component List
Pushbutton
- Description: A simple pushbutton switch.
- Pins: Pin 1 (in), Pin 2 (in), Pin 3 (out), Pin 4 (out)
Arduino Mega 2560
- Description: A microcontroller board based on the ATmega2560.
- Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, SDA, SCL, AREF
LED: Two Pin (red)
- Description: A red LED.
- Pins: Cathode, Anode
LED: Two Pin (blue)
- Description: A blue LED.
- Pins: Cathode, Anode
LED: Two Pin (yellow)
- Description: A yellow LED.
- Pins: Cathode, Anode
LED: Two Pin (green)
- Description: A green LED.
- Pins: Cathode, Anode
Resistor (220 Ohms)
- Description: A resistor with a resistance of 220 Ohms.
- Pins: Pin 1, Pin 2
Resistor (330 Ohms)
- Description: A resistor with a resistance of 330 Ohms.
- Pins: Pin 1, Pin 2
74HC595
- Description: An 8-bit serial-in, serial or parallel-out shift register with output latches.
- Pins: Q0-Q7, GND, VCC, DS (DATA), OE (Enable), ST_CP (RCLK), SH_CP (SRCLK), MR (SRCLR), Q7' (QH)
7 Segment Display (4 Digit)
- Description: A 4-digit 7-segment display.
- Pins: 1, A, F, 2, 3, B, G, 4, C, DP, D, E
Buzzer
- Description: A simple buzzer.
- Pins: PIN, GND
Wiring Details
Pushbutton
Pushbutton 1
- Pin 1 (in) -> Arduino Mega 2560 D2 PWM
- Pin 2 (in) -> Arduino Mega 2560 D2 PWM
- Pin 3 (out) -> Common GND
- Pin 4 (out) -> Common GND
Pushbutton 2
- Pin 1 (in) -> Arduino Mega 2560 D3 PWM
- Pin 2 (in) -> Arduino Mega 2560 D3 PWM
- Pin 3 (out) -> Common GND
- Pin 4 (out) -> Common GND
Pushbutton 3
- Pin 1 (in) -> Arduino Mega 2560 D4 PWM
- Pin 2 (in) -> Arduino Mega 2560 D4 PWM
- Pin 3 (out) -> Common GND
- Pin 4 (out) -> Common GND
Pushbutton 4
- Pin 1 (in) -> Arduino Mega 2560 D5 PWM
- Pin 2 (in) -> Arduino Mega 2560 D5 PWM
- Pin 3 (out) -> Common GND
- Pin 4 (out) -> Common GND
Arduino Mega 2560
- 5V -> 74HC595 VCC, 74HC595 MR (SRCLR)
- GND -> Common GND
- D2 PWM -> Pushbutton 1 Pin 1 (in), Pin 2 (in)
- D3 PWM -> Pushbutton 2 Pin 1 (in), Pin 2 (in)
- D4 PWM -> Pushbutton 3 Pin 1 (in), Pin 2 (in)
- D5 PWM -> Pushbutton 4 Pin 1 (in), Pin 2 (in)
- D6 PWM -> 7 Segment Display (4 Digit) Pin 1
- D7 PWM -> 7 Segment Display (4 Digit) Pin 4
- D8 PWM -> 74HC595 ST_CP (RCLK)
- D9 PWM -> 7 Segment Display (4 Digit) Pin 2
- D10 PWM -> 7 Segment Display (4 Digit) Pin 3
- D11 PWM -> 74HC595 DS (DATA)
- D12 PWM -> 74HC595 SH_CP (SRCLK)
- D13 PWM -> Resistor (220 Ohms) Pin 1
- D14/TX3 -> Resistor (220 Ohms) Pin 1
- D15/RX3 -> Resistor (220 Ohms) Pin 1
- D16 PWM/TX2 -> Resistor (220 Ohms) Pin 1
- D17 PWM/RX2 -> Resistor (220 Ohms) Pin 1
LED: Two Pin (red)
- Anode -> Resistor (220 Ohms) Pin 2
- Cathode -> Common GND
LED: Two Pin (blue)
- Anode -> Resistor (220 Ohms) Pin 2
- Cathode -> Common GND
LED: Two Pin (yellow)
- Anode -> Resistor (220 Ohms) Pin 2
- Cathode -> Common GND
LED: Two Pin (green)
- Anode -> Resistor (220 Ohms) Pin 2
- Cathode -> Common GND
Resistor (220 Ohms)
Pin 1 -> Arduino Mega 2560 D13 PWM
Pin 2 -> LED: Two Pin (red) Anode
Pin 1 -> Arduino Mega 2560 D14/TX3
Pin 2 -> LED: Two Pin (blue) Anode
Pin 1 -> Arduino Mega 2560 D15/RX3
Pin 2 -> LED: Two Pin (yellow) Anode
Pin 1 -> Arduino Mega 2560 D16 PWM/TX2
Pin 2 -> LED: Two Pin (green) Anode
Pin 1 -> Arduino Mega 2560 D17 PWM/RX2
Pin 2 -> Buzzer PIN
Resistor (330 Ohms)
Pin 1 -> 74HC595 Q0
Pin 2 -> 7 Segment Display (4 Digit) Pin A
Pin 1 -> 74HC595 Q1
Pin 2 -> 7 Segment Display (4 Digit) Pin B
Pin 1 -> 74HC595 Q2
Pin 2 -> 7 Segment Display (4 Digit) Pin C
Pin 1 -> 74HC595 Q3
Pin 2 -> 7 Segment Display (4 Digit) Pin D
Pin 1 -> 74HC595 Q4
Pin 2 -> 7 Segment Display (4 Digit) Pin E
Pin 1 -> 74HC595 Q5
Pin 2 -> 7 Segment Display (4 Digit) Pin F
Pin 1 -> 74HC595 Q6
Pin 2 -> 7 Segment Display (4 Digit) Pin G
74HC595
- VCC -> Arduino Mega 2560 5V
- GND -> Common GND
- MR (SRCLR) -> Arduino Mega 2560 5V
- OE (Enable) -> Common GND
- DS (DATA) -> Arduino Mega 2560 D11 PWM
- ST_CP (RCLK) -> Arduino Mega 2560 D8 PWM
- SH_CP (SRCLK) -> Arduino Mega 2560 D12 PWM
- Q0 -> Resistor (330 Ohms) Pin 1
- Q1 -> Resistor (330 Ohms) Pin 1
- Q2 -> Resistor (330 Ohms) Pin 1
- Q3 -> Resistor (330 Ohms) Pin 1
- Q4 -> Resistor (330 Ohms) Pin 1
- Q5 -> Resistor (330 Ohms) Pin 1
- Q6 -> Resistor (330 Ohms) Pin 1
7 Segment Display (4 Digit)
- Pin 1 -> Arduino Mega 2560 D6 PWM
- Pin 2 -> Arduino Mega 2560 D9 PWM
- Pin 3 -> Arduino Mega 2560 D10 PWM
- Pin 4 -> Arduino Mega 2560 D7 PWM
- Pin A -> Resistor (330 Ohms) Pin 2
- Pin B -> Resistor (330 Ohms) Pin 2
- Pin C -> Resistor (330 Ohms) Pin 2
- Pin D -> Resistor (330 Ohms) Pin 2
- Pin E -> Resistor (330 Ohms) Pin 2
- Pin F -> Resistor (330 Ohms) Pin 2
- Pin G -> Resistor (330 Oh