Bi-Directional Logic Level Converter Hookup Guide
Before you can plug the converter into your system, you’ll need to solder something into it. There are a lot of options here. You could solder straight male headers in, and plug it right into a breadboard. Or perhaps you want to solder wires directly into it. Pick an assembly method that melds with how you intend to use the board.
Once your BD-LLC is soldered up, it's time to hook it up. Your hookup will probably vary depending on which communication interface you're using. Below we'll show how to hook the level converter for three of the most common communication protocols.
Using the BD-LLC for Serial
Although you won't be taking advantage of the BD-LCC's bi-directional abilities, it's perfectly fine to use the board to shift serial communication. Serial usually requires two signal wires -- RX (receive) and TX (transmit) -- which both have a defined direction. These signals can be passed through any of the four channels on the BD-LLC.
Make sure LV is powered at 3.3V, and HV is at 5V. Double-check that the channels match up, and a-shifting you will go! You've even got two extra channels to shift as you please.
Using the BD-LLC for SPI
The BD-LLC's four channels are a perfect match for most SPI communications. SPI usually requires four wires: MOSI (master out, slave in), MISO (master in, slave out), SCLK (serial clock), and CS (chip select). These four wires can each be routed through a channel on the BD-LLC.
For example, if you wanted to connect an Arduino to an ADXL345 Breakout Board, which has an operating range of 2.0-3.6V, here's how the BD-LLC could be spliced in:
Since each of the channels on the BD-LLC are bi-directional any of the four SPI lines can go through any of the BD-LLC's four channels.
Using the BD-LLC for I2C
I2C is the communication standard where the BD-LLC really shines, because it requires that both data and clock signals -- SDA and SCL -- be bi-directional. Each of those lines can be passed through any of the BD-LLC's level-shifting channels.
For this example, let's keep using the ADXL345 breakout but instead swap over to the I2C interface. We can even add another I2C device...how about the L3G4200D Gyroscope Breakout. Since I2C is only a two-wire interface, we have room on the BD-LLC to fit in a couple of extra signals, like the interrupt outputs from each board
The two 3.3V I2C devices can both share the same level shifted SDA and SCL lines. Even more I2C device can be added, as long as they have unique addresses.