Relay Interface

Thread Starter

Plecc

Joined Aug 26, 2010
22
Hi all,

Can anyone tell me if this will work?
I'm not sure if the diode is the correct way round, (or even up to the job) I think it's there to deal with the voltage created as the magnetic field from the coil collapses :)
Not a 100% on this one either, but i think the opto needs a low logic state to complete the 12v circuit! is this correct?

Sorry pic is so large!
 

simo_x

Joined Dec 23, 2010
200
The photo-transistor will allow more current to flow in its collector as more current will flow in the photo-diode, in other words, more light in LED, more current in the photo-transistor base..
The scheme is OK, but don't put the R between the relay & the collector.. Normally a relay consume about 30 ~ 60mA. Be sure the photo-transistor can sink that current. It's not a lot, but with a resistor in series with relay, maybe it will not excite.. In other words, it is not needed there. Relay coil have its own resistance yet...
The diode 1N4148 is well mounted, but a 1N4007 is more robust.

Resistor between the photo-transistor base & Gnd, 1K should be fine.
 

SgtWookie

Joined Jul 17, 2007
22,230
The diode is installed correctly; cathode towards positive.
1N4148's tend to die when used across relay coils. Try using a 1N4004 instead.

You are trying to turn on a 12v relay with a 4N25 optoisolator, but those are limited to around 8mA current if the IR emitter gets enough current. The 1K resistor on the emitter is probably too high; if your data line is 5v then the resistor should be around 360 Ohms. The output transistor probably won't sink enough current to reliably energize the relay.

Additionally, you have a green LED and current limiting resistor in the ground path of the relay, which simply won't work. The green LED will drop around 3v across itself, which will be taken away from the coil. A 12v relay usually needs over 9v in order to engage.

I have never seen a relay with contacts like you are showing.
You would never mix low voltage and mains voltage using the same common terminal.
 

Thread Starter

Plecc

Joined Aug 26, 2010
22
Thanks so much for the feed back,

Looks like this coil takes a whopping 100mA to energise!
could i replace the opto with a small solid state relay to switch between the 5v and 12v circuits?
 

SgtWookie

Joined Jul 17, 2007
22,230
Why don't you replace the whole thing with an SSR instead?
Basically, an SSR has an optoisolator for input control, and can switch mains power.
 

ErnieM

Joined Apr 24, 2011
8,377
Is there any reason you cannot connect the 12V return to the controller's return?

If you can connect them you can just use a small transistor to handle the 100mA relay and drive it directly.
 

strantor

Joined Oct 3, 2010
6,797
I have never seen a relay with contacts like you are showing.
You would never mix low voltage and mains voltage using the same common terminal.
nor would you switch them with the same relay.
+1

I copied you relay symbol into mspaint and was going to edit it to show you how your relay is more likely internally configured, but didn't know where to start. do you have a datasheet for it or a link of some sort, or even a part #?
 
Top