Hardware circuit design guide: five core steps and common misunderstandings detailed explanation

2024-07-09 10:46:29 1497

summarize

1) General idea

The design of the hardware circuit, the large framework and the architecture to figure out, but to do this is not easy. Some of the big framework may have been thought of by their bosses and teachers, and they just realized the idea concretely; But there are also some to design their own framework, it is necessary to find out what functions to achieve, and then find if there is a reference board that can achieve the same or similar functions. The more experienced engineers know how to use the work of others, the more they will learn from the work of others.

2) Understand the circuit

If you find a reference design, then congratulations, you can save a lot of time (both pre-design and post-debugging). copy it right away? NO, it is better to understand and understand it first, on the one hand, it can improve our circuit understanding ability, and on the other hand, it can avoid mistakes in design.

3) Didn't find a reference design? it doesn't matter. First determine the large IC chip, find datasheet, see whether its key parameters meet their requirements, which are the key parameters they need, and whether they can understand these key parameters

This is a reflection of the ability of hardware engineers, which also needs to be slowly accumulated over a long period of time. During this period, be good at asking questions, because what you don't understand, others often can wake you up in a word, especially hardware design.

4) Hardware circuit design is mainly three parts, schematic diagram, PCB, Bill of materials (BOM) table.

Schematic design is to convert the previous ideas into circuit schematic. It looks a lot like our textbook circuit diagram. PCB involves the actual circuit board, it is based on the schematic conversion of the net table (the net table is the bridge between the schematic diagram and the PCB), and the package of the specific components is placed (layout) on the circuit board, and then connected to its electrical signal (wiring) according to the fly line (also known as the pre-draw line). After the PCB layout is completed, which components should be used should be summarized, so we will use the BOM table.

5) What tools do you use? Protel, that is, Altium is easy to get started, more popular in China, cope with the general work is enough, suitable for the beginning of the designer to use.

In fact, whether you use simple protel or complex cadence tools, the hardware design is the same (protel's operation is similar to windwos, which is post-command; cadence's product concept & allegro is pre-command, used to protel, suddenly turned to cadence tools, will not be used to this reason).

The major links of design should have: schematic design, PCB design, and BOM table production.

Design process

1) Establishment of schematic library

To place a new component on the schematic, we must create a library for that component. The library mainly defines the pin definition of the new component and its properties, and is represented in a concrete graphical form (we often see a rectangle (representing its IC BODY), surrounded by many short lines (representing the IC pin)).

protel is extremely easy to create libraries, and because many people use them, many components can find ready-made libraries, which is extremely convenient for users. Should be clear ic body, ic pins, input pin, output pin, analog pin, digital pin, power pin and other differences.

2) With sufficient library, you can draw on the schematic diagram, according to the requirements of the datasheet and system design, through the wire to connect the relevant components

Add line and text comments where relevant. The difference between wire and line is that the former has electrical properties and the latter does not. wire is good for connecting to the same network, line is good for annotating graphs.

At this time, some basic concepts should be clear, such as: wire, line, bus, part, footprint, and so on.

3) After this step, we can generate the netlist, which is the bridge between the schematic and the pcb

The schematic is a form that we can recognize, and to convert the computer into a pcb, it must convert the schematic into the form that it recognizes, netlist, and then process it and convert it into a pcb.

4) Get netlist, draw pcb immediately? Don't worry. Do the ERC first

ERC stands for Electrical Code Inspection. It can troubleshoot some basic design errors of the schematic diagram, such as multiple outputs connected together and other problems, related recommendations: Electronic engineers manual: PCB Layout creepage distance and electrical clearance determination criteria. But be sure to check your schematic carefully and don't rely too much on the tool, after all, the tool does not understand your system, it is purely based on some basic rules to check.

5) Did you get a pcb from netlist, a bunch of dense components, and countless flying wires? Oh, don't worry. Take your time

6) Determine the size of the board frame

Draw a frame in the keepout area (or mechanic area), which will limit the area you wire. Need to consider the board length, board width (sometimes, also have to consider the board thickness). Of course, the layering has to be considered. (Laminated means that there are several layers of the board, how to apply, such as a total of 4 layers of the board, the top layer of signal, the first layer of power supply in the middle, the second layer of ground in the middle, and the bottom of the signal).

Terminology interpretation

post-command, for example if we want to copy an object, we select the object, then press ctrl+C, then ctrl+V(the copy command occurs after object is selected). This is the way both windows and protel operate.

But concept is another way, we call it pre-command. Similarly, to copy an object, press ctrl+C, then select object, and then click outside (the copy command occurs before object is selected).

1) After determining the board frame, the component layout (placement) is very critical

It often determines the difficulty of later wiring. Which components should be placed on the front side and which components should be placed on the back side should be considered. But this is a matter of different opinions; The placement can be different from different angles.

In fact, they draw the schematic, understand all the component functions, and naturally have a clear understanding of the component placement (if you let a person who is not drawing the schematic to place the components, the result will often surprise you).

For beginners, pay attention to the isolation of analog components, digital components, and the placement of mechanical positions, while paying attention to the topology of the power supply.

2) The next step is wiring, which is often interactive with the layout

Experienced people can often see where the wiring can be successful at the beginning, if some places are difficult to wire also need to change the layout, for fpga design often also need to change the schematic to make the wiring smoother.

Wiring and layout problems involve many factors, and for high-speed digital parts, they are complicated by signal integrity issues, but often these problems are difficult to quantify or even calculate. Therefore, in the case of signal frequency is not very high, it should be the first principle.

3) Is it OK? Don't worry, check with DRC first

This is something that must be checked. DRC will mark the wiring completion coverage rate and the violation of the rules, and then check and correct them one by one according to this.

4) Some PCB also need to add copper (may lead to an increase in cost), make the wire part into a tear drop (the factory may help you add)

The final pcb file is converted to gerber file and can be delivered to pcb production. (Some directly to the pcb is also done, the factory will help you transfer gerber).

5) To assemble the PCB, prepare the BOM table, which can be directly exported from the schematic diagram

However, it should be noted that which parts of the schematic components should be on and which parts should not be on, and we should know what to do. For small batches or research boards, it is also convenient to use excel to manage them yourself (large companies often need professional software to manage them).

For beginners, the first version, it is not recommended to directly to the assembly factory or welding factory to weld all bom materials, which is not easy to troubleshoot problems. The best way is to prepare the components yourself according to the bom. After the board comes, step by step on the components, debugging.

debug

1) Get the board the first step to do what, do not rush to power supply to see the function, hardware debugging can not be completed in one step

First take the multimeter to see whether the key network is abnormal, mainly to see whether there is a short circuit between the power supply and the ground (although the manufacturer has helped you do the test, this step is still to see yourself, sometimes it seems that some steps are very cumbersome, but can save you a lot of time later!) In fact, short circuit is not only related to PCB, in any link of production may lead to this problem, IO short circuit generally will not cause disastrous consequences, but power short circuit......

2) No short circuit in the power network? Well, let's see if the power output is your ideal value

For beginners, it is best to debug a piece of IC chip, the first to go on the power chip.

3) Is the power network short-circuited? This is more troublesome, but it is necessary to carefully look at whether it is possible to have such a situation in your schematic diagram, and at the same time, combined with the method of secant line, step by step, what is the short circuit

Is the pcb problem (generally rotten pcb factory may occur this situation), or the assembly problem, or their own design problem.

4) Power chip no output? Check that your power chip input is normal, also need to check the enable signal, divider resistance, feedback network......

5) The output value of the power chip is not in the expected range?

If more than very outrageous, such as to 10%, then look at the partial voltage resistor first, the two partial voltage resistors generally use 1% accuracy, this you have not done, and look at the feedback network, which will also affect the range of your output power supply.

6) The power output is normal, don't be happy, if there are conditions, take the oscilloscope to see if the output of the power supply is normal

That is, grab the moment of power on and see the situation of power from scratch (as for why you want to see this, hey...... Professionals still want to see ~)

Power source

Undoubtedly, the power supply design is the most important part of the entire circuit board. The power is unstable. Don't talk about anything else. I don't want to use balabala to tell you how important it really is.

In the power supply design we use the most occasion is to get a stable "low" voltage from a stable "high" voltage, which is often said DC-DC(DC-DC), and the most used DC-DC power supply regulator chip there are two kinds, one is called LDO(low voltage difference linear regulator, we say after the linear regulator power supply, also refers to it), The other is called PWM(pulse width modulation switching power supply, we also call it switching power supply in this article).

We often hear that PWM is more efficient, but LDO is more responsive, why? Don't worry, let's see how they work first.

The following will cover some theoretical knowledge, but it is still very easy to understand, if you do not understand, then you really need to check your basics.

The working principle of linear stabilized power supply

线性稳压电源的工作原理

The figure is a simple diagram of the internal structure of a linear voltage regulator power supply. Our aim is to get a low voltage Vo from a high voltage Vs. In the figure, Vo is divided by two divider resistors to get V+, V+ is fed into the positive end of the amplifier (we call this amplifier the error amplifier), and the negative end of the amplifier Vref is the reference level inside the power supply (this reference level is constant).

The output Va of the amplifier is connected to the gate of the MOSFET to control the MOSFET impedance. When Va increases, the impedance of MOSFET increases. When Va changes, the impedance of MOSFET becomes smaller. The voltage drop on the MOSFET will be Vs-Vo.

Now let's look at how Vo is stable, assuming Vo becomes smaller, then V+ will become smaller, the output Va of the amplifier will also become smaller, which will lead to the impedance of the MOSFET becomes smaller, so after the same current, the pressure difference of the MOSFET will become smaller, so the Vo is lifted up to inhibit the reduction of Vo.

Similarly, Vo increases, V+ increases, Va increases, the impedance of MOSFET increases, and after the same current, the pressure difference of MOSFET increases, thus inhibiting Vo increases.

Working principle of switching power supply

开关电源的工作原理

As shown in the figure above, in order to obtain Vo from high voltage Vs, the switching power supply adopts square wave Vg1 with a certain duty cycle, and Vg2 drives the MOS tube up and down. Vg1 and Vg2 are inverse-phase, Vg1 is high and Vg2 is low. When the upper MOS tube is open, the lower MOS tube is closed. When the lower MOS tube is on, the upper MOS tube is off.

Thus, a square wave voltage with a certain duty cycle is formed at the left end of L, and the inductor L and capacitor C can be regarded as low-pass filters, so the filtered stable voltage Vo is obtained after the square wave voltage is filtered.

Vo is sent to the negative end V+ of the first amplifier (error amplifier) after voltage separation of R1 and R2. The output Va of the error amplifier is used as the positive end of the second amplifier (PWM amplifier). The output Vpwm of the PWM amplifier is a square wave with a certain duty cycle. Two reversed square wave Vg1 and Vg2 are obtained by gate logic circuit to control MOSFET switching.

The positive Vref of the error amplifier is a constant voltage, while the negative Vt of the PWM amplifier is a triangular wave signal. Once Va is larger than the triangular wave, the Vpwm is higher. When Va is smaller than triangular wave, Vpwm is lower. Therefore, the relationship between Va and triangular wave determines the duty cycle of Vpwm of square wave signal. If Va is high, duty cycle is low, and if Va is low, duty cycle is high.

After processing,Vg1 is in phase with Vpwm, Vg2 is in reverse phase with Vpwm; The final square wave voltage Vp at the left end of L is the same as Vg1. As shown below:

L左端的方波电压Vp与Vg1相同

When Vo goes up, V+ will go up, Va will go down, and Vpwm duty cycle will go down. After gate logic, Vg1 duty cycle will go down, Vg2 duty cycle will go up, and Vp duty cycle will go down, which will lead to Vo reduction, so Vo rise will be inhibited, and vice versa.

Comparison of linear regulated power supply and switching power supply

After understanding the working principle of linear regulated power supply and switching power supply, we can understand why linear regulated power supply has less noise, faster transient response, but poor efficiency; The switching power supply noise is larger, the transient response is slower, but the efficiency is higher.

Linear power supply has simple internal structure, short feedback loop, so the noise is small, and the transient response is fast (when the output voltage changes, the compensation is fast). However, because the pressure difference between the input and output all falls on the MOSFET, its efficiency is low. Therefore, linear voltage regulation is generally used in applications with small currents and high voltage accuracy requirements.

However, the switching power supply has complex internal structure, many factors affecting the output voltage noise performance, and its feedback loop is long, so its noise performance is lower than that of the linear voltage regulator power supply, and the transient response is slow. However, according to the structure of the switching power supply, the MOSFET is fully on and fully off in two states, in addition to the drive MOSFET, and the MOSFET's own internal resistance consumption of energy, other energy is all used in the output (theoretically L, C is not energy consumption, although the actual is not the case, but these energy consumption is very small).

Write part 8 first, and then add part 6 and 7 to describe the principle of switching power supply and the comparison between LDO and switching power supply when the picture can be uploaded.

The following to clarify some misunderstandings of high-speed signal understanding:

High speed looks at the signal edge, not the clock frequency

1) Generally speaking, the clock frequency is high, its signal rising edge is fast, so generally we regard them as high-speed signals; However, the reverse is not necessarily true, if the clock frequency is low, if the signal is still fast, it should be treated as a high-speed signal. According to signal theory, the rising edge of a signal contains high-frequency information (a quantitative expression can be found using the Fourier transform). Therefore, once the rising edge of the signal is very steep, we should process the high-speed signal, the design is not good, it is likely to appear that the rising edge is too slow, there are overrush, downrush, ringing phenomenon. For example, the I2C signal, in ultra-fast mode, has a clock frequency of 1MHz, but its specification requires that the rise time or fall time does not exceed 120ns! There are so many boards that I2C can't get through!

2) Therefore, we should pay more attention to the signal bandwidth. According to the empirical formula, the relationship between bandwidth and rise time (10%-90%) is Fw * Tr = 3.5

Oscilloscope selection

1) Many people noticed the sampling rate of the oscilloscope, did not notice the bandwidth of the oscilloscope. But often oscilloscope bandwidth is a more important parameter. Some people think that as long as the oscilloscope sampling rate meets more than twice the signal clock frequency, this is a big mistake. The reason for the error is a misunderstanding of the sampling theorem. Sampling theorem 1 states that when the sampling frequency is greater than twice the maximum bandwidth of the signal, the original signal can be perfectly restored. However, the signal referred to by the sampling theorem is a band-limited signal (the bandwidth is limited), which is seriously inconsistent with the real signal. Our ordinary digital signals, with the exception of clocks, are not periodic, and their spectrum is infinitely wide over long periods of time; To capture a high-speed signal, it is necessary not to distort its high-frequency component too much. Oscilloscope bandwidth index is closely related to this. Therefore, the real thing to pay attention to is still the rising edge distortion of the signal captured by the oscilloscope in our acceptable range.

2) So choose how high bandwidth oscilloscope is appropriate? In theory, an oscilloscope with five times the signal bandwidth captures a signal that loses less than 3% of the original signal. If the loss requirements are more relaxed, you can choose a lower-end oscilloscope. An oscilloscope that uses three times the signal bandwidth should be able to meet most requirements. But don't forget the bandwidth of your probe!

Tags:#Circuit design

Tags

STMicroelectronics (ST)sensordiodecapacitormemoryVariable Inductormagnetic beadsPower moduleEmbedded product developmentEmbedded hardware development processTL064CDTMCUSTM32F070CBT6Power management (PMIC)ThyristorMOS tubeHardware designElectric heaterEmbedded systemresistorOperational amplifierDigital power supplyPCBThin film capacitanceElectrolytic capacitancecircuitLithium batteryLithium-ion batteryICPower sourceHisilicon chipKirin chipPower chipPower amplifierNTC thermistorPower capacitorPassive filterExcitation transformerApple M series chipsBuck circuitAC/DC converterIGBTAluminum electrolytic capacitorTantalum capacitorAluminium polymer capacitorsupercapacitorDouble electric layer capacitorCeramic capacitorFilm capacitorSurge suppression icElectrostatic Discharge (ESD)PTC resets the fuseEMIBuck circuit optimizationEMCSwitching Mode Power Supply (SMPS)inductorPhotoetching machineCircuit protectionLightning arresterGas discharge tubeInrush current limiter (ICL)Circuit breakerSwitching power supplyGFCIFuse wireThermal fuseChip resistance/patch resistanceCircuit designcouplerCircular connectorCasing connectorESDTerminal connectorModular connectorCoaxial connectorRS-485AvagoRenesasPCB LayoutCreepage distanceElectrical clearanceSamsung ElectronicsRegulated power supplyDC-DC converterCharging circuitComplete circuit diagramMemory connectorLaminated inductorsMagnetic beadHUAWEIChip manufacturing processTVS diodeLot NumberPassive elementCircuit analysis methodSwitching power supplyHeavy-duty connectorTerminal blockElectrical connectionRENESASAltiumpurchaseSignal isolatorSafety fencedistinctioninfineonQ3 Financial revenueD-sub connectorType D connectorBackplane connectorAC power connectorBlade power connectorOptical fiber connectorRussiaSemiconductor silicon wafersAdvanced Micro-Fabrication Equipment Inc.ChinaElectronic components industry trendsPassive electronic componentsTIBasic electronic componentWelded electronicsElectronic componentprincipleHow electronic components workCircuit Board (PCB)Test elementLight-emitting diodePerformance parameterWhat electronic components were used in the first generation of computersFirst-generation computerRectangular connectorElectronic component distributorElectronic components online mallVCOVoltage-controlled oscillatorVoltage-controlled oscillatorencoderCommon encoder typesEncoder applicationElectronic component procurementoscillator

Hot Sale Parts