Logic Level shifter and bidirectional serial

Hi,

I want to use the “4 Channel Logic Level shifter” (#2595) between RX/TX-pins of my Arduino Due and a cameras LANC-port.
RX/TX are running at 3.3V, LANC at 5 - 8V and its a bidirectional serial connection - so only one wire for data in both directions (not at the same time). I want to use both, the TX and RX-pin - not one GPIO pin.

First I thought to connect the RX-pin straight to the level shifter and the TX-pin via a resistor:

No problem when receiving at the Arduino end, just have to pull the TX-pin “high” for that time.

But when sending form the Arduino it might be a problem pulling the line low enough to send a “0” to the camera (the line would be at 1.6V), as I don’t know the maximum voltage level of a “0” in LANC.

So, because the TX-pin has to be “high” when receiving anyway, why not use it directly for pulling up the line. And when sending, the TX-pin can directly pull the line up and down as needed (nothig else will be hocked to that level shifter):

Will it work? Any better ideas?

Hi.

Connecting TX to that level shifter’s low voltage supply pin (LV) will not work. The FET will only turn on and let a low signal pass from the low to high side of the shifter if the LV pin is higher than the L1 pin. I suspect there are better ways out there for communicating with a LANC device from an Arduino, but we do not have any particular suggestions. You could probably find some resources on the Web to help you with that.

-Claire

Hi Claire,

thanks for the information. I did quite some research on the Web before posting here, e.g. this diagram pointed me to your level shifter:

But, like in this example, most people are using a single GPIO pin and are bitbanging the LANC-protocoll (which I don’t want to do, because it will block the CPU).

I had a look into other solutions to this problem (TX will be HIGH when not sending).

  1. Using a diode:

  2. Using a NPN-transistor:

  3. Using an analog switch:

I’m sure 3) will work fine, but it needs an extra GPIO-pin and (in my project) a lot of (re-)wiring, so I would prefere to not go this route.

What do you think about 1) and 2)? Any problems with the level shifter, any “side effects” I’m not aware off?

Any of those three seem like they might be okay, though the second option will invert your TX signal, so I am not sure that will work with your protocol. I do not expect any issues with the level shifter for any of them.

-Claire

Thanks Claire!

So, I will got with the diode - seems to be easy and straight forward (using a BAT43).

Cheers Chris