User avatar
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

optoisolators??? Sensors

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

domesday
Posts: 258
Joined: Fri Oct 21, 2011 5:53 pm
Location: UK

Re: optoisolators??? Sensors

Sun Feb 10, 2013 8:24 pm

No the Gertboard does not have an opto isolator.

User avatar
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

Re: optoisolators??? Sensors

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
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: optoisolators??? Sensors

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, RasP.iO

User avatar
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

Re: optoisolators??? Sensors

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
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

Re: optoisolators??? Sensors

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
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: optoisolators??? Sensors

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, RasP.iO

User avatar
Gert van Loo
Posts: 2409
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: optoisolators??? Sensors

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

Return to “Gertboard classic”

Who is online

Users browsing this forum: No registered users and 2 guests