The output is open collector NPN ... so if you need PNP (why?) then just use a PNP transistor like so:
[image: image.png] But why do you think you need PNP output? The device has an open collector NPN output, just hook a resistor to whatever voltage you need (if your system is using 24V for logic, a 1K to 24V will do, if it is 5V logic, just hook a 1K to 5V ) ... when the sensor sensor opens/closes your signal will go between your logic voltage and 0V ... if it is "the wrong way up" you can just invert the signal in the software, simple. There really is no need to be converting NPN to PNP outputs when you can just invert it in software. On Sun, 21 Aug 2022 at 08:54, andrew beck <andrewbeck0...@gmail.com> wrote: > I'm trying to convert these color sensors > > US $50.00 | Color Mark Sensor HW-111 Use for Packing Machine voltage 12-24v > DC NPN metal case Photoelectric Eyes Marks > https://a.aliexpress.com/_mtEjRmc > > > To pnp. > > I converted similar sensors with a 10k resistor. > > > US $2.37 5%OFF | CHUX Proximity Switch NPN M12 non-Flush IM12-4-DNC 5V > 6-36v Cylinder NO+NC 4Wires 4mm Detect Distance Motion Approach Sensor > https://a.aliexpress.com/_mLMiQHA > > These work fine > > > My theory was maybe use a higher value one and check with voltmeter > decreasing the value until it works > > But I could use a quick lesson from you guys. > > So just thought I would ask. > > I know a bunch of you. > > Chris > Andy > John > > And many others > you guys know lots of electronics😊 > > > Regards > > Andrew > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users >
_______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users