The PCB is designed, sent to the board factory for processing, and the next step is “A” (Assembly), which is the process of welding and debugging as we often say. This process requires good soldering ability, correct use of testing and measuring instruments, and standardized debugging process. Finally, it is necessary to test the function and performance of the designed PCB board and write a test report. Let me break it down one by one:
Welding is the basic skill of debugging circuit board.
Welding requires certain basic skills; Debugging requires certain skills and steps. For a new project, the two are combined. Debugging, welding, debugging, welding, debugging … step by step until all components are finally installed and all functions on the board are verified.
Therefore, as a hardware engineer who designs a circuit, he must first have a certain welding ability, a clear debugging idea and process, and the ability to analyze and solve various problems on the circuit board.
Some engineers said that our unit has a professional welding master, so I just need to be responsible for the design, so I don’t have to learn welding. Know that for most new designs, it is impossible for a hardware engineer to ask a professional master to install and power up all components at once. Everything will be Ok, and there will be various problems on the board. The board in the R&D stage must be debugged while welding. If you don’t have good welding skills, your debugging work will be subject to various factors, which will lead to the delay of the project’s construction period. Your own welding skills are not too hard, and a series of big troubles will also be caused by insignificant problems such as virtual welding and short circuit.
Therefore, to be a hardware engineer, you need to be proficient in 18 classes of martial arts-welding, baking, blowing holes and flying wires. The more comprehensive and refined the technology, the lower the probability of problems in debugging, and the smoother the debugging process.
Necessary debugging tools-testing and measuring instruments
Four pieces of conventional measurement.
The main battlefield of the hardware is the Lab, whose task is to Debug the circuit. Apart from the necessary tools such as soldering iron, wire stripper, solder, rosin, tweezers, etc., the four big tools that occupy a large area of the desktop and need multiple power outlets are the ones that look tall, big and tall and are used for routine testing and measurement.
Multimeter: Its main function is to measure the parameters in Ohm’s Law, such as on-off of circuit, impedance, voltage and current, and to judge the direction of diode. When the circuit board is not powered on or powered on, the problems on the circuit board can be quickly found by multimeter, especially the problems can be quickly locked by comparing the parameters of multiple circuit boards.
Stabilized DC power supply: The most commonly used dual-channel traceable power supply (negative voltage can track the adjustment of positive voltage to adjust the voltage automatically) can provide the required voltage/current for the circuit to be tested. The voltage can be adjusted from 0v to a relatively high level, such as 25V, and the adjustment accuracy is relatively high, which can accurately control the power supply to the circuit board. It has short-circuit protection, overcurrent protection (by setting a limited current) and other functions, and the ripple of the power supply is very low. It should be noted that the output terminal of the power supply has three terminals:+,-and GND (connected to the earth’s “ground” through the chassis of the power supply). The voltage you want to adjust the output is reflected in the+/-two terminals, which is a relative voltage value-for example, 5V. Only by connecting the “GND” and “-“terminals, the voltage value you get at the “+”terminal is relative.
With the miniaturization and low power consumption of electronic products, more and more products supply power to the circuit board through the 5V port of USB, and multiple sets of voltages required on the circuit board are generated by switching and linear voltage stabilization. Therefore, USB power ports that can be found everywhere-USB port of PC, USB charging port on power strip, power adapter of mobile phone, charging treasure, etc. can be used as power supply. However, it should be noted that the output current capacity of different adapters is very different. It is necessary to ensure that the output power of adapters can meet the power supply requirements of the board to be debugged, and there is a certain margin, otherwise it will lead to unstable system work. The USB cable between the adapter and the circuit board has impedance, which will cause a large voltage drop on the wire when the power supply current is large (Ohm’s Law V = I * R). Make sure that the voltage that reaches the circuit board after the voltage drop of the USB cable meets the requirements of the input power supply voltage on your board; As the USB adapter is 5V DC which is regulated by AC-DC switching from 220V AC, the output 5VDC will have large switching noise. Therefore, in the specific application, make sure that the noise on the adapter you choose will not affect the performance of the board, and the ripple performance of different quality USB power adapters is also very different.
Signal generator (signal source): It is used to provide excitation signals with a certain amplitude range and a certain frequency range to the circuit under test (DUT), and sometimes noise with various characteristics is added to the input signal to evaluate some characteristics of the circuit under test. The mainstream signal sources in the market are all arbitrary waveform generators synthesized by DDS, which can easily set the waveform, frequency and amplitude of excitation signals. The commonly used measurement excitation signals in analog circuit debugging are sine waves with adjustable amplitude/frequency, and the commonly used excitation signals in digital circuit debugging are pulse signals with adjustable repetition frequency and adjustable pulse width.
Oscilloscope: It can be called the eyes of our engineers. It can visually observe the changes of voltage or current of any electrical signal on the circuit board with time, and can accurately measure various parameters (such as amplitude, frequency, rising edge, etc.), and then determine the circuit characteristics according to the changes of these signals. To make good use of the oscilloscope, we must first deeply understand several key technical indicators of the oscilloscope-analog bandwidth, sampling rate and storage depth, and correctly use the probe in the measurement.
In addition to the conventional four items, there are spectrum analyzer for frequency domain measurement, logic analyzer for digital logic and time sequence relationship, vector network analyzer for network communication, etc. These will be configured according to the needs of the measured object.
Pocket instrument:
Equipping more than one instrument is not only expensive, but also takes up a large space, can’t be portable, and is not flexible and convenient to use. In recent years, the older the multifunctional and inexpensive pocket instruments are, the more they are welcomed by engineers, college teachers and students, such as Analog Discovery II of Digilent (acquired by NI) and ADALM2000 of ADI, all of which have integrated oscilloscopes, signal sources, power supplies, multimeters and frequency spectrometers in palm-sized boxes.
The field of instruments is constantly evolving, in order to equip our engineers with lighter, clearer and more powerful “eyes”. Of course, to make good use of these instruments, we need to have a deep understanding of their principles, and combine our daily testing experience to constantly improve our ability to observe and analyze problems, and quickly upgrade to an excellent hardware engineer.
Debugging process of PCB
With the basic skills of welding, let’s talk about the steps to be followed and the key points to be paid attention to when debugging PCB. First, let’s look at the following flow chart:
From this figure, we can divide the debugging process of PCB into three major parts:
1. Make commissioning plan.
This step can be done after you send out the Gerber file and before you get the finished bare board from the PCB factory, so that you can start the next step after you get the board. The so-called plan is to make full preparations for the actual operation, so you should first think clearly about the items and contents to be debugged and tested; Tools, instruments and equipment that you must use in debugging and testing and can help you speed up the whole process; And the steps of debugging and testing.
For an enterprise or a project team, there are basically only a few types of products developed. Therefore, a detailed and reasonable standard debugging template can be formulated by the project leader or experienced old engineer, and continuously enriched and improved in the debugging process of each PCB board, so that all details can be covered, and detours caused by missing important links in the debugging process can be avoided.
2 Bare board test
When you get the bare board from the PCB factory, don’t weld the components in a hurry. First, do some basic tests on the bare board to ensure that there are no obvious problems in PCB design and no processing problems in the PCB factory (mainly caused by precision and process). The two most commonly used tools for bare board testing-own eyes (sometimes with the help of magnifying glass, electron microscope, etc.) and multimeter. The former can physically check some obvious problems, such as virtual soldering, short circuit, whether the apertures of vias and pads are appropriate, and whether the packaging of devices is wrongly painted, etc. With the help of multimeter, it can be judged whether there is short circuit between each group of power supply and ground on the board, etc. If these problems exist, but they are not checked, it will be more difficult to judge after the devices are welded to the board.
3 Welding debugging
It’s not until this step that you start welding components. Don’t weld all the components to the board at once. This will cause too many problems to get mixed up, and the difficulty of debugging will increase geometrically. The best way is to weld gradually according to the properties of the circuit, for example, first fix the power supply part, because there is no power supply for the whole board, and other circuits can’t work normally, so you can weld the devices of the power supply part first, and test with instruments until the power supply circuit meets the design requirements, and then weld the circuits of other parts down.
On most circuit boards, MCU or FPGA is the core of the circuit. Therefore, after the welding and debugging of the power supply is completed, you can start to install and debug the devices of the processor to ensure that the voltages of each circuit are correct, the ripple meets the system requirements, the clock starts to vibrate and the working frequency is correct, and a simple test program can be programmed to display the required state through LED.
After the installation and debugging of the core MCU or FPGA circuit, you can start to toss the analog signal link devices. Generally, analog circuits are from small signals to large signals, and from analog to digital signals through ADC. Therefore, we need to debug step by step along the direction of signal flow until each level of the whole signal flow can meet the requirements of system design in its amplitude and bandwidth. What should be paid attention to here is the impedance matching. If all the devices of the later stage circuit are not installed, the performance of the previous stage circuit may be deteriorated because the impedance does not meet the requirements, but it does not mean that it is the problem of your circuit. You need to temporarily connect an equivalent load at the short output.
Experienced hardware engineers usually place some test points at key signals in new projects, so that they can observe with instruments during debugging; At the same time, some 0-ohm resistors will be placed between the front and rear stages, just like the sluice. The front and rear stages are connected by welding the 0-ohm resistors. Remove this resistor and the front and rear stages will be disconnected, so that there will be no influence between the front and rear stages. After debugging and performance testing, when the system is optimized and the final version of PCB is made, these test points and 0 ohm resistors can be removed.
In the process of debugging, especially for high-frequency circuits and small-signal analog circuits, the problems that often occur are not those on the board, but those caused by improper testing methods. It is necessary to learn to use an oscilloscope and its probe, and to know clearly the probe of the oscilloscope and the correct connection point of its grounding terminal.