Photodiode, photoresistor, or phototransistor

crutschow

Joined Mar 14, 2008
34,452
That schematic doesn't work at all for me. This is what works for me. example1.asc
The problem is it only works when no current resistor is in place by the LED as it drops as much current as it takes to maintain its voltage, same with the one you gave me except yours didn't work in any situation.
Whether you circuit simulates or not it worn't work in practice since you have the NPN transistor upside down. In a real circuit the emitter base junction would avalanche at about 5V.

Veracohr's simulation of my circuit works. Why do you say it doesn't?

It you keep insisting that correctly connected circuits don't work and incorrectly ones do. then we obviously can't help you since you apparently know more than we do. :rolleyes:
 

Thread Starter

coinmaster

Joined Dec 24, 2015
502
Why do you say it doesn't?

It you keep insisting that correctly connected circuits don't work and incorrectly ones do. then we obviously can't help you since you apparently know more than we do. :rolleyes:
I'm just telling you what LT spice is telling me. If it doesn't work in LTSpice then I need to figure out why. It's not working in Multisim either.
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
I'm just telling you what LT spice is telling me. If it doesn't work in LTSpice then I need to figure out why.
If you are listening, crutschow is telling you why it doesn't work. Your model is wrong. Read back and let us know how the test results work with the correct circuit.

Sometimes a simulation fail provides good information.
 

Thread Starter

coinmaster

Joined Dec 24, 2015
502
Okay I finally got it to work, I'm not sure what I did since I physically tried everything last night but now it is working all of the sudden. Yay, thank you for the help peoples :) I've learned much from this.
Now onto learning how to use microcontrollers :confused:
 
Last edited:

Thread Starter

coinmaster

Joined Dec 24, 2015
502
No I didn't I used a generic NPN model instead. For whatever reason it refused to do anything though until I reuploaded the file today. In anycase it's now working fine and It's simulating successfully inside my intended circuits.
I do wish I could decrease the sensitivity though, it has a functional range of like half a volt on the LED between 0 and B+ which means the microcontroller would need like microvolt accuracy.
 

Veracohr

Joined Jan 3, 2011
772
On the output of the MCU or whatever you're using to control the circuit. Use the divided voltage to control the circuit (probably you'll want to buffer it).
 
Top