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..)
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.
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.
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.
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.
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.
@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..
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.
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.
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.