Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

5V - 3V interfacing

5V - 3V interfacing

2007-01-21 by kernels_nz

Hey guys,

Anybody know what the best way is to interface a 5V output on my
Mega64 to a 3V input on a Nordic RF IC ? The Nordic datasheet
specifies a max input voltage of VDD + 0.3V (3.3V) 

Best way I could come up with was a voltage divider on each line, but
theres six lines, so thats 12 extra resistors ! 

I need to run the Mega at 5V because of interfacing to other 5V
components, so running it @ 3V is not an option unfortunately. 

I assume that outputs from the Nordic IC to input pins on the Mega
will be no problem for straight connection due to the high input
impedance of the Mega and I would not need to use the pullsups on the
Mega because the RF IC drives the line both low and high. It looks
like anything above 1V on the Mega is seen as a 1.

Any insights would be appreciated.

Thanks
Hein B
Auckland, New Zealand.

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-21 by Thomas Keller

At a guess,m substitute a single 3.3 V zener diode for each voltage 
divider.    Ought to work (I think).   Only potential problem I can see 
is it could end up overloading the AVR outputs.

tom

kernels_nz wrote:
Show quoted textHide quoted text
>
> Hey guys,
>
> Anybody know what the best way is to interface a 5V output on my
> Mega64 to a 3V input on a Nordic RF IC ? The Nordic datasheet
> specifies a max input voltage of VDD + 0.3V (3.3V)
>
> Best way I could come up with was a voltage divider on each line, but
> theres six lines, so thats 12 extra resistors !
>
> I need to run the Mega at 5V because of interfacing to other 5V
> components, so running it @ 3V is not an option unfortunately
>

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-21 by David VanHorn

Anybody know what the best way is to interface a 5V output on my
Mega64 to a 3V input on a Nordic RF IC ? The Nordic datasheet
specifies a max input voltage of VDD + 0.3V (3.3V)

BTDT.



> Best way I could come up with was a voltage divider on each line, but
> theres six lines, so thats 12 extra resistors !


Resistors are cheap..

You can also use a Szaiklai pair, to convert the 3V outputs to 5V rails



> I need to run the Mega at 5V because of interfacing to other 5V
> components, so running it @ 3V is not an option unfortunately.


Realize that a high output on a 3V processor is a high input on a 5V CMOS or
TTL input.
Lows on both families are compatible.



> I assume that outputs from the Nordic IC to input pins on the Mega
> will be no problem for straight connection due to the high input
> impedance of the Mega and I would not need to use the pullsups on the
> Mega because the RF IC drives the line both low and high. It looks
> like anything above 1V on the Mega is seen as a 1.


It's not as hard as you think.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-21 by David VanHorn

On 1/21/07, Thomas Keller <tjkeller1@alltel.net> wrote:
>
>    At a guess,m substitute a single 3.3 V zener diode for each voltage
> divider.    Ought to work (I think).   Only potential problem I can see
> is it could end up overloading the AVR outputs.


You'll end up with each output trying it's hardest to pull up the zener.
Also know this:  Zeners have bad knees.

The two resistors is a very good solution.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-21 by np np

I dont think I would use resistors as the R and C input would delay the signal.
A logic gate IC of some sort would be a better solution with low value pull ups on the outputs.

http://www.ckp-railways.talktalk.net/pcbcad17.htm

David VanHorn <microbrix@gmail.com> wrote:                                  Anybody know what the best way is to interface a 5V output on my
 Mega64 to a 3V input on a Nordic RF IC ? The Nordic datasheet
 specifies a max input voltage of VDD + 0.3V (3.3V)
 
 BTDT.
 
 > Best way I could come up with was a voltage divider on each line, but
 > theres six lines, so thats 12 extra resistors !
 
 Resistors are cheap..
 
 You can also use a Szaiklai pair, to convert the 3V outputs to 5V rails
 
 > I need to run the Mega at 5V because of interfacing to other 5V
 > components, so running it @ 3V is not an option unfortunately.
 
 Realize that a high output on a 3V processor is a high input on a 5V CMOS or
 TTL input.
 Lows on both families are compatible.
 
 > I assume that outputs from the Nordic IC to input pins on the Mega
 > will be no problem for straight connection due to the high input
 > impedance of the Mega and I would not need to use the pullsups on the
 > Mega because the RF IC drives the line both low and high. It looks
 > like anything above 1V on the Mega is seen as a 1.
 
 It's not as hard as you think.
 
 [Non-text portions of this message have been removed]
 
 
     
                       

 		
---------------------------------
 New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.

[Non-text portions of this message have been removed]

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-22 by David VanHorn

On 1/21/07, np np <harrabylad@yahoo.co.uk> wrote:
>
> I dont think I would use resistors as the R and C input would delay the
> signal.


Since the C on the inputs is a few pF, and you can use resistors on the
order of 1k, why are you worried?

A logic gate IC of some sort would be a better solution with low value pull
> ups on the outputs.


If you like, Maxim makes such chips. They are expensive, large, and hard to
get other than in sample quantities.
Resistors are cheap, easy, and small.

I assure you this works.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-22 by Jim Wagner

I like 74LCX125. Gives you six converters in a  package.
They do it right! You can power them from 3.3V and both
input and output are 5V tolerant. This lets you convert
both ways.

Jim


On Sun, 21 Jan 2007 17:17:11 -0600
 Thomas Keller <tjkeller1@alltel.net> wrote:
>     At a guess,m substitute a single 3.3 V zener diode
> for each voltage 
> divider.    Ought to work (I think).   Only potential
> problem I can see 
> is it could end up overloading the AVR outputs.
> 
> tom
> 
> kernels_nz wrote:
> >
> > Hey guys,
> >
> > Anybody know what the best way is to interface a 5V
> output on my
> > Mega64 to a 3V input on a Nordic RF IC ? The Nordic
> datasheet
> > specifies a max input voltage of VDD + 0.3V (3.3V)
> >
> > Best way I could come up with was a voltage divider on
> each line, but
> > theres six lines, so thats 12 extra resistors !
> >
> > I need to run the Mega at 5V because of interfacing to
> other 5V
> > components, so running it @ 3V is not an option
> unfortunately
> >
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: 5V - 3V interfacing

2007-01-22 by sm5glc

http://en.wikipedia.org/wiki/Sziklai_pair

--- In AVR-Chat@yahoogroups.com, erikc <firewevr@...> wrote:
>
> David VanHorn wrote:
> 
> > You can also use a Szaiklai pair, to convert the 3V outputs to 5V
rails
Show quoted textHide quoted text
> 
> What?
> 
> 
> -- 
> erikc
> --

Re: [AVR-Chat] 5V - 3V interfacing

2007-01-22 by erikc

David VanHorn wrote:

> You can also use a Szaiklai pair, to convert the 3V outputs to 5V rails

What?


-- 
erikc
--
GILLETTE'S PRINCIPLE: "If you want to make people angry, lie. If
you want to make them absolutely livid with rage, tell the
truth."

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by erikc

Thanks.  Just never heard that configuration called that.

sm5glc wrote:
> http://en.wikipedia.org/wiki/Sziklai_pair
> 
> --- In AVR-Chat@yahoogroups.com, erikc <firewevr@...> wrote:
>> David VanHorn wrote:
>>
>>> You can also use a Szaiklai pair, to convert the 3V outputs to 5V
> rails
>> What?
>>
>>
>> -- 
>> erikc
>> --


-- 
erikc
--
GILLETTE'S PRINCIPLE: "If you want to make people angry, lie. If
you want to make them absolutely livid with rage, tell the
truth."

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by David VanHorn

On 1/22/07, erikc <firewevr@airmail.net> wrote:
>
> Thanks.  Just never heard that configuration called that.


What other names does it go by?


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by Jim Wagner

This has no real advantage that I can see for level
shifting. Rather than this, just use a transistor/fet and a
pullup resistor. With one of these, you still need a pullup
and you have used two transistors. It is still inverting
like a single transistor would be, which makes neither of
these very useful for simple in-line level shifting.

Jim


On Mon, 22 Jan 2007 08:55:00 -0000
 "sm5glc" <lasse.moell@swipnet.se> wrote:
> http://en.wikipedia.org/wiki/Sziklai_pair
> 
> --- In AVR-Chat@yahoogroups.com, erikc <firewevr@...>
> wrote:
> >
> > David VanHorn wrote:
> > 
> > > You can also use a Szaiklai pair, to convert the 3V
> outputs to 5V
> rails
> > 
> > What?
> > 
> > 
> > -- 
> > erikc
> > --
> 
> 
> 

---------------------------------------------------------------
The Think Different Store
http://www.thinkdifferentstore.com/
For All Your Mac Gear
---------------------------------------------------------------

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by David VanHorn

On 1/22/07, Jim Wagner <jim_d_wagner@applelinks.net> wrote:
>
> This has no real advantage that I can see for level
> shifting.


It's another option, but as to what advantage, I don't know.


> Rather than this, just use a transistor/fet and a
> pullup resistor.


Well, that normally inverts the sense of the signal, which may or may not be
a problem.


With one of these, you still need a pullup
> and you have used two transistors. It is still inverting
> like a single transistor would be, which makes neither of
> these very useful for simple in-line level shifting.


The Szaiklai is not inverting.  Each transistor inverts, so the end product
is the original polarity.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by dlc@frii.com

The main advantage is high input Z and low output Z.  I've used the
resistor divider 3.3V/5V matching design on circuits up to 40KHz transfer
rates with no problems.  If you use smaller value resistors (well under
10K) then unless you have some WAY high line capacitance things will work
out fine at even higher frequencies.  If you are talking MHz clock rates
then you should indeed look into "high input impedence, low output
impedence" type drivers to assure good signal states.  The OP was talking
to a low data rate transceiver, but that transceiver (if I remember
correctly) can have a high burst rate comm speed (in the 1MHz range), so
if he runs it that fast he should use a driver, under 100KHz he's almost
certainly safe with the resistor divider method IMO.

DLC
Show quoted textHide quoted text
> This has no real advantage that I can see for level
> shifting. Rather than this, just use a transistor/fet and a
> pullup resistor. With one of these, you still need a pullup
> and you have used two transistors. It is still inverting
> like a single transistor would be, which makes neither of
> these very useful for simple in-line level shifting.
>
> Jim
>
>
> On Mon, 22 Jan 2007 08:55:00 -0000
>  "sm5glc" <lasse.moell@swipnet.se> wrote:
>> http://en.wikipedia.org/wiki/Sziklai_pair
>>
>> --- In AVR-Chat@yahoogroups.com, erikc <firewevr@...>
>> wrote:
>> >
>> > David VanHorn wrote:
>> >
>> > > You can also use a Szaiklai pair, to convert the 3V
>> outputs to 5V
>> rails
>> >
>> > What?
>> >
>> >
>> > --
>> > erikc
>> > --
>>
>>
>>
>
> ---------------------------------------------------------------
> The Think Different Store
> http://www.thinkdifferentstore.com/
> For All Your Mac Gear
> ---------------------------------------------------------------
>
>
>
> Yahoo! Groups Links
>
>
>
>

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by David VanHorn

>
>
> if he runs it that fast he should use a driver, under 100KHz he's almost
> certainly safe with the resistor divider method IMO.


For this specific application, I know the chips involved, and I can't see
any reason not to use the resistor method.


[Non-text portions of this message have been removed]

Re: 5V - 3V interfacing

2007-01-22 by kernels_nz

Hi Again ! I ended up using the resistor method in my design - main
problem was not the cost of adding 14 resistors, but rather that id
already designed the PCB and it was a pain in the A to add 14
resistors to the tightly packed Nordic RF circuit. Managed to fit them
in using 0603 resistors. By the way, 1k5 and 1k give 5V to 3V. 

I believe it will work fine, as the fastest data rate is only in the
100s of kHz 

I was only hoping someone would say something like : "Oh on, don't use
resistors, the simplest way that takes zero space is . . . " didn't
get the answer I was hoping for unfortunately. 

Reminds me of my uni electronics lecturer's favorite quote: "Theres no
free lunch in electronics"

Thanks for all the response to everyone

Cheers
Hein B
Auckland, New Zealand.

--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
Show quoted textHide quoted text
>
> At 07:55 PM 22/01/2007, you wrote:
> >http://en.wikipedia.org/wiki/Sziklai_pair
> 
> It would be nice to how many pins (out of 12??) are inputs
> and how many are outputs to the processor (I could look it up ;) ??).
> Not all of them will be data or clock pins I suppose.
> 
> For the data and clock pins level shifters like those used for
> I2C could be used (PCA9515 or similar)
> 
> Regards
> 
> John Samperi
> 
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495       Fax (02) 9674-8745
> Email: john@...
> Website  http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by John Samperi

At 07:55 PM 22/01/2007, you wrote:
>http://en.wikipedia.org/wiki/Sziklai_pair

It would be nice to how many pins (out of 12??) are inputs
and how many are outputs to the processor (I could look it up ;) ??).
Not all of them will be data or clock pins I suppose.

For the data and clock pins level shifters like those used for
I2C could be used (PCA9515 or similar)

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-22 by David VanHorn

>
>
> I was only hoping someone would say something like : "Oh on, don't use
> resistors, the simplest way that takes zero space is . . . " didn't
> get the answer I was hoping for unfortunately.


No, and if you'd tried to drive those pins directly, that would have been
bad.

Reminds me of my uni electronics lecturer's favorite quote: "Theres no
> free lunch in electronics"


No, but sometimes you find a lunch that someone left behind  :)


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-23 by Russell Shaw

kernels_nz wrote:
> Hi Again ! I ended up using the resistor method in my design - main
> problem was not the cost of adding 14 resistors, but rather that id
> already designed the PCB and it was a pain in the A to add 14
> resistors to the tightly packed Nordic RF circuit. Managed to fit them
> in using 0603 resistors. By the way, 1k5 and 1k give 5V to 3V. 
> 
> I believe it will work fine, as the fastest data rate is only in the
> 100s of kHz 
> 
> I was only hoping someone would say something like : "Oh on, don't use
> resistors, the simplest way that takes zero space is . . . " didn't
> get the answer I was hoping for unfortunately. 
> 
> Reminds me of my uni electronics lecturer's favorite quote: "Theres no
> free lunch in electronics"

If the data rate isn't too fast and the latchup current of overdriven
inputs is specified, you can use a single series resistor between output
and input. Even if the latchup current isn't specified, you can still gain
some confidence by abusing a chip with 10-20mA overdrive and see if it's
tolerant.

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-23 by David VanHorn

>
> If the data rate isn't too fast and the latchup current of overdriven
> inputs is specified, you can use a single series resistor between output
> and input. Even if the latchup current isn't specified, you can still gain
> some confidence by abusing a chip with 10-20mA overdrive and see if it's
> tolerant.


Confidence in what, exactly?

If there isn't enough load to pull that current back out of the rail, you
end up raising the 3.3V rail out of spec.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-23 by Russell Shaw

David VanHorn wrote:
>> If the data rate isn't too fast and the latchup current of overdriven
>> inputs is specified, you can use a single series resistor between output
>> and input. Even if the latchup current isn't specified, you can still gain
>> some confidence by abusing a chip with 10-20mA overdrive and see if it's
>> tolerant.
> 
> Confidence in what, exactly?
> 
> If there isn't enough load to pull that current back out of the rail, you
> end up raising the 3.3V rail out of spec.

Latchup only happens over a certain thresh-hold, so if you're confident
that your overdrive is always much lower than that, then problem solved.

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-23 by David VanHorn

>
> > If there isn't enough load to pull that current back out of the rail,
> you
> > end up raising the 3.3V rail out of spec.
>
> Latchup only happens over a certain thresh-hold, so if you're confident
> that your overdrive is always much lower than that, then problem solved.


I'm not willing to generalize the behaviour of an unpublished parameter
across large numbers of chips from a small sample, especially when the
variability of that parameter is unknown.

Also, what do you do about the current you're dumping into the 3V system?

I saw something like this happen on a 5V system where the incoming current
was enough to shut down the output of the 5V regulator, and raise VCC to
5.24V.  While this SEEMED to be barely within tolerance, the systems
suffered from unpredictable crashes.  Eliminating the source of the excess
current into VCC solved the problem.
In this case, the current into VCC was coming through the protection diodes
on a ULN2003, which are rated for some fair current, and the problems were
not latchup related.


[Non-text portions of this message have been removed]

Re: [AVR-Chat] Re: 5V - 3V interfacing

2007-01-23 by Russell Shaw

David VanHorn wrote:
>>> If there isn't enough load to pull that current back out of the rail,
>> you
>>> end up raising the 3.3V rail out of spec.
>> Latchup only happens over a certain thresh-hold, so if you're confident
>> that your overdrive is always much lower than that, then problem solved.
> 
> I'm not willing to generalize the behaviour of an unpublished parameter
> across large numbers of chips from a small sample, especially when the
> variability of that parameter is unknown.

You only try it on unpublished data when fixing stuff-ups.

> Also, what do you do about the current you're dumping into the 3V system?

It feeds the 3V power supply.
Show quoted textHide quoted text
> I saw something like this happen on a 5V system where the incoming current
> was enough to shut down the output of the 5V regulator, and raise VCC to
> 5.24V.  While this SEEMED to be barely within tolerance, the systems
> suffered from unpredictable crashes.  Eliminating the source of the excess
> current into VCC solved the problem.
> In this case, the current into VCC was coming through the protection diodes
> on a ULN2003, which are rated for some fair current, and the problems were
> not latchup related.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.