Here are some notes on different level-shifting strategies to convert from 5V to 3.3V circuits. As usual, this is for quick-and-dirty stuff.
I searched the Internet, found a couple of appealing strategies, and tried them out. I connected them to an Arduino output that cycled between high and low, and connected an oscilloscope to the output.
This is a very simple strategy with few parts that I found on Rob Faludi’s page XBee Level Shifting. This is what I saw on the scope:
It’s been too many years since I’ve been in school to remember my analogue electronics, so at first this surprised me. Top to bottom is approximately 3.3V, but the huge rise and fall times were not what I expected.
I suspected that the 10k resistor was the culprit, (e.g. see Effects of Varying I2C Pull-Up Resistors), and threw in a 220 ohm resistor as an opposite extreme. The results were much more promising. The falling edge is very sloppy, but the rising edge is pretty crisp.
This is a variation on the first, but relying on the zener to limit voltage to 3.3V. The 10k ohm resistor I found on more than one site, so I tried it first of all.
This produced the following on the scope:
This is atrocious with a 10k resistor in there. Switching to the other extreme, the 220 ohm resistor, I got the following beautiful display. The falling edge has some roundoff on the bottom, but it demonstrates that the zener diode’s a viable quick and dirty level shifter.
The last strategy I tried uses a 74LVC245 bus transceiver.
Using an actual IC is a little heavy-handed for a single line, but the results were solid.
Because 3.3V is 2/3 of 5V, it’s easy to create a voltage divider out of resistors.
Using 10k resistors produced the familiar shape:
While dropping down to the other extreme, 200 ohms, produced a solid waveform:
Demonstrating that if you need a dirt simple level shifter, three resistors may do in a pinch. However! Danger! Danger! The impedance of the surrounding circuitry will wreck havoc with the voltage divider. I really do not recommend this method.