Click here to Skip to main content
13,351,050 members (54,796 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 8 Aug 2006

Photodiode Amplifier via Parallel Port

, 8 Aug 2006
Rate this:
Please Sign up or sign in to vote.
Using a photodiode to trigger the signal pin on the parallel port


In a previous article, I wrote about reading to a parallel port using the signal port. What I needed to read in was the signal from a photodiode. The following is a decent method to amplify the photodiode signal using common IC chips.


This is a schematic of a photodiode amplifier that I used for an earlier project. It produces enough current to trigger a relay that connects the 'signal pin' to a 'ground pin.'

Sample screenshot

The components are as follows:

  1. LED or any light source, mine was a laser
  2. Photodiode
  3. 3 Pots (Potentiometer) or Resistors; R1 = 3.3K, R2 = 104.6K, R3 = 312.2
  4. Opamp, mine was a UA741
  5. NPN Transistor, mine was 2N3904
  6. IC Relay, mine was a Hamlin HE721C0500
  7. Source: You'll need a source with at least 9 Volts. Note that you'll need a source that also includes a negative voltage and ground. You can substitute +9V or my +5V and -9V for my -5V. However if you also want to substitute my +12V for a +9V, then you may have to tweak R3.

*Important note: I take no responsibility for any mishaps.

IC Diagram/Schematic

*This Diagram/Schematic can be found at


Sample screenshot

NPN Transistor

Sample screenshot

Reed Relay

Sample screenshot


My photodiode can only provide at most .9V (I think). The relay I'm using requires more current than my photodiode could provide. I needed the relay to trigger the switch inside of it and allow the 'signal pin' to be grounded; this would then result in a low on my signal pin. And as indicated from my previous article; I need the signal pin to be grounded so I could read it as data.

Some may say; why didn't you just use the transistor. Wouldn't it be easier? My answer is nah! Due to the fact that the base of the transistor needs a decent current to allow Vbe to go to saturation, I used a opamp to boost the signal and then tie the output to the base of the transistor. I used 12V at the collector since I didn't have 9V.

If you have any questions, email me at


  • 8th August, 2006: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

Questioncant use my relay Pin
¤ Muammar ¤9-Nov-06 10:40
member¤ Muammar ¤9-Nov-06 10:40 
AnswerRe: cant use my relay Pin
phebejtsov8-Jan-07 6:53
memberphebejtsov8-Jan-07 6:53 
GeneralRe: cant use my relay Pin
Muammar©8-Jan-07 20:36
memberMuammar©8-Jan-07 20:36 
thanx for the replay, and dont worry, i've already worked it over by using another relay

ps. sorry, somehow i thought i've already shared this once i figuered it out cuz i think it's mean not to share an answer once we have it!

All generalizations are wrong, including this one!
(\ /)

Generalhello frnds,i need run exe as background process with webapplication i need run exe as background process with webapplication is it possible then ho Pin
SharmaAshutosh8-Nov-06 1:34
memberSharmaAshutosh8-Nov-06 1:34 
QuestionHow to read multiple signals Pin
ceplin16-Aug-06 7:23
memberceplin16-Aug-06 7:23 
AnswerRe: How to read multiple signals Pin
phebejtsov16-Aug-06 20:57
memberphebejtsov16-Aug-06 20:57 
GeneralNice article Pin
rschaer16-Aug-06 4:46
memberrschaer16-Aug-06 4:46 
GeneralIdeas for improvement. Pin
normanS14-Aug-06 21:06
membernormanS14-Aug-06 21:06 
GeneralRe: Ideas for improvement. Pin
phebejtsov15-Aug-06 6:10
memberphebejtsov15-Aug-06 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 8 Aug 2006
Article Copyright 2006 by phebejtsov
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid