Go Down

Topic: Logic level conversion hypothetical? (Read 953 times) previous topic - next topic

1ChicagoDave


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?

dc42

#1
Sep 17, 2013, 08:43 pm Last Edit: Sep 18, 2013, 10:24 am by dc42 Reason: 1
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.
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.

zoomkat

You probably also could get by with using three small diodes in series to drop the 5v down to ~2.9v.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Chagrin

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

Describes using mosfets.

1ChicagoDave


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

Describes using mosfets.


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!


cjdelphi




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...

cjdelphi

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

Check out the attached image.

dc42

Yes, that will work - but it uses more components than a simple 2-resistor voltage divider.
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.

cjdelphi

Or this?  :smiley-eek:

Attached...

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

Docedison

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
--> 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

1ChicagoDave


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!

cjdelphi

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!



Go Up