Pages: [1]   Go Down
Author Topic: Logic level conversion hypothetical?  (Read 798 times)
0 Members and 1 Guest are viewing this topic.
Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I was just pondering logic level conversion for 5V Arduino to 3.3V devices. I see lots of solutions ranging from dedicated ICs to resistor voltage dividers, etc. But I haven't seen the following...

Since the Arduino (UNO) already has a regulated 3.3V pin.... Could it be possible (reliable?) to connect a transistor/FET from 3.3V pin and 3.3V device, and use the 5V signal to turn transistor/FET on/off...effectively translating the signal?

 I'm curious about the feasibility of this method. Has anyone tried it? It's pretty similar to some solutions I've seen. I just havent seen anyone use the 3.3V pin as the voltage source. Is there any reason this wouldn't work?
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To convert a 5V logic signal to 3.3V, you could indeed use a p-channel mosfet to connect the +3.3V pin to the input of the 3.3V device. But you would also need a pulldown resistor. A voltage divider (consisting of 2 resistors) is cheaper and simpler than a mosfet and a resistor.
« Last Edit: September 18, 2013, 03:24:02 am by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You probably also could get by with using three small diodes in series to drop the 5v down to ~2.9v.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 45
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter

Describes using mosfets.
Logged

Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Ok, well....I'm an idiot.  smiley-red

What the...how come I never find any of those Playground pages when I do searches? There's a ton of stuff very well hidden in there.

Thanks for pointing out the obvious (which I failed to see myself) to me!

Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2379
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



 I'm curious about the feasibility of this method. Has anyone tried it? It's pretty similar to some solutions I've seen. I just havent seen anyone use the 3.3V pin as the voltage source. Is there any reason this wouldn't work?


Why not! An ordinary NPN transistor will do the job but?

If i applied 3v to the collector, 5v high to base... would the emitter spit out 3v from thr collector side or 5v from the base? Where'my android circuit emulator...
Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2379
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Never applied a higher voltage to it's base over the collector before!

Check out the attached image.


* Screenshot_2013-09-18-09-17-15.png (83.74 KB, 720x1280 - viewed 27 times.)
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that will work - but it uses more components than a simple 2-resistor voltage divider.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 29
Posts: 2379
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or this?  smiley-eek

Attached...

I'd still opt for a zener diode....


* Screenshot_2013-09-18-18-19-20.png (81.12 KB, 720x1280 - viewed 23 times.)
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2866
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For an IIC level converter the only thing 'required' is 2 logic level mosfets (the lower the VGth the lower the low side voltage can be.
NXP AN10441 (attached) is a good source of 'inspiration' I've used the circuit from 5 to 3V3 (BMP085) with 2N7000's with good success. the recommended mosfet is an SOT-23 BSS138..
Level shifters of similar nature can be found on Ebay too, I bought two for $2.42  "Free Shipping".
I thought the price high considering the BOM but the convenience won me over.

Doc

* AN10441.pdf (52.45 KB - downloaded 14 times.)
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For an IIC level converter the only thing 'required' is 2 logic level mosfets (the lower the VGth the lower the low side voltage can be.
NXP AN10441 (attached) is a good source of 'inspiration' I've used the circuit from 5 to 3V3 (BMP085) with 2N7000's with good success. the recommended mosfet is an SOT-23 BSS138..
Level shifters of similar nature can be found on Ebay too, I bought two for $2.42  "Free Shipping".
I thought the price high considering the BOM but the convenience won me over.

Doc

Ok, that's pretty clever. I like it. Thanks for posting!
Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2379
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

https://www.google.com.au/url?sa=t&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fwww.nxp.com%2Fdocuments%2Fdata_sheet%2FHEF4050B.pdf&ei=Tqs5Us7gIcisiAfL_IGoDw&usg=AFQjCNGXZrNtDg0e4VKIcQpSDO0B3CraRQ&sig2=VER6nJ2ByxiWc6t-K6QDhA


That link is supposed to be to the 4050 datasheet!


Logged

Pages: [1]   Go Up
Jump to: