Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Using Opto isolation in a relay based circuit

Status
Not open for further replies.

makjee

Newbie level 6
Joined
Sep 5, 2011
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,425
Hello everyone

I have a RS485 based relay control hardware. I need to transfer a ground signal to a remote component. Once the component is on (by receiving my ground signal), it sends a back indication in form of ground signal which is received at AT89C51. I have isolated the ground sent/received to/from the component using optocouplers. I need your reviews on whether I am missing something in my hardware.

Thanks in advance

Mak

View attachment rRLYDRV_RMT_V2.pdf
 

Thank you for the response, I am, however, not looking for a direct RS485 to electronics controller. RS485 is already handled using SN75176 ICs and the command string is already being received in 89C51. Its the 89C51 to relays path which I need to isolate to avoid problems on ground when relays switch. I have made a sample circuit which will do that job and though I think I got everything right, there may be many things I might be overlooking. Thanks for your guidance

Mak

 

Your schematic seems to be fine, the only problem is that I don't know if you will be able to get about 5mA at the output of the optocoupler with just 1mA input, I think you will need to provide a higher current to the diode.

Alex
 

Thank Alex, see thats whats been confusing me, I read the datasheets and the forward voltage drop of about 1.2-1.5V is required for proper operation of optocoupler, but I have not been able to exactly pinpoint the current required to pass through the diode. Could you please elaborate why I would need 5mA at the output of the opto? Because the npn and the affliated resistors I am using at the output ensure that the base current is limited to not more than 1mA... This is sufficient as the transistor has enough gain to switch the relay on.
 

The 5mA was a quick estimation , it will probably be slighting less.

I have simplified the circuit with an equivalent of the 5v going through the 1K resistor to the base of the transistor driving the relay.
The base current will be (Vb-Vbe)/Rb which is (5v-0.7v)/1K =4.3mA
In reality there will be a Vce voltage drop for the opto transistor so the 5v will be slightly lower and the current will be about 3.5mA - 4mA

There should be a graph in the opto datasheet that shows the input/output current relation

Alex
 

ok I see your point, I will test with two separate methods, I will first reduce the 1k resistance to 470-680 ohms for higher current because the transistor is 2N2222, it will handle the higher current for transistor. Alternatively, I can drive the diode side of the opto using a buffer/inverter IC (74XX series) which can source upto 100mA so 100mA/8 (for 8 relay drivers) will be about 12.5mA and this should be sufficient for the diode side too. Thanks

Mak
 

The problem is not the 1k resistor, the problem is that the diode resistor in the input of the optocoupler is low.
You will probably need to use a lower resistor in the opto input, I suppose about 1K (5mA) would be fine and the mcu should be able to give that current.

Alex
 

ok I understand, I will have to test and see which works, because 89C51 that I have doesnt sink more than 15mA current per port. There will 8 relay driving circuits on one port so 5mA per relay will exceed the micro's port current sink limit, but I can connect a buffer or inverter IC in between the micro and diode pins of optocoupler to provide extra current, that should do it or perhapes a ULN2803 will be ok for this too. Thanks Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top