How to Build a PNP Inductive Proximity Sensor Circuit

How to Build a PNP Inductive Proximity Sensor Circuit


Inductive proximity sensor



In this project, we will show how to connect an inductive proximity sensor to an output.

There are 2 types of inductive proximity sensors: NPN and PNP.

In this circuit, we will build a PNP inductive proximity sensor circuit. A PNP is by far easier to connect up than an NPN because it doesn't require a voltage comparator IC. This will be explained fully below.

An inductive proximity sensor is a useful device because it can get detect metal objects. Therefore, it can be used as a metal detector device for screening when people walk through the entrance of a building or it can be be used to find metal objects such as looking for gold.

The sensor has a range of 4mm, meaning the object has to be within 4mm of the tip of the sensor to be detected. 4mm is 0.4cm or 0.157 inches away. So basically the sensor has to be right on top of the object. This can be good or bad depending on the application and use of the sensor. It's good because, since it's so close it won't pick up objects far away, confusing other metallic objects for the one in front. It's bad because the object literally has to be right on the sensor.

So, depending on the use of the sensor, it can be a very useful device in many applications. So we will now show how to build it.

Components



  • PNP Inductive Proximity Sensor
  • 4011 NAND gate chip
  • NPN Transistor
  • 6V Buzzer


The PNP inductive proximity sensor we will use can be obtained for just over $2 on ebay.

The sensor detects metal objects 4 meters from the tip.

It is a 3-pin sensor. The pinout of the sensor is shown below.

Inductive proximity sensor pinout

The brown pin is the positive voltage pin. Here we connect anywhere from 6V-36V.

The blue pin is the ground pin. Here we connect the pin to power ground.

The black pin is the signal pin. When the proximity sensor doesn't detect any metal objects, this pin will be LOW, about 10 times less than the voltage that is fed to positive voltage pin, the brown pin. So, for example, if you are feeding a voltage of 6.5V into the brown pin, when no metal objects are detected, the black pin will output about 0.65V or even less. When a metal object is detected, the sensor will output a voltage of about 6.5V, almost nearly the same as the voltage fed into the positive voltage pin, the brown pin.

The reason PNP inductive proximity sensor circuits are easier to connect than NPNs is because PNPs are OFF when no object is detected and turn ON when an object is detected. Thus, it's configured perfectly to how we would want it to be. Thus, all we have to do is connect our load to the signal output and we're done.

NPNs were different. NPNs were ON naturally or emitting HIGH from the signal pin when no metal object is detected and goes OFF or LOW when an object is detected. Being that we usually want a load to be powered when an metal is detected, NPNs require more circuitry in order for this to happen. NPNs are configured the opposite of how we want it. It goes off when an object is detected. So a load will shut off when an object is detected.

PNPs are configured just as we would want them, going ON or HIGH when a metal is detected. So with PNPs, we simply connect our load device to the signal pin, the black pin.

This inductive proximity sensor really is an output voltage device. It doesn't output much current. In order to get enough current to light up a device such as an LED or a buzzer or motor, a transistor should be used. Otherwise, the device won't be able to operate at full capacity. The transistor gives us current amplification. This will allow the buzzer, which we will use in this circuit, to sound at full force.



PNP Inductive Proximity Sensor Circuit

The PNP inductive sensor circuit we will build that sounds a buzzer when metal is detected is shown below.

Inductive proximity sensor circuit

We will now explain the hardware connections.

First to connect power to the inductive proximity, we connect the brown pin to 6V of power and connect the blue pin to ground. This establishes power to the sensor.

The only other thing we have to do is connect the signal pin (the black) to our load. Being that we want to sound a buzzer, which requires a good deal of current, we connect the signal pin to the base of nNPN transistor. We connect the collector of the transistor to 6V and to the buzzer, while connecting the emitter to ground. This transistor gives us current amplification, so that there is enough to drive a buzzer.

When no metal object is detected, the signal pin emits a LOW signal. Thus, the transistor and buzzer are therefore off.

when a metal object is detected, the signal pin emits a HIGH signal, nearly the voltage fed into the posiitve voltage pin (the brown pin). Thus, the transistor and buzzer, therefore, turn on.

And this is how a PNP inductive proximity sensor works.

How the Circuit Works

This is how the circuit works.

When no metallic object is detected by the proximity sensor, it outputs a HIGH voltage att just around the voltage fed into the positive voltage pin of the sensor, the brown pin. When no metal is detected by the sensor, we don't want our output on. So when we feed a HIGH signal into the NAND gate, whose input pins are tied together, this produces 2 HIGHs on the input pins. According to NAND gate logic, 2 HIGHs create a LOW output. This means that our output is OFF. So when no metal is detected by the sensor, the output, which in this case is a buzzer, is off, does not sound.

Now the other scenario is when metal is detected by the sensor. When metal is detected by the sensor, the voltage output from the sensor drops significantly, it drops tenfold. So if it was putting out a voltage of 6.5V when no metal was detected, it would drop to about 0.65V when metal is detected. On a NAND gate chip and pretty much all logic chips, when the voltage at the input of a gate falls to less than VDD/2, this is interpreted as a LOW signal. So we 6v into VDD of the NAND gate. 6V/2= 3V. So anything less than 3V is seen as a LOW signal. So the 0.65V output by the signal pin of the sensor is definitely seen as a LOW signal. If both or any of the signals are LOW being fed into a NAND gate, the output will be HIGH or ON. So when a metal object is detected by the proximity sensor, the buzzer will sound.

Being that a buzzer usually requires a good amount of current to really sound off, we connect a transistor so that it gets enough current to go off loudly.

And this is how an PNP proximity sensor circuit can work.



To see how this circuit works in real life, please see the video below.



Related Resources

How to Build an NPN Inductive Proximity Sensor Circuit

HTML Comment Box is loading comments...