optoisolators??? Sensors


8 posts
by silverfox0786 » Sun Feb 10, 2013 7:14 pm
Hi i have been looking at the optoisolator and have found that a very simple device can be breadboarded to sense a trigger from a alarm pir

what i wanted to know is does the gertboard have this feature built into it

currently the optoisolator uses a 3.3v gnd and any 1 pin of the GPIO usually pin 7 (pi)/pin 4 (BCM)

i need to know this as if i use the gertboard then i cant use the optoisolator setup so need to know if its incorporated

thanks
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
by domesday » Sun Feb 10, 2013 8:24 pm
No the Gertboard does not have an opto isolator.
Posts: 258
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK
by silverfox0786 » Mon Feb 11, 2013 1:31 am
domesday wrote:No the Gertboard does not have an opto isolator.


sorry i may have asked the question a bit wrong

i know the gertboard has no optoisolator itself but what i wanted to ask is can the gertboard be rigged in a way to give the funtions of an optoisolator
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
by alexeames » Mon Feb 11, 2013 9:32 am
You could use the open collector with a relay, or just the open collector itself if the current isn't over half an amp (from memory)
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2068
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by silverfox0786 » Mon Feb 11, 2013 1:14 pm
i been doing a bit more research and think i cracked the concept

only yhing is how to rig it up

what i want to do is when a button is pressed the pi registers this and sends an email to me

so what i can do is set the gertboard to register a buttonpush from the button push setup as the gert has this

i have code which i borrowed from another user and will adapt it

what i need help on is the button push rig and and an output i dont want the gert to light the onboard LED but rather to trigger and external device

and then i can adapt the code to trigger on this
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
by silverfox0786 » Mon Feb 11, 2013 2:24 pm
alexeames wrote:You could use the open collector with a relay, or just the open collector itself if the current isn't over half an amp (from memory)


looks like open collector is the way to go here
User avatar
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
by alexeames » Mon Feb 11, 2013 10:22 pm
It would be a lot easier to help you if you could describe what you are trying to do in a clear, comprehensible, and complete way.

From what I've read of your description, all of the things you want to be able to do are possible with the Gertboard, but you have omitted so much (like even what programming language) that it's impossible to help you any further.
Alex Eames RasPi.TV HDMIPi.com RasP.iO
User avatar
Posts: 2068
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
by Gert van Loo » Tue Feb 12, 2013 11:02 am
Just a general remark about opto-isolators.
I have seen a lot of posts where users are adding them because they think they have to or have been told so.
I also have seen several cases where they are totally superfluous but at the same time caused the user significant trouble.
They are not easy to use as there are a whole lot of caveats** associated with them.
There are two cases where you normally use opto isolators:
A/ To protect your electronics from high voltages.
B/ To protect the operator(s) from dangerous voltages.

Case (B) is trivial: always, always use them!

For case (A) you have to assess if it is economical viable. Opto-isolators can add significant complexity and thus costs and the raspberry-Pi is only $35.
e.g. if you drive a 24V motor from an open collector transistor/FET the probability that your circuit will burn out in such a way that the 24V end up on your GPIO is not zero but it is very, very low. I would never use opto-isolators in such a case.
On the other hand ground loops, even if they are not damaging, can cause stability/operating problems. So there is a valid reason for usage.
(But they are rare in most of the small circuits I have seen)

**A warning or caution
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2051
Joined: Tue Aug 02, 2011 7:27 am