C8051F064 is a new type of microcontroller launched by Cygnal (now Silicon Lab) in 2000. It has the advantages of fast running speed and compatibility with 8051 instruction system. It has been welcomed by the majority of 8031 users in China as soon as it was launched. Many people have learned to use it and have certain commercial applications. However, many problems have been found in specific use, and anti-interference ability is one of them. I will discuss it in detail in the article below. First, explain my system.
In this design, the system consists of: 1. Power monitoring instrument - responsible for collecting the voltage and current of three alternating currents, LCD display, including keyboard operation, data recording and other functions, and controlling the actuator to adjust the voltage and current of the power grid according to the changes in voltage and current, so as to achieve the function of power saving, and has the ability to remotely transmit data via modbus networking. 2. Host computer database system - detect and record the status and power data of each terminal.
Obviously, the power monitor plays a core role in this system and is the key to the normal operation of the system. The core device is the C8051F064 single-chip microcomputer, and its internal integrated AD and EEPROM and other peripherals are used. At the beginning of the design, only the realization of the function was considered, and the anti-interference problem was not paid much attention. Considering that the function of this product is not very complicated, it is mainly based on the previous experience of using AT89C51 to complete product design. I casually drew the PCB and focused on the software writing. The development of the prototype was quickly completed and entered the debugging stage.
When debugging in the laboratory, everything went smoothly and I was very proud of it. As the project progressed, it was time for the system joint debugging. At this time, an unexpected situation occurred. When the power monitor was installed in the power regulating cabinet for the first time, the static operation was normal, the three voltage and current were displayed normally, the data communication was normal, and the measurement was accurate. However, when the main circuit was connected to test the grid compensation function, the actuator frequently jumped, the screen of the power monitor was sometimes bright and sometimes dark, the buzzer sounded long, and the actuator was overwhelmed by the frequent repeated adjustments and emitted white smoke.
Emergency shutdown! It feels strange. Why? I didn't give up and tried again. This time, I didn't connect the main circuit first. I tested it with no load. Everything was normal after starting it. Then I connected it to the main circuit. The situation happened again. This time, the power monitor didn't work at all. I decided not to test it blindly. I removed the controller and conducted a detailed analysis. I connected the IDE debugging line and found that the reason why the monitor didn't work was that the internal EEPROM and the FLASH storing the program could not be written, and the IDE debugging software could not be connected normally. I changed a single-chip microcomputer and downloaded the program again, and it worked normally again. It was confirmed that the single-chip microcomputer was damaged. So what caused the damage to the FLASH and the EEPROM on the chip? After repeatedly searching the DATASHEET, it was found that the FLASH had a life of about 1,000 times of reading and writing. In order to store random parameters locally in the program, there was a code to burn the EEPROM on the chip. Under normal circumstances, it was enough. Was it because the program ran away and the variables were changed, causing excessive erasure? There is a great possibility. In order to verify that the limit of random write times was added to the program, the fault still exists after the test, but the EEPROM is not damaged, which confirms the above assumption. So what causes the interference? After discussing with the power engineer, it was found that the most likely source is the high-power AC contactor. When the main AC contactor is powered on at the moment the main circuit is connected, a huge electromagnetic pulse will be generated. Since the distance between the monitor and the AC contactor is very small, it is possible to sense the electromagnetic interference in the space. At the same time, the C8051F series microcontroller is a 3V system that can be erased online, and its anti-interference ability is very weak. In addition, the AD interface of the microcontroller has PT and CT mutual inductors. Although they have an isolation effect, they have huge voltage and current jumps (di/dt, du/dt) at the moment of grid connection, which may also cause interference.
According to the initial test and analysis results, the circuit is changed as follows:
1. Widen the power line width of the microcontroller on the PCB as much as possible and shorten the length as much as possible.
2. Use as many large-capacity filter capacitors as possible on the power line of the microcontroller.
3. Connect a transient suppression diode to ground in parallel on the microcontroller power line.
4. Expand the area of the ground wire as much as possible, and make more vias between the two layers to increase the grounding effect.
5. A large number of holes are also punched between the two layers of the 3V power supply to increase the contact effect.
6. Control the peripherals through optocouplers through the IO of the microcontroller, and make the connection from the IO pin of the microcontroller to the optocoupler as short as possible, and incorporate transient suppression diodes on the lines that cannot be shortened.
7. The AD interface is also incorporated with transient suppression diodes.
8. Use the internal clock of the microcontroller, not the external clock, and ground the external clock pin.
9. When the debugging signal lines of C8051F064's IDE interface MSO, MSI, etc. are not in use, use a jumper to ground them.
According to the above points, after a long period of LAYOUT and repeated modifications, confirm that it has reached a satisfactory level and then make the plate.
After the actual online debugging, everything was OK! After the aging, high and low temperature, vibration and other tests, it can run normally. After 2 years of actual operation on site, there was no failure.
Lessons learned:
1. When designing a product with relatively simple functions, the design is not simple considering the various complex situations that may arise in actual engineering use.
The anti-interference ability of a 2.3V powered microcontroller may not be as good as that of a 5V powered microcontroller if the design is not careful.
3.FLASH microcontrollers may not be as good as OTP microcontrollers if the design is not careful.
4. With the advancement of single-chip microcomputer technology, its hardware integration is getting higher and higher, which requires designers to have a relatively high comprehensive application ability. Only by combining analog and digital design can stable and reliable products be designed.
Previous article:Introduction of charger circuit based on MCU AT89C2051
Next article:Design of electronic switch based on RS485 single chip multi-machine serial communication
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- MPS live broadcast at 10:00 this morning [How much do you know about the application of inductors in switching power supplies] (entry starts at 9:30)
- 【MM32 eMiniBoard Review】USB Test
- MN12832L VFD screen driver based on STM32 platform driver code
- TouchGFX design" + graph waveform drawing 1
- About the PCB design of MP2303
- LC parallel resonance frequency selection circuit
- EEWORLD University - Electronic Design from Scratch
- 5G Basic Knowledge Special
- Review Weekly Report 20220627: High-end products & new products are here~NXP high-speed LS1028A, Arteli Bluetooth new product WB415
- Teach you how to implement J-Link batch programming through batch commands