Shop OBEX P1 Docs P2 Docs Learn Events
Optoisolated PropPlug? ---> It works! — Parallax Forums

Optoisolated PropPlug? ---> It works!

RaymanRayman Posts: 14,243
edited 2008-10-16 21:56 in Propeller 1
I'd like to send data from Prop to PC with optical isolation...· Just sending one way...

I think I can use the H11L optoisolator ('cause it's cheap).· http://www.fairchildsemi.com/ds/H1%2FH11L1-M.pdf

Only problem is that the PropPlug doesn't provide a power output to power the receive side...

But, I'm thinking that maybe I can use the TX pin for power.· I read 3.3 V there when just sitting idle.· But, I see it comes through a 150 ohm resistor.

Think I'll give it a try.

Anybody, see problems?

Here's how I might lay it out:


Update:· It works!· Here's a photo of my board pushing out 400 bytes/second over a 57600 baud optoisolated link. It didn't work at 115200 baud though...

Post Edited (Rayman) : 10/16/2008 5:44:20 PM GMT
889 x 673 - 19K
1152 x 864 - 566K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-08 21:30
    With the 150-ohm series resistor, you're cutting things pretty close. The H11L1, for example, draws a nominal 1.5mA. Through the series resistor, this will drop the supply voltage to 3.075V, barely over the required 3V for the H11. The pullup resistor on the receive side will also consume current, dropping the supply voltage even more when the output is low. A 10K resistor, for example, will draw another 0.3mA, dropping the suppy voltage another 0.045V. A filter cap from Tx to ground would help to average this additional drain to about half, though. Also, note that the H11 is an inverter. You will need to rewire your emitter side to reflect that fact.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 14,243
    edited 2008-10-08 22:25
    Thanks for looking at this Phil. Guess I'll have to try this out before ordering any boards....

    I'm not really clear on whether that pull-up resistor is needed or not. They call it a "load" in the datasheet. To me, that implies that it's not necessary. But, I drew a spot for it anyway.

    If the Rx pin on the PropPlug is normally low, then adding a cap would definitely help.

    I was thinking about just inverting the TTL logic with the Spin driver.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-08 22:49
    I've used H11L1s before. The pullup is necessary since the output is open collector.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • Dennis FerronDennis Ferron Posts: 480
    edited 2008-10-08 23:50
    Can you draw power from the PC serial port instead?
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-10-09 04:28
    Unfortunately I think you may find the opto does not have the frequency response for 115200 baud. Check the datasheet first. There are some optos that will do the job so you will have to check.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-10-09 18:37
    I didn't see anything about 115.2 KBaud in his post, but you're right: that would be way too fast for the H11. When I've used these parts, I've stayed at or below 2400 Baud — and even then, with a stiffer pullup.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 14,243
    edited 2008-10-09 19:43
    I'll probably need at least 4800 baud to send two channel, one byte, EKG data at 200 samples/second... The thing is rated for 1 MHz, so I don't think that will be a problem.
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-10-10 03:34
    No, I didn't see anything about 115,200 baud. Just that this is the rate for loading the prop, so I guess I now am used to that. When I started debugging I used 4800 baud on a second channel.

    For opto's: I am successfully using isolation at 4800 baud with 6N139. I have 4 channels using 6N139 (receive only to the prop) that I use and have a 6N138 which I have wired but not tried. I have tried higher speeds with the 6N139's linking them back to back (this is not a real life test). Unfortunately, I did not write down my results but think 19200 worked.

    From observations on the CRO, I decided my optimum circuit was 1K in series with the input diode (pin 2), with pin 3 ground. A 1K pullup on pin 6 to pin 8 with pin 8 at +5V or +3v3, pin 5 ground. Note that I am interfacing NMEA which is switching from 0v to +5v. I posted the info under a thread like NMEA interfacing about June 2008.
  • RaymanRayman Posts: 14,243
    edited 2008-10-16 17:43
    Just got my boards in and soldered up enough to test out the optoisolated link and... It works!

    I updated the first post here with a photo of the board at 57600 baud...
  • BTXBTX Posts: 674
    edited 2008-10-16 18:36
    Hi Ray.
    Sorry for get too late in this.
    Maybe an 6N137 could help you to get 115,2 kbps working fine.
    I used it succesufully in DMX signals (it is 250Kbaud).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • RaymanRayman Posts: 14,243
    edited 2008-10-16 18:46
    BTX: That does look faster and about the same price. But, it's only 2500 V isolation instead of 7500 V.

    And, 57600 is plenty fast for what I want...
  • BTXBTX Posts: 674
    edited 2008-10-16 19:02
    Oh sorry Ray.
    I missed the isolation issue.
    Although if 57600 bps is good for your needs that's great.
    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • evanhevanh Posts: 15,545
    edited 2008-10-16 21:56
    Good job Rayman, and good info too.

    I guess three optocouplers would be needed to perform remote programming via this link.
Sign In or Register to comment.