Connect with us

optoisolator input -> PC

Discussion in 'Electronic Basics' started by shmoppy, Sep 24, 2003.

Scroll to continue with content
  1. shmoppy

    shmoppy Guest

    Hello, I'm very new to electronics so I thought this would be a good
    place to ask some "basic" questions about a circuit I'm trying to

    I have 15 12v bulbs in my car that come on at different times (check
    engine, low coolant, low oil, service ABS, etc). I would like to
    replace these bulbs with 15 optoisolators that will output a logical 1
    or 0 to a PC based on whether or not the "bulb" is hot. Then the PC's
    software would display an ON/OFF status for each of the 15
    optoisolators. This being my first ever project, I've got plenty of
    questions about how to do this. to start:

    - is there anything I can read or reference that would help in
    learning how to do this?

    - would serial or parallel be better to get the data into the PC.
    would I use a 16 bit number to represent the 15 inputs? ('0100 0000
    0010 0110' means bulb 2, 3, 6 & 15 are "on". 16th bit is not used.)

    - what components will I need to do this?

    any info is GREATLY appreciated. I'm excited to get started, but don't
    really know where! :)
  2. Yes, go buy a book like "Practical Electronics for Inventors" by Sherz.
    Fairly straightforward with no real math to speak of. Better, but a bit
    outdated is "The Art of Electronics" by Horowitz and Hill. This one is
    harder, but better for those wishing to get exact results.
    There is a great page on interfacing to the parallel port here:

    Somebody just posted it here recently, and its fairly helpful.
    Look at some circuits that use the parallel port to interface to external
    sensors. They will give you some idea.
  3. shmoppy

    shmoppy Guest

    thanks for the reply and info Robert! I'm starting to get a better
    idea of how to do this. I've still got a couple more questions:

    1) there are at least two dozen optoisolators to choose from. will
    just a plain jane 4N32 work ok for this?

    2) how can I get the 15 separate optoisolator outputs into one 16 bit
    number that my software will handle?

    3) will I need an ADC or can the serial/parallel port already
    understand the output from the optoisolators.

  4. You can simply use the bits directly, yes?
    I don't think you'll need an ADC. If the 12V wires power the optoisolator,
    (through a resistor, choose the resistor to limit the current to whatever
    the datasheet recommends) the optoisolator can be used to signal a high to
    the PC through the parallel port.

    Bob Monsen
  5. shmoppy

    shmoppy Guest

    ok good, no need for an ADC. the simpler the better :) I don't think
    I'll be able to tie the output bits from optoisolator directly to the
    parallel port because I am going to need 15 different inputs. It's my
    understanding that the parallel port only has 9 inputs. This is why I
    was thinking I'll need to consolidate those 15 separate 1 bit inputs
    into a single 16 bit number. I'm only guessing that's how to do it,
    and it's not a very educated guess at that :) So I'm open to
    suggestions of how to get the 15 optoisolator outputs into the PC.

    thanks very much for all your help so far!
  6. Look at

    you'll need to write some software to select a register. Circuit posted on
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