Shop OBEX P1 Docs P2 Docs Learn Events
Opto coupler Sanity check please... — Parallax Forums

Opto coupler Sanity check please...

pacmanpacman Posts: 327
edited 2009-11-10 02:28 in General Discussion
I'm _VERY_ rusty at this, so can I get a sanity check please.

I have a propeller chip that needs to interface to the real world for its inputs.

The input voltage _could_ vary between 8 to 16V DC. Switching time is in seconds. I'm thinking that I could get away with a 4n25 Optocoupler with a 1/2W 1K resistor in series with the opto pin.

My maths is...

Typically 1.2 V drop across 4n25 Opto.

So for 8V, 6.8V drop through external resistor. I = 6.8mA, P = 46mW

For 16V, 14.8V drop through eternal resistor I = 14.8mA, P = 219mW (hence 1/2W resistor, as 1/4 W doesn't give me much room to move if 16V became {say} 16.5V).


On the output side of the Opto, I'll just switch the 3.3V rail to the propeller pin (with 10K pull downs)


Is this correct?

Thanks in advance...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
=================
The future is in our hands.
Which way to the future?
=================

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-10 01:00
    I'd use a higher series resistance (hence a lower current and power dissipation), maybe 2.2K or 3.3K. The rest sounds ok.
  • pacmanpacman Posts: 327
    edited 2009-11-10 01:38
    Mike Green said...
    I'd use a higher series resistance (hence a lower current and power dissipation), maybe 2.2K or 3.3K. The rest sounds ok.

    Thanks Mike.

    I think I'll go with the 2k2 option (and thus can use 1/4W resistors)


    Who knows - I may even has a schematic that I'll ask to get sanity checked one day this decade....


    Please advise details of your "Good Karma" account (so I can deposit)..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    =================
    The future is in our hands.
    Which way to the future?
    =================
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-11-10 02:28
    I typically tie the Emitter of the Opto (4N25) to ground (VSS). The Collector goes to a 10K pull-up and to the microprocessor I/O pin. 1K seems way too stiff of a pull-up and draws a realtively high amount of current needlessly. The 4N25 is only rated for 100mA anyway, so pushing that hard isn't good for it. Just my opinion having used this opto for many years now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
Sign In or Register to comment.