Tuesday 27 September 2016

proximity sensor - Using 24 V PNP switch on NPN input



I purchased a PNP sensor in error. I should have purchased an NPN version.


I'm stuck with this thing now and I'm trying to get it to work. All the guides online show circuitry from NPN sensor. I do however have multiple NPN transistor 2N2222A if that will help.


Can somebody draw up a quick diagram on how to do this correctly for my case?




Additional information:


Thomas' Auto Bed Tramming guide on how to wire it , I'm left with the ground wire that is to be used as the Z signal...i guess.. here is a pic that i got from instructibles that matches my setup: http://i.imgur.com/cxJdbYO.jpg


I've noticed that even though i followed the wiring guide for an NPN inductive sensor, the light from the inductive sensor does turn on when it's near the aluminium heated bed, and turn off when it is away from the aluminium heated bed.


However the wire i'm left with to use as a signal to the RAMPS 1.4 board from my inductive sensor appears to be a negative terminal. As I undertstand it, I need to send a positive signal, and I'm not sure how to invert a negative/ground signal to positive.




Answer



Your question is quite garbled but if I understand correctly what you are asking is:



How can I adapt a 24 V, PNP proximity switch for an NPN machine input.



schematic


simulate this circuit – Schematic created using CircuitLab


Figure 1. Adding R1 and a small signal NPN transistor should do the trick.


If your machine input requires a "pull-to-ground" to activate it then the NPN transistor configuration of Figure 1 will do the trick.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...