Author Options:

Arduino UART communication quandary Answered

I'm trying to hook up a 5v Arduino to a 3.3v datalogger. I just realized that in all the time I have been messing around with micro controllers, I have never communicated serially to a device that wasn't 5V. I was about to just wire the two devices together when I thought better of it and figured I should look into the matter a little further. Can I just directly connect the RX pin on the 3.3V device to the TX pin on the Arduino? Or do I need to add a resistor in-between? Or a voltage divider? Actually, that wasn't all that many questions. Basically, I'm just wondering what is good form in communicating between devices of varying voltages?

3 Replies

randofo (author)2008-04-15

Thanks for the Sparkfun link. I think I may try their resistor setup and see how that goes. I don't think the Arduino itself can be run at 3v, but I think the chip might be able to. I'd program it, remove it from the Arduino and then run it at 3v, but I want to try to keep this project as simple as possible so that other people can easily replicate it.

Select as Best AnswerUndo Best Answer

westfw (author)randofo2008-04-17

There isn't much to Arduino other than the chip, but you'd need to change regulators and such, and probably run at a lower clock rate. Last time I looked at the data sheet, the ATmegaXXX wouldn't quite run 16MHz at 3V. (IIRC, Arduino lilypad does 8MHz at 3V ?)

Select as Best AnswerUndo Best Answer

gmoon (author)2008-04-15

Any possiblity that an Arduino can be run @ 3.3V? I've always used AVRs that would work at the voltage of the other device...

Failing that, the standard way is to use a mosfet to translate the voltage. It's in the i2c specs (maybe even SPI, too.) You can find the full specs on the i2c PDF, or here's a link with just the level shifter. (i2c is what Atmel calls a "2-wire Serial Interface")

Sparkfun has a page with some simpler current-limiting resistors (as well as the mosfet shifter), but I've never tried just the resistors. That page is here....

Good luck.

Select as Best AnswerUndo Best Answer