I'm trying to make a circuit where my computer can send data out serially to the lazer and receive data from the phototransistor, but the bit values both ways need to be inverted (so I see it as "normal")
When the computer doesn't send data out, the lazer light must be off.
But when the UART start bit is transmitted, the lazer light goes on (this is when the computer transmits a logic low out).
I'm doing it this way so the lazer doesn't stay on forever while waiting for the computer to send data out.
Reception is similar. When the phototransistor does not detect light, then it means the computer receives a logic 1. When the phototransistor detects light, then the computer receives a logic 0.
This is my circuit so far:
The question is, other than the 200 ohm resistor connected to the lazer (yes its my own symbol with an L with a picture of a diode), is there a way to calculate the optimal values of the resistors attached to the transistors? The resistor connected to the phototransistor is set to 100K, but sensitivity is not a concern because in my tests the remote light will be strong when it is aimed at the phototransistor.
So how do I calculate the optimal values of the resistors and still have bright lazer output without damaging the lazer?
The lazer is a cheap ebay 5mw lazer module from china with a resistor built onto it which I think is 80 ohms.
When the computer doesn't send data out, the lazer light must be off.
But when the UART start bit is transmitted, the lazer light goes on (this is when the computer transmits a logic low out).
I'm doing it this way so the lazer doesn't stay on forever while waiting for the computer to send data out.
Reception is similar. When the phototransistor does not detect light, then it means the computer receives a logic 1. When the phototransistor detects light, then the computer receives a logic 0.
This is my circuit so far:
The question is, other than the 200 ohm resistor connected to the lazer (yes its my own symbol with an L with a picture of a diode), is there a way to calculate the optimal values of the resistors attached to the transistors? The resistor connected to the phototransistor is set to 100K, but sensitivity is not a concern because in my tests the remote light will be strong when it is aimed at the phototransistor.
So how do I calculate the optimal values of the resistors and still have bright lazer output without damaging the lazer?
The lazer is a cheap ebay 5mw lazer module from china with a resistor built onto it which I think is 80 ohms.