How to Implement a Bipolar LED Driver Circuit Using 8051 Microcontroller
Source: InternetPublisher:吃掉星星 Keywords: LED driver LED circuit 8051 microcontroller Updated: 2024/08/23
In this article, we will introduce how to implement a bipolar LED driver circuit using 8051 microcontroller. The difference between a bipolar LED and a regular bi-color LED is that a bipolar LED has only two leads, while a regular bi-color LED has three leads.
A bi-color LED is a special type of LED that consists of two diodes connected in reverse order within a package. Bi-color LEDs usually consist of three terminals, a common pin and two independent pins. If it is a common cathode LED, the common pin can be grounded, and if it is a common anode, it can be connected to
+5V power supply. However, there is another type of bi-color LED that has two terminals, called a bipolar LED.
The device functions based on a positive signal supplied to one of the terminals. For example, in the case of a green-red bi-color LED, a positive signal at the green terminal and a negative signal at the red terminal ensures that the green LED is forward biased and the red LED is reverse biased. This results in a green light that flashes. The same is true for the red LED.
However, if a negative signal is given to both the terminals, neither diode will conduct and the device will remain off. If a positive signal is applied to both the terminals, different colors based on the LED color combination will flash.
Following is an image of a Red and Green Bipolar LED, it looks like a normal LED.
In this project, we are designing a simple dual color LED driver circuit using 8051 microcontroller. The LEDs used here have a forward voltage drop of 2.2V, so a 5V
The control is done by the microcontroller program based on the input given by two buttons.
1. Principle of bipolar LED drive circuit
This circuit uses a microcontroller to drive a bipolar LED. The input commands are given by two push buttons and based on the input; the microcontroller is configured to send appropriate high or low signals to the two output pins. These output pins are connected to the terminals of the bipolar LED.
2. Bipolar LED driver circuit diagram
Components required:
1. 8051 microcontroller (AT89C51 is used here);
2. 8051 MCU programmer;
3. 11.0592 MHz crystal oscillator;
4. Capacitors – 2 X 33pF, 10uF;
5. Resistors – 150Ω, 10KΩ x 2;
6. Button x 3;
7. Bipolar LED (two leads);
8. Connect the wires;
9. Breadboard.
3. Bipolar LED drive circuit design
It is a simple circuit, the design mainly involves the MCU interface design, MCU oscillator and reset circuit design and the selection of LED resistors. The MCU interface is achieved by connecting two push button switches to the port P0 pin
This is achieved by connecting the two terminals of the bipolar LED to port P0 pins P0.0 and P0.1.
The oscillator design is done by choosing two 33pF ceramic capacitors to provide stability. The clock signal is an 11MHz
Generated by a crystal oscillator. The reset circuit design uses a 10uF electrolytic capacitor and a 10K resistor to achieve a reset pulse width of 100ms. The voltage drop across the resistor is maintained at around 1.2V.
Now, when the second button is pressed, the microcontroller will assign a logic low signal to pin P0.0 and a logic high signal to pin P0.1 accordingly. This will make the green light glow.
#include< reg51.h >sbit red = P0^0; sbit green = P0^1; sbit red_switch = P0^6; sbit green_switch = P0^7;unsigned char i=0;void delay (int);void main(){ red=0; green=0; while(1) {if(red_switch==0) { green=0; red=1;while(red_switch==0); }else if(green_switch==0) { green=1; red=0;while(green_switch==0); } } }
- SN75370 Dual MOS Memory Interface Circuit
- How to design a home computer using Arduino DUE
- Interface circuit based on 8155 and single chip microcomputer
- How to use ESP8266 to make a mini fully functional clock
- How to use ESP8266 to design a portable air quality monitoring station
- How to use ADXL335 to realize the design of gesture control robot
- A safe and reliable IC card reader/writer system circuit
- Production of infrared receiving controller based on AT89C2051
- ISP2 using real USB chip and M8
- Circuit diagram of RS232-TTL-RS485
- LED emergency light circuit diagram
- simple photometer
- LED light circuit diagram
- Novel solar LED light controller circuit diagram
- LED voltage measurement circuit diagram
- NCP1014/1028 driver LED circuit diagram
- MAX16834 driver LED circuit diagram
- Typical application circuit diagram of TPS92310 high power LED driver
- Using MA1576 charge pump to drive two sets of LED circuits
- Typical application circuit of high power LED driver TPS92310 block diagram