Connect with us

voltage divider with current considerations

Discussion in 'Electronic Basics' started by jim barchuk, Jul 5, 2004.

Scroll to continue with content
  1. jim barchuk

    jim barchuk Guest

    Hi All!

    I want to control the switches of an infrared transmitter via PC parallel
    port. My main Q is regarding converting voltages and protecting the port and
    the transmitter.

    I have a *ton* of software and digital experience, and enough analog
    experience to interface simple stuff like LEDs and phototransistors to PIC
    uC, but very little practical analog experience.

    (The transmitter has one IC, an SC2262IR. I find only a few distributor's
    pages on the net about it, and a sample schematic, but no real data sheet.
    But this is all simple enough that that shouldn't be necessary anyway.)

    The transmitter has little dome buttons with a carbon coating underneath
    that snap down onto a 'grid' array on a PCB.

    The transmitter is powered by a typical 3V CR2032 button cell.

    The dome buttons simply short 3V to the IC inputs. The carbon does offer
    very slight resistance though.

    'Closing a switch by shorting it through a mA meter' I see it draws 1mA.
    Cool.

    A parallel port pin is supposed to source 2.6mA, so I think in theory I
    could drive the transmitter IC directly if I'm sure to divide the parallel
    port voltage and limit the current.

    I think I need to divide the 5V off the parallel port down to 3V, -and-
    limit the current to the transmitter to 1mA.

    I'm using the voltage divider calculator at
    http://www.raltron.com/cust/tools/voltage_divider.asp but I'll draw the
    schematic here to so you don't have to bother going there to understand what
    I write further.

    O---/\/\/\---o-------O
    | R1 | |
    + \ +
    Vin / R2 Vout
    - \ -
    | / |
    O------------o-------o

    Vin = 5v from the parallel port.

    I set R1 to 5k to limit current to 1mA.

    Vout = 3v that goes to the IR transmitter IC pin.

    The calculator tells me R2 should be 7.5k.

    Bingo? Or should I keep a fire extinguisher handy. :)

    Does the -way- I'm thinking about this whole thing seem right?

    Tx very much for your interest and attention.

    Have a :) day!

    jb
     
  2. CFoley1064

    CFoley1064 Guest

    Subject: voltage divider with current considerations
    Hi, Jim. As someone who's done some programming, you'll find a lot of what you
    need at Jan Axelson's Parallel Port Complete website
    http://www.lvr.com/parport.htm
    just follow the links.

    You also might want to try the book "Parallel Port Complete", which is
    available from Axelson's Lakeview Research website, Amazon, and a lot of the
    hobbyist sources.

    From your description, it's probable that there's a 3K pullup or pulldown
    resistor internal to the device, and that accounts for the 1mA when the contact
    to 0V is made. Again, that's another reason not to use voltage divider.

    If I were in your shoes, not knowing for sure what's going on with the chip,
    I'd probably use a quad analog switch to make the contact to circuit common
    (e.g. CD4066). For four switch contacts, the extra IC won't take up any more
    space than the eight resistors. The buffer might also give you some extra
    protection from any transients which might upset or zap your parallel port.

    Oh, yes. Also, as a matter of safety and sanity, use a junker PC to experiment
    with, or one with a separate, replaceable I/O card. DO NOT use a laptop for
    this until everything is debugged and set to go, because you just might have to
    replace the whole motherboard if something goes wrong (hard-earned advice).

    Good luck
    Chris
     
  3. jim barchuk

    jim barchuk Guest

    Hi Chris!

    Thanks for the response. I have a few more clues.
    Oh for sure, been there already, great links.

    Found one off that page that talks about interfacing PC to Sega Dreamcast
    VMU with exactly the same voltage divider trick. Of course he also mentions
    other Zener and 74HC techniques, and a whole paragraph of caveats in red.
    (Slight misunderstanding, the pushbutton switches contact to +3V directly to
    the battery.)

    I have more clues.

    One distributor http://www.scet.com.cn/prod.asp?lbbh=77 has a PDF with a
    sample circuit. http://www.scet.com.cn/pdf/982.pdf As far as I can tell this
    IR uses exactly that circuit.

    With battery out of the circuit the IC input pins show open resistance to +V
    (20M range) and 2.7K to GND, exactly as shown in the sample circuit.
    Yes 4066 would be ideal. I think though that there's far less possiblity of
    damage to the PC because the IR transmitter is essentially an 'open end'
    device with no physical connection to the outside world except for the PC. I
    think the only protection I need for the PC is from the potential power of
    the button battery. Given that I'm not conecting directly to +V on the IR
    board I think that risk is minimal.
    Absolutely. Actually I had to do that because modern motherboards come with
    only one parallel port which is already occupied. No, I wouldn't risk using
    the only working port.

    Two other side notes.

    The IR transmitter is fairly expendable. Circuit City recently put on
    'clearance' the Memorex Pan-O-Matic tripod mount power head. The product was
    a disaster. It doesn't exist on memorex.com. Excellent design, pretty good
    manufacturing, *zero* (zero) *testing* before shipping. I picked up four of
    them, eventually, that worked. The first two, neither worked. One, the wall
    wart was dead. The other, the power switch simply didn't work. The -unit-
    worked, I could manually short across the power switch and everything else
    was fine. There was one post somewhere on the net that they guy tried it
    out, the up switch went up, the down switch went down, the right switch went
    right, and the left switch -also- went right. So I've got spare
    transmitters. Gauging by the packaging this was a Circuit City project
    farmed out to Memorex farmed out to Taiwan and Taiwan blew it so CC and M
    jsut tossed the whole thing into the 'oh well' bin.

    This is also not a final product, just a hack to get my feet wet. I intend
    to build a full IR receiver with decoder, and transmitter to control the
    heads, TV, stereo, AC etc..
    I'm gonna give the divider trick a try and will report back with luck/not.

    Thanks much. Have a :) day!

    jb
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-