Pages: [1] 2   Go Down
Author Topic: 1.8v to 5v logic level converter *solved*  (Read 5032 times)
0 Members and 1 Guest are viewing this topic.
Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an ARM platform with a 1.8v UART and I want to connect my Arduino to it, but I'm afraid of ruining it.  I heard about using logic level converters but surprisingly many of the sources recommending this don't have a particular model to recommend, and I can't find any that work at a 1.8v to 5v range.

I'm open to using transistors and resistors to get the job done (I have a resistor that'll do the trick) but I can't figure out how to use a transistor to amplify the 1.8v TX signal to 5v.  I know how to use a transistor for something that has an input pin and an output/ground, but I don't know how to use one for something that's basically a direct shot, and I'm afraid of ruining something.

I'm sure this is a stupid question to ask but after an hour or two of searching I can't seem to get a complete answer anywhere.
« Last Edit: April 21, 2013, 08:55:35 pm by schmidtbag » Logged

Offline Offline
Full Member
***
Karma: 3
Posts: 246
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try one of these http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm
This one TTL-232RG-VREG1V8-WE
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How about TXB0102?

http://www.ti.com/product/txb0102
1.8V Vcc on one side, 5V on the other.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm looking to avoid USB, so the TTL-232RG-VREG1V8-WE won't work for me.  The TXB0102 looks nice but is there a breakout board or a DIP version of it?  Also, while I didn't read it very thoroughly, it the datasheet doesn't explicitly say whether you can do 1.8v to 5v.  I get the impression that many of these logic converters work in increments (so for example 1.8 to 3.3, then 3.3 to 5) but like I said in my OP, I can't seem to get a complete, definite answer.  Also, are the data pins bi-directional?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26943
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"This allows for universal low-voltage bidirectional translation between any of the 1.2-V, 1.5-V, 1.8-V, 2.5-V, 3.3-V, and 5-V voltage nodes."

"The TXB0102 architecture (see Figure 2) does not require a direction-control signal to control the direction of
data flow from A to B or from B to A."

You can get a breakout board for any part. Check dipmicro.com, e-bay, whatever your favorite source is.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Sweden
Offline Offline
Full Member
***
Karma: 1
Posts: 185
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I had a similar question a couple of days ago how to convert a 2.65v signal to 5v with transistors.
I ended up using 2*NPN transistors and it worked fine (serial communication)

Logged

Australia
Offline Offline
Sr. Member
****
Karma: 13
Posts: 446
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Breakout board for TXB0108.

https://www.adafruit.com/products/395
Logged

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I had a similar question a couple of days ago how to convert a 2.65v signal to 5v with transistors.
I ended up using 2*NPN transistors and it worked fine (serial communication)



Hmm interesting.  I'm going to have to try that before I buy anything TXB010* related.

Just wondering though, but why is R6 necessary?  Why not simply just use R5 and increase the ohms?


@lemming
I saw that later last night and might consider it.  It's a little overkill but at least I don't have to worry about making a mistake.
Logged

Sweden
Offline Offline
Full Member
***
Karma: 1
Posts: 185
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

R5 and R6 are a voltage divider.
In this case the output voltage is 3.33V if the input is 5V.

Vout = (R6 / R5 + R6) * VIN

3.33 = (2 / (1+2)) * 5
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12048
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Just wondering though, but why is R6 necessary?  Why not simply just use R5 and increase the ohms?


To make it switch fast - the divider circuit has a significantly lower impedance than just a high-value
series resistor - the 2k + 2k divider has an impedance of 1k, whereas using a 10k series resistor
would be 10k.  Every input has a few pF of input capacitance and the lower source impedance will drive
that capacitance faster, might make the difference between a 20MHz top frequency and 5MHz,
something like that.
Logged

[ I won't respond to messages, use the forum please ]

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies everyone, and sorry about the late reply - I haven't had much time to work on this until now.

The unidirectional output diagram olof_n showed seems to work fine but it revolves around a 3.3v source - mine is 1.8v.  The transistor I'm using is the 2222A.  What do I need to change to make it accept the 1.8v source?  I tried removing the resistor between the odroid TX and the T1 base, but it didn't seem to make a difference.


The receiving end works fine, I just used 1.1k and 2.2k resistors instead of the 1k and 2k, I switched their positions, and now I seem to get approximately 1.8v.  I have an analog multimeter so I'm not sure how far off from 1.8 I really am but the odroid didn't blow up *knock on wood* and it's receiving data.
« Last Edit: April 21, 2013, 11:43:50 am by schmidtbag » Logged

Offline Offline
Edison Member
*
Karma: 65
Posts: 2499
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The unidirectional output diagram olof_n showed seems to work fine but it revolves around a 3.3v source - mine is 1.8v.  The transistor I'm using is the 2222A.  What do I need to change to make it accept the 1.8v source?
No "1.8V" modifications necessary (exc., perhaps a somewhat lower value for R1?)
I don't see R3 as necessary, T2_B could go directly to junction of T1_C & R2.
I'd consider adding a pulldown on the input (with a >= 22K from T1_B to Gnd.)

I tried removing the resistor between the odroid TX and the T1 base, but it didn't seem to make a difference.
So, I guess you tried that out and "no joy".  Perhaps a wiring error? 
Don't remove resistors recklessly.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I added a 27K from T1_B to gnd and it seemed to make the problem worse.  Before, simply nothing was happening, but now on odroid when I run "cat /dev/zero > /dev/ttySAC1", it claims there's an I/O error and stops.  However, it doesn't fail if I unplug the wire at T2_C.

I quadruple checked everything.  Like I said, it seems to work but only if the voltage is high enough.  If I try putting the 3.3v source from the arduino at the T1_B and then use the multimeter to check T2_C, the output is about 5v.  As a side note, when doing that (in the current setup), I've noticed T1_B is only getting about 1.5v.  Seems like a lot of resistance over there.
Logged

Offline Offline
Edison Member
*
Karma: 65
Posts: 2499
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are doing like so:



  ?
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Newburyport, MA
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that is how I have it set up.  But the picture you supplied confuses me a little.  T1 and T2 are NPN, but the transistor you showed me in the picture is, if I'm not mistaken, PNP:
http://3.bp.blogspot.com/-iTo2cABnytE/UAmCx3gD34I/AAAAAAAAFBc/_xjB__ClEuI/s1600/NPNvsPNP.png
« Last Edit: April 21, 2013, 04:58:11 pm by schmidtbag » Logged

Pages: [1] 2   Go Up
Jump to: