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); } } }
- Improved circuit diagram of 8050 transistor emitter drive relay
- Sample and hold amplifier AD9101 interface circuit
- Digital signal isolation interface circuit
- Interface circuit based on 8155 and single chip microcomputer
- How to use ESP8266 to make a mini fully functional clock
- How to make a simple quadcopter using ESP8266
- Experiment on using 51 microcontroller to drive relay
- Use printer port to make programmable frequency generator circuit
- Usb mouse circuit diagram
- Production of infrared receiving controller based on AT89C2051
- Common anode 3-digit dynamic display circuit diagram
- Capacitor step-down LED drive circuit diagram using varistor
- 8W LED driver application circuit diagram (input voltage is 85 to 264V)
- LED light circuit diagram
- LED lighting circuit diagram in refrigerator
- Automotive LED driver circuit diagram using LT3486
- Inductive Boost Converter LED Driver
- LED driver CAT3606 application circuit diagram
- Using MA1576 charge pump to drive two sets of LED circuits
- NCP1200 driver LED circuit