4
\$\begingroup\$

In a little hobby project I am trying to send data from one Arduino to another using a modulated laser and a photodiode.

On the sender side, the laser has a dedicated modulation input for up to 100kHz. The input is low-active and I connect it directly to the TX pin of the sender-Arduino serial port. Since the UART is low-active too, the laser is turned off, if the UART is idle, which is nice.

On the receiver side I have a photo diode and a transimpedance amplifier with an LM385 opamp. The output is wired to the RX of the receiver-Arduino.

schematics

Here is the problem: If the sender pulls TX to low (1), this causes the laser turn on (2). On the receiver side the photo diode is illuminated causing a current to flow (3) and the transimpedance amplifier to output a high signal at RX (4). In short: Sender TX low -> Receiver RX high.

I clearly need an inversion of the transimpedance amplifier's output: 5V -> 0V and 0V -> 5V. The inversion cannot be done in software in the receiver, since the UART of the Arduino cannot be configured to do that. Of couse I could add a 7404 with a NOT gate to the schematics. But would it be possible to change the transimpedance amplifier in a way that the output is inverted but it still stays a transimpedance amplifier with the performance advantages for my application?

Careful with the word "inverted" in the world of opamps. You have "inverting opamps" but that is something different. And I do not want to "invert" by making 5V -> -5V or something like that.

\$\endgroup\$
3
  • \$\begingroup\$ A LM385 is not a transimpedance amplifier. \$\endgroup\$ Dec 30, 2017 at 12:56
  • 1
    \$\begingroup\$ I had the impression, that "transimpedance amplifier" refers to a circuit you use the opamp in, not a type of opamp. I saw schematics with LM385 titled as transimpedance amplifier, which got me confused. I think you are right. \$\endgroup\$
    – Phil
    Dec 30, 2017 at 13:36
  • \$\begingroup\$ Transimpedance amplifier is an application circuit of an ordinary opamp, the one which converts current to voltage. It's used in your photodiode amplifier. Your impression was right. There's an opamp type named Operational transconductance amplifier, which is totally different thing and can cause some confusion. See this: en.wikipedia.org/wiki/Operational_transconductance_amplifier \$\endgroup\$
    – user136077
    Dec 30, 2017 at 19:39

2 Answers 2

1
\$\begingroup\$

No, do not invert the sender. That would leave the laser on during idle, something you probably want to avoid.

You can flip around the receiving circuit so that the photodiode is between the positive supply and the inverting opamp input:

When the diode produces current, the opamp output will go low.

You have to think carefully about what power voltage is used for what. In the above circuit, the opamp can be powered from the same voltage as at the top of the diode only if the opamp's common mode range extends all the way to its positive supply. Otherwise, you'll need a little higher voltage for the opamp positive supply.

If the opamp negative supply is ground, then you have to make sure its active output range gets low enough for the digital input to reliably interpret that voltage as a low.

A CMOS "rail to rail" opamp might be good enough to use common power for the diode and the opamp. However, you need to check the datasheet carefully to see what "rail to rail" really means.

\$\endgroup\$
3
  • \$\begingroup\$ I build up the circuit you suggested by flipping the photo diode and supplying (+) of the opamp with 5V instead of 0V. So far no luck, (OUT) stays at constant 5V. Tried different values for R1: does not really change the outcome. Must further investigate. Not so easy since I am rather a software developer... \$\endgroup\$
    – Phil
    Dec 31, 2017 at 14:55
  • \$\begingroup\$ @Phil: So the exact circuit you tried in a different question, and we may be able to help diagnose it. \$\endgroup\$ Dec 31, 2017 at 15:05
  • \$\begingroup\$ Much appreciated. Here is the separate question. \$\endgroup\$
    – Phil
    Jan 1, 2018 at 19:37
0
\$\begingroup\$

You could use a transistor at the "sender side".

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

Check if the transistor and the op amp that you're using can run in such frequency.

[EDIT]: Base resistor added, thx @Olin Lathrop.

\$\endgroup\$
2
  • \$\begingroup\$ Hi Francisco, thanks for your suggestion. You are right, that would be a solution. But TX is ON when I am not sending (UART convention), so the laser is ON during that time. So when just sending data from time to time, the laser is on most of the time. To change that I could add the transistor on the receiver side. But I hoped to get around that without adding further hardware... \$\endgroup\$
    – Phil
    Dec 30, 2017 at 13:42
  • \$\begingroup\$ Your circuit is also missing the base resistor. \$\endgroup\$ Dec 30, 2017 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.