Shop OBEX P1 Docs P2 Docs Learn Events
draw per pin — Parallax Forums

draw per pin

jcfergusonjcferguson Posts: 86
edited 2007-02-16 16:08 in BASIC Stamp
Hi,

I am driving an optoisolator with a bs2sx pin - it draws 15ma. This optoisolator then drives a relay.

Is the 15ma ok? I understand the limit is 30ma per pin, 60ma total, but is 15ma continuous a good idea or should I use a transistor to drive the optoisolator?

Thanks

Carlos Ferguson

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2007-02-15 20:04
    Depends on the opto-isolator. You may need a current-limiting resistor.

    Properly designed, you should be able to drive ONE pin at 15 mA. The question then becomes, what else is your chip doing?

    A Darlington Array would probably be a good idea.
  • jcfergusonjcferguson Posts: 86
    edited 2007-02-15 20:06
    What about using a npn transistor to drive the relay instead? I guess the advantage to the optoisolator is the back voltage protection - would I get enough protection from the transistor? I could use a transitor to drive the optoisolator, but is this starting to spend a lot of energy doing something that I could just do with the transistor alone?

    Carlos

    ps thanks for the fast reply!
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-02-15 20:13
    Now that would work well. And you get your 'back voltage' protection with a reverse-biased diode placed across the coil. When you 'turn off' the coil, the collapsing magnetic field creates a current that has to go somewhere. The diode gives it some place to go -- namely a low-resistance path to the other side of the coil.
  • jcfergusonjcferguson Posts: 86
    edited 2007-02-15 20:18
    npn it is! I have been figuring the resistor for the transistor by hooking it up and trying different values until I get the ma draw down low but can still drive the relay... I'm sure there is a formula for determining the saturation point of the base, but does my empirical method sound ok?


    Carlos
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-02-15 20:32
    Pretty good. Usually, when using a transistor in this way, you want to drive it into 'saturation'. Your experimental method should find that point just in or just below saturation that will conduct enough current to control the relay. Don't cut it too fine, or the relay will just 'barely' pull-in, and may not work reliably in all temperatures, in all conditions, and as it ages.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-15 23:01
    The Opto may not require 30 mA to work. You may be able to provide 10 mA and it will function fine. Most require and external resistor to limit current anyway. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-16 03:15
    jcferguson,
    I have included a pdf on a 'Pvdz172' photovoltaic (pvdz172.pdf)- which is an opto Isolated ssr.It uses MOSFET switch stage ,incorporates a reversed biased diode (ideal for inductive loads) can switch up to 60VDC and can drive up to a 1.5Amp load. I have used it many times with basic stamps.

    I also drew a quick application sample schematic for you to show connection (jcferguson_sample.pdf). You will see in the schematic I have used a 4.7K pull down resistor (R1) and a series resistor 1.5K to device. The device requires 10mA to switch.

    Regards,
    Quattro
  • jcfergusonjcferguson Posts: 86
    edited 2007-02-16 16:08
    Wow, grazie molto Quattro! This looks perfect.

    Carlos
Sign In or Register to comment.