Transistor short circuit protection circuit. Short-circuit protection on field-effect transistor

A protection design for any type of power supply is presented. This protection circuit can work together with any power supply - mains, switching and DC batteries.

The schematic decoupling of such a protection unit is relatively simple and consists of several components.

The power part - a powerful field-effect transistor - does not overheat during operation, therefore it does not need a heat sink either.

The circuit is at the same time a protection against power reversal, overload And short circuit at the output, the protection response current can be selected by selecting the resistance of the shunt resistor, in my case the current is 8 Amperes, 6 resistors of 5 watts 0.1 Ohm connected in parallel were used.

Shunt can also be made from resistors with a power of 1-3 watts.


The protection can be more accurately adjusted by selecting the resistance of the trimming resistor.


In the event of a short circuit and overload of the unit output, the protection will instantly operate, turning off the power source. An LED indicator will indicate that the protection has been triggered. Even if the output short-circuits for a couple of tens of seconds, the field-effect transistor remains cold.

The field-effect transistor is not critical; any switches with a current of 15-20 Amps or higher and an operating voltage of 20-60 Volts will do. The keys from the line fit perfectly IRFZ24, IRFZ40, IRFZ44, IRFZ46, IRFZ48 or more powerful - IRF3205, IRL3705, IRL2505 and the like.



This circuit is also excellent as charger protection for car batteries, if the connection polarity is suddenly mixed up, then charger nothing bad will happen, the protection will save the device in such situations.

Thanks to the fast operation of the protection, it can be successfully used for pulsed circuits; in the event of a short circuit, the protection will operate faster than the power switches of the switching power supply have time to burn out. The circuit is also suitable for pulse inverters, as current protection. If there is an overload or short circuit in the secondary circuit of the inverter, the inverter's power transistors instantly fly out, and such protection will prevent this from happening.

Sincerely - AKA KASYAN

A protection design for any type of power supply is presented. This protection circuit can work together with any power supply - mains, switching and DC batteries. The schematic decoupling of such a protection unit is relatively simple and consists of several components.

Power supply protection circuit

The power part - a powerful field-effect transistor - does not overheat during operation, therefore it does not need a heat sink either. The circuit is at the same time a protection against power overload, overload and short circuit at the output, the protection operation current can be selected by selecting the resistance of the shunt resistor, in my case the current is 8 Amperes, 6 resistors of 5 watts 0.1 Ohm connected in parallel were used. The shunt can also be made from resistors with a power of 1-3 watts.

The protection can be more accurately adjusted by selecting the resistance of the trimming resistor. Power supply protection circuit, current limit regulator Power supply protection circuit, current limit regulator

~~~In the event of a short circuit and overload of the unit output, the protection will instantly operate, turning off the power source. An LED indicator will indicate that the protection has been triggered. Even if the output short-circuits for a couple of tens of seconds, the field-effect transistor remains cold

~~~The field-effect transistor is not critical; any switches with a current of 15-20 Amps or higher and an operating voltage of 20-60 Volts will do. Keys from the IRFZ24, IRFZ40, IRFZ44, IRFZ46, IRFZ48 line or more powerful ones - IRF3205, IRL3705, IRL2505 and the like are ideal.

~~~This circuit is also great for protecting a charger for car batteries; if the connection polarity is suddenly reversed, then nothing bad will happen to the charger; the protection will save the device in such situations.

~~~Thanks to the fast operation of the protection, it can be successfully used for pulsed circuits; in the event of a short circuit, the protection will operate faster than the power switches of the switching power supply have time to burn out. The circuit is also suitable for pulse inverters, as current protection. If there is an overload or short circuit in the secondary circuit of the inverter, the inverter's power transistors instantly fly out, and such protection will prevent this from happening.

Comments
Short circuit protection, polarity reversal and overload are assembled on a separate board. The power transistor was used in the IRFZ44 series, but if desired, it can be replaced with a more powerful IRF3205 or with any other power switch that has similar parameters. You can use keys from the IRFZ24, IRFZ40, IRFZ46, IRFZ48 line and other keys with a current of more than 20 Amps. During operation, the field-effect transistor remains icy. therefore it does not need a heat sink.


The second transistor is also not critical; in my case, a high-voltage bipolar transistor of the MJE13003 series was used, but there is a large choice. The protection current is selected based on the shunt resistance - in my case, 6 0.1 Ohm resistors in parallel, the protection is triggered at a load of 6-7 Amps. You can set it more precisely by rotating the variable resistor, so I set the operating current to around 5 Amps.



The power of the power supply is quite decent, the output current reaches 6-7 Amps, which is quite enough to charge a car battery.
I chose shunt resistors with a power of 5 watts, but 2-3 watts is also possible.




If everything is done correctly, the unit starts working immediately, close the output, the protection LED should light up, which will light up as long as the output wires are in short-circuit mode.
If everything works as it should, then we proceed further. Assembling the indicator circuit.

The circuit is copied from a battery screwdriver charger. The red indicator indicates that there is output voltage at the power supply output, the green indicator shows the charging process. With this arrangement of components, the green indicator will gradually go out and finally go out when the voltage on the battery is 12.2-12.4 Volts; when the battery is disconnected, the indicator will not light up.

This circuit is a simple transistor power supply equipped with short circuit (short circuit) protection. Its diagram is shown in the figure.

Main parameters:

  • Output voltage - 0..12V;
  • The maximum output current is 400 mA.

The scheme works as follows. The input voltage of the 220V network is converted by a transformer to 16-17V, then rectified by diodes VD1-VD4. Filtering of rectified voltage ripples is carried out by capacitor C1. Next, the rectified voltage is supplied to the zener diode VD6, which stabilizes the voltage at its terminals to 12V. The remainder of the voltage is extinguished by resistor R2. Next, the voltage is adjusted by variable resistor R3 to the required level within 0-12V. This is followed by a current amplifier on transistors VT2 and VT3, which amplifies the current to a level of 400 mA. The load of the current amplifier is resistor R5. Capacitor C2 additionally filters output voltage ripple.

This is how protection works. In the absence of a short circuit at the output, the voltage at the terminals of VT1 is close to zero and the transistor is closed. The R1-VD5 circuit provides a bias at its base at a level of 0.4-0.7 V (voltage drop across the open p-n junction diode). This bias is enough to open the transistor at a certain collector-emitter voltage level. As soon as a short circuit occurs at the output, the collector-emitter voltage becomes different from zero and equal to the voltage at the output of the unit. Transistor VT1 opens, and the resistance of its collector junction becomes close to zero, and, therefore, at the zener diode. Thus, zero input voltage is supplied to the current amplifier; very little current will flow through transistors VT2, VT3, and they will not fail. The protection is turned off immediately when the short circuit is eliminated.

Details

The transformer can be any with a core cross-sectional area of ​​4 cm 2 or more. The primary winding contains 2200 turns of PEV-0.18 wire, the secondary winding contains 150-170 turns of PEV-0.45 wire. A ready-made frame scan transformer from old tube TVs of the TVK110L2 series or similar will also work. Diodes VD1-VD4 can be D302-D305, D229Zh-D229L or any with a current of at least 1 A and a reverse voltage of at least 55 V. Transistors VT1, VT2 can be any low-frequency low-power ones, for example, MP39-MP42. You can also use more modern silicon transistors, for example, KT361, KT203, KT209, KT503, KT3107 and others. As VT3 - germanium P213-P215 or more modern silicon high-power low-frequency KT814, KT816, KT818 and others. When replacing VT1, it may turn out that short-circuit protection does not work. Then you should connect another diode (or two, if necessary) in series with VD5. If VT1 is made of silicon, then it is better to use silicon diodes, for example, KD209(A-B).

In conclusion, it is worth noting that instead of those indicated in p-n-p scheme transistors can be used with similar parameters npn transistors(not instead of any of VT1-VT3, but instead of all of them). Then you will need to change the polarity of the diodes, zener diode, capacitors, and diode bridge. At the output, accordingly, the polarity of the voltage will be different.

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
VT1, VT2 Bipolar transistor

MP42B

2 MP39-MP42, KT361, KT203, KT209, KT503, KT3107 To notepad
VT3 Bipolar transistor

P213B

1 P213-P215, KT814, KT816, KT818 To notepad
VD1-VD4 Diode

D242B

4 D302-D305, D229Zh-D229L To notepad
VD5 Diode

KD226B

1 To notepad
VD6 Zener diode

D814D

1 To notepad
C1 2000 µF, 25 V1 To notepad
C2 Electrolytic capacitor500 µF. 25 V1 To notepad
R1 Resistor

10 kOhm

1 To notepad
R2 Resistor

360 Ohm

1 To notepad
R3 Variable resistor4.7 kOhm1 To notepad
R4, R5 Resistor

Today my article will be of an exclusively theoretical nature, or rather, it will not contain “hardware” as in previous articles, but do not be upset - it has not become less useful. The fact is that the problem of protecting electronic components directly affects the reliability of devices, their service life, and therefore your important competitive advantage - the ability to provide a long-term product warranty. The implementation of protection concerns not only my favorite power electronics, but also any device in principle, so even if you are designing IoT crafts and you have a modest 100 mA, you still need to understand how to ensure trouble-free operation of your device.

Current protection or short circuit (short circuit) protection is probably the most common type of protection because neglect in this matter causes devastating consequences in the literal sense. As an example, I suggest looking at a voltage stabilizer that was sad because of a short circuit:

The diagnosis here is simple - an error occurred in the stabilizer and ultra-high currents began to flow in the circuit; the protection should have turned off the device, but something went wrong. After reading the article, it seems to me that you yourself will be able to guess what the problem could be.

As for the load itself... If you have an electronic device the size of a matchbox, there are no such currents, then do not think that you cannot become as sad as the stabilizer. Surely you don’t want to burn bundles of $10-$1000 chips? If so, then I invite you to familiarize yourself with the principles and methods of dealing with short circuits!

Purpose of the article

I am targeting my article at people for whom electronics is a hobby and novice developers, so everything will be told “at a glance” for a more meaningful understanding of what is happening. For those who want an academic touch, go and read any university textbook on electrical engineering + the “classics” of Horowitz, Hill “The Art of Circuit Design”.

Separately, I would like to say that all solutions will be hardware-based, that is, without microcontrollers and other perversions. In recent years, it has become quite fashionable to program where it is necessary and where it is not necessary. I often observe current “protection”, which is implemented by simply measuring the ADC voltage with some arduino or microcontroller, and then the devices still fail. I strongly advise you not to do the same! I will talk about this problem in more detail later.

A little about short circuit currents

In order to start coming up with methods of protection, you must first understand what we are fighting against. What is a “short circuit”? Ohm’s favorite law will help us here; consider the ideal case:

Just? Actually, this circuit is the equivalent circuit of almost any electronic device, that is, there is an energy source that supplies it to the load, and it heats up and does or does not do something else.

Let’s agree that the power of the source allows the voltage to be constant, that is, “not to sag” under any load. At normal operation the current acting in the circuit will be equal to:

Now imagine that Uncle Vasya dropped a wrench on the wires going to the light bulb and our load decreased 100 times, that is, instead of R it became 0.01*R and with the help of simple calculations we get a current 100 times greater. If the light bulb consumed 5A, then now the current from the load will be about 500A, which is quite enough to melt Uncle Vasya’s key. Now a small conclusion...

Short circuit- a significant decrease in load resistance, which leads to a significant increase in current in the circuit.

It is worth understanding that short-circuit currents are usually hundreds and thousands of times greater than the rated current, and even a short period of time is enough for the device to fail. Here, many will probably remember electromechanical protection devices (“automatic devices” and others), but everything here is very prosaic... Usually a household socket is protected by a circuit breaker with a rated current of 16A, that is, shutdown will occur at 6-7 times the current, which is already about 100A. The laptop power supply has a power of about 100 W, that is, the current is less than 1A. Even if a short circuit occurs, the machine will not notice it for a long time and will turn off the load only when everything has already burned out. This is more fire protection than equipment protection.

Now let's look at another frequently encountered case - through current. I will show it using the example of a dc/dc converter with a synchronous buck topology; all MPPT controllers, many LED drivers and powerful DC/DC converters on boards are built exactly on it. Let's look at the converter circuit:

The diagram shows two options for overcurrent: green way for a “classic” short circuit, when there is a decrease in load resistance (“snot” between roads after soldering, for example) and orange path. When can current flow through the orange path? I think many people know that the open channel resistance of a field-effect transistor is very small; in modern low-voltage transistors it is 1-10 mOhm. Now let’s imagine that PWM with a high level came to the keys at the same time, that is, both keys opened, for the “VCCIN - GND” source this is equivalent to connecting a load with a resistance of about 2-20 mOhm! Let's apply the great and mighty Ohm's law and get a current value of more than 250A even with a 5V power supply! Although don’t worry, there won’t be such a current - the components and conductors on the printed circuit board will burn out earlier and break the circuit.

This error very often occurs in the power system and especially in power electronics. It can occur for various reasons, for example, due to control errors or long-term transient processes. In the latter case, even the “dead time” in your converter will not help.

I think the problem is clear and familiar to many of you, now it’s clear what needs to be dealt with and all that remains is to figure out HOW. This is what the next story will be about.

Operating principle of current protection

Here you need to apply ordinary logic and see the cause-and-effect relationship:
1) The main problem is the large current in the circuit;
2) How to understand what current value? -> Measure it;
3) Measured and obtained the value -> Compare it with the specified acceptable value;
4) If the value is exceeded -> Disconnect the load from the current source.
Measure the current -> Find out whether the permissible current has been exceeded -> Disconnect the load
Absolutely any protection, not only current, is built this way. Depending on the physical quantity on which the protection is built, various technical problems and methods for solving them will arise on the way to implementation, but the essence is unchanged.

Now I propose to go through the entire security chain in order and solve all the technical problems that arise. Good protection is protection that is planned in advance and it works. This means we can’t do without modeling, I’ll use the popular and free one MultiSIM Blue, which is actively promoted by Mouser. You can download it there - link. I will also say in advance that within the framework of this article I will not delve into the circuitry and fill your head with unnecessary things at this stage, just know that everything will be a little more complicated in real hardware.

Current measurement

This is the first point in our chain and probably the easiest to understand. There are several ways to measure current in a circuit, and each has its own advantages and disadvantages; which one to use specifically in your task is up to you to decide. I will tell you, based on my experience, about these very advantages and disadvantages. Some of them are “generally accepted”, and some are my worldviews; please note that I’m not even trying to pretend to be some kind of truth.

1) Current shunt. The basis of the fundamentals “works” on the same great and powerful Ohm’s law. The simplest, cheapest, fastest and generally the best method, but with a number of disadvantages:

A) No galvanic isolation. You will have to implement it separately, for example, using a high-speed optocoupler. This is not difficult to implement, but it requires additional space on the board, decoupled dc/dc and other components that cost money and add overall dimensions. Although galvanic isolation is not always needed, of course.

B) At high currents, global warming accelerates. As I wrote earlier, it all “works” on Ohm’s law, which means it heats up and warms the atmosphere. This leads to a decrease in efficiency and the need to cool the shunt. There is a way to minimize this disadvantage - to reduce the shunt resistance. Unfortunately, it cannot be reduced indefinitely and at all I wouldn't recommend reducing it to less than 1 mOhm, if you still have little experience, because the need arises to combat interference and the requirements for the design stage of the printed circuit board increase.

In my devices I like to use these shunts PA2512FKF7W0R002E:

Current measurement occurs by measuring the voltage drop across the shunt, for example, when a current of 30A flows across the shunt there will be a drop:

That is, when we get a drop of 60 mV on the shunt, this will mean that we have reached the limit and if the drop increases further, then we will need to turn off our device or load. Now let's calculate how much heat will be released on our shunt:

Not a little, right? This point must be taken into account, because The maximum power of my shunt is 2 W and it cannot be exceeded, and you should also not solder the shunts with low-melting solder - it can come off, I’ve seen that too.

  • Use shunts when you have high voltage and not very high currents
  • Monitor the amount of heat generated by the shunt
  • Use shunts where you need maximum performance
  • Use shunts only from special materials: constantan, manganin and the like
2) Hall effect current sensors. Here I will allow myself my own classification, which fully reflects the essence of various solutions for this effect, namely: cheap And expensive.

A) Cheap, for example, ACS712 and the like. Among the advantages, I can note the ease of use and the presence of galvanic isolation, but that’s where the advantages end. The main disadvantage is the extremely unstable behavior under the influence of RF interference. Any dc/dc or powerful reactive load is interference, that is, in 90% of cases these sensors are useless, because they “go crazy” and rather show the weather on Mars. But it’s not for nothing that they are made?

Are they galvanically isolated and can measure high currents? Yes. Don't like interference? Yes too. Where to put them? That's right, into a low-responsibility monitoring system and for measuring current consumption from batteries. I have them in inverters for solar power plants and wind power plants for a qualitative assessment of the current consumption from the battery, which allows you to extend the life cycle of the batteries. These sensors look like this:

B) Expensive. They have all the advantages of cheap ones, but do not have their disadvantages. An example of such a sensor LEM LTS 15-NP:

What we have as a result:
1) High performance;
2) Galvanic isolation;
3) Ease of use;
4) Large measured currents regardless of voltage;
5) High measurement accuracy;
6) Even “evil” EMPs do not interfere with work; affect accuracy.

But what is the downside then? Those who opened the link above clearly saw it - this is the price. $18, Karl! And even for a series of 1000+ pieces, the price will not fall below $10, and the actual purchase will be $12-13. You can’t install this in a power supply unit for a couple of bucks, but I would like it... Summarize:

A) This The best decision in principle for measuring current, but expensive;
b) Use these sensors in harsh operating conditions;
c) Use these sensors in critical components;
d) Use them if your device costs a lot of money, for example, a 5-10 kW UPS, where it will definitely justify itself, because the price of the device will be several thousand dollars.

3) Current transformer. Standard solution in many devices. There are two minuses - they do not work with direct current and have nonlinear characteristics. Pros - cheap, reliable and you can measure enormous currents. It is on current transformers that automation and protection systems are built in RU-0.4, 6, 10, 35 kV enterprises, and there thousands of amperes are quite normal.

To be honest, I try not to use them, because I don’t like them, but I still use them in various control cabinets and other AC systems, because They cost a couple of dollars and provide galvanic isolation, not $15-20 like LEMs, and they perform their task perfectly in a 50 Hz network. They usually look like this, but they also appear on all sorts of EFD cores:

Perhaps we can finish with current measurement methods. I talked about the main ones, but of course not all. To expand your own horizons and knowledge, I advise you to at least google and look at various sensors on the same digikey.

Measured Voltage Drop Gain

Further construction of the protection system will be based on the shunt as a current sensor. Let's build a system with the previously announced current value of 30A. At the shunt we get a drop of 60 mV and here 2 technical problems arise:

A) It is inconvenient to measure and compare a signal with an amplitude of 60 mV. ADCs usually have a measurement range of 3.3V, that is, with 12 bits of capacity we get a quantization step:

This means that for the range of 0-60 mV, which corresponds to 0-30A, we will get a small number of steps:

We find that the measurement depth will be only:

It is worth understanding that this is an idealized figure and in reality they will be many times worse, because... The ADC itself has an error, especially around zero. Of course, we will not use an ADC for protection, but we will have to measure the current from the same shunt to build a control system. Here the task was to clearly explain, but this is also relevant for comparators, which in the area of ​​ground potential (0V usually) operate very unstable, even rail-to-rail.

B) If we want to drag a signal with an amplitude of 60 mV across the board, then after 5-10 cm there will be nothing left of it due to interference, and at the moment of short circuit we definitely won’t have to count on it, because EMR will further increase. Of course, you can hang the protection circuit directly on the leg of the shunt, but we will not get rid of the first problem.

To solve these problems we need an operational amplifier (op-amp). I won’t talk about how it works - the topic is easily googled, but we’ll talk about the critical parameters and choice of op-amp. First, let's define the scheme. I said that there won’t be any special graces here, so let’s cover the op-amp with negative feedback (NFB) and get an amplifier with a known gain. I will model this action in MultiSIM (the picture is clickable):

You can download the file for the simulation at home - .

The voltage source V2 acts as our shunt, or rather, it simulates the voltage drop across it. For the sake of clarity, I've chosen a drop-off value of 100 mV, now we need to boost the signal to move it to a more convenient voltage, usually between 1/2 and 2/3 V ref. This will allow you to get a large number of quantization steps in the current range + leave a margin for measurements to assess how bad everything is and calculate the current rise time, this is important in complex reactive load control systems. The gain in this case is equal to:

This way we have the opportunity to amplify our signal to the required level. Now let's look at what parameters you should pay attention to:

  • The op amp must be rail-to-rail to adequately handle signals near ground potential (GND)
  • It is worth choosing an op-amp with a high slew rate of the output signal. For my favorite OPA376, this parameter is 2V/µs, which allows you to achieve the maximum output value of the op-amp equal to VCC 3.3V in just 2 µs. This speed is quite enough to save any converter or load with frequencies up to 200 kHz. These parameters should be understood and turned on when choosing an op-amp, otherwise there is a chance to put an op-amp for $10 where an amplifier for $1 would suffice
  • The bandwidth selected by the op-amp must be at least 10 times greater than the maximum load switching frequency. Again, look for the “golden mean” in the price/performance ratio, everything is good in moderation
In most of my projects I use an op-amp from Texas Instruments - OPA376, its performance characteristics are enough to implement protection in most tasks and the price tag of $1 is quite good. If you need cheaper, then look at solutions from ST, and if even cheaper, then at Microchip and Micrel. For religious reasons, I only use TI and Linear, because I like it and sleep more peacefully.

Adding realism to the security system

Let's now add a shunt, load, power source and other attributes in the simulator that will bring our model closer to reality. The resulting result looks like this (clickable image):

You can download the simulation file for MultiSIM - .

Here we already see our shunt R1 with a resistance of the same 2 mOhm, I chose a power source of 310V (rectified network) and the load for it is a 10.2 Ohm resistor, which again, according to Ohm’s law, gives us a current:

As you can see, the previously calculated 60 mV drops on the shunt and we amplify it with the gain:

At the output we receive an amplified signal with an amplitude of 3.1V. Agree, you can feed it to the ADC, to the comparator and drag it across the board 20-40 mm without any fears or deterioration in stability. We will continue to work with this signal.

Comparing Signals Using a Comparator

Comparator- this is a circuit that accepts 2 signals as input, and if the signal amplitude at the direct input (+) is greater than at the inverse input (-), then a log appears at the output. 1 (VCC). Otherwise log. 0 (GND).

Formally, any op-amp can be turned on as a comparator, but such a solution in terms of performance characteristics will be inferior to the comparator in terms of speed and price/result ratio. In our case, the higher the performance, the higher the likelihood that the protection will have time to work and save the device. I like to use a comparator, again from Texas Instruments - LMV7271. What you should pay attention to:
  • The response delay is, in fact, the main speed limiter. For the comparator mentioned above, this time is about 880 ns, which is quite fast and in many tasks is somewhat redundant at a price of $2, and you can choose a more optimal comparator
  • Again, I advise you to use a rail-to-rail comparator, otherwise the output will not be 5V, but less. The simulator will help you verify this; choose something that is not rail-to-rail and experiment. The signal from the comparator is usually fed to the driver failure input (SD) and it would be nice to have a stable TTL signal there
  • Choose a comparator with a push-pull output rather than an open-drain and others. This is convenient and we have predicted performance characteristics for the output
Now let's add a comparator to our project in the simulator and look at its operation in the mode when the protection has not worked and the current does not exceed the emergency one (clickable image):

You can download the file for simulation in MultiSIM - .

What do we need... If the current exceeds 30A, it is necessary that there is a log at the output of the comparator. 0 (GND), this signal will feed the SD or EN input of the driver and turn it off. In the normal state, the output should be a log. 1 (5V TTL) and turn on the power switch driver (for example, the “folk” IR2110 and less ancient ones).

Let's return to our logic:
1) We measured the current on the shunt and got 56.4 mV;
2) We amplified our signal with a factor of 50.78 and got 2.88V at the op-amp output;
3) We apply a reference signal with which we will compare to the direct input of the comparator. We set it using a divider on R2 and set it to 3.1V - this corresponds to a current of approximately 30A. This resistor adjusts the protection threshold!
4) Now we apply the signal from the op-amp output to the inverse and compare the two signals: 3.1V > 2.88V. At the direct input (+) the voltage is higher than at the inverse input (-), which means the current is not exceeded and the output is log. 1 - the drivers are working, but our LED1 is not lit.

Now we increase the current to a value of >30A (twist R8 and reduce the resistance) and look at the result (clickable image):

Let's review the points from our “logic”:
1) We measured the current on the shunt and got 68.9 mV;
2) We amplified our signal with a factor of 50.78 and got 3.4V at the op-amp output;
4) Now we apply the signal from the op-amp output to the inverse and compare the two signals: 3.1V< 3.4В. На прямом входу (+) напряжение НИЖЕ, чем на инверсном входе (-), значит ток превышен и на выходе лог. 0 - драйвера НЕ работают, а наш светодиод LED1 горит.

Why hardware?

The answer to this question is simple - any programmable solution on an MK, with an external ADC, etc., can simply “freeze” and even if you are a fairly competent software writer and have turned on a watchdog timer and other anti-freeze protections - while it is all being processed, your device will burn out.

Hardware protection allows you to implement a system with performance within a few microseconds, and if the budget allows, then within 100-200 ns, which is generally enough for any task. Also, hardware protection will not be able to freeze and will save the device, even if for some reason your control microcontroller or DSP is frozen. The protection will turn off the driver, your control circuit will quietly restart, test the hardware and either report an error, for example, in Modbus, or start if all is well.

It is worth noting here that specialized controllers for building power converters have special inputs that allow you to disable the generation of a PWM signal in hardware. For example, the beloved STM32 has a BKIN input for this.

Separately, it is worth saying about such a thing as CPLD. In essence, this is a set of high-speed logic and its reliability is comparable to a hardware solution. It would be quite common sense to put a small CPLD on the board and implement hardware protection, deadtime and other amenities in it, if we are talking about dc/dc or some kind of control cabinets. CPLD makes this solution very flexible and convenient.

Epilogue

That's probably all. I hope you enjoyed reading this article and it will give you some new knowledge or refresh old ones. Always try to think in advance which modules in your device should be implemented in hardware and which in software. Often the hardware implementation is orders of magnitude easier to implement software, and this leads to saving time on development and, accordingly, its cost.

The format of an article without hardware is new to me and I would like to ask you to express your opinion in the survey.


This is an incredibly useful device that will protect your home from short circuits when testing any appliances being tested. There are times when it is necessary to check an electrical device for the absence of a short circuit, for example, after repair. And in order not to expose your network to danger, to play it safe and avoid unpleasant consequences, this very simple device will help.

Will need

  • Overhead socket.
  • Key switch, overhead.
  • Incandescent light bulb 40 - 100 W with socket.
  • Two-core wire in double insulation 1 meter.
  • The fork is removable.
  • Self-tapping screws.


All parts will be attached to a wooden square made of chipboard or other material.


It is better to use a wall socket for a light bulb, but if you don’t have one, we make a clamp for the girth from thin sheet metal.


And we roll out a square of thick wood.


It will be attached like this.

Assembling a socket with short circuit protection

Diagram of the entire installation.


As you can see, all elements are connected in series.
First of all, we assemble the plug by connecting the wire to it.


Since the socket and switch are wall-mounted, use a round file to make cuts on the side for the wire. This can be done with a sharp knife.


We screw the wooden square to the base with self-tapping screws. Choose ones that won't go right through.


We screw the lamp socket with a bracket to a wooden square.


We disassemble the socket and switch. Screw it to the base with self-tapping screws.


We connect the wires to the socket.


For complete reliability, all wires are soldered. That is: we clean it, bend the ring, solder it with a soldering iron with solder and flux.


We fix the power cord with nylon ties.


The circuit is assembled, the installation is ready for testing.


To test, insert the charger into the socket from cell phone. We press the switch - the lamp does not light. This means there is no short circuit.


Then we take a more powerful load: a power supply from a computer. Turn it on. The incandescent lamp first flashes and then goes out. This is normal, since the unit contains powerful capacitors, which initially become infected.


We simulate a short circuit - insert tweezers into the socket. Turn it on, the lamp lights up.

This is such a wonderful and very necessary device.


This installation is suitable not only for low-power devices, but also for powerful ones. Certainly washing machine or an electric stove will not work, but by the brightness of the glow you can understand that there is no short circuit.
Personally, I have been using a similar device almost my entire life, testing all newly assembled ones on it.
mob_info