Only after learning the basics can you start circuit design

Embedded design is a huge project. Today, let’s talk about several precautions in hardware circuit design. First, let’s understand the embedded hardware architecture.

We know that the CPU is the soul of this system, and all peripheral configurations are related to it. This also highlights a feature of embedded design: hardware can be tailored. When doing embedded hardware design, the following points need to be paid attention to.

First, power supply determination

The role of power supply in embedded systems can be regarded as the role of air in the human body, or even more important: there is oxygen, carbon dioxide, and nitrogen in the air that people breathe, but the content is stable, which is equivalent to various noises in the power supply system. We hope to get a pure and stable power supply that meets the requirements, but due to various factors, it is just our dream. This needs to pay attention to two aspects:

a. Voltage

Embedded systems require various levels of power supplies, such as the common 5v, 3.3v, 1.8v, etc. In order to minimize the ripple of the power supply, LDO devices are used in embedded systems. If DCDC is used, it is not only large in size, but its ripple is also a headache.

b. Current

The normal operation of embedded systems requires not only stable and sufficient power supply, but also sufficient current. Therefore, when selecting power supply devices, its load needs to be considered. I usually leave a 30% margin when designing.
If it is a multi-layer board, the power supply part needs to be divided during layout. At this time, you need to pay attention to the division path and try to place a certain amount of power together. If it is a double-sided board, the trace width needs to be paid attention to. If the board allows, try to widen it. The appropriate decoupling capacitor is as close to the power pin as possible.

Second, determine the crystal oscillator

The crystal oscillator is equivalent to the heart of the embedded system. Its stability is directly related to its operating status and communication performance. Common oscillators include passive crystal oscillators and active crystal oscillators. First, determine its oscillation frequency, and secondly determine the crystal oscillator type.

a. Passive crystal oscillator

The selection of its matching capacitor and matching resistor is generally based on the reference manual. In the design of single-chip microcomputers, plug-in crystal oscillators are often used in combination with ceramic capacitors. In ARM, in order to reduce space and facilitate wiring, four-corner passive crystal oscillators are often used in combination with chip capacitors. Although we are familiar with the matching circuit of fixed crystal oscillator, in order to be foolproof, we still need to refer to the reference manual to determine the size of the capacitor, whether matching resistors and other details are needed.

b. Active crystal oscillator

It has a better and more accurate clock signal, but in comparison, it is more expensive than the passive crystal oscillator, so this is also a cost that needs to be paid attention to in hardware circuit design.

When designing a circuit board, it is necessary to pay attention to the crystal oscillator routing as close to the chip as possible, and the key signal is far away from the clock routing. Add a ground protection ring when conditions permit. If it is a multi-layer board, it is also necessary to keep the key signal away from the crystal oscillator routing.

Third, reserve a test IO port

In the embedded debugging stage, when the pin resources are abundant, I usually reserve an IO port to connect the LED or speaker to pave the way for the next software writing. During the operation of the embedded system, the IO interface is properly controlled to determine whether the system is operating normally.

Fourth, external storage device

If an embedded system has a power supply, crystal oscillator and CPU, then this is the smallest system we are familiar with. If the embedded system needs to run a larger operating system, then not only does the CPU need to have an MMU, but the CPU also needs to be connected to SDRAM and NANDFLASH. If the CPU has SDRAM and NANDFLASH controllers, then the use of address lines does not need to be considered too much in hardware design. If there is no relevant controller, then attention should be paid to the use of address lines.

This part is a key point in LAYOUT. The reason is to make the relevant signal lines of equal length to ensure equal signal delays and differential signal lines of clock and DQS. Various wiring techniques need to be used in combination when wiring, such as symmetrical distribution with CPU, daisy chain wiring, T-type wiring, which need to be selected according to the number of memories. Generally speaking, the more the number, the more complicated the wiring, but knowing the key points, everything can be solved.

Fifth, functional interface

The most important thing for an embedded system is to control peripheral modules through various interfaces to achieve the designer’s preset purpose. Common interfaces include serial ports (which can be used to connect Bluetooth, wifi and 3G modules), USB interfaces, network interfaces, JTAG interfaces, audio and video interfaces, HDMI interfaces, etc. Since these interfaces are connected to external modules, it is an important task to do a good job of electromagnetic compatibility design. In addition, pay attention to the use of differential lines when LAYOUT.

Sixth, screen

This function is listed separately because it is optional. If an embedded system is only used as a connector to connect peripheral device modules, connected to the computer host through relevant interfaces or directly hung on the network, then the screen is not needed. But if it is a consumer product that interacts frequently with users, it has to be said a few words.
Capacitive screen is the first choice for embedded screens. In circuit design, attention should be paid to the layout of touch screen connection lines and display connection lines. In the process of routing, try to be as close to the main control CPU as possible, and pay attention to the differential line of paired signals and the equal length of RGB control signals. The spacing between various signal routing lines follows the 3W rule to avoid mutual interference. In the design of the screen, it is necessary to ensure power and prevent interference to prevent the screen from flashing and flower screen.
The following courses can be tried for free: C language, electronics, PCB, STM32, Linux, FPGA, JAVA, Android, etc.
If you want to learn, you can contact me to make an appointment and attend the class for free.

Similar Posts

Leave a Reply