After the circuit installation is completed

by gtrr4684 on 2009-11-26 15:23:51

Contents

1. Introduction to Single-tone Low-efficiency Music Color Lamp Scattered Circuit: _ 2

2. Design Methods and Steps for Dual-tone Multi-functional Music Color Lamp Controller: _ 3

2.1 Design Task: _ 3

2.2 Selection of Separate Plans: _ 4

3. Design Plan: _ 4

(1) Controller Based on Shift Register: _ 4

3.1.1 Code Generator: _ 4

(2) Control Circuit: _ 7

3.2.1 Oscillation Circuit: _ 7

3.2.2 Control Channel: _ 8

(3) Chip Brief Description: _ 10

4. Rhythm Circuit Diagram: _ 13

5. After the Circuit Assembly is Completed, the Actual Measurement of Input and Output Signal Waveforms of Each Dual-element Circuit: _ 14

6. Power Supply Circuit Design: _ 14

7. Tone Controller: _ 15

8. Audio Input Signal Circuit: _ 16

9. Audio Output Circuit: _ 17

10. Adjustment and Testing of Electronic Circuits: _ 18

10.1 Debugging of Electronic Circuits: _ 18

10.2 Fault Analysis and Handling of Electronic Circuits: _ 19

11. Component Layout Rules for Electronic Circuits: _ 20

11.1 Overall Disassembly Layout Rules: _ 20

11.2 PCB Structure Layout Rules: _ 20

Appendix (I) Audio Control Color Lamp Circuit Used Outside Bars: _ 22

Appendix (II) SH-808 Night Festival Color Lamp Accompanying Tail Music Synchronous Sound Control Circuit: _ 23

Appendix (III) SH-804 Night Festival Pattern Color Lamp Accompanying "Ha Ha Laugh" Sound Control Circuit: _ 24

12. Conclusion: _ 25

13. References: _ 25

Abstract: The original design uses homemade digital integrated circuit timers, counters, and decoders to generate cyclic control signals to control the thyristor-driven circuit, thereby controlling the cyclic flashing of color lamps. The original circuit is simple and easy to debug.

Keywords: Eight-channel color lamp, counter, register, code generator, 555 integrated block

Postscript: As the application of eight-channel color lamps becomes more extensive, with the improvement of our living standards and the acceleration of urban infrastructure construction, the use of lamps is no longer just for illumination. In the urban lighting project and various large and small advertising signs, it shows great prowess. Nowadays, many outdoor commercial advertisements, public service advertisements, night festival color lights, etc., mostly adopt a cyclic light control form. Through clever conception and creation, they can make advertisements, color lights, and other works colorful, creative, and rich in changing forms, playing a role in publicity and beautifying the environment, creating a bright atmosphere. I use homemade digital integrated devices to design an eight-channel automatic adjustable slow-speed cycling color lamp control circuit. When the controller consists of an irregular clock signal generator, counter, decoder, and switch circuit.

1. Introduction to Single-tone Multi-functional Music Color Lamp Integrated Circuit:

Music integrated circuits are large-scale CMOS integrated circuits. Using music integrated circuits, through simple external circuits, you can obtain simple melodies, voices, or various simulated sounds. Music integrated circuits are inexpensive, have a simple circuit structure, work stably and reliably, and consume low power, so they have wide applications; they can be seen in music doorbells, music greeting cards, music clocks, telephone ring circuits, etc.

Design Structure of Dual-tone Multi-functional Music Color Lamp Integrated Circuit:

The oscillation circuit generates signals for each circuit application; the control circuit reads codes from its own memory and controls the rhythm generator and tone generator to work in harmony according to the codes, producing corresponding sound outputs.

Music integrated circuits generally adopt "hard start packaging," some use dual-in-line and single-in-line packaging, and others are made into the shape of transistors, called "music transistors." The working voltage generally uses a 1.5~5V DC power source.

The output commonly uses piezoelectric ceramic pieces as electro-acoustic conversion devices; also, crystals transistors are often used for amplification and then sent to the speaker for better volume.

2. Design Methods and Steps for Dual-tone Multi-functional Music Color Lamp Controller:

2.1 Design Task

Design an 8-way color lamp control circuit

Specific requirements:

(1) The color lamp control circuit controls more than eight color lamps, demonstrated using light-emitting diodes.

(2) Requires the formation of more than two flower patterns, each pattern cycles twice continuously, and different patterns alternate.

(3) The brightness change rhythm of the color lamps is 1.0S and 0.5S, alternating between the two rhythms during operation.

2.2 Selection of Modular Solutions

The modular solution design is shown in the figure above, where the oscillator generates a clock signal, and then the controller produces sequence signals such as "11110000" triggered by this clock signal, which can control the brightness of the lamps through diodes. Different sequence signal rules will produce different flower patterns.

3. Design Plan

(1) Controller Based on Shift Register

3.1.1 Code Generator

The code generator requires the emission of eight-bit status code signals according to the rhythm to control the color lamps' brightness changes. Since there are many color lamp channels and fewer flower pattern requirements, it is appropriate to select shift registers to output signals and control the brightness of the color lamps. The code generator uses two general-purpose shift registers 74LS194 to complete the task. 74LS194 has multiple functions such as synchronous clearing and synchronous presetting, right shifting, holding, etc., making control flexible. Two 74LS194 chips compose an eight-bit shift register for eight-channel color lamps, allowing relatively flexible flower patterns. The function and terminals of 74LS194 are shown in the following diagram:

74LS194 is a four-bit bidirectional shift register with a maximum clock pulse of 36 MHz.

TTL integrated shift register 74LS194 is a bidirectional shift register, having parallel storage, left-shift storage, right-shift storage, and hold modes determined by M1M0 end signals. The functional table and logic diagram of 74194 are shown in the table and figure. CR is the active-low clear terminal, DSR is the right-shift serial input terminal, DSL is the left-shift serial input terminal, and D3D2D1D0 are the parallel input terminals.

74194 Function Table

CR M1 M0 DSL DSR CP D3 D2 D1 D0 Q3 Q2 Q1 Q0

0 × × × × × × × × 0 0 0 0

1 × × × × × × × × Q3 Q2 Q1 Q0

1 1 1 × ↑ A B C D A B C D

1 1 0 1 × ↑ × × × × Q2 Q1 Q0 1

1 1 0 0 × ↑ × × × × Q2 Q1 Q0 0

1 0 1 × 1 ↑ × × × × 1 Q3 Q2 Q1

1 0 1 × 0 ↑ × × × × 0 Q3 Q2 Q1

1 0 0 × × × × × × Q3 Q2 Q1 Q0

From the table, we know that 74LS194 has a synchronous clear function when the terminal is at a low level. Under these conditions, when M1M0=00, the register implements a hold (data) function; in Figure (b), QA serves as the high-position output of the register, i.e., QAQBQCQD=Q3Q2Q1Q0. When M1M0=01, the register performs a right-shift function under the action of CP, where data moves from high to low positions, and the data from the right-shift input terminal DSR shifts into Q3; when M1M0=10, the register performs a left-shift function under the action of CP, where data moves from low to high positions, and the data from the left-shift input terminal DSL shifts into Q0; when M1M0=11, the register performs a parallel input (preset) function, where the parallel input data D3D2D1D0=ABCD is stored in Q terminals, and after the clock rises, Q3Q2Q1Q0=D3D2D1D0=ABCD.

This needs special attention: normally, left-shifting refers to moving from low to high positions. However, because the high and low positions in 74LS194 are opposite to the usual writing habit, performing a right-shift operation should be executed when moving from low to high positions.

The eight output signals from the shift register are connected to LED light-emitting diodes. The data input ends of the encoder and the connections of the control end depend on the flower pattern. Considering convenience, three types of flower patterns are adopted:

Pattern 1 - Gradual brightness from right to left until all are lit. Loops twice.

Pattern 2 - Gradual brightness from right to left until all are lit. Loops twice.

Pattern 3 - Gradual dimming from right to left until all are off. Loops twice.

Requirement: Implement the following sequence signal generation circuit.

Rhythm Sequence Number Flower Pattern 1 Flower Pattern 2 Flower Pattern 3

1 10000000 00000000 11111111

2 11000000 00000001 11111110

3 11100000 00000011 11111100

4 11110000 00000111 11111000

5 11111000 00001111 11110000

6 11111100 00011111 11100000

7 11111110 00111111 11000000

8 11111111 01111111 10000000

9 11111111 00000000

Circuit diagram as follows:

(2) Control Circuit

The control circuit provides the required rhythm pulses and drive signals for the encoder, synchronizing the entire system's operation. The control circuit has two functions: one is to generate rhythm pulses according to the rhythm needs, and the other is to generate various drive signals required by the shift register. The former is simpler, while the latter is more complex.

3.2.1 Oscillation Circuit

The oscillator is formed by 555, generating a periodic signal, where the period T = 0.7(R1+2R2)C.

3.2.2 Control Circuit

When the control circuit consists of a bidirectional shift register 74LS194, hexadecimal counter 74LS161, and eight-to-one data selector 74LS151. Two 74LS194 chips are cascaded into an eight-bit bidirectional shift register. In the diagram, the 74LS151 data selector connects to the function control end of the shift register to control the working method of the shift register, specifically controlled by the data at the input ends of 74LS151.

Functions as follows:

D0 D1 D2 D3 D4 D5 D6 D7

Left 74LS151 (corresponding to S1) 0 0 1 1 1 1 1 1

Right 74LS151 (corresponding to S0) 1 1 0 0 1 1 1 1

74LS194 Working State Right Shift Right Shift Left Shift Left Shift Data Input Data Input Data Input Data Input

In the diagram, there are two 74LS161 chips. The state output ends QA, QB, QC of the left 74LS161 connect to the address ends of the data selector to select the output of the data selector and thus control the working state of the shift register 74LS194. Its QA state also provides the serial input data for left-right movement and the parallel input code during static number input.

The right 74LS161 records the number of shifts; when it counts nine states, the NOT gate outputs a high level. At this time, the counting method control ends ET, TP of the left counter are high levels. At this moment, the left counter counts once, then after another 9 CP pulses, it counts again until QC=1, where this 1 passes through the OR gate making the EP, ET of the left counter continue to be high. At this time, the left counter responds to every CP pulse once, corresponding to the phenomenon of all color lamps being fully lit, fully extinguished, and then fully lit again and fully extinguished. When QAQBQCQD=0001, the process repeats.

Now let's analyze its changing form. First, set the circuit unit, at this time the state of the left 74LS161 is QDQCQBQA=0000; ET, TP=0; the address selection end A2A1A0 of 74LS151=000; at this time S1S0=Y1Y2=01, 74LS194 is in the right-shift working state, because QA=0, passing through the NOT gate, the serial right-shift data output end SR=1, making the output of 74LS194 QAQBQCQD, right QAQBQCQD go through 10000000-〉11000000-〉11100000-〉11110000-〉11111000-〉11111100-〉11111110-〉11111111 these states. The corresponding result is the color lamps gradually lighting up from right to left until all are lit, requiring eight CP pulses for these state changes.

After nine pulses, the QDQCQBQA of the right 74LS161=1000, making the right 74LS161's preset usable due to the low output. The QDQCQBQA of the right 74LS161=0000, and QD passes through the OR gate, making the ET, EP of the left 74LS161=1. At this time, after one pulse, the left 74LS161 counts once, QDQCQBQA=0010, A2A1A0=010,S1S0=D1D0=10, 74194 is in the left-shift working state. At this time QA=0, passing through the NOT gate becoming 1, i.e., SL=1, making the output of 74LS194 QAQBQCQD, right QAQBQCQD go through 00000000-〉00000001-〉00000011-〉00000111-〉00001111-〉00011111-〉00111111-〉01111111-〉11111111, corresponding to the result of the color lamps gradually lighting up from right to left until all are lit.

After nine pulses, the QDQCQBQA of the right 74LS161=1000, making the right 74LS161's preset usable due to the low output. The QDQCQBQA of the right 74LS161=0000, and QD passes through the OR gate, making the ET, EP of the left 74LS161=1. At this time, after one pulse, the left 74LS161 counts once, QDQCQBQA=0011, A2A1A0=011,S1S0=D1D0=01, 74194 remains in the left-shift working state. At this time QA=1, passing through the NOT gate becoming 0, i.e., SL=0, making the output of 74LS194 QAQBQCQD, right QAQBQCQD go through 11111111-〉11111110-〉11111100-〉11111000-〉11110000-〉11100000-〉11000000-〉10000000-〉00000000, corresponding to the result of the color lamps gradually dimming from right to left until all are extinguished.

Then in the next four pulses, the EP, ET of the left 74LS161 continuously remain at a high level via its own QC, i.e., continuous counting, while for the 74LS194 QAQBQCQD, right QAQBQCQD, it is 11111111-〉00000000-〉11111111-〉00000000.

The final pulse makes all lamps extinguished.

(3) Chip Description

①74LS161

The clear function of 74LS161 is synchronous. When the clear terminal CR is at a low level, regardless of the status of the clock terminal (CP), the clear function can be completed.

The preset function of 74LS161 is synchronous. When the load control terminal LD is at a low level, under the action of the falling edge of CP, the output terminal (Q0~Q3) matches the data input terminal (D0~D3).

The count function of 74LS161 is synchronous, realized by applying CP simultaneously to four triggers. When CTP and CTT are both at high levels, under the action of the rising edge of CP, the output terminal (Q0~Q3) changes simultaneously, eliminating the counting spikes that appear in asynchronous counters.

74LS161 has a carry-ahead function. When the count overflows, the carry output terminal (CO) outputs a high-level pulse, whose width is the high-level part of Q0.

Figure (c) External pin diagram of 74LS161 Figure (d) Logical symbol of 74LS161

Figure (e) Functional table of 74LS161

②74LS151

The pin functions of 74LS151 are shown in the figure below. It has 8 data input terminals D0~D7, 3 address input terminals A0~A2, one enable control terminal , and two complementary output terminals Y and . When the enable control terminal =1, the selector is disabled and does not work, Y=0, and the input data and address signals are ineffective. When the enable control terminal =0, the selector works.

Figure (f) Pin diagram of 74LS151

Figure (g) Functional table of 74LS151

③Introduction to 555

The 555 timer is a mixed digital and analog large-scale integrated circuit with wide applications. By adding resistors, capacitors, etc., it can form astable multivibrators, bistable circuits, Schmitt triggers, etc. The internal structure of the timer includes comparators, voltage divider circuits, RS flip-flops, and discharge transistors. The voltage divider circuit consists of three 5K resistors providing reference voltages of 2/3VCC and 1/3VCC to A1 and A2 respectively. The outputs of A1 and A2 control