Iv. Led introduction to lamp rationale 1. 1. Led basic knowledge 1. 1. 1. Led structure
Led lamps, also known as luminous diodes, are semiconductors capable of converting electrical energy into visible light in solid form, which can directly convert electricity into light. Led's interior is a semiconductor chip, one end of the chip is attached to a frame, one end is negative, the other is connected to the positive pole of the power, and the entire chip is sealed with epoxy resin。
1. 1. 2. Led lighting principles

The semiconductor chip consists of two parts, one p and the other n. When the two semiconductors are connected, they form a p-n knot. When the current works through this chip, the electrons are pushed to the p section, where the electrons are composited with holes, and the energy is sent in photons, which is the principle of led light。
Led light drivers
Led driver means to provide led with the right current and voltage to light up its normal work through a stable power source. The led drive is mainly a constant stream and a constant pressure. Limiting the constant current drive is the most common method, as led lamps are sensitive to the current, and currents above their rated values may cause damage. The constant current drive ensures a steady current, thus ensuring led safety. The led light drive is simple and can be driven only if the corresponding positive and negative polar is passed to the single machine. There are also two types of led connections, which feed currents and output currents。

What needs to be noted is that the led lights are different in color and the corresponding voltage is different. The current cannot be too large and usually requires access to a limited current resistance of 220 om to around 10 k om, the greater the resistance of the current resistance, the darker the light of the led。
1. 2. Led lights figure
The rationale for the led lamps on the board is shown in figure 2-1-1。
1. 3. Led light drive process

As can be seen from the diagram above, the negative pole of the led light is connected to the power source, the positive pole of the led light is connected to the gpio mouth of the single machine, and the driving principle of the led light is simply to set the led light to high level. The corresponding led2 is to light up led2 with high pd7 output. Led1, led3 and led4 are similar。










