[Diao Ye learns programming] Arduino hands-on (97) --- 10-segment LED beam module 2

The reference to 37 sensors and actuators has been widely circulated on the Internet. In fact, there must be more than 37 sensor modules compatible with Arduino. In view of the fact that I have accumulated some sensor and actuator modules on hand, according to the concept of practicing true knowledge (must be done), for the purpose of learning and communication, I am going to try a series of experiments one by one, regardless of success (the program goes through) or not, They will be recorded - small progress or unsolvable problems, hoping to inspire others.

[Arduino] 168 kinds of sensor module series experiments (data code + simulation programming + graphics programming)
Experiment 97: 10-segment LED light strip MT102510AG digital display LM3914 light column module

insert image description here
Knowledge points: LM3914 chip
is a dot/bar display driver integrated circuit developed by Ns Corporation in the United States. Contains input buffer, 10-level precision voltage comparator, 1.25V reference voltage source and point/bar display mode selection circuit, etc. The non-inverting input terminal of the 10-level voltage comparator is connected with a resistor divider, and the resistor divider is composed of ten 1kg precision resistors connected in series.

The weighted value of each unit-level comparator is equal, so that the composition of the ten-level linear display driver is suitable for use in LEDs, and can complete the perfect drive of linear scale devices for LCD and VFD level meters. The working voltage is 3v 25W, the highest is 48V, the output current is adjustable in the range of 2-30mA, the output pressure capacity is ±35V, and the maximum output is limited within 30mA. The input buffer is connected in the form of a follower, which improves the input impedance and measurement accuracy. . LM3914 has a hysteresis circuit inside, the display does not jump from one LED to another LED immediately, but smoothly transitions, which can eliminate noise interference and improve the flicker phenomenon caused by the rapid change of input signal. Since the internal resistor divider is floating, the voltage measurement range is wide.

LM3914 is a 10-bit light-emitting diode driver, which can convert the input analog to digital output and drive 10-bit light-emitting diodes for point display or column display.

insert image description here
LM3914 pins and related functions introduction:

Pin 1 is connected to the negative pole of the luminous tube; pin 2 is ground; pin 3 is the positive power supply; pin 4 is the minimum brightness setting of the luminous tube; pin 5 is the signal input; pin 6 is the highest brightness setting of the luminous tube; pin 7 is the reference voltage output; pin 8 is the reference voltage setting Set; 9-pin mode setting; 10-18 pins are connected to the negative pole of the LED.

The LM3914 reference voltage source outputs about 5V, that is, maintains a 5V reference voltage [color=rgb(0, 66, 118) !important] Vref between pin 7 and pin 8, which can be used directly for the internal voltage divider. In this way, when Vin (pin 5) inputs a 0-5V voltage, 0-10 light-emitting diodes can be lit through the comparator.

There are 10 precision divider resistors connected between pin 4 and pin 6, a reference voltage source between pin 7 and pin 8, pin 9 is point/column mode selection, and pin 5 is the signal input terminal.

insert image description here
insert image description here
The internal circuit structure diagram of LM3914

This circuit can be used in occasions that need to detect and indicate humidity.
There are 10 voltage comparators in the LM3914 as drivers for 10 light-emitting diodes. The reference voltage of each voltage comparator is provided by a series resistor voltage divider circuit, and its voltage value decreases from top to bottom. The humidity signal detected by the humidity sensor Icl is passed by R. , RP1, as a control signal input from pin ⑤ of IC2, output after the buffer amplifier, and added to the reverse input terminals of 10 voltage comparators, when the reverse input voltage of the comparator is greater than the voltage of the same phase terminal of the comparator is The comparator outputs a low level, and the corresponding light-emitting diode lights up.
The higher the voltage output from the buffer amplifier in the LM3914 to the inverting terminal of the voltage comparator, the more diodes will be lit. Bright.
insert image description here

Working principle and application circuit of LM3914N
The capacitor charging circuit is composed of time-base integrated circuit ICl, relay Kl and resistor R4. The capacitor discharge circuit is made up of resistor R5, transistors Vl, V2 and relay K2. The charging/discharging selection control circuit is composed of switch S, resistor R3, power supply socket XS and diodes VDl, VD2. The multivibrator circuit is composed of resistor Rl, capacitor C2 and NAND integrated circuit IC2 (Dl, D2). The LED display driving circuit is composed of light emitting diodes VLl-VL36, resistors R6, R2, capacitor Cl and counting distributor integrated circuit IC3. When demonstrating the charging process of the capacitor, put S in the "charging" position, so that the working power of ICl and IC3 is connected. When the charging capacitor is not connected, pin 7 of IC1 outputs a high level, Kl does not pull in, and the multivibrator does not work. After IC3 is powered on and reset, its YO terminal outputs a high level, and YI-Y9 terminals all output Low level, VLl-VL36 does not emit light. After the charging capacitor is connected, since the voltage at both ends of the capacitor cannot change abruptly, pin 2 and pin 6 of IC1 change from low level to high level, and pin 7 changes from high level to low level, Kl energizes and pulls in, its The normally open contact is connected to make the multivibrator energize and work, and provide counting pulses for the CP terminal of IC3, so that the YO-Y9 terminals of IC3 output high levels in turn, and VL1, VL2-VL17, and VL18 are turned on in turn. The Y9 terminal of IC3 is connected with the EN terminal. When outputting a high level, IC3 stops counting and keeps the Y9 terminal constantly outputting a high level, so that VLl7 and VLl8 are in a constant light state. This demonstrates the change law of the voltage and current of the capacitor when the capacitor is charged: that is, the terminal voltage becomes higher and higher as the charging time increases until it remains unchanged; while the current flowing through the capacitor increases as the charging time becomes longer. smaller until zero. When the capacitor charging circuit is working, when the capacitor is fully charged (The voltage at both ends is charged to 2/3 of the power supply voltage), the pin 7 of ICl will change from low level to high level, so that Kl is released, and the multivibrator stops working. When demonstrating the capacitor discharge process, the charging capacitor should be removed first, the S should be placed in the "discharging" position, and the charged capacitor should be connected to the discharge terminals of T3 and T4. At this time, the charge stored on the capacitor discharges V1 through R5, making V1 and V2 saturated and conducting, K2 pulls in, its normally open contact is connected, and the multivibrator oscillates to provide counting pulses for IC3. YO-Y9 of lC3 The output terminals output high levels in turn, so that VL19, VL2O-VL35, and VL36 are turned on in turn. When the Y9 terminal of IC3 outputs a high level, lC3 stops counting, and keeps the Y9 terminal to output a high level, so that VL35 and VL36 are always on. Therefore, it demonstrates that the terminal voltage and current of the capacitor are getting lower and lower as the discharge time becomes longer when the capacitor is discharged. When the capacitor is discharged, Vl and V2 are cut off, K2 is released, and the multivibrator stops working.

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
10-segment light bar digital tube module, 20 red pins, dimensions: 25.10x10.10x7.9mm, one leg is positive and the other is negative, super bright red light bar, 10 pen segments can be controlled individually

insert image description here
insert image description here

Features of 10-segment LED beam module
* Can be driven to emit light under low voltage and low current conditions;
* Lighting response time is extremely short (<0.1μs), high-frequency characteristics are good, monochromaticity is good, and brightness is high;
* Small size and light weight , Good impact resistance. Solid-state packaging, the packaging method is glue filling type, high stability;
*Long life, the service life is more than 50,000 hours;
*Can continuously scan and drive each lamp segment;
*Good display effect, wide viewing angle;
*Recommended for constant current use, Constant pressure will cause uneven brightness;
*Products with a protective film on the surface can be torn off before use;
*Using temperature: -30°C to 65°C.

insert image description here

Experimental open source graphics programming (Mind+, programming while learning)

insert image description here2

[Arduino] 168 sensor module series experiments (data code + simulation programming + graphics programming)

Experiment 97: 10-segment LED light strip MT102510AG digital display light column module

1. Program 3: Control multiple LEDs to achieve various flashing effects

2. Pins (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)

Arduino experiment open source code

/*

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)

 实验九十七:10段LED发光条MT102510AG数码显示光柱模块

1、程序之三,控制多个LED实现多种闪烁效果

2、接脚(2、3、4、5、6、7、8、9、10、11)

*/



int led1 = 2;

int led2 = 3;

int led3 = 4;

int led4 = 5;

int led5 = 6;

int led6 = 7;

int led7 = 8;

int led8 = 9;

int led9 = 10;

int led10 = 11;

int n;





void setup(){
    
    

for(n=2;n<=11;n++)

{
    
    

  pinMode(n, OUTPUT);  

}

}



void loop(){
    
    

  turn1();

  clean();

  turn2();

  clean();

  turn3();

  clean();

}



void turn1()

{
    
    

  for(n=2;n<=11;n++)

{
    
    

  digitalWrite(n,HIGH);

  delay(300);

}

  for(n=2;n<=11;n++)

{
    
    

  digitalWrite(n,LOW);

  delay(300);

}

}



void turn2()

{
    
     for(int x=0;x<=2;x++)

{
    
    

  for(n=2;n<=11;n++)

{
    
    

  digitalWrite(n,HIGH);  

}

delay(300);

  for(n=2;n<=11;n++)

{
    
    

  digitalWrite(n,LOW);

}

delay(300);

}

}





void turn3()

{
    
    

  for(int x=0;x<=2;x++)

  {
    
    

  digitalWrite(2,HIGH);

  digitalWrite(3,HIGH);

  for(n=4;n<=11;n++){
    
    

  digitalWrite(n,LOW);

  }

  delay(300);

  digitalWrite(6,HIGH);

  digitalWrite(7,HIGH);

  digitalWrite(2,LOW);

  digitalWrite(3,LOW);

  digitalWrite(4,LOW);

  digitalWrite(5,LOW);

  digitalWrite(8,LOW);

  digitalWrite(9,LOW);

  digitalWrite(10,LOW);

  digitalWrite(11,LOW);

  delay(300);

  digitalWrite(10,HIGH);

  digitalWrite(11,HIGH);

  for(n=2;n<=9;n++){
    
    

  digitalWrite(n,LOW);

  }

  delay(300);

}

}



void clean()

{
    
      for(n=2;n<=11;n++)

{
    
    

  digitalWrite(n,LOW);  

}

delay(300);

}

Arduino experiment scene diagram

insert image description here
[Arduino] 168 sensor module series experiments (data code + simulation programming + graphics programming)

Experiment 97: 10-segment LED light strip MT102510AG digital display light column module

Program 3, control multiple LEDs to achieve multiple flashing effects and record video

https://v.youku.com/v_show/id_XNDMzNTk0ODE1Ng==.html?spm=a2hzp.8244740.0.0

Guess you like

Origin blog.csdn.net/weixin_41659040/article/details/131990481