For a newly designed circuit board, debugging often encounters some difficulties, especially when the board is large and has many components, it is often difficult to start. But if you master a set of reasonable debugging methods, debugging will be twice the result with half the effort. For the new PCB board just brought back, we must first roughly observe whether there are any problems on the board, such as whether there are obvious cracks, short circuits, open circuits, etc. If necessary, you can check whether the resistance between the power supply and the ground wire is large enough.
Then it is time to install the components. If you are not sure that the independent modules are working properly, it is best not to install them all at once, but install them one by one (for smaller circuits, you can install them all at once). This makes it easier to determine the scope of the fault, so as to avoid being at a loss when encountering problems. Generally speaking, you can install the power supply first, and then power on to test whether the output voltage of the power supply is normal. If you are not very sure when powering on (even if you are very sure, it is recommended that you add a fuse just in case), you can consider using an adjustable regulated power supply with current limiting function. First preset the overcurrent protection current, then slowly increase the voltage value of the regulated power supply, and monitor the input current, input voltage and output voltage. If there are no problems such as overcurrent protection during the upward adjustment, and the output voltage has reached normal, it means that the power supply is OK. Otherwise, disconnect the power supply, find the fault point, and repeat the above steps until the power supply is normal.
Next, gradually install other modules. After each module is installed, power it on for testing. Follow the above steps when powering on to avoid overcurrent and component burnout due to design errors and/or installation errors.
There are generally several ways to find the fault:
① Voltage measurement method. First, check whether the voltage of each chip power pin is normal, then check whether various reference voltages are normal, and whether the working voltage of each point is normal. For example, when a general silicon transistor is turned on, the BE junction voltage is about 0.7V, and the CE junction voltage is about 0.3V or less. If the BE junction voltage of a transistor is greater than 0.7V (except for special transistors, such as Darlington, etc.), it is possible that the BE junction is open.
②Signal injection method. Add the signal source to the input terminal, and then measure the waveform of each point in turn to see if it is normal, so as to find the fault point. Sometimes we also use a simpler method, such as holding a pair of tweezers in hand to touch the input terminal of each level to see if there is a response at the output terminal. This is often used in audio, video and other amplification circuits (but be aware that this method cannot be used in circuits with hot base plates or high voltages, otherwise it may cause electric shock). If there is no response when touching the previous level, but there is a response when touching the next level, it means that the problem lies in the previous level and should be checked in detail.
③ Of course, there are many other ways to find the fault point, such as looking, listening, smelling, etc. "Looking" means to see if the component has obvious mechanical damage, such as cracking, burning, deformation, etc.; "Listening" means to listen to whether the working sound is normal, such as some things that should not be ringing are ringing, the places that should be ringing are not ringing or the sound is abnormal, etc.; "Smelling" means to check whether there is any odor, such as the smell of burning, the smell of capacitor electrolyte, etc. For an experienced electronic maintenance personnel, these odors are very sensitive; "Touching" means to use your hands to test whether the temperature of the device is normal, such as too hot or too cold. Some power devices will heat up when working. If they feel cool to the touch, it can basically be judged that it is not working. But if the place that should not be hot is hot or the place that should be hot is too hot, it is not okay. For general power transistors, voltage regulator chips, etc., it is completely fine to work below 70 degrees. What is the concept of 70 degrees? If you press your hand on it and can hold it for more than three seconds, it means that the temperature is about 70 degrees.
If you want to know more debugging methods and experience, you can find some books on home appliance maintenance. A good designer should first be a good maintenance person.
First, you should confirm whether the power supply voltage is normal. Use a voltmeter to measure the voltage between the ground pin and the power pin to see if it is the power supply voltage, such as the commonly used 5V. The next step is to check whether the reset pin voltage is normal. Measure the voltage values when the reset button is pressed and released to see if they are correct. Then check whether the crystal oscillator is oscillating. There are two ways: 1. Generally, use an oscilloscope to view the waveform of the crystal oscillator pin. Note that the "X10" position of the oscilloscope probe should be used. 2. Measure the voltage of the 18th and 19th legs respectively. The voltage of the 18th leg is about 2V, and the voltage of the 18th leg is slightly higher than that of the 19th leg!
Another way is to measure the IO port level in the reset state. Press and hold the reset button, and then measure the voltage of the IO port (except the P0 port that is not connected to the external pull-up) to see if it is a high level. If it is not a high level, it is mostly because the crystal oscillator has not started. Another thing to note is that if you use the on-chip ROM (this is the case in most cases, and now there are very few people who use external expansion ROM), you must pull the EA pin high, otherwise the program will run around. Sometimes it works with the emulator, but it doesn't work when burning into the chip. It is often because the EA pin is not pulled high (of course, the crystal oscillator does not start oscillating is also the only reason). After checking the above points, the fault can generally be eliminated. If the system is unstable, it is sometimes caused by poor power supply filtering. Connecting a 0.1uF capacitor between the power pin and the ground pin of the microcontroller will improve it. If the power supply does not have a filter capacitor, you need to connect a larger filter capacitor, such as 220uF. When the system is unstable, you can try to connect a capacitor (the closer to the chip, the better).
Previous article:Design of Single Chip Microcomputer Control System for Stepping Motor
Next article:The resistance value of the pull-up resistor of the P0 port of the 51 single-chip microcomputer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- LM358 op amp problem, please give me some advice
- How to Measure Circuit Current Using a Shunt Resistor
- TI's ultra-low power solution gives birth to TWS true wireless
- 【TI millimeter wave radar evaluation】+SDK development environment
- PCB News: Zhongjing Electronics plans to acquire 45% of Yuansheng Electronics for RMB 270 million to achieve horizontal integration of PCB
- How to use EPI general mode to communicate with FPGA in TM4c129 series microcontroller
- Before buying a cable fault tester, you must know about its manufacturer. How to find a good time...
- High-speed PCB design technology (Chinese)
- Buck-boost DCDC TPS63810 application in TWS earphones
- Purgatory Legend-IIC Battle