Using a buffer for level shifting

Thread Starter

electrophile

Joined Aug 30, 2013
167
In my design a custom implementation of an Arduino Uno talks to either a CP2104 USB-UART or a bluetooth module, through a multiplexer (74LVC1G3157). Priority is given to the wired connection and hence when the USB cable is plugged in (sensed with the VBUS of the USB), power to the BT module is turned off and hence is inactive.

The CP2104 and the Bluetooth have 3.3V outputs and the Arduino Uno is a 5V device. For the Arduino RX, a 3.3V from either the CP2104 or the BT module works without any conversion and for the TX there is a voltage divider that steps down to 3.3V level to be read into the BT module and the CP2104 has 5V tolerant lines and hence there is no conversion there. However, the DTR line that resets the Arduino should be 5V and I was wondering if the way its wired in the schematic would work ok? (74LVC1G3157 followed by the 74LVC1G17). The 74LVC1G17 is simply a buffer.

 

GopherT

Joined Nov 23, 2012
8,009
What is the switching threshold for the arduino? I doubt it must see 5V. Likely anything over 2V is considered (high) and under 1V is considered low.

Check the Datasheets.
 

Thread Starter

electrophile

Joined Aug 30, 2013
167
What is the switching threshold for the arduino? I doubt it must see 5V. Likely anything over 2V is considered (high) and under 1V is considered low.

Check the Datasheets.
I have an existing implementation of this without the buffer at the output of the mux for the DTR signal and the Arduino being reset (active low DTR signal) with this is random. It works in some cases and in some it doesn't. On the scope the pulse goes as low as about 2V and I'm guessing thats the 3.3V output at this mux thats causing this. Its right there on the border and probably it sometimes works.
 

shteii01

Joined Feb 19, 2010
4,644
What is the switching threshold for the arduino? I doubt it must see 5V. Likely anything over 2V is considered (high) and under 1V is considered low.

Check the Datasheets.
Uno uses ATmega328 uC. OP would need to look in the ATmega328 datasheet.
My guess it is standard 2.4+ volts for logic high (digital 1).
 

GopherT

Joined Nov 23, 2012
8,009
I have an existing implementation of this without the buffer at the output of the mux for the DTR signal and the Arduino being reset (active low DTR signal) with this is random. It works in some cases and in some it doesn't. On the scope the pulse goes as low as about 2V and I'm guessing thats the 3.3V output at this mux thats causing this. Its right there on the border and probably it sometimes works.
A common level shift circuit (bidirectional)...
Study it for a minute - it is not immediately clear until you realize that the output LOW is required to send a low signal across the transistor as a low. Otherwise the output will be the value of the pull up resistor.

image.jpeg
 
Last edited:
Top