Olimex Support Forum

Microcontrollers => PIC => Topic started by: betuse on September 18, 2013, 12:42:34 PM

Title: Optocoupler input on PIC MAXI WEB
Post by: betuse on September 18, 2013, 12:42:34 PM
Hi there,
I need to use proximity sensor with 3 wire,
can somebody share with me how to connect this sensor on Optocoupler input on PIC MAXI WEB?
thanks and
regards
Title: Re: Optocoupler input on PIC MAXI WEB
Post by: LubOlimex on September 24, 2013, 11:55:08 AM
Hey there,

It would be a good idea to provide us with some more information about this proximity sensor. What are the names of those wires? What are the levels of these wires?

If you have some datasheet of the sensor it would be a good idea to share it with us.

Best regards,
Lub/OLIMEX
Title: Re: Optocoupler input on PIC MAXI WEB
Post by: betuse on September 26, 2013, 11:31:53 AM
Hi Olimex,
thanks for reply,
that is inductive proximity sensor, with three wires,
brown (+),
blue (-),
black (load),
NPN NO (normally open) tipe,
up to 30VDC,
regards
 
Title: Re: Optocoupler input on PIC MAXI WEB
Post by: LubOlimex on September 26, 2013, 03:57:20 PM
Hello betuse,

Ok, based on the information provided by you there are two possibilities:

1. If you power the sensor by up to 12V then you can directly connect it to the optocouplers. For instance, if you wish to use IN1 then you connect brown(+) to IN1+ and black(load) to IN1-.

2. If you power the sensor by 12V to 30V (e.g. more than 12V) you would need to put an additional resistor on the IN1-1 or you would damage the circuit before the coupler. If you use 30V the resistor should be 2.4K Ohm(in series with the 330 Ohm one already mounted). After this the connection of the signals is the same.

Best regards,
Lub/OLIMEX
Title: Re: Optocoupler input on PIC MAXI WEB
Post by: betuse on September 29, 2013, 12:33:12 PM
Thanks LUB,
to avoid missunderstud:
I will power sensor with 12V,
brown wire (+) to IN1+,
black wire (load) to IN1-
AND BETWEEN brown(+) and blue(-) add 12VDC?
is it right?
thanks and
regards
Title: Re: Optocoupler input on PIC MAXI WEB
Post by: LubOlimex on October 10, 2013, 10:46:38 AM
Hello betuse,

Brown and black lines are responsible for the connection. Blue(-) is not related to the connection between PIC- MAXI-WEB and your sensor. It is up to you how you power the sensor - probably check its documentation.

Check how much current your sensor might withstand on its output - it should be able to survive at least 30mA.

Best regards,
Lub/OLIMEX