3V <-> 5V Level shifter ?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

        Hi,

        I want to connect a GPS Smart antenna SAM LS from u-blox, to the
        UART of an atmega128 running under 5V.

        Unfortunately the GPS runs in 3V and has 3V compatible IOs.
        I set up a 3V regulator already for the power supply. Can someone
        explain how to build a level shifter from 3V to 5V with a transistor ?
        (How do I choose it, how to connect it ?)

        any better idea ?

Thanks
Martial Chateauvieux

        

Re: 3V <-> 5V Level shifter ?
Quoted text here. Click to load it
transistor ?
Quoted text here. Click to load it

You don't need all that. The TX signal from the u-blox can go right into the
input of the atmega, since everything above 2.5V is seen as '1'. The signal
from the atmega to the u-blox can be brought down to 3V by a voltage divider
with two resistors: 12k and 18k. I've used this in a commercial product and
it runs just fine.

Meindert



Re: 3V <-> 5V Level shifter ?
snipped-for-privacy@NOcustomSPAMware.nl says...
Quoted text here. Click to load it
That's probably correct.   When I was  connecting 3V and 5V systems, I
was connecting a 5V ADC to a 3V SPI serial port.  The clock and data
were running at 2MHz, and I had to use the tri-state feature to allow
the SPI bus to be used for other peripherals.

Mark Borgerson



Re: 3V <-> 5V Level shifter ?

Quoted text here. Click to load it

Doesn't the Mega need 0.6*VCC as Vih(min) , the datasheet says so ..
0.6 x 5V = 3V

Carsten


Re: 3V <-> 5V Level shifter ?
Quoted text here. Click to load it
the
signal
divider
and

Correct. In my case, the LV device runs at 3.3V, and there it works. So did
the OP really mean 3V or 3.3V?
But even with 3V it can be done with a shottky diode (to make the 3V output
behave like an open collector/drain) and a pull-up resistor. No need for
fancy circuits.

Meindert



Re: 3V <-> 5V Level shifter ?
On Sun, 30 Jan 2005 14:39:36 +0100, "Meindert Sprang"

Quoted text here. Click to load it

Sounds interresting , Meindert would you please give an example , i'm
a bit of a electronics beginner ???
Im going to interface a Dataflash to a Mega162 , and was planning on
using a HCT as levelconverter for the dataflash SO , but would like to
avoid it if possible , i will be using a Micrel mic2920 LDO as 3v3
regulator , or maybe "just" the 3 x 1n4148 in series from 5v  "trick".

Does it have to be a Schottky diode ??



TIA
Carsten


Re: 3V <-> 5V Level shifter ?
Quoted text here. Click to load it

Assuming the dataflash is 3.3V and the mega162 is on 5V, you can connect the
DO from flash directly to the DI from the mega.

Using a schottky diode is good for two reasons: the voltage drop is lower
( and therefore the raise of the 0-level voltage) and they are much faster
and have a lower recovery time. But if the flash is on 3.3V you don't need a
diode at all to simulate an open drain output to the mega.

The DO from the mega should be brought down to 3.3V. I have used a voltage
divider for that (2 resistors) but this was for a low speed connection
(57600 baud max.) I am afraid that the signal edges could be affected too
much to run this on 1 mbps or higher when communicating to the flash.

Meindert



Re: 3V <-> 5V Level shifter ?
On Mon, 31 Jan 2005 09:34:41 +0100, "Meindert Sprang"

Quoted text here. Click to load it

Im quite sure that Atmel says that the DataFlash has 5v tolerant input
signals.

But i have seen the divider trick used on a mmc card.

Just for learning the opencolector stuff , how do you connect the
schotky and the resistor.

I guess the resistor goes to vcc , but what about the diode ??

Is it like this :

                           ---------------|--------Vcc
                   |
                 Pullup            
                   |

DO----------|>-------|-----------------------AtMega-Input




Regards
Carsten


Re: 3V <-> 5V Level shifter ?

Quoted text here. Click to load it

Almost. The diode must be the other way around and the resistor must be
sitting between the atmega input and VCC

But you'll probably don't need this at all.

Meindert



Re: 3V <-> 5V Level shifter ?
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

Or germanium :-)  The point is that the lower forward drop does
less harm to the low logic level.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: 3V <-> 5V Level shifter ?

Quoted text here. Click to load it

Philips do a range of level shifters

http://www.semiconductors.philips.com/catalog/219/282/27063/29482/index.html#29482

You just need to connect up the 3V and 5V supplies, and ground the OE pins, and
you're
good to go.


Quoted text here. Click to load it



Re: 3V <-> 5V Level shifter ?

Quoted text here. Click to load it




Most 5 Volt Circuits can cope with 3.3 Volt CMOS Signal, which has around
the same levels as normal 5 Volt TTL Outputs. If you really want to shift 3
Volt CMOS to 5 Volt CMOS, use a TTL level compatible CMOS gate, like AHCT,
with 5 Volt supply. For the way 5 Volt CMOS to 3 Volt CMOS, look for 3 Volt
Gates with 5 Volt tolerant inputs, like AHC. For bidirectional busses, there
are devices to with two supplies, however ther need additional direction
signals and need some conditions when switched on, or there is a chance that
they will latch.

If you want to connect a 3.3 Volt device to a 5 Volt TTL/CMOS Bus, use a
passive busswitch, like the  SN74CBTD3861.

Bye
--
Uwe Bonnes                 snipped-for-privacy@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
We've slightly trimmed the long signature. Click to see the full one.
Re: 3V <-> 5V Level shifter ?
Two better ideas:

1. use an ARM microcontroller e.g. LPC2000 from Philips or Atmels SAM7s
they are all 3V by definition
2. as already mentioned compare output levels to input levels both
ways. If this is for a hobby project, just measure the voltage levels,
if it is for a product you want to vcreate and sell, you better get the
specifications of the output and input levels.

An Schwob

Martial Chateauvieux wrote:
Quoted text here. Click to load it
the
someone
transistor ?
Quoted text here. Click to load it


Re: 3V <-> 5V Level shifter ?

Quoted text here. Click to load it

The ATMega128 also has a 3V version available. The only "problem" is
that the maximum clock frequency is only 8MHz in stead of 16MHz. For
talking to a GPS module, an 8MHz ATMega128 should be plenty powerfull
enough.

Regards
   Anton Erasmus




Site Timeline