Most projects using a 5v Arduino board for robots are going to run into some 3.3v circuits at some point. This might be the serial line coming from a G1 Android phone or an inexpensive Bluetooth module. To deal with this properly you’ll want to be able to convert the voltage going in and out of the Arduino to work properly with these devices.
Let’s look at two options, starting with the least expensive, but more complicate method we started with in 2009. This involves using a $0.25 hex inverter chip such as an 74LS04 chip and two resistors. We used this to send the 3.3v signal from the phone into the chip, back out at 5v but inverted (0′s were 1′s and 1′s were 0′s), and then through again to come out properly at 5v.
Handling the 5v to 3.3v side of things is even easier with two resistors. We used a 20k and a 39k resistor as described here on Make Things, but we’ve also used a 1.8k and a 3.1k as described here. Both did the job just fine and made sure we didn’t fry our phone or Bluetooth module.
The above method has served us well but we’re moving on to using this $2 logic level converter from Sparkfun.
It supports two channels of conversion and we’re only using one so far. You simply connect it to your 3.3v and 5v power sources and it handles converting the signal in and out. You can use the Arduino for both power sources since they typically provide you one of each level, even though the RX/TX pins are always 5v. All you need is a little soldering when you get the board to connect the header pins and it will plug right into your breadboard.
Some of you have pointed out that the Arduino will often treat as 3.3v RX serial input just fine. We’ve tested this as well and found it usually works. You’ll still want to lower the returning TX voltage going back down to 3.3v to not damage your phone or Bluetooth module. To be safe though we recommend using the proper conversion each way to avoid headaches by eliminating the chances that something isn’t reading right.
We’ve posted some additional pictures of what we’re doing in our gallery and embedded it below for convenience. Read the captions to see what is going on in each shot and reach out to the Cellbots discussion group if you need a hand or want to share some tips of your own.