All about car tuning

Bipolar transistor control. The difference between a field-effect transistor and a bipolar transistor. Scope of their application

The following articles will include devices that need to control external loads. By external load I mean everything that is attached to the legs of the microcontroller - LEDs, light bulbs, relays, motors, actuators... well, you get the idea. And no matter how hackneyed this topic may be, in order to avoid repetition in the following articles, I still risk not being original - you will forgive me :). I will briefly recommendation form, I’ll show you the most common ways to connect the load (if you want to add something, I’ll be only too glad).
Let’s immediately agree that we are talking about a digital signal (a microcontroller is still a digital device) and we will not deviate from the general logic: 1 - included, 0 -turned off. Let's begin.

Load direct current are: LEDs, lamps, relays, DC motors, servos, various actuators, etc. Such a load is most simply (and most often) connected to a microcontroller.

1.1 Connection loads through a resistor.
The simplest and probably most often used method when it comes to LEDs.

A resistor is needed in order to limit the current flowing through the microcontroller leg to permissible 20mA. It is called ballast or damping. You can approximately calculate the resistor value by knowing the load resistance Rн.

Rquenching =(5v / 0.02A) – Rн = 250 – Rн

As you can see, even in the worst case, when the load resistance is zero, 250 Ohms is enough to ensure that the current does not exceed 20 mA. This means that if you don’t want to count something there, put 300 Ohm and you will protect the port from overload. The advantage of the method is obvious - simplicity.

1.2 Connection loads using a bipolar transistor.
If it so happens that your load consumes more than 20mA, then, of course, a resistor will not help here. You need to somehow increase (read strengthen) the current. What is used to amplify the signal? Right. Transistor!


It is more convenient to use for strengthening n-p-n transistor connected according to the circuit OE. With this method, you can connect a load with a higher supply voltage than the power supply to the microcontroller. The resistor on the base is limiting. It can vary within a wide range (1-10 kOhm), in any case the transistor will operate in saturation mode. The transistor can be anything n-p-n transistor. The gain is practically irrelevant. The transistor is selected based on the collector current (the current we need) and the collector-emitter voltage (the voltage that powers the load). Power dissipation also matters - so as not to overheat.

Of the common and easily accessible ones, you can use BC546, BC547, BC548, BC549 with any letters (100mA), and even the same KT315 will do (those who have leftovers from old stocks).
- Datasheet for bipolar transistor BC547

1.3 Connection loads using a field effect transistor.
Well, what if the current of our load is within ten amperes? It will not be possible to use a bipolar transistor, since the control currents of such a transistor are large and will most likely exceed 20 mA. The output can be either a composite transistor (read below) or a field-effect transistor (aka MOS, aka MOSFET). The field-effect transistor is simply a wonderful thing, since it is controlled not by current, but by potential at the gate. This makes it possible for microscopic gate current to control large load currents.

Any n-channel field-effect transistor is suitable for us. We choose, like bipolar, by current, voltage and power dissipation.


When turning on a field-effect transistor, you need to consider a number of points:
- since the gate is, in fact, a capacitor, when the transistor switches, large currents flow through it (short-term). In order to limit these currents, a limiting resistor is placed in the gate.
— the transistor is controlled by low currents and if the output of the microcontroller to which the gate is connected is in a high-impedance Z-state, the field switch will begin to open and close unpredictably, catching interference. To eliminate this behavior, the microcontroller leg must be “pressed” to the ground with a resistor of about 10 kOhm.
The field-effect transistor, against the background of all its positive qualities, has a drawback. The cost of controlling low current is the slowness of the transistor. Of course, it will handle PWM, but if the permissible frequency is exceeded, it will respond to you with overheating.

1.4 Connection loads using a compound Darlington transistor.
An alternative to using a field-effect transistor for high-current loads is to use a composite Darlington transistor. Externally, it is the same transistor as, say, a bipolar one, but internally a pre-amplifier circuit is used to control the powerful output transistor. This allows low currents to drive a powerful load. The use of a Darlington transistor is not as interesting as the use of an assembly of such transistors. There is such a wonderful microcircuit as ULN2003. It contains as many as 7 Darlington transistors, each of which can be loaded with a current of up to 500 mA, and they can be connected in parallel to increase the current.


The microcircuit is very easy to connect to the microcontroller (just pin to pin), has convenient wiring (input opposite output) and does not require additional wiring. As a result of this successful design, ULN2003 is widely used in amateur radio practice. Accordingly, it will not be difficult to get it.
- Datasheet for Darlington assembly ULN2003

If you need to manage devices alternating current(most often 220v), then everything is more complicated, but not by much.

2.1 Connection loads using a relay.
The simplest and probably most reliable connection is using a relay. The relay coil itself is a high-current load, so you cannot connect it directly to the microcontroller. The relay can be connected via a field-effect or bipolar transistor, or via the same ULN2003, if several channels are needed.


The advantages of this method are high switching current (depending on the selected relay), galvanic isolation. Disadvantages: limited speed/frequency of activation and mechanical wear of parts.
It makes no sense to recommend something for use - there are many relays, choose according to the required parameters and price.

2.2 Connection loads using a triac (triac).
If you need to control a powerful AC load, and especially if you need to control the power supplied to the load (dimers), then you simply cannot do without using a triac (or triac). The triac is opened by a short current pulse through the control electrode (for both negative and positive voltage half-waves). The triac closes itself when there is no voltage on it (when the voltage passes through zero). This is where the difficulties begin. The microcontroller must control the moment the voltage crosses zero and, at a precisely defined moment, send a pulse to open the triac - this is a constant controller occupancy. Another difficulty is the lack of galvanic isolation in the triac. You have to do it on separate elements, complicating the circuit.


Although modern triacs are controlled by a fairly low current and can be connected directly (via a limiting resistor) to a microcontroller, for safety reasons they have to be switched on through optical decoupling devices. Moreover, this applies not only to the triac control circuits, but also to the zero control circuits.

A rather ambiguous way to connect the load. Since, on the one hand, it requires the active participation of a microcontroller and a relatively complex circuit design. On the other hand, it allows you to manipulate the load very flexibly. Another disadvantage of using triacs is the large amount of digital noise created during their operation - suppression circuits are needed.

Triacs are quite widely used, and in some areas they are simply irreplaceable, so getting them is not a problem. Triacs of the BT138 type are very often used in amateur radio.

Hello dear readers. In this article, we will look at the difference between a field-effect transistor and a bipolar transistor, and we will find out in what areas both transistors are used.

So, let's begin…

Among semiconductor devices, there are two large groups, which include field-field and bipolar. They are widely used in electronics and radio engineering as generators, amplifiers and converters. electrical signals. To understand the main difference between these devices, it is necessary to consider them in more detail.

Bipolar transistors

The conducting region of the structure consists of three “soldered” semiconductor parts, alternating according to the type of conductivity. A semiconductor with donor (electronic) conductivity is designated as n-type, and with acceptor (hole) conductivity - p-type. Thus, we can observe only two alternation options - p-n-p, or n-p-n. Based on this feature, bipolar transistors with n-p-n and p-n-p structures are distinguished.

The common part of the transistor chip in contact with the other two is called the “base”. The other two are “collector” and “emitter”. The degree of saturation of the base with charge carriers (electrons or electron vacancies “holes”) determines the degree of conductivity of the entire transistor crystal. Thus, the conductivity of the transistor transitions is controlled, which allows it to be used as a signal power amplification element, or a switch.

Field effect transistors

The conducting part of the structure is a p- or n-type semiconductor channel in the metal. The load current flows through the channel through electrodes called "drain" and "source". The cross-sectional area of ​​the conductive channel and its resistance depend on reverse voltage at the p-n junction of the boundary of the metal and semiconductor channel. The control electrode connected to the metal area is called the "gate".

The field-effect transistor channel can have an electrical connection with the gate metal - a non-insulated gate, or it can be separated from it by a thin layer of dielectric - an insulated gate.

Which transistors are better, field-effect or bipolar?

And so, we learned that the main difference between these two types of transistors is control. Let's look at other advantages of field-effect transistors compared to bipolar ones:

  • high input impedance for direct current and at high frequency, hence low control losses
  • high performance (due to the absence of accumulation and resorption of minor carriers)
  • almost complete electrical isolation of input and output circuits, low pass-through capacity since the amplifying properties of field-effect transistors are due to the transfer of the main charge carriers, their upper limit of effective amplification is higher than that of bipolar ones
  • squareness of volts - ampere characteristic(similar to triode)
  • high temperature stability
  • low noise level, since field-effect transistors do not use the phenomenon of injection of minority charge carriers, which makes bipolar transistors “noisy”
  • low power consumption

The accumulation and resorption of minority charge carriers is absent in field-effect transistors, which is why their performance is very high (as noted by power equipment developers). And since the transferred main charge carriers are responsible for the amplification in field-effect transistors, the upper limit of the effective amplification for field-effect transistors is higher than for bipolar ones.


Here we note high temperature stability, low level of interference (due to the absence of injection of minority charge carriers, as happens in bipolar ones), and efficiency in terms of energy consumption.

Current or field, transistor control

Most people who deal with electronics in one way or another should know the basic structure of field-effect and bipolar transistors. At least from the name "field effect transistor", it is obvious that it is controlled by a field, the electric field of the gate, while a bipolar transistor is controlled by the base current.

Current and field, the difference here is cardinal. In bipolar transistors, the collector current is controlled by changing the base control current, while to control the drain current of a field-effect transistor, it is enough to change the voltage applied between the gate and source, and no control current as such is needed.

Different reaction to heating

For bipolar transistors, the temperature coefficient of collector-emitter resistance is negative (that is, with increasing temperature, the resistance decreases and the collector-emitter current increases). For field-effect transistors, the opposite is true - the drain-source temperature coefficient is positive (with increasing temperature, the resistance increases and the drain-source current decreases).

An important consequence of this fact is that if bipolar transistors cannot simply be connected in parallel (for the purpose of increasing power), without current equalizing resistors in the emitter circuit, then with field-effect transistors everything is much simpler - thanks to the automatic balancing of the drain-source current when the load/heating changes - they can be freely turned on in parallel without equalizing resistors. This is due to temperature properties p-n junction and a simple p- or n-type semiconductor. For this reason, field-effect transistors are much less likely to experience irreversible output thermal runaway than bipolar ones.

So, to achieve high switching currents, you can easily assemble a composite switch from several parallel field-effect transistors, which is used in many places in practice, for example in inverters.

But bipolar transistors cannot just be paralleled; they definitely need current equalizing resistors in the emitter circuits. Otherwise, due to an imbalance in a powerful composite switch, one of the bipolar transistors will sooner or later experience an irreversible thermal breakdown. Field composite keys are hardly affected by this problem. These characteristic thermal features are associated with the properties of a simple n- and p-channel and p-n junction, which are radically different.

Areas of application of these and other transistors

The differences between field-effect and bipolar transistors clearly separate their areas of application. For example, in digital chips, where a minimum current consumption in the standby state is required, field-effect transistors are used much more widely today. In analog microcircuits, field-effect transistors help achieve high linearity of the amplification characteristic over a wide range of supply voltages and output parameters.

Circuits of the reel-to-reel type are conveniently implemented today with field-effect transistors, because the voltage swing of the outputs as signals for the inputs is easily achieved, coinciding almost with the level of the supply voltage of the circuit. Such circuits can simply connect the output of one to the input of another, and no voltage limiters or resistor dividers are needed.

As for bipolar transistors, their typical applications remain: amplifiers, their stages, modulators, detectors, logic inverters and transistor logic microcircuits.

The field wins, why?

Outstanding examples of devices based on field-effect transistors are electronic wristwatches and TV remote controls. Due to the use of CMOS structures, these devices can operate for up to several years from a single miniature power source - a battery or an accumulator, because they consume virtually no energy.

Currently, field-effect transistors are being found more and more wide application in various radio devices, where they are already successfully replacing bipolar ones. Their use in radio transmitting devices makes it possible to increase the frequency of the carrier signal, providing such devices with high noise immunity.

Possessing low on-resistance, they are used in the final stages of power amplifiers audio frequencies high power (Hi-Fi), where again bipolar transistors and even vacuum tubes are successfully replaced.

In high power applications, e.g. soft start motors, insulated gate bipolar transistors (IGBTs), devices that combine both bipolar and field-effect transistors, are already successfully replacing thyristors.

Video, the difference between a field-effect transistor and a bipolar one

06 Jan 2017

In practice, there is often a need to control some powerful electrical device using a digital circuit (for example, a microcontroller). This could be a powerful LED that consumes high current, or a device powered by a 220 V network. Let's consider typical solutions to this problem.

Types of control

Conventionally, three groups of methods can be distinguished:

  1. DC load control.
    • Transistor switch based on a bipolar transistor.
    • Transistor switch based on a MOS transistor (MOSFET).
    • IGBT transistor switch.
  2. AC load control.
    • Thyristor switch.
    • Triac key.
  3. Universal method.
    • Relay.

The choice of control method depends on both the type of load and the type of digital logic used. If the circuit is built on TTL chips, then it should be remembered that they are controlled by current, in contrast to CMOS, where control is carried out by voltage. Sometimes it's important.

Bipolar transistor switch

For current $I_(LED) = 0(,)075\,A$, the control current should be $\beta = 50$ times less:

Let us take the voltage drop across the emitter-base transition to be equal to $V_(EB) = 0(,)7\,V$.

The resistance was rounded down to provide a current margin.

Thus, we found the values ​​of resistances R1 and R2.

Darlington transistor

If the load is very powerful, then the current through it can reach several amperes. For high-power transistors, the $\beta$ coefficient may be insufficient. (Moreover, as can be seen from the table, for powerful transistors it is already small.)

In this case, a cascade of two transistors can be used. The first transistor controls the current, which turns on the second transistor. This connection circuit is called a Darlington circuit.

In this circuit, the $\beta$ coefficients of the two transistors are multiplied, resulting in a very large current transfer coefficient.

To increase the turn-off speed of transistors, you can connect the emitter and base of each with a resistor.


The resistances must be large enough so as not to affect the base-emitter current. Typical values ​​are 5…10 kOhm for voltages 5…12 V.

Darlington transistors are produced as a separate device. Examples of such transistors are given in the table.

Otherwise, the operation of the key remains the same.

Field effect transistor key

In the future, we will specifically call a field-effect transistor a MOSFET, that is, field-effect transistors with an insulated gate (aka MOS, aka MOS). They are convenient because they are controlled exclusively by voltage: if the gate voltage is greater than the threshold voltage, then the transistor opens. In this case, the control current does not flow through the transistor while it is open or closed. This is a significant advantage over bipolar transistors, in which current flows the entire time the transistor is open.

Also, in the future we will only use n-channel MOSFETs (even for push-pull circuits). This is because n-channel transistors are cheaper and have better performance.

The simplest switch circuit using a MOSFET is shown below.

Again, the load is connected “from above”, to the drain. If you connect it “from below”, the circuit will not work. The fact is that the transistor opens if the voltage between the gate and source exceeds the threshold. When connected “from below,” the load will produce an additional voltage drop, and the transistor may not open or not open completely.

With push-pull control, the capacitor discharge circuit actually forms an RC circuit in which maximum current rank will be equal

where $V$ is the voltage that controls the transistor.

Thus, it will be enough to install a 100 Ohm resistor to limit the charge and discharge current to 10 mA. But the greater the resistance of the resistor, the slower it will open and close, since the time constant $\tau = RC$ will increase. This is important if the transistor switches frequently. For example, in a PWM controller.

The main parameters that you should pay attention to are the threshold voltage $V_(th)$, the maximum current through the drain $I_D$ and the drain-source resistance $R_(DS)$ of an open transistor.

Below is a table with examples of characteristics of MOSFETs.

Model $V_(th)$ $\max\I_D$ $\max\R_(DS)$
2N7000 3 V 200 mA 5 ohm
IRFZ44N 4 V 35 A 0.0175 Ohm
IRF630 4 V 9 A 0.4 ohm
IRL2505 2 V 74 A 0.008 Ohm

Maximum values ​​are given for $V_(th)$. The fact is that for different transistors, even from the same batch, this parameter can differ greatly. But if the maximum value is, say, 3 V, then this transistor is guaranteed to be used in digital circuits with a supply voltage of 3.3 V or 5 V.

The drain-source resistance of the above transistor models is quite small, but it should be remembered that at high voltages of the controlled load, even this can lead to the release of significant power in the form of heat.

Fast switching circuit

As already mentioned, if the voltage at the gate relative to the source exceeds the threshold voltage, then the transistor opens and the drain-source resistance is low. However, the voltage when turned on cannot suddenly jump to the threshold. And at lower values, the transistor acts as a resistance, dissipating heat. If the load has to be turned on frequently (for example, in a PWM controller), then it is advisable to switch the transistor from the closed state to the open state and back as quickly as possible.


Once again, pay attention to the location of the load for the n-channel transistor - it is located “on top”. If you place it between the transistor and ground, due to the voltage drop across the load, the gate-source voltage may be less than the threshold, the transistor will not open completely and may overheat and fail.

Field Effect Transistor Driver

If you still need to connect the load to an n-channel transistor between drain and ground, then there is a solution. You can use a ready-made chip - a high-side driver. Top - because the transistor is on top.

Drivers of both upper and lower arms are also available (for example, IR2151) to build a push-pull circuit, but this is not required for simply turning on the load. This is necessary if the load cannot be left “hanging in the air”, but must be pulled to the ground.

Let's look at the high-side driver circuit using the IR2117 as an example.


The circuit is not very complicated, and the use of a driver allows you to use the transistor most efficiently.

IGBT

Another interesting class of semiconductor devices that can be used as a switch are insulated gate bipolar transistors (IGBTs).

They combine the advantages of both MOS and bipolar transistors: they are voltage controlled and have high maximum permissible voltages and currents.

You can control a switch on an IGBT in the same way as a switch on a MOSFET. Because IGBTs are used more in power electronics, they are usually used in conjunction with drivers.

For example, according to the datasheet, IR2117 can be used to control IGBT.


An example IGBT is IRG4BC30F.

AC Load Control

All previous schemes were distinguished by the fact that the load, although powerful, operated on direct current. The circuits had clearly defined ground and power lines (or two lines - for the controller and the load).

For AC circuits, different approaches must be used. The most common are the use of thyristors, triacs and relays. We'll look at the relay a little later, but for now let's talk about the first two.

Thyristors and triacs

A thyristor is a semiconductor device that can be in two states:

  • open - passes current, but only in one direction,
  • closed - does not allow current to pass through.

Since a thyristor only passes current in one direction, it is not very suitable for turning on and off a load. Half of the time for each alternating current period the device is idle. However, a thyristor can be used in a dimmer. There it can be used to control power, cutting off a piece of the required power from the power wave.

A triac is actually a bidirectional thyristor. This means that it allows passing not half-waves, but a full wave of the load supply voltage.

There are two ways to open a triac (or thyristor):

  • apply (at least briefly) an unlocking current to the control electrode;
  • submit enough high voltage to its “working” electrodes.

The second method is not suitable for us, since the supply voltage will have a constant amplitude.

After the triac has opened, it can be closed by changing the polarity or reducing the current through it to a value less than the so-called holding current. But since the power supply is provided by alternating current, this will automatically happen at the end of the half-cycle.

When choosing a triac, it is important to take into account the magnitude of the holding current ($I_H$). If you take a powerful triac with a high holding current, the current through the load may be too small, and the triac simply will not open.

Triac key

For galvanic isolation of control and power circuits, it is better to use an optocoupler or a special triac driver. For example, MOC3023M or MOC3052.

These optocouplers consist of an infrared LED and a phototriac. This phototriac can be used to control a powerful triac switch.

In the MOC3052, the voltage drop across the LED is 3 V and the current is 60 mA, so when connecting to a microcontroller, you may have to use an additional transistor switch.

The built-in triac is designed for voltage up to 600 V and current up to 1 A. This is enough to control powerful household appliances through a second power triac.

Consider a circuit for controlling a resistive load (for example, an incandescent lamp).


Thus, this optocoupler acts as a triac driver.

There are also drivers with a zero detector - for example, MOC3061. They switch only at the beginning of the period, which reduces interference in the power grid.

Resistors R1 and R2 are calculated as usual. The resistance of resistor R3 is determined based on the peak voltage in the power supply network and the unlocking current of the power triac. If you take one that is too large, the triac will not open; if it is too small, the current will flow in vain. A powerful resistor may be required.

It would be useful to recall that 220 V in the electrical network is the value of the effective voltage. The peak voltage is $\sqrt2 \cdot 220 \approx 310\,V$.

Inductive Load Control

When driving an inductive load such as an electric motor, or when there is noise on the line, the voltage may become high enough to cause the triac to open spontaneously. To combat this phenomenon, it is necessary to add a snubber to the circuit - this is a smoothing capacitor and a resistor in parallel with the triac.


The snubber doesn't improve the emissions situation much, but it's better with it than without it.

The ceramic capacitor must be designed for a voltage greater than the peak in the power supply. Let us remember once again that for 220 V this is 310 V. It is better to take it with a reserve.

Typical values: $C_1 = 0(,)01\,uF$, $R_4 = 33\,Ohm$.

There are also triac models that do not require a snubber. For example, BTA06-600C.

Examples of triacs

Examples of triacs are given in the table below. Here $I_H$ is the holding current, $\max\ I_(T(RMS))$ is the maximum current, $\max\ V_(DRM)$ is the maximum voltage, $I_(GT)$ is the unlocking current.

Model $I_H$ $\max\I_(T(RMS))$ $\max\V_(DRM)$ $I_(GT)$
BT134-600D 10 mA 4 A 600 V 5 mA
MAC97A8 10 mA 0.6 A 600 V 5 mA
Z0607 5 mA 0.8 A 600 V 5 mA
BTA06-600C 25 mA 6 A 600 V 50 mA

Relay

Electromagnetic relays

From the point of view of the microcontroller, the relay itself is a powerful load, and an inductive one at that. Therefore, to turn the relay on or off, you need to use, for example, a transistor switch. The connection diagram and also the improvement of this scheme were discussed earlier.

Relays impress with their simplicity and efficiency. For example, the HLS8-22F-5VDC relay is controlled by a voltage of 5 V and is capable of switching a load that requires a current of up to 15 A.

Solid State Relays

The main advantage of the relay - ease of use - is overshadowed by several disadvantages:

  • this is a mechanical device and the contacts can become dirty or even welded to each other,
  • lower switching speed,
  • relatively large currents for switching,
  • contacts click.

Some of these shortcomings are eliminated in so-called solid-state relays. These are, in fact, semiconductor devices with galvanic isolation, containing inside a full-fledged powerful switch circuit.

Conclusion

Thus, we have enough load control methods in our arsenal to solve almost any problem that may arise for a radio amateur.

  • Key on your shoulder! – features of the use of high-voltage drivers produced by IR
  • Scheme editor

    All diagrams are drawn in KiCAD. Lately I’ve been using it for my projects, it’s very convenient, I recommend it. With its help you can not only draw circuits, but also design printed circuit boards.

    Here I separately raised such an important practical issue as connecting inductive sensors with transistor output, which are ubiquitous in modern industrial equipment. In addition, real instructions for the sensors and links to examples are provided.

    The principle of activation (operation) of sensors can be anything - inductive (proximity), optical (photoelectric), etc.

    The first part described possible options sensor outputs. There should be no problems connecting sensors with contacts (relay output). But with transistor ones and connecting to a controller, not everything is so simple.

    Below, as an example, are diagrams for connecting sensors with a transistor output. Load - as a rule, this is the controller input.

    Sensor. The load (Load) is constantly connected to “minus” (0V), the supply of discrete “1” (+V) is switched by a transistor. NO or NC sensor - depends on the control circuit (Main circuit)

    Sensor. The load (Load) is constantly connected to the “plus” (+V). Here, the active level (discrete “1”) at the sensor output is low (0V), while power is supplied to the load through the opened transistor.

    I urge everyone not to get confused; the operation of these schemes will be described in detail below.

    The diagrams below show basically the same thing. Emphasis is placed on the differences in the PNP and NPN output circuits.


    In the left picture there is a sensor with an output transistor NPN. The common wire is switched, which in in this case— negative wire of the power supply.

    On the right is the case with a transistor PNP at the exit. This case is the most common, since in modern electronics it is customary to make the negative wire of the power supply common, and activate the inputs of controllers and other recording devices with a positive potential.

    How to check an inductive sensor?

    To do this, you need to supply power to it, that is, connect it to the circuit. Then - activate (initiate) it. When activated, the indicator will light up. But the indication does not guarantee the correct operation of the inductive sensor. You need to connect the load and measure the voltage on it to be 100% sure.

    Replacing sensors

    As I already wrote, there are fundamentally 4 types of sensors with transistor output, which are divided according to the internal structure and switching circuit:

    • PNP NO
    • PNP NC
    • NPN NO
    • NPN NC

    All these types of sensors can be replaced with each other, i.e. they are interchangeable.

    This is implemented in the following ways:

    • Alteration of the initiation device - the design is mechanically changed.
    • Changing the existing sensor connection circuit.
    • Switching the type of sensor output (if there are such switches on the sensor body).
    • Reprogramming a program - changing the active level of a given input, changing the program algorithm.

    Below is an example of how you can replace a PNP sensor with an NPN one by changing the connection diagram:


    PNP-NPN replacement. On the left is the original diagram, on the right is the modified one.

    Understanding the operation of these circuits will help you understand the fact that the transistor is a key element that can be represented by ordinary relay contacts (examples are below in the notation).

    So, here's the diagram on the left. Let's assume that the sensor type is NO. Then (regardless of the type of transistor at the output), when the sensor is not active, its output “contacts” are open and no current flows through them. When the sensor is active, the contacts are closed, with all the ensuing consequences. More precisely, with current flowing through these contacts)). The current flowing creates a voltage drop across the load.

    The internal load is shown with a dotted line for a reason. This resistor exists, but its presence does not guarantee stable operation of the sensor; the sensor must be connected to the controller input or other load. The resistance of this input is the main load.

    If there is no internal load in the sensor, and the collector “hangs in the air,” then this is called an “open collector circuit.” This circuit ONLY works with a connected load.

    Maybe this will be interesting:

    So, in a circuit with a PNP output, when activated, voltage (+V) is supplied to the controller input through an open transistor, and it is activated. How can we achieve the same with NPN output?

    There are situations when the required sensor is not at hand, and the machine must work “right now.”

    We look at the changes in the diagram on the right. First of all, the operating mode of the sensor output transistor is ensured. To do this, an additional resistor is added to the circuit; its resistance is usually about 5.1 - 10 kOhm. Now, when the sensor is not active, voltage (+V) is supplied to the controller input through an additional resistor, and the controller input is activated. When the sensor is active, there is a discrete “0” at the controller input, since the controller input is shunted by an open NPN transistor, and almost all of the additional resistor current passes through this transistor.

    Yes, not exactly what we wanted. In this case, a rephasing of the sensor operation occurs. But the sensor works in mode, and the controller receives information. In most cases this is enough. For example, in the pulse counting mode - a tachometer, or the number of workpieces.

    How to achieve full functionality? Method 1 - mechanically move or remake the metal plate (activator). Or the light gap, if we are talking about an optical sensor. Method 2 is to reprogram the controller input so that discrete “0” is the active state of the controller, and “1” is the passive state. If you have a laptop at hand, then the second method is both faster and easier.

    Proximity sensor symbol

    On circuit diagrams Inductive sensors (proximity sensors) are designated differently. But the main thing is that there is a square rotated by 45° and two vertical lines in it. As in the diagrams shown below.

    NO NC sensors. Schematic diagrams.

    On the top diagram there is a normally open (NO) contact (conventionally designated PNP transistor). The second circuit is normally closed, and the third circuit is both contacts in one housing.

    Color coding of sensor leads

    There is a standard sensor labeling system. All manufacturers currently adhere to it.

    However, before installation, it is a good idea to make sure that the connection is correct by referring to the connection manual (instructions). In addition, as a rule, the wire colors are indicated on the sensor itself, if its size allows.

    This is the marking.

    Blue - Minus power

    Brown - Plus

    Black - Exit

    White - second output, or control input, you need to look at the instructions.

    Designation system for inductive sensors

    The sensor type is indicated by a digital-alphabetic code, which encodes the main parameters of the sensor. Below is the labeling system for popular Autonics sensors.


    Download instructions and manuals for some types of inductive sensors:

    / Inductive proximity sensors. Detailed description parameters, pdf, 135.28 kB, downloaded: 1183 times./

    Real sensors

    It is problematic to buy sensors, the product is specific, and electricians do not sell these in stores. Alternatively, you can buy them in China, on AliExpress.

    Thank you all for your attention, I look forward to questions about connecting sensors in the comments!