Photo lnterrupter to a PC parallel port

Thread Starter

no1knows

Joined Sep 21, 2010
3
Hello everyone. I'm new to this site and circuit design. :D I am looking for a little help with my project. To start out I'm just trying to attach a Photo lnterrupter to a parallel port and read the value via basic. The PC/basic stuff is not a problem.. but I seem to have a flaw in my design. I made the drawing below from memory so I might have the parallel pins wrong.. In the image below you will see i'm connected to pin 10 (one of the data input pins) and pin 25 (gnd). By default Pin 10 will hang high at 5 volts @ 2.0 mA max. My power source is 5V from the PC power supply (not the port itself) The output at R2 (lower right) from the photo interrupter(CNZ1112) will be at 5 volts when nothing is blocking the LED. 0V when blocked.

I have two problems:

1) the value of R2 seems to effect the response time of the photo interrupter, but it also lowers its output voltage. What would you think is the best value for this that would still keep the PC port happy? :confused:

2) I also need to pull pin 10 low so that the parallel port pin will only be high when the LED is not blocked.. After much trail and error I was unable to find a resistor that would not pull low all the time or never at all... Am I going about this wrong? :eek:


Datasheet for CNZ1112: http://www.semicon.panasonic.co.jp/ds4/SHG00031BED_discon.pdf


Thanks :D
 

Attachments

eblc1388

Joined Nov 28, 2008
1,542
You don't need to use any resistor at all.

The pin#10 of the printer port is an input pin and has internal pullup resistor.

You just use the following connection:

 

Attachments

Thread Starter

no1knows

Joined Sep 21, 2010
3
Opps.. Pin 10 connects above R2 ,not below it. I have it wired above it on my test board. I just connected it wrong in the picture.


Re: eblc1388
Thanks a bunch :D.... How could I be so blind :eek:.... I knew the trans needed power.. so why not use the power of the port itself... I have not tried this yet, but I will tonight.


Thanks.
 
Top