I have been engaged in the embedded industry for seven or eight years. Here, I’d like to share some design schemes and experiences of hardware circuits for the reference of some new embedded friends. Please ignore the great God and the old bird. Also, because my knowledge is very limited, I am not specialized in circuit design.

1、 Common design reference of key circuit

Poybagj6jleazrixaadrmss4h1k552 Png

1. R1 pull-up resistor clamps the uncertain signal at the high level through a resistor, maintains the state that is not triggered or returns to the original state after triggering. (personal suggestion plus)

2. C1 capacitor reduces key jitter and high-frequency signal interference. (personal suggestion plus)

3. R2 current limiting resistance (the value varies from 100 Ω to 10K. If internal pull-up is set, the value should not be too large, otherwise the current is not enough to pull down the IO port) protects the IO port from over-current and over-voltage, which can absorb static electricity or some high-voltage pulses. (personal suggestion plus)

4. D1 ESD diode electrostatic protection diode to prevent electrostatic interference or damage to IO port. (whether to add or not depends on PCB cost and protection level requirements)

2、 External signal input design reference (similar to key)

Pyybagj6jmmacxwwaaejsjibeig385 Png

1. The R3 pull-up resistor clamps the uncertain signal at the high level through a resistor to maintain the non triggered state or return to the original state after triggering. (if the external connection line is long and the internal pull-up capability of the chip is weak, it is recommended to add it. The communication distance is not long at ordinary times, and the internal pull-up can be omitted.)

2. C2 capacitor prevents high-frequency signal interference. (note that if the input frequency signal is large, the C2 capacitance should be reduced correspondingly, or C2 should be omitted directly)

3. R4 current limiting resistor protects the IO port from over-current and high voltage, which can absorb static electricity or some high-voltage pulses. (personal suggestion plus)

4. D2 ESD diode electrostatic protection diode to prevent electrostatic interference or damage to IO port. (whether to add or not depends on PCB cost and protection level requirements)

3、 Output circuit relay design reference

Poybagj6jokaawj8aafkhdg7ynq706 Png

1. U1 optocoupler separates high and low voltage to prevent high voltage interference and realize electrical isolation

2. D5 1N4148 freewheeling diode Bai protects the components from being punctured or burned out by the induced voltage. It is connected in parallel to both ends of the components generating the induced electromotive force and forms a loop with it, so that the high electromotive force generated by it is consumed in the loop in the form of continuous current, thus protecting the components in the circuit from damage.

4、 Design reference application of Darlington transistor

Pyybagj6jpgazyjkaag9mdpqiiw585 Png

Darlington transistors are commonly used by friends to drive stepping motors. In fact, they can be used for motor speed regulation, high-power switching circuits, driving relays, driving LED light sources with relatively high power, and using PWM to adjust brightness.

1. R6 R7 R8 resistor is used for current limiting to prevent damage of uln2001, resulting in high-voltage IO directly input to MCU (since uln2001d has its own 2.7K resistor, R6 R7 R8 here can be omitted. If some drive chips do not have a resistor, it is better to add it yourself. For specific conditions, please refer to the data manual of the selected chip for decision)

2. Com terminal power supply when the output terminal is connected to an inductive load, the load does not need to add a freewheeling diode. The chip is designed with a diode, so only the COM port is connected to the load power supply. When other loads are connected, the COM port can not be connected.

3. When the resistance capacitance step-down circuit is used to supply power to the uln2001d, because the resistance capacitance step-down voltage cannot prevent the transient high voltage fluctuation on the power grid, a 104 capacitor must be connected near the com terminal and the ground terminal of the uln2001d. In other applications, this capacitor may not be added.

5、 Operational amplifier design reference application

Poybagj6jqgataesaaghuzg1om621 Png

Using the operational amplifier to skillfully collect the current current current of the load, you can accurately know the current load operation and whether it works normally. It is very easy to use. Operational amplifiers also have many sophisticated and practical circuits, which will be shared with you one by one in the future. You can also search some classic circuits of operational amplifiers online when you are free, and there are many places you can refer to.

1. Gnd2 is the ground terminal of the load. It is connected to the common ground through R16 resistor (R16 should have a higher power according to the load current). There will be a small voltage difference

2. This circuit is an in-phase proportional operation circuit, so the voltage at the sampling end = input voltage * (1+r9/r11) = 69 times the input voltage. You can adjust the magnification by modifying R9 according to the measurement range.

6、 MOS tube design reference application (control power output on / off)

Poybagj6jq-apizqaaevad-yny4829 Png

7、 Input power design reference application

Pyybagj6jskabrftaadcqo9yolk442 Png

If the circuit cost is tight, components can be appropriately deleted as required

1. F1 self recovery fuse, overcurrent protection, threshold value can be adjusted according to actual load current

2. D10 Schottky diode reduces the influence of the power supply of the subsequent stage on the previous stage, prevents the positive and negative connections of the power supply from burning out the circuit of the subsequent stage, and prevents the current from flowing back when the power supply is turned off. However, there is a voltage drop of about 0.4V through the diode. It is necessary to consider whether the voltage will be lower than the normal working voltage of the circuit of the subsequent stage after 0.4V voltage reduction

3. TVs tube input voltage over high protection, generally 1.4 times the normal input voltage.

This article is the original article of CSDN blogger “fish and feather”

Leave a Reply

Your email address will not be published. Required fields are marked *