I'm currently in the process of having a laser beam detected by the phototransistor. While the parts in themselves work, I want to detect when the beam has been detected.
I understand that a 38Khz module exists for detecting IR but I already bought my phototransistors and they are much less expensive and offer me more flexibility.
What I currently have setup in my 8051 microcontroller is a procedure which detects when a laser beam has been sensed by detecting the value 0Fh from SBUF (uart input).
The reason I chose that value 0Fh is because for a standard 8N1 UART protocol The data packet for the UART starts with a logic low for start bit, then the next four bits are logic low then the next four are logic high then logic high for stop bit.
Then the remote unit that controls the beam will operate much the same way by sending 0Fh over its UART (8N1) and both units will run at the same baud rate.
Currently I have the speed set to 1200bps on both units.
My questions are:
Is this a good way to implement manchester encoding to detect when a valid laser beam is sensed (as opposed to interfering light)?
Is the speed too high for the lazer to keep up? I mean some devices take some time to turn on and off. The laser in question comes from those cheap 5mw laser modules you can get off ebay for under $1.