Okay here's how it is.
I've attached a UART to my computer and I've been echoing messages to its com port using CMD. In principle, these messages should be repeated over the TX line of the pinout. Actually, this part has been going extremely well! I'm driving a laser diode using a mosfet and a 9V power source, and the echoed messages pulse the laser just as expected.
Awesome!
The problem is the integration of this part here:
https://www.mouser.com/ds/2/678/V02-1501EN_DS_HFBR-0500Z_2014-09-190-909160.pdf
It's the HFBR 25X3Z reciever (page 18^^) this is a fairly standard 40Kb optical receiver, but when it reads the signal produced by the laser, it always produces some garbled, garbage signal. Like, when I echo the message "3" to the laser's COM port, it outputs a consistent 102, 41, 214, 0. For any one-digit number, it maps a four-number string to correspond to it and prints it to the serial monitor. I have recorded all of the numbers from 0-8, and there is no clear pattern. But as long as you know which four numbers to look for, you can tell which number was sent --I mean to emphasize that the detector is failing consistently.
It's like the detector is printing each individual bit that it receives, rather than the whole message itself.
Here's where my confusion begins... I have come to understand that the output from the laser's com port may be TTL, while the detector's com port is expecting an rs232 signal. However, when I connect a wire between the laser's TXD line and the detector's RXD line, the transmission is perfect. Clearly, the failure is of the optical components. I think it's the detector.
Any ideas on how to send an rs232 signal successfully?
I've attached a UART to my computer and I've been echoing messages to its com port using CMD. In principle, these messages should be repeated over the TX line of the pinout. Actually, this part has been going extremely well! I'm driving a laser diode using a mosfet and a 9V power source, and the echoed messages pulse the laser just as expected.
Awesome!
The problem is the integration of this part here:
https://www.mouser.com/ds/2/678/V02-1501EN_DS_HFBR-0500Z_2014-09-190-909160.pdf
It's the HFBR 25X3Z reciever (page 18^^) this is a fairly standard 40Kb optical receiver, but when it reads the signal produced by the laser, it always produces some garbled, garbage signal. Like, when I echo the message "3" to the laser's COM port, it outputs a consistent 102, 41, 214, 0. For any one-digit number, it maps a four-number string to correspond to it and prints it to the serial monitor. I have recorded all of the numbers from 0-8, and there is no clear pattern. But as long as you know which four numbers to look for, you can tell which number was sent --I mean to emphasize that the detector is failing consistently.
It's like the detector is printing each individual bit that it receives, rather than the whole message itself.
Here's where my confusion begins... I have come to understand that the output from the laser's com port may be TTL, while the detector's com port is expecting an rs232 signal. However, when I connect a wire between the laser's TXD line and the detector's RXD line, the transmission is perfect. Clearly, the failure is of the optical components. I think it's the detector.
Any ideas on how to send an rs232 signal successfully?