Click the card above to follow and learn moreEmbedded design is a huge project, today we will talk about several considerations in hardware circuit design. First, let’s understand the hardware architecture of embedded systems.We know that the CPU is the soul of the entire system, and all peripheral configurations are related to it. This also highlights a characteristic of embedded design: hardware can be trimmed. In embedded hardware design, the following points need to be focused on.
1. Determining the Power Supply
The role of power supply in embedded systems can be seen as equivalent to the role of air for the human body, even more important: the air we breathe contains oxygen, carbon dioxide, and nitrogen in stable amounts, which is equivalent to various noise in the power supply system. We hope to obtain a clean and stable power supply that meets requirements, but due to various constraints, it remains a dream. This needs to focus on two aspects:
a. Voltage
Embedded systems require various levels of power supply, such as the common 5V, 3.3V, 1.8V, etc. To minimize power supply ripple, LDO devices are used in embedded systems. If DC-DC is used, not only is it large, but its ripple is also a headache.
b. Current
Normal operation of embedded systems requires not only a stable and sufficient power supply but also adequate current. Therefore, when selecting power supply devices, the load needs to be considered. I usually leave a 30% margin when designing.
If it is a multilayer board, the power supply section needs to be split during layout. At this time, attention should be paid to the split path, and a certain amount of power supply should be placed together as much as possible. If it is a double-sided board, the width of the traces needs to be considered, and they should be widened as much as possible within the board’s limits. Suitable decoupling capacitors should be placed as close to the power pins as possible.
2. Determining the Crystal Oscillator
The crystal oscillator is equivalent to the heart of the embedded system, and its stability directly affects its operating state and communication performance. The common types of oscillators include passive and active crystal oscillators. First, the oscillation frequency needs to be determined, and then the type of crystal oscillator needs to be established.a. Passive Crystal OscillatorThe selection of matching capacitors and matching resistors is generally based on the reference manual. In microcontroller design, plug-in crystal oscillators are often used with ceramic capacitors. In ARM designs, to save space and facilitate wiring, four-corner passive crystal oscillators are often used with surface mount capacitors. Although we are familiar with the matching circuit of fixed crystal oscillators, to ensure everything is foolproof, we still need to refer to the manual to determine the capacitor size and whether matching resistors are needed among other details.b. Active Crystal OscillatorIt provides a better and more accurate clock signal, but compared to passive crystal oscillators, it is more expensive. Therefore, this is also a cost consideration in hardware circuit design.When designing the circuit board, care should be taken to keep the crystal oscillator traces as close to the chip as possible, and critical signals should be kept away from clock traces. If conditions permit, grounding protection rings should be added. If it is a multilayer board, critical signals should also be kept away from crystal oscillator traces.
3. Reserve Test IO Ports
During the debugging phase of embedded systems, when there are abundant pin resources, I usually reserve an IO port to connect an LED or a buzzer to lay the groundwork for the next step of software development. During the operation of the embedded system, this IO interface can be controlled appropriately to determine whether the system is running normally.
4. External Memory
An embedded system with a power supply, crystal oscillator, and CPU is our familiar minimum system. If this embedded system needs to run a larger operating system, not only does the CPU need an MMU, but it also requires external SDRAM and NAND FLASH. If the CPU has SDRAM and NAND FLASH controllers, then there is no need to consider the use of address lines too much in hardware design. If there are no related controllers, then the use of address lines needs to be considered.
This part is a focus during LAYOUT as it is essential to ensure that the related signal lines are of equal length to ensure equal signal delay, and the clock and DQS differential signal lines should be routed properly. Various wiring techniques need to be comprehensively used during the routing process, such as symmetrical distribution with the CPU, daisy chain wiring, and T-shaped wiring. The choice of these techniques depends on the number of memory chips; generally, the more chips, the more complex the wiring. However, knowing the key points makes everything easier.
5. Functional Interfaces
The most important thing for an embedded system is to control peripheral modules through various interfaces to achieve the designer’s preset goals. Common interfaces include serial ports (which can be used to connect Bluetooth, WiFi, and 4G modules), USB interfaces, network interfaces, JTAG interfaces, audio and video interfaces, HDMI interfaces, etc. Since these interfaces connect with external modules, good electromagnetic compatibility design is an important task. In addition, attention should be paid to the use of differential lines during LAYOUT.
6. Screen
This function is listed separately because it is optional. If an embedded system only serves as a connector to connect peripheral device modules through related interfaces to a computer host or directly to the network, then a screen is not necessary. However, if a consumer product is created that frequently interacts with users, it must be mentioned.The capacitive screen is the main component of embedded screens. During circuit design, attention should be paid to the layout of touch screen connection lines and display screen connection lines. During routing, they should be kept as short as possible and close to the main control CPU, while also ensuring paired signal differential lines and equal-length RGB control signal lines. The spacing between various signal traces should follow the 3W rule to avoid mutual interference. In screen design, it is crucial to ensure power and prevent interference to avoid flickering and distortion of the screen.
Source: Internet, infringement will be deleted.
–END–
Recommended Reading
Estimating MOSFET Drive Current
Ten Considerations for Peripheral Circuit Design of Microcontrollers
Understanding MOSFET: The Miller Effect You Must Know