Opti Switch to Logic Level

Discussion in 'General Electronics Chat' started by Mad Professor, Oct 22, 2009.

  1. Mad Professor

    Thread Starter Active Member

    Apr 15, 2009
    133
    1
    Good Day All.

    This is a follow on from my Opti Switch Datasheet Needed post, I did not want to go off topic with my other post so I have started a new one.

    I want to be able to conect this Opti Switch to my computers printer port.

    The printer port in question is a PCI card with duel ports, it uses a MCS9865IV-AA chip, all the I/O pins on the printer ports are pulled to 5volts via some SMD resistors, marked as "472" and "DEE" using my DVM I get a ohm reading of around 4730-4735ohms from one side of the "DEE" to the other side of the "472".

    I need to be able to have my opti switch pull all the way to ground or as close to ground as possible.

    Back in the Opti Switch Datasheet Needed post I have already tested a via pull-up resistors to see what values the opti switch could pull down to ground.

    But using a 4.7ohm resistor and using a stable 5volt ref the opti switch could only pull the voltage down to 2.40volts, and to get it that low I had to get the refelector just right.

    I need quite a quick responce from the sensor as I will be looking at a input freq of around 0-200hz.

    Can you please advice the best way to go about doing this.

    Thanks for your time.
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could use the 20k collector resistor like you did in the other thread, and use the output to drive the base of a more robust transistor, like a 2N3904 or 2N4401 with a 4.7k resistor on it's collector. The logic will be inverted by doing this, but you'll have more drive.
     
  3. Mad Professor

    Thread Starter Active Member

    Apr 15, 2009
    133
    1
    Thanks for your replys.

    SgtWookie: I will have a look in my parts box shortly and see what transistors I have to hand, I know I have got lots of BC557B and BC547B.

    As for the logic being inverted I don't think that will be a big problem, but will have to look into that once I have the sensor working.

    Alberto: Yes your right that was ment to be 4.7kohm and not 4.7ohm, I will edit my 1st post.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    How about this? Powered from the 4.7K pullup inside the Parallel Port. The Opto-Isolator collector current of >10uA will pull the PortPin low.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Normally, I'd agree with you - >10uA isn't much current to expect out of an optoisolator. However, it's an OEM-spec reflective optical sensor that Fairchild won't give complete details to our OP.

    With the rudimentary tests our OP has performed, the best they've managed is around 9uA current sink, which leaves them at around 2.4v with a 4.7k pullup resistor; almost the center of "no man's land" for TTL logic levels.
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Some thing wrong with this math. If the device can pull a 4.7K resistor down to 2.4V when the other end of the 4.7K is tied to 5V, the current that the photodetector(I mistakenly called it an Optoisolator) is sinking is (5-2.4)/4700= 553uA, which will drive the PNP transistor in the circuit I posted very nicely.
     
  7. Mad Professor

    Thread Starter Active Member

    Apr 15, 2009
    133
    1
    Thanks again for eveyones replys.

    I still have not heard back from Fairchild.

    Last night my internet was being very picky so I could not get on here to look for replys, so I spent most of last night playing with the opti switch.

    In my parts box I found some F12N10L 12A, 100V, 0.200 Ohm, Logic Level,N-Channel Power MOSFET.

    I connected the F12N10L Gate to 5volts via a 220kohm resistor, the Drain direct to the needed pin on the printer port, the Source direct to ground, also connected the sensor collector to the gate, the sensor emitter to ground.

    I know the F12N10L is overkill for what is needed, but seems to be working very nicly atm, I have been able to use the computer to control a DC motor from stall to 15,000 rpm, with speed control feedback using the optiswitch.

    I do still hope that Fairchild might give out some of the details requested.
     
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The threshold for your FET is about 2.5V, so the optiswitch is sinking about 2.5/220000 = 11uA at the point where the FET begins turning off.

    That means that the simple fix I posted would work, too. If you look at the plot, you will see that the optiswitch only has to sink ~9uA at the point where the Port input is about halfway.
     
Loading...