At 11:39 PM 10/6/2005 +0200, you wrote: >Hello! > >I have a IR-sensor with an open collector output. >Can somebody be kind and explain how it works >or show me with a drawing will be nice! It would be better if you could post a link to a datasheet. "Usually" industrial sensors with open-collector outputs have an NPN transistor with emitter common with the (-) supply. So, you'd typically use a pullup resistor somewhere in the circuit, or use a PLC input which has it built-in. In some very benign situations (short wires, all inside one enclosure, little electrical noise) you might be able to go directly into a PIC port pin and omit the signal conditioning and isolation, but that's oh so seldom true in industrial situations. (view with fixed-width font) +12V or whatever rated supply voltage o VCC | + | | | pullup | | Sensor \ .-. .-------------------. | | optional isolation and | | | | Signal conditioning | | '-' .----------. | | | | | | +----------+--------| |-----o | | |<- "open | | logic | ___ |/ | collector" | | level | -|___|---| | | | | |> | | | | | | | | | | | | | '-------------------' '---.------' | | === === GND GND Your sensor should come with specs that spell out the range of supply voltage it expects & the current and voltage rating of the output. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist