Several key issues to consider in embedded hardware design

2020-12-16 14:36:26 hongling

In an embedded development project, first need to do a demand analysis, and then comprehensively consider the demand analysis, here are a few issues that should be paid special attention to when designing embedded hardware.

  1, the choice of MCU

   When choosing an MCU, consider the functions that the MCU can complete, the price of the MCU, power consumption, power supply voltage, I/O port level, the number of pins, and the package of the MCU. The power consumption of the MCU can be found from its electrical performance parameters. The power supply voltage has 5V, 3.3V and 1.8V ultra-low voltage power supply modes. In order to allocate the I/O resources of the MCU reasonably, a pin allocation table can be drawn during the MCU selection for future design use.

  2, power supply

   Consider the power requirements of embedded systems. For example, embedded systems need several power sources, such as 24V, 12V, 5V or 3.3V, etc., and estimate how much power or maximum current (mA) each needs. A certain margin should be considered when calculating the total power of the power supply, which can be calculated according to the formula "total power of the power supply = 2 × total power of the device".

  Considering the demand for power fluctuation of chips and devices. Generally, the allowable power supply fluctuation range is within ±5%. The reference voltage of the A/D conversion chip is generally required to be within ±1%.


Embedded hardware design


  Consider whether the working power supply is a power supply module or an external power supply.

  3, ordinary I/O port

   Pull-up and pull-down resistors: Consider using internal or external pull-up/pull-down resistors. The internal pull-up/pull-down resistance is generally around 700Ω, which is not suitable for low power consumption mode. The external up/down resistance can be selected from 10KΩ to 1MΩ as required.

   switch input: must ensure that the high and low voltages are distinct. Ideally, the high level is the power supply voltage, and the low level is the ground level. If the external circuit cannot distinguish the high and low levels correctly, but there is still a large pressure difference between the high and low levels, consider using A/D acquisition method to design and process. For the sampling point in the voltage division mode, the selection of the voltage divider resistance should be considered, so that the current through the sampling port at this point is not less than the sampling minimum input current, otherwise sampling cannot be performed.

   Switch output: The basic principle is to ensure that the output high level is close to the power supply voltage, and the low level is close to the ground level. The absorption current of the I/O port is generally greater than the discharge current. The best way to control low-power components is to use low-level control. Under normal circumstances, if the load requirement is less than 10mA, it can be directly controlled by the chip pins; when the current is 10~100mA, it can be controlled by a transistor, and when it is 100mA~1A, it can be controlled by IC; a larger current is suitable for relay control, and it is recommended to use it Photoelectric isolation chip.

  4, A/D circuit and D/A circuit

  A/D circuit: To be clear about the basic principles of front-end sampling, use different collection circuits for resistance, current and voltage sensors. If the collected signal is weak, also consider how to amplify the signal.

  D/A circuit: Consider what kind of output circuit the MCU pin uses to control the actual object.

   5. Control circuit

   The external control circuit should pay attention to design redundancy and back-testing, and have appropriate signal isolation measures. When evaluating the layout of the design, it is necessary to lead out detection holes at the input and output ends of the component to facilitate the measurement when troubleshooting errors.


Embedded hardware design


  6, consider low power consumption

   The low-power design is not only for saving power, but also for reducing the cost of power modules and cooling systems. The reduction of current also reduces the interference of electromagnetic radiation and thermal noise. As the temperature of the device decreases, the life of the device is extended accordingly. To achieve low power consumption, the following points should be paid attention to:

   Not all bus signals must be pulled up. There are also power consumption issues with pull-up and pull-down resistors to consider. The pull-up and pull-down resistor pulls a simple input signal, and the current is less than tens of microamperes. But pulling a driven signal, its current will reach the milliampere level. So it is necessary to consider the influence of the pull-up and pull-down resistors on the total power consumption of the embedded system.

   Do not suspend unused I/O ports. If they are vacant, a little bit of interference from the outside may become an input signal that oscillates repeatedly, and the power consumption of MOS devices basically depends on the number of flips of the gate circuit.

   The power consumption of some small peripheral chips also needs to be considered. It is difficult to determine the power consumption of the internally less complex chip, which is mainly determined by the current on the pin. For example, some chip pins consume less than 1 mA when there is no load, but when the load increases, it may consume a lot of power.

  7, consider low cost

   Correctly choose the resistance value and capacitance value

For example, a pull-up resistor, you can use 4.5K-5.3K resistance, you think you choose an integer 5K, in fact, there is no 5K resistance on the market, the closest is 4.99K (accuracy 1%), followed by 5.1 K (accuracy of 5%), its cost is 4 times and 2 times higher than that of 4.7K with an accuracy of 20%. The resistance values of 20% precision resistors are only 1, 1.5, 2.2, 3.3, 4.7, 6.8 (including integer multiples of 10); similarly, 20% precision capacitors have only the above values, if you choose other types The value must use higher precision, the cost will be doubled several times, but it will not bring any benefits.

   indicator light selection

  What color should the indicator light on the panel choose? Some people choose according to the color. For example, they choose blue if they like blue. However, other colors such as red, green, yellow and orange have been mature for decades, regardless of the size (under 5mm), and the price is generally less than 50 cents, while blue was invented in the past three or four years, and the technology is mature. Degree and supply stability are both poor, but the price is four or five times more expensive.

   Don’t choose the best

   In a high-speed embedded system, not every part of it works at a high speed, and every time the device speed increases by one level, the price almost doubles, and it also has a great negative impact on signal integrity problems.