Go Down

Topic: Serial with optocoupler (Read 2756 times) previous topic - next topic

m_ri

Apr 10, 2012, 02:57 pm Last Edit: Apr 10, 2012, 03:27 pm by m_ri Reason: 1
Hi all,
This is my first time in the english forum(I know that my english is not really drinkable..)
I have good knowledge about programming, but I don't have lot of experience in electronics..
I have two arduino which communicate in full duplex mode via the serial hardware and they implement a anti-theft system in two different builds..obviously the cable passes outside..
I wanna protect these microcontroller from surge and other acts of sabotage..at the begginig, I thougth to use 4 optocoupler ( 4n35), one for each pin involved in the serial connection..
Does someone know some schema to implements this?

Thank u everybody :) (and sorry for my mistakes..If u wanna correct them,it's ok..)
(I hope that this is the correct section..)

m_ri

Could u tell me the more appropriate section?

dc42

Using opto couplers with serial is not too difficult provided you use a low enough baud rate (I suggest you start with 1200 baud). See attached schematic.

Choose R1 to get the correct forward current for the diode in the opto. 220 or 470 ohms is about right.

Choose R2 to get a good signal at the input to the receiving Arduino. Try a value around twice R1. Too low and you won't get a good logic low at the input. Too high and the transistor will switch off too slowly, reducing the maximum baud rate.

R3 can probably be omitted (leave the base connection of the opto disconnected), but if present it helps the transistor to switch off faster. 100K is about right.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

m_ri

Thank u very much for your response..tomorrow or this weekend, I'll try to implement its...
Have a good night.. :)

Techone

@m_ri

dc42 circuit will work as long the speed is slow - under 1200 baud rate.

If you want faster rate, well it not going to be easy. But I did a two design : one using 4N35 and one using 6N135. Here the link :
http://arduino.cc/forum/index.php/topic,92665.0.html. I did some rechearch regarding this and I am now into the PCB version.

Quote
I thougth to use 4 optocoupler ( 4n35), one for each pin involved in the serial connection..


Why you need 4 opto-coupler ? My opto-coupler linker use only 2. except to program the Ardiuno. 3 is needed.

Techone

@ADI_Coupler

Thank for the info. BUT how can buy them at low quantity ? and  how much will be those chips ? and where is the distributor of those chips, willing to sell at low quantity ?   I am just an hobbyiest here with a LOW budget.

That will be nice to provided more info how to get those chips for the hobbyest, instead of posting the same post in this tread and my tread.

   


ADI_iCoupler

@Techone:

These digital isolators are available through distributors such as Digi-Key, with typical low volume prices in the $4 to $6 (USD) range. Small numbers of samples are also available for most products.

I'll look for another part of the forum to post this info as well. Thanks for your interest.

liudr

Thanks for the info about digital isolators! I might use these in projects that I thought I could only use opto-isolators.

Techone

@ADI_iCoupler

Thank for the link of the distributors. I did check it out and I find two canadian distributors.

m_ri

#9
Apr 13, 2012, 04:42 pm Last Edit: Apr 13, 2012, 06:06 pm by m_ri Reason: 1
Ok,tomorrow I'll try.. :)

@techone: thank u for ur response..I'll use 4 optocoupler because I wanna protect both arduinos..so i use one opto for each Rx an Tx....( I don't wanna see thief who fun with overvoltage on my serial line...)

@ADI_iCoupler: oh, they sound interesting..for this projects,I'll probably use optocouplers, but in the future..

dc42

btw at additional cost you can get digital isolators that also transmit power (5v or 3.3v) over the link. I've used these in a recent commercial project. This particular one I used (ADUM6401) has 3 forward channels and 1 reverse channel.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Techone

I will updated my opto-linker with the use of digital isolators.

I wonder if they have DIP version ? If not, solder SMT parts is "tricky". I will check this site : http://www.ezprototypes.com/ChipAdapterSocketsMain.php to make it a DIP.  Or order a PCB using Express PCB sevices...Hmm... Money will help me decide.  :smiley-roll:

dc42

The digital isolators I have used (ADUM6401) come in SMD packages with relatively large lead spacing, and were not difficult to hand solder with a soldering iron. You will still need an adapter board or PCB designed for them though.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Techone

That what I was thinking.... SMT + DIP adapter = place into breadboard / make my own PCB

Go Up