Mixing 3.3v and 5v devices in Microcontroller Projects

Quite often these days I'm presented with a project that has to mix between 3.3v and 5v devices. Interconnecting these devices is made a lot easier with the use of bidirectional logic level shifters.

Two of these devices that are fairly easy to obtain in Japan are the PCA9306 module from Akizuki Denshi at 150 yen and the BOB-12009 from Sparkfun, available for 310 yen from Sengoku.

The PCA9306 is a 2-channel logic shifter intended for a I2C SDA/SDL pair and uses a TI chip purpose designed for this. The Akizuki Denshi module implements the datasheet reference circuit for this device on a small 10.5x11mm breakout board with an 8-pin header that will easily solder to a pinheader and fit over the centre gap of a breakout board. The pinout is conveniently split with all high-voltage on one side and all low-voltage on the other. All you need to do is connect up the two Vcc rails, a ground and your signals on each side.

The Sparkfun module is a 4-channel shifter using BSS-138 MOSFETs. Due to the extra channels the board is over 50% larger at 13.3x16mm and unfortunately 2.5mm wider between pin rows, meaning it doesn't exactly match the centre gap in a breadboard. Pinout is similar, with all high-voltage signals on one side and all low-voltage on the other. Header pins are not provided but the pitch is the standard 2.5mm.

Personally I prefer the Akizuki Denshi board if I'm only going to be using the 2 channels for one I2C or similar device but both boards do the job.