Follow these 5 steps to debug
Test before power on
After a circuit board is soldered, when checking whether the circuit board can work normally, it is usually not directly powered on, but the following steps should be followed to ensure that there is no problem in each step before powering on.
1.Whether the connection is correct
Check the schematic diagram. The main thing to check is whether the power supply of the chip and the marking of the network nodes are correct. At the same time, pay attention to whether the network nodes overlap, which is the focus of the inspection.
Another focus is the packaging of the original. The model adopted by the package, the order of the pins of the package, the package cannot be top-viewed, remember, especially for non-pin packages.
Check the connection, including wrong lines, fewer lines and more lines. There are usually two ways to check the line:
Check the installed lines according to the circuit diagram, and check the installed lines one by one according to the circuit connection in a certain order;
Check the actual line against the schematic diagram, and check the line with the component as the center. Check the connection of each component pin and check whether each place exists on the circuit diagram.
In order to prevent mistakes, the checked lines should usually be marked on the circuit diagram, and the buzzer test of the pointer multimeter ohm block should be used to measure the component pins directly, so that the poor wiring can be found at the same time.

2.Component installation
Whether there is a short circuit between the pins and whether there is poor contact at the connection, you can use the diode of the multimeter to detect, and slide the test pen on the circuit board to detect;
Whether the polarity of the diode, transistor, integrated device and electrolytic capacitor is connected incorrectly.
Whether there is a short circuit in the power interface. If the power supply is not powered on before debugging, the power supply will be short-circuited, which may cause the power supply to burn out, and sometimes cause more serious consequences. Use a multimeter to measure the input impedance of the power supply, which is a necessary step. Before powering on, disconnect a power line and use a multimeter to check whether there is a short circuit between the power supply end and the ground.
When designing, a 0 ohm resistor can be used as a debugging method for the power supply part.
Do not solder the resistor before powering on. After checking that the voltage of the power supply is normal, solder the resistor on the PCB to power the subsequent units, so as to avoid burning the chip of the subsequent units due to abnormal power supply voltage when powering on. Add protection circuits to circuit design, such as using recovery fuses and other components.
Mainly check polar components, such as light-emitting diodes, electrolytic capacitors, rectifier diodes, etc., and whether the pins of transistors correspond.
First do open circuit and short circuit tests to ensure that there will be no short circuit after power-on. If the test points are set well, you can get twice the result with half the effort. The use of 0 ohm resistors is sometimes also beneficial for high-speed circuit testing.
After the above non-power-on detection is completed, the power-on detection can be started.

3.Power-on detection
(1)Power-on observation
After power-on, do not rush to measure electrical indicators, but observe whether the circuit has any abnormal phenomena, such as whether there is smoke, abnormal smell, touch the outer package of the integrated circuit, whether it is hot, etc.
If an abnormal phenomenon occurs, the power supply should be turned off immediately, and the power should be turned on again after the fault is eliminated.
(2)Static debugging
Static debugging generally refers to DC testing without adding input signals or only adding fixed level signals. The potential of each point in the circuit can be measured with a multimeter.
By comparing with the theoretical estimated value and combining with the analysis of the circuit principle, it is possible to determine whether the DC working state of the circuit is normal, and timely discover components in the circuit that are damaged or in a critical working state. By replacing components or adjusting circuit parameters, the DC working state of the circuit meets the design requirements.
(3)Dynamic debugging
Dynamic debugging is carried out on the basis of static debugging. A suitable signal is added to the input end of the circuit, and the output signal of each test point is detected in sequence according to the flow direction of the signal. If an abnormal phenomenon is found, the cause should be analyzed and the fault should be eliminated, and then debugging is carried out until the requirements are met.
During the test, you cannot rely on your feelings and impressions, and you must always observe with the help of instruments. When using an oscilloscope, set the signal input mode of the oscilloscope to the “DC” position. Through the DC coupling mode, you can simultaneously observe the AC and DC components of the measured signal.
Through debugging, check whether the various indicators of the functional blocks and the whole machine (such as the amplitude, waveform shape, phase relationship, gain, input impedance and output impedance, etc.) meet the design requirements. If necessary, further make reasonable corrections to the circuit parameters.

3.Other work in debugging electronic circuits
Develop debugging steps and measurement methods according to the working principle of the system to be debugged, determine the test points, mark the positions on the drawings and boards, draw debugging data record tables, etc.
Set up a debugging workbench, and equip the workbench with the required debugging instruments.
The layout of the instruments should be easy to operate and observe. Students often do not pay attention to this problem. When making or debugging the machine, the workbench is very messy, and tools, books, clothes, etc. are mixed with instruments, which will affect the debugging. Special reminder: When making and debugging, the workbench must be arranged cleanly and tidy.
For hardware circuits, the measuring instrument should be selected according to the system to be debugged, and the accuracy of the measuring instrument should be better than that of the system to be tested.
The debugging sequence of electronic circuits is generally carried out according to the signal flow direction, and the output signal of the previously debugged circuit is used as the input signal of the latter to create conditions for unified debugging.
For digital circuits implemented by programmable logic devices, the input, debugging and of programmable logic device source files should be completed, and the programmable logic device and analog circuit should be connected into a system for overall debugging and result testing.
During the debugging process, we should carefully observe and analyze the experimental phenomena, keep good records, and ensure the integrity and reliability of the experimental data.
4.Precautions in circuit debugging
Whether the debugging results are correct is largely affected by the correctness of the test quantity and the test accuracy. In order to ensure the test results, the test error must be reduced and the test accuracy must be improved. To this end, we need to pay attention to the following points:
(1)Correctly use the ground terminal of the test instrument:
For any electronic instrument that uses the ground terminal to connect the housing for testing, the ground terminal should be connected to the ground terminal of the amplifier. Otherwise, the interference introduced by the instrument housing will not only change the working state of the amplifier, but also cause errors in the test results.
According to this principle, when debugging the **** electrode bias circuit, if you need to test Vce, you should not connect the two ends of the instrument directly to the collector and **** electrode, but measure Vc and Ve to the ground respectively, and then subtract the two.
If you use a dry battery-powered multimeter for testing, since the two input terminals of the meter are floating, it is allowed to directly jumper between the test points.
(2)The input impedance of the instrument used to measure the voltage must be much larger than the equivalent impedance of the measured point.
If the input impedance of the test instrument is small, it will cause shunting during measurement, which will bring great errors to the test results.
(3)The bandwidth of the test instrument must be greater than the bandwidth of the circuit being tested.
(4)Correctly select the test point.
When the same test instrument is used for measurement, the error caused by the internal resistance of the instrument will be very different at different measurement points.
(5)The measurement method should be convenient and feasible.
When it is necessary to measure the current of a circuit, it is generally better to measure the voltage instead of the current, because the circuit does not need to be changed when measuring the voltage. The test is convenient. If you need to know the current value of a branch, you can get it by measuring the voltage across the resistor in the branch and converting it.
(6)During the debugging process, you should not only observe and measure carefully, but also be good at recording:
The content of the record includes experimental conditions, observed phenomena, measured data, waveforms and phase relationships. Only with a large number of reliable experimental records and compared with theoretical results can we find problems in circuit design and improve the design plan.
5.Failure during debugging
Carefully find the cause of the failure, and never dismantle the line and reinstall it when the failure cannot be solved. Because the reinstalled circuit may still have various problems, if it is a problem in principle, even reinstallation will not solve the problem.
We should regard fault finding and fault analysis as a good learning opportunity, and constantly improve our ability to analyze and solve problems through it.
- Fault inspection ideas
For a complex system, it is not easy to accurately find faults in a large number of components and circuits. The general fault diagnosis process starts from the fault phenomenon, through repeated testing, analysis and judgment, and gradually finds the fault.
- Fault phenomenon and cause of failure
Common fault phenomenon, the amplifier circuit has no input signal but has an output waveform. The amplifier circuit has an input signal, but no output waveform, or the waveform is abnormal. The series voltage-stabilized power supply has no voltage output, or the output voltage is too high and cannot be adjusted, or the output voltage regulation performance deteriorates, the output voltage is unstable, etc. The oscillation circuit does not produce oscillation, the counter waveform is unstable, etc.
The cause of the fault, the finalized product fails after a period of use, which may be component damage, short circuit and open circuit of the connection, or changes in conditions
- General method of checking faults
Direct observation method. Check whether the instrument is selected and used correctly, whether the level and polarity of the power supply voltage meet the requirements; whether the pins of polarity components are connected correctly, whether there are any wrong connections, missing connections, or mutual collisions.
Whether the wiring is reasonable; whether the printed board is short-circuited or broken, whether the resistors and capacitors are burnt or cracked, etc. Observe whether the components are hot or smoking, whether the transformer has a burnt smell, whether the filaments of the electron tube and oscilloscope are bright, whether there is high voltage sparking, etc. after power on.
Use a multimeter to check the static working point. The power supply system of the electronic circuit, the DC working state of semiconductor triodes and integrated blocks (including components, device pins, power supply voltage), and the resistance value in the circuit can all be measured with a multimeter. When the measured value differs greatly from the normal value, the fault can be found after analysis.
By the way, the static working point can also be measured using the “DC” input mode of the oscilloscope. The advantage of using an oscilloscope is that the internal resistance is high, and the DC working state and the signal waveform at the measured point, as well as possible interference signals and noise voltage, can be seen at the same time, which is more conducive to fault analysis.
Signal tracing method. For various complex circuits, a signal of a certain amplitude and appropriate frequency can be connected to the input end (for example, for a multi-stage amplifier, a sine signal of f=1000 HZ can be connected to its input end), and an oscilloscope can be used to observe the changes in waveform and amplitude from the front stage to the back stage (or vice versa). If there is an abnormality, the fault is at this stage. This is a method for in-depth inspection of the circuit.
Comparison method. When a circuit is suspected to have a problem, the parameters of this circuit can be compared one by one with the parameters of a normal circuit with the same working state (or the current, voltage, waveform, etc. analyzed in theory), and the abnormal situation in the circuit can be found out, and then the cause of the fault can be analyzed and the fault point can be determined.
Component replacement method. Sometimes the fault is more hidden and cannot be seen at a glance. If you have an instrument of the same model as the faulty instrument at this time, you can replace the components, components, plug-in boards, etc. in the instrument with the corresponding components in the faulty instrument to narrow the scope of the fault and further find the fault.
Bypass method. When there is a parasitic oscillation phenomenon, you can use an appropriate amount of capacitors, select an appropriate checkpoint, and temporarily bridge the capacitor between the checkpoint and the reference ground point. If the oscillation disappears, it means that the oscillation is generated near this or in the previous circuit. Otherwise, it is in the back, and then move the checkpoint to find it. It should be pointed out that the bypass capacitor should be appropriate and not too large, as long as it can eliminate harmful signals well.
Short-circuit method. It is a method of temporarily short-circuiting a part of the circuit to find the fault. The short-circuit method is effective for checking open-circuit faults, but it should be noted that the short-circuit method cannot be used for power supplies (circuits).
Open-circuit method. The open-circuit method is effective for checking short-circuit faults. The open-circuit method is also a method to gradually narrow the scope of suspected fault points. For example, a voltage-stabilized power supply is connected to a circuit with a fault, making the output current too large. We take the method of disconnecting a branch of the cir
cuit in turn to check the fault. If the current returns to normal after disconnecting the branch, the fault occurs in this branch.
During actual debugging. There are many ways to find the cause of the fault, and the above only lists a few common methods. These methods can be used flexibly according to the equipment conditions and fault conditions. For simple faults, one method can be used to find the fault point, but for more complex faults, multiple methods need to be used to complement and cooperate with each other to find the fault point.
In general, the conventional approach to finding faults is:
First use direct observation to eliminate obvious faults
Then use a multimeter (or oscilloscope) to check the static working point
The signal tracing method is a simple and intuitive method that is generally applicable to various circuits and is widely used in dynamic debugging.






