RS232 9600 8N1 & Opto-Isolator

Hello All,

I'm learn how to use the Optocoupler with RS232 Data. I have a working unit Scanner, but want to Isolate it from the I/O pin once the Data has been received. I've Googled and YouTubed what I could to figure it out. But has anyone ever done this before and got it working?

I'm using my DG4062 (SQ Wave) & Scope for my test signal for now and a BOE.

I've used this (on hand) part before as a switch (https://www.mouser.com/ProductDetail/Broadcom-Avago/ASSR-1411-001E?qs=/ha2pyFadujqZRlk8FbaCxsFnFMaIZhm0pCj%2bakKD4xmiRcEDqqyeg==), will it couple Data?. Inverter Amp. arrives tomorrow.

Find attached the 2 designs I think may work. One is from the Sparkfun.com website.


:::Just want to Isolate the I/O pin once the Data is received.
Thanks for any help.

Comments

  • Short answer: NO

    Why? That part is great as a solid-state "relay" but due to the way the MOSFET is activated it is slow to response. It might be ok at 300 baud, but not 9600. The rurn-on time can be 0.25ms or more.

    Anyway, if you are really using optos then why bother with an inverter output although there are many devices with integrated logic outputs (HCPL-22xx etc). You could use the opto output in emitter follower so that a high input in the anode of the LED produced a high output. Or you could have your ground emitter circuit and drive the cathode of the LED instead etc.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2CHIP-1.jpg
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • Thanks Peter,

    Up date.

    Bottom schematic, with resistor(s) removed, GND on pin 2 and signal (Sq. Wave) in on pin 1.

    See attached Wave form Screen Shot.

    Do you know of a part that would work at 9600 Baud?

    Thanks
    800 x 480 - 87K
  • Up-date,

    read over your part number ref...my bad, getting late.

    Just ordered parts...Thru hole was out, so I ordered FairChild/ON (https://www.mouser.com/ProductDetail/512-HCPL2630SDM).

    NOTE:Had googled your part and looked it up at Mouser.com, just was not sure if that was over kill or not.

    Thanks.

    will update.
  • I'm might be taking a big guess here trying to figure out what you mean and what "signal" source you are using and where you are measuring etc. Only one waveform? Clamped to around 2V for some reason as if you weren't using a series resistor (the LED is a current device) etc.

    The RS232 signal would feed the LED through a resistor although that resistor can be anywhere in series, the important thing is to convert the voltage to a limited current. There is no "pull-up" voltage on the transmitter side from the RS-232 but I'm guessing that this circuit is not a real circuit, just another one of those "interweb" circuits. Quickly typing in RS232 OPTO I picked a circuit that seems to be able to actually work although I don't know what they mean by "available via licence", as if it were something clever and patented whereas it is a basic circuit. This one at least uses the negative voltage from the RS232 itself although it does require an RTS for the positive voltage. Always always, there are caveats.

    BTW, there are thousands of parts that would be suitable and you could get by even with something basic but it all depends upon where you source your parts.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    P2CHIP-1.jpg
    P2 +++++ TAQOZ INTRO & LINKS +++++ P2 SHORTFORM DATASHEET
    P1 +++++ Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    Brisbane, Australia
  • Up-date,

    read over your part number ref...my bad, getting late.

    Just ordered parts...Thru hole was out, so I ordered FairChild (https://www.mouser.com/ProductDetail/512-HCPL2630SDM).

    NOTE:Had googled that part and looked it up at Mouser.com, just was not sure if that was over kill or not.

    Thanks.

    will
  • jmgjmg Posts: 13,108
    A cheap and widely available Logic output Opto, is the H11L1. 1MHz and 1.6mA, so 9600 baud is no problems.
    Plenty of sources, and package choices.
  • Hello All,
    Want some help. Need someone to look over this circuit and let me know if it will work as planed (few tweaks).
    This may be over kill, but will it work and how can it be reduced.

    I want to separate two different RS232 units that will transmit their DATA into one I/O pin. Each unit will transmit data at separate times, but I thought about one unit being damage from the other units signal because the Traces will be connected. I will be setting up a test unit on the BOE unit.

    Schematic attached
  • Sounds to me like you should be looking more at RS422/485.
    Failure is not an option...it's bundled with the software.
  • couldn't you use diodes to block the units sending from each other, or am I way off?

    Enjoy!

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • At it's simplest a 330 ohm resistor on each unit should work, although data will be garbled if two units send or have active outputs at the same time.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • hmlittle59hmlittle59 Posts: 396
    edited 2019-02-16 - 02:19:31
    Hello All,

    Thanks for all the help. OEM PCB's/Stencil should be here next week from China($1.00) apiece. Hope to have it built to specs and see it will pass the Data.

    will update

    Howard
Sign In or Register to comment.