Pages: [1]   Go Down
Author Topic: Interfacing 3.3v CMOS and 5v TTL  (Read 4197 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I have an Arduino Mega 2560 and I've got a Nokia 6100 Knock-off LCD screen and an RN41 Bluetooth module.
I'm planning to have the arduino control some motors for a telescope and have a laptop send signals to the arduino telescope controller via bluetooth and to have it display various things on the LCD screen to aid debugging and so on.

I can control both from the arduino using serial communication but my problem is that the i/o pins on the arduino are 5v TTL but the screen & bluetooth are both 3.3v CMOS. A while back I came across an IC that allowed bidirectional communication between the 2 - a kind of buffer /  translator thing, with them both being electrically isolated from each other. Now I come to try to do the programming and electronics I can't seem to find the chip I identified a while back as being what I needed.

I want a single IC solution without having to fiddle with putting in any extra resistors / capacitors etc. Does anyone know of any suitable chips ? Do I need something from the 74HCT family or are there any optocoupler type things that would be better ?

Thanks,

Emyr
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Too bad you don't want to use resistors.  That's works for me.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For 5v ->3v yes a simple voltage divider would suffice, but what about going the other way ? Need bidirectional communication.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think this might do it...

http://focus.ti.com/lit/ds/symlink/txb0108.pdf
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you're going to use this IC make sure your Rx/Tx lines can source at least 2mA or else it won't work.  If they can't source at least 2mA you can switch to the TXS series IC instead as long as your data rate is below 20MHz.
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The AHC series has 5V tolerant inputs. These are not isolated.

There should be parts in the series that are bi-directional.

(* jcl *)
Logged


0
Offline Offline
Shannon Member
****
Karma: 220
Posts: 12702
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino can read 3V3 CMOS signals directly, and a resistor divider will work the other way. At 5V supply the 328 recognises low as less than 1.5v and high as more than 3.0v - so its just within spec.
Logged

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

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The case I can see for a bi-directional level shifter would be for a bi-directional signal such as 1-Wire or a shared data bus.

For simple cases, two resistors for 5V->3.3V and nothing for 3.3V->5V.  Two equal resistors of 1K to 10K will work, giving a logic level of 2.5V, but a high-side resistor of 2.2K and a low-side resistor of 3.3K will get 3V, much closer to 3.3V.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Minnesota, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Resistor dividers work but only up to a certain data rate. For faster data rates it is recommended to use the following type of tranciever device:

The type of device you're thinking of is a 74LVC245

http://focus.ti.com/lit/ds/symlink/sn74lvc245a.pdf


Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Resistor dividers work but only up to a certain data rate. For faster data rates it is recommended to use the following type of tranciever device:

The type of device you're thinking of is a 74LVC245

http://focus.ti.com/lit/ds/symlink/sn74lvc245a.pdf




I don't necessarily agree with that. A simple two resistor divider would not be speed limited, only if there was a large capacitance associated with the load would there then be a R/C time constant to be concerned about.

My take on voltage divider Vs voltage translator is mostly dependent on the input impedance of the load being driven at the reduced voltage level.

Lefty
Logged

Minnesota, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The type of device you're thinking of is a 74LVC245

http://focus.ti.com/lit/ds/symlink/sn74lvc245a.pdf

I don't necessarily agree with that. A simple two resistor divider would not be speed limited, only if there was a large capacitance associated with the load would there then be a R/C time constant to be concerned about.

My take on voltage divider Vs voltage translator is mostly dependent on the input impedance of the load being driven at the reduced voltage level.

Lefty

If you're dealing with your standard 9600 baud resistor divider will not be a problem. Capacitance isn't the only thing going on, your average resistor also has inductance. There is a reason the tranciever I linked has been invented and standardly used. Our original poster also stated a desire to buffer the two circuits.

Original poster, if you want I can also link up some trancievers that do bidirectional with individual directional controls/output enables, as the one I gave you can only do one direction at a time.
« Last Edit: June 26, 2011, 03:51:36 pm by dshay » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Original poster, if you want I can also link up some trancievers that do bidirectional with individual directional controls/output enables, as the one I gave you can only do one direction at a time.

Well at a higher level the OP says he just needs to interface two serial devices, a bluetooth modem and a serial LCD to his arduino, but that the devices were 3.3vdc and an arduino is 5vdc.

As a 3.3vdc signal can be wired to an arduino input pin without modification and two simple voltage dividers can handle both the arduino 5vdc to 3.3vdc pins used for serial output,  I see little reason to spend the costs and board space for voltage translator devices. I run a simple 3.3vdc bluetooth modem at 57,600 baud with no problems using just a divider for the 5v to 3v signal line.

 Not saying there is anything wrong with using active voltage translation devices, just that for many applications a simple voltage divider is all that is required. I just suggest that a serial LCD display and a bluetooth modem are two such applications.

Lefty
  
« Last Edit: June 26, 2011, 04:15:51 pm by retrolefty » Logged

Vancouver, Canada
Offline Offline
Newbie
*
Karma: 1
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do I need something from the 74HCT family or are there any optocoupler type things that would be better ?


I use a 74HC4050 as a 5v to 3.3v translator and it works well.
Logged

-=Bryan=-

Pages: [1]   Go Up
Jump to: