Recolux tells you how to design a LED light flashing circuit with a flashing frequency?

Recolux tells you how to design a LED light flashing circuit with a flashing frequency?缩略图

Flashing frequency of 2Hz, that is to say, the LED flashing period of T = 1 / f = 0.5s, that is, 500ms, that is to say, requires the LED light 500ms flashes once, that is, the average second flashes twice. This requirement can be achieved in many ways, the following list of several commonly used examples for your reference and study.

1 The most classic MCU implementation

If we have a processor (such as microcontroller, DSP, ARM, CPLD or FPGA, etc.), it will be very simple to implement the LEDs to blink at a frequency of 2Hz. We only need to use one I/O port of the processor to drive a transistor, which in turn controls the LED's on/off state. By writing a simple programme for the programmer, we can make this I/O port output a high level every 250 milliseconds and then a low level for the next 250 milliseconds. This gives an overall blinking period of 500 milliseconds, which is the 2Hz blinking frequency we are looking for.

The output signal of the I/O port presents a specific waveform: it is actually a square wave signal with a frequency of 2Hz.

Recolux tells you how to design a LED light flashing circuit with a flashing frequency?插图

The following is a common circuit design method of using an NPN-type transistor to control the brightness of an LED. In this circuit, when the I/O outputs a high level, the base of the transistor receives a high level, it will conduct, thus making the LED light; and when the I/O outputs a low level, the base receives a low level, the transistor will cut off, and the LED light then goes out.

Recolux tells you how to design a LED light flashing circuit with a flashing frequency?插图2

2 Use 555 timer is very

Common 555 timer, it is very powerful, it can generate a frequency of up to 300KHZ and adjustable duty cycle PWM wave. For its operation as a square wave generator, the period of the output waveform is calculated by the following formula: TH (high level time) = ln2 × R1 × C1, and TL (low level time) = ln2 × R2 × C1, where ln2 ≥ 0.7. Taking the given resistors R1 and R2 of 768KΩ, and capacitor C1 of 470μF as an example, we can calculate TH and TL as about 250ms each. TL are each about 250 ms. Therefore, the period T of the entire square wave is the sum of TH and TL, which is 500 ms, and the corresponding frequency is 1 divided by the period T, which is 2 Hz.

We know that the output of the 555 timer has a driving capability of about 200mA, so we only need to drive an LED lamp in case we don't need additional components such as transistors to enhance its driving capability. You can directly connect the LED lamp to the output pin (pin 4) of the 555 timer.

Recolux tells you how to design a LED light flashing circuit with a flashing frequency?插图4

3 Multi-Harmonic Oscillator This is a very classic LED alternating blinking circuit, which uses two NPN transistors and capacitor charging and discharging principle to achieve the alternating blinking effect between LED1 and LED2. If you only need to control one or a group of LEDs, you can use a resistor instead of LED2.This circuit is a multi-harmonic oscillator circuit, where one of the transistors is in the on state and the other transistor will cut off, and through the coupling of capacitors and resistors, these two transistors will alternate into the on and cut off state, which will result in a self-excited oscillation. This oscillation mechanism makes the LED1 and LED2 can achieve a smooth alternating flashing effect.

Recolux tells you how to design a LED light flashing circuit with a flashing frequency?插图6

The working principle of this circuit is based on the charging and discharging process of the two NPN transistors and capacitors. At the moment of power-on, due to the small difference between the two sides of the circuit, so the two transistors on time will be first and later, resulting in one of the transistors on first, while the other is in the cut-off state, forming a temporary stable state. Take transistor Q1 on, transistor Q2 cut-off, for example, at this time the collector of Q1 (i.e., the left end of the capacitor C1) voltage is 0, while the base voltage of Q1 is about 0.7 V. At the same time, the capacitor C1 through the resistor R2 for charging, while the capacitor C2 is also charged through the resistor R4. Assuming that the supply voltage VCC is 5V, when capacitor C2 is fully charged, the voltage at both ends of it is 4.3V (0.7V at the left end and 5V at the right end). Since the resistance value of R4 is much smaller than R2, the charging speed of capacitor C2 is much faster than that of C1. When the voltage at the right end of C1 reaches 0.7V, Q2 starts to conduct. At this time, the voltage at the right end of capacitor C2 is directly pulled down to 0V, but because the voltage at the two ends of the capacitor can not be changed abruptly, the voltage at the left end of capacitor C2 instantly becomes -4.3V, resulting in the immediate cut-off of Q1, forming another temporary stable state. Then, capacitor C2 begins to discharge through resistor R3, and after discharging, it begins to reverse charge. When the voltage at the left end of capacitor C2 reaches 0.7V, Q1 conducts again. Similarly, the conduction of Q1 will make the voltage at the left end of capacitor C1 become 0V, which in turn feeds back to the voltage at the right end of capacitor C2 become -4.3V, which makes Q2 cut off, and then enter the next transient steady state. This process will be repeated, so as to achieve the effect of LED1 and LED2 flashing alternately.

The oscillation period T of this polytuned oscillator can be calculated by the formula T=0.7(R2C1+R3C2). Since the values of resistors R2 and R3, capacitors C1 and C2 are the same, the period can be simplified to T=1.4×R2×C1. By adjusting the values of capacitors C1 and C2 as well as resistors R2 and R3, we can change the frequency of the LED's blinking. This circuit may be difficult for beginners to understand, but we can gradually master its working principle through practice.

Summary: This article introduces three commonly used LED blinking programme.

The first programme using the processor to achieve, although the process is relatively simple, but the premise is that the original system has a processor can be used, otherwise in order to a single LED blinking function and the design of a separate processor is uneconomical, high cost.

The second programme uses 555 timer, is a commonly used method, only a 555 chip and some capacitors and resistors to achieve the LED blinking, its principle is simple and low cost.

The third scheme is based on the classic polyharmonic oscillation circuit, only two transistors and a few capacitive resistors can achieve the LED alternately blinking, with a lower cost.

Translated with DeepL.com (free version)

For more LED lighting issues, please feel free to consult recolux

Leave a Reply

Your email address will not be published.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*