Laser trip system analysis

Hello, i have made a laser trip system consisting of arduino, light transistor (2 leads), NPN bjt transistor, and some leds, and resistors... I was hoping someone can help me analyze the circuit, i already did an analysis, however i simplified it by assuming the base current is zero going into the NPN. The circuit is shown below:

This is what i have tried so far:

I have drawn a load line for the phototransistor branch, and designed the resistors so that when i get 0.7 volts or above going through bottom resistor, the NPN turn on and lights up the green LED. By varying the resistor, i can get the LED to turn on for a dimmer light, or a brighter light.

My problem is, is that when i designed it, i calculated what current i would be getting out of the phototransistor for a given lux, and given resistance, and tried to get the voltage drop to be 0.7 . The problem with this is that it assumes all the current from the phototransistor goes through the bottom resistor, but some must go to the base of NPN for it to turn the other branch on. How do i find what the base current would be? I can't just assume the NPN is in active mode, which would then tell me what the base current is. If its not active, but saturated, then the base current is no longer related by B....

Is there any way to simplify this circuit, maybe do a thevenin equivalent? How do you usually deal with circuits that have transistors, or diodes in series/parallel and you want to do equivalent circuits? Is it possible? It seems like i would not be able to use superposition method to help me either...

Can i replace the transistors and replace them with variable resistors? Can i replace them with current sources? Whats the best way to do this...

I did the whole analysis, and i got numbers that are pretty good and my circuit does work, i just wanted to know the proper way.

Your "proper" way is going to get derailed by the huge variations in Beta from one transistor to another. But for the sake of argument, let's say Beta=100.

For a target LED current of 10mA you need 10mA/Beta=100 microamps into the base terminal. At this point the transistor is on so its base-to-emitter voltage is 0.7V....maybe...maybe it's 0.5V, 0.6V, etc. Another source of variation.

So if the variable resistor (Rpot) has 0.7V across it it conducts 0.7V/Rpot amount of current. The phototransistor must therefore have enough light to conduct (0.7/Rpot+10mA/Beta) amount of current.

As you vary the 0.7 and Beta numbers from part to part, and with temperature, and with the phase of the moon, you will get different answers :)

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

RuggedCircuits: Your "proper" way is going to get derailed by the huge variations in Beta from one transistor to another. But for the sake of argument, let's say Beta=100.

For a target LED current of 10mA you need 10mA/Beta=100 microamps into the base terminal. At this point the transistor is on so its base-to-emitter voltage is 0.7V....maybe...maybe it's 0.5V, 0.6V, etc. Another source of variation.

So if the variable resistor (Rpot) has 0.7V across it it conducts 0.7V/Rpot amount of current. The phototransistor must therefore have enough light to conduct (0.7/Rpot+10mA/Beta) amount of current.

As you vary the 0.7 and Beta numbers from part to part, and with temperature, and with the phase of the moon, you will get different answers :)

-- The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Fair enough, i do understand there is huge variation between even the same type of transistor with Gain, emmiter on, etc... And i do understand that when the transistor is on, the phototransistor must allow enough current to feed the base, and the resistor to get the 0.7V. The only thing is... how do you figure out the proportion of current going to the NPN, and how much goes through the resistor? Is there an equivalent resistance of the base-emmiter junction ? (probably not since its diode, so it always has the same voltage drop? therefore is kinda like a var. resistor) . Is there a current divider equivalent for my circuit?

Is there an equivalent resistance of the base-emmiter junction ? (probably not since its diode, so it always has the same voltage drop? therefore is kinda like a var. resistor) . Is there a current divider equivalent for my circuit?

There are equivalent models for transistors based upon what region they're in and are the signals changing a lot (large signal model) or have small variations around a bias point (small-signal model). I'm not sure what you're looking for in this whole application, perhaps it is just to learn about transistor models :)

In any case, start here:

http://en.wikipedia.org/wiki/Transistor_model#Popular_models

-- The Arduino Drum Machine: MIDI development system with 14-track MIDI drum machine sequencer / groove-box software

So there is no fairly simple, analytical method to approximate how this system would run? I have no problem modelling it using one of those models, and doing some differential equations if required, but nothing quick and dirty? Or is the method i did quick and dirty?

So there is no fairly simple, analytical method to approximate how this system would run? I have no problem modelling it using one of those models, and doing some differential equations if required, but nothing quick and dirty? Or is the method i did quick and dirty?

Perhaps you should state your assumptions for each component of the circuit when it is being supplied with a constant 5v.

Ok, here is a list of my assumptions:

With the current circuit i have with +5V source, and the data from datasheet for phototransistor, and NPN are as follows.

For a given light conditions, and resistors i have chosen i should have the following:

Lux = 46 @ 10k ohm provides .112 mA from photo transistor Lux = 5100 @ 100 ohm provides 14 mA from photo transistor

This range will give me a voltage drop across the phototransistor ranging from 0.2 (saturated) - 4.8 ish. So i will have a range of voltage across the variable resistor , which should give me some point close to 0.7 Volts to turn the npn on. The npn has a minimum gain specified of 400, so i should be able to draw a collector current of (44.8 mA - 5600 mA) if the source permits. With the current resistor and LED, the normal current draw without the NPN would be around 25 mA, so i am assuming that i should be always saturating the NPN transistor so its acting as a switch. The only problem with that assumption, is that i am assuming that all the current from phototransistor will go through the base (which it wont). If we assume 50/50 current split , i should be getting 22.4 - 2800 mA which would also be higher than the load allows, so the npn would be saturated and act as switch. In either case, the actual current draw through collector would be that of 25 mA , or whatever is normal without the NPN there...

For this circuit, i will probably like to model it as large signal model, because i want the behaviour for a wide range of light conditions, and therefore base currents. As i am typing this, i have a question which is picking at me... Will the drop from the base to emmiter always be 0.7 volts? If that is so, then the voltage drop on my variable resistor will be increasing until it hits 0.7, and then it should stay there because its in parallel with the transistor? Correct? If the voltage will be forced to be 0.7 through the resistor, that means that if my phototransistor allows more current, more current will not be allowed to go through the resistor (because that would increase voltage drop), so does that mean that any additional current past the 0.7 volts will be going to the base? So to figure out how much base current i have, calculate the max current phototransistor allows and then subtract the amount that comes out when i have 0.7 volts through the resistor? The difference will be going through base?

Any thoughts on that assumption/theory?

Have you considered the semiconductor voltage drop across all your components (transistor collector/emitter and LED)? If the .2v drop across the photo transistor is always going to be there, then a resistance curve will have to account for that (data sheets usually have this type of info). Have you measured the voltage drop across and thru each component while in service to see if they are consistant with your thoughts? The propertys of each component have to be understood individually to develop a circuit differential equation.