I have a rowing machine that I'm trying to replace the computer on. It uses a phototransistor switch to detect flywheel rotation speed. The phototransistor is an Optek OPB365T55.
Here is the datasheet.
TT electronics provides an App Bulletin showing a sample circuit and formulas for calculating the values for R1 and R2. Here is the link.
When I examine the existing computer's circuit board it seems they are using a value of 5.6K for R2. This seems to be in line with all of my research on this type of circuit. Usually, I find most similar circuits are using values from 4.7K to 10K.
My application uses the circuit config from Figure 1 in the App Bulletin. The formula given for R2 is R2 = (VCC - VCEsat)/Ic(on). Using the values from the datasheet (Ic(on) 3.5mA to 14mA) and with VCC = to 3.3V I calculate a value of between 207 Ohm and 828 Ohm. This doesn't seem in line with what the observed circuit is using or with any of my research. Please educate me on what I am missing. This is fairly new to me.
By the way, my calculation for R1 would seem to be 100 Ohm. Does this seem correct?
Thank you for your help.
This is a standard opto isolation circuit. There is one R to limit the current through the LED to 20mA. General purpose value 270ohms for 5v and 470 to 560 for 12v. A higher value to reduce the current to 10 mA is also ok.
The R for the transistor is again a basic switch arrangement as the transistor is simply on or off. It is wired as you would a normal switch, IE, 10k from 5v to the digital input and the transistor to Gnd.
Weedpharma
Edit, Yes I know the output is actually analogue, but in most uses it is used as on or off.
Thank you for your reply.
With VCC = 3.3V I calculate the value for R1 to be 100 Ohm. I'm assuming this could be a little larger without causing any issues?
My real problem is with R2. You say that a normal circuit like this would use about a 10K value. My research confirms this. Also, the existing circuit seems to be using a value of 5.6K (562 smt resistor marking).
I'm wondering what I am doing wrong when using the formula from the app bulletin with the values from the datasheet. I calculate somewhere around 330-680 Ohm. This seems far too low. I'm trying to figure out where I went wrong.
I'm new to electronics and just want to figure out where I am going wrong.
Thank you for your time.
R2 = (3.3 - .3)/ .001 = 3000. 1mA current gives 3k ohm for R2. Or 1k for 3mA.
The point however is that we don't actually care about a calculated value in our use. We are just using it to switch.
10k from 5v will tie the input to a logical high. The transistor when on will drop this to a logical low. That is what we look for.
Weedpharma