This is an experimental circuit that simulates traffic light control at an intersection. By adjusting the potentiometer settings and LED displays of different colors, the time for east-west traffic and north-south traffic can be set respectively, as well as the time for the yellow light to flash.
R3: Adjust the yellow light flashing time when turning from east-west traffic to north-south traffic;
R4: Adjustment of yellow light flashing time when turning from north-south traffic to east-west traffic;
R5: East-west traffic time adjustment;
R6: North-south travel time adjustment.


Circuit working principle:
1. All LED lights are off When the circuit is first powered on. When S1 is pressed, pins 2 and 4 of U1 are low level at the same time, and pin 3 of U1 also outputs low level. When S1 is rereleased, the 4th pin of U1 becomes high level, and at this time, the 26th pin of U1 is low level, so the 3rd pin of U1 outputs high level, the transistor Q2 is turned on, so L1 L2 L3 L4 all light up, that is, east-west traffic is allowed, and north-south traffic is prohibited. At the same time, transistor Q3 is also turned on, pins 2 and 4 of U2 are low level at the same time, pin 3 of U2 also outputs low level, transistor Q4 is cut off, and L5, L, 6, L7, and L8 are not lit.

2. During the period when the 3rd pin of U1 outputs a high level, it charges C3 through D2, causing the 2nd pin of U4A to input a high level. At the same time, the power supply VCC charges C1 through R28 and R5, and the voltage of the 6th pin of U1 gradually rises; when it exceeds vCC, the voltage of pin 3 of U1 becomes low level, Q2 is cut off, L1 L2 L3 L4 are all turned off, pin 3 of U4A outputs low level, and pin 10 of U4C outputs high level. U3 starts oscillation, and pin 3 outputs a high-low transition level, causing Q5 to work alternately in the on and off states, and the four yellow lights L9, L10, L11, and L12 flash on and off. At the same time, Q3 is cut off, the 4th pin of U2 becomes high level, and the 3rd pin also outputs a high level; Q4 is turned on, L5, L6, L7, L8 are all lit, that is, north-south traffic is allowed, and east-west traffic is prohibited.

3. During the flashing of the yellow light, C3 will be discharged to a low level through R30 and R3, causing pin 2 of U4A to become low level, pin 3 to output a high level, and pin 10 of U4C to output a low level. U3 stops vibrating, and the yellow light stops flashing.
4. During the north-south passage, the power supply VCC charges C2 through R29 and R6, and the voltage of pin 6 of U2 gradually increases. When it exceeds vCC, the voltage of pin 3 of U2 becomes low level, Q4 is cut off, L5, L6, L7, and L8 all go out, and the yellow lights flash on and off simultaneously. L1, L2, L3, and L4 are all on, and east-west traffic is allowed again, and north-south traffic is prohibited. The cycle continues.
Circuit schematic diagram:

Installation Notes:
1. Install short components first (for example, chip resistors should be installed first), and then install tall in-line components).
2. The temperature of the soldering iron is high when welding the terminals. Be careful not to burn your hands.
3. Components without positive and negative directions: resistors ceramic capacitors.
4. Components with positive and negative poles: switching diodes (with black negative pole), light-emitting diodes, electrolytic capacitors (the long leg is the positive pole)
5. Pay attention to the installation direction of the components: NE5511 (the direction of the notch corresponds to the direction of the notch mark on the circuit belt), and the terminals’ metal holes should face the circuit board’s outside.
6. Pay attention to the model of the triode and the base b, collector e, and emitter c (the triode is installed according to the logo pattern on the circuit board).

Debugging instructions:
After everything is installed, please check again whether the components are installed correctly and whether the welding is good. After confirming there is no problem, connect the 5v regulated DC power supply. Connect the positive pole of the power supply to the positive pole of the terminal and the negative pole of the power supply to the negative pole of the terminal. Be careful not to reverse the positive and negative poles.
After powering on, press the touch switch, and the circuit works.
If the circuit does not work, please check whether the welding and components are correct after cutting off the power, observe the fault status, and analyze the circuit diagram to solve the fault.
Parts list:

| No. | Model | Name | Quantity | location mark |
| 1 | 100R | Chip resistor | 12 | R7, R17-R27 |
| 2 | 1K | Chip resistor | 9 | R9-R13, R28-R31 |
| 3 | 10K | Chip resistor | 5 | R1, R2, R8, R14, R16 |
| 4 | 470K | Chip resistor | 1 | R15 |
| 5 | 10uF | Electrolytic capacitor | 2 | C3, C4 |
| 6 | 47uF | Electrolytic capacitor | 2 | C1, C2 |
| 7 | 1uF | Electrolytic capacitor | 1 | C5 |
| 8 | 1N4001 | Diode | 4 | D1-D4 |
| 9 | 8050 | Transistor | 5 | Q1-Q5 |
| 10 | 5mm red | Light-emitting diode | 4 | L3, L4, L7, L8 |
| 11 | 5mm yellow | Light-emitting diode | 4 | L9, L10, L11, L12 |
| 12 | 5mm green | Light-emitting diode | 4 | L1, L2, L5, L6 |
| 13 | 1M | Potentiometer | 4 | R3, R4, R5, R6 |
| 14 | 6*6*5 | Tactile switch | 1 | S1 |
| 15 | NE555 | Time base chip | 3 | U1, U2, U3 |
| 16 | CD4011 | Four 2-input NAND gates | 1 | U4 |
| 17 | 8 pin | IC holder | 3 | U1-U3 |
| 18 | 14 pin | IC holder | 1 | U4 |
| 19 | KF301-2P | Terminals | 1 | J1 |
| 20 | power cable | Dupont line | 2 | |
| 21 | 3*10mm copper pillar | Copper pillar | 4 | |
| 22 | 3*6mm screw | Screw | 4 | |
| 23 | 116mm*74mm | Circuit board | 1 |





Reviews
There are no reviews yet.