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.
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?
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.
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.
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.
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.
Disconnect "the circuit" from the RPi.
If you put the input resistor to +5 then T1's collector should be Gnd/0V and T2's collector should be +5.
If you put the input resistor to Gnd then T1's collector should be +5 and T2's collector should be Gnd/0V.
If you have access to the RPi's "1.8V", do the same using that instead +5 for the input.
I hope we have the Grounds in common: the RPi's goes to the circuit's goes to the TTL device's. Please confirm.
Apparently I had the transistors in backwards, not much of a surprise since I'm pretty terrible with electronics. Anyways, it seems to have a better end result but it's not the end result I'm looking for. The situation is if I replace the odroid TX with the 1.8v source (also from the odroid), T2_C shows the 5v as it should - I didn't get that far before with the transistors in backwards. However, doing this seems to make the odroid crash, as though it's draining all of it's power just for this serial port. I am running the system in a lower power rating than recommended, but I currently have no display, no USB devices, or processor intensive tasks running. When using the actual TX pin from odroid, the arduino doesn't seem to read it but the multimeter seems to show results.