Connecting 12V Inductive Sensor to Raspberry Pi 3B+

Thread Starter

SeattleThomas

Joined Mar 4, 2020
5
Hello,

I am not too strong with building electrical circuits so I am just wondering if I could get some feedback on the circuit I built. I am trying to connect a 12V inductive sensor to a Raspberry Pi 3B+ 3.3V port. The inductive sensor is being used to detect a metal sleeve inside of a valve.

Below is the circuit I made on a cad program as well as the actual electrical circuit that I built on a breadboard (Pi and Sensor not included in picture). The optoisolator being used is a PS2502.

Thank you for help in advance!
 

Attachments

bertus

Joined Apr 5, 2008
22,270
Hello,

Looking at the schematic, the C and E of the optocoupler are the wrong way around.
The E should be on ground. Th C via a resistor to the powersupply.

Bertus
 

bertus

Joined Apr 5, 2008
22,270
Hello,

Yes, a simple explanation would be the arrow of the Emittor.
It is now counter direction of the current flow.

Bertus
 

Thread Starter

SeattleThomas

Joined Mar 4, 2020
5
Hello,

Yes, a simple explanation would be the arrow of the Emittor.
It is now counter direction of the current flow.

Bertus
Thank you! As for the circuit I built, how does that look in regards to the schematic? I have a hard time transferring from drawings to building circuits.
 

dl324

Joined Mar 30, 2015
16,846
The inductive sensor will be connected at the VCC, I just simplified it by adding only the voltage source into the circuit drawing.
It would have been helpful if you had mentioned that.

What is the output of this sensor? Is it binary (digital) or analog? Why do you think you need an optoisolator?

EDIT: clarified the meaning of binary.
 
Last edited:

Thread Starter

SeattleThomas

Joined Mar 4, 2020
5
It would have been helpful if you had mentioned that.

What is the output of this sensor? Is it binary (digital) or analog? Why do you think you need an optoisolator?

EDIT: clarified the meaning of binary.
The output polarity is DC and the output type is PNP. I am using the optoisolator to make sure there is less noise in the circuit.
 
Top