Page 1 of 1
3 wire Retroreflective Photoelectric Sensor Switch
Posted: Sat Oct 20, 2012 1:44 pm
by wobinb
Hello,
I have purchased a retroreflective photoelectric sensor switch from ebay, it runs at 10-30 volts. I would like some advice on how to connect it to the GPIO connector on the raspberry pi.
I have connected the switch to a 12volt supply, the switch has three wires +, - and the third wire becomes live (at 12volts - i guess) when the switch is activated. So I'm guessing I need to reduce that voltage in order to not fry the pi.
The end objective is to connect two of these sensors and measure the time between them being tripped, to make a rudimentary speed trap.
Any advice greatly received.
Robin
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Sun Oct 21, 2012 8:57 am
by huskybloke
hi
A safe and easy option is to use the 12volts output from the sensor to power a small relay which can then switch whatever voltage the pi likes.
This gives the element of isolation between the 12volt and the pi.
You might also consider a small diode (1n4001) across the relay coil to protect the sensor.
http://www.ebay.co.uk/itm/10-Pcs-DC-12V ... 1e733c4bf5
http://www.ebay.co.uk/itm/20-x-1N4001-R ... 484542760c
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Sun Oct 21, 2012 8:35 pm
by wobinb
thanks for the help, I have ordered the parts so lets see....
What do you mean by putting the diode across the coil?
I'm assuming you mean in the 12 volt circuit, in series with the relay?
Regards
Robin
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Mon Oct 22, 2012 9:54 am
by Burngate
wobinb wrote:What do you mean by putting the diode across the coil?
I'm assuming you mean in the 12 volt circuit, in series with the relay?
NO! In
parallel with the coil!
At the point when the sensor decides to switch the current through the coil off, the inductance of the coil tries to keep the current flowing.
With nowhere to go, that current builds up a large negative voltage, which could damage something.
The diode provides the current with somewhere to go, and so prevents the negative voltage building up.
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Sat Oct 27, 2012 12:13 pm
by wobinb
so something like this?
many thanks for all the help so far
Robin
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Mon Oct 29, 2012 8:59 am
by Burngate
Yes, precisely that
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Mon Jan 28, 2013 10:33 pm
by Joypipe
How did your project go?
Re: 3 wire Retroreflective Photoelectric Sensor Switch
Posted: Thu Jan 31, 2013 6:45 pm
by wobinb
I ended up putting that project on hold - thanks for all the help tho.
I ended up building a raspberry pi big trak robot. I'm currently building mk2, once that is built I'll share it here.