Skip to content

A PiHAT for converting the Raspberry Pi I²C Signals from 3.3V levels to 5V levels, which is usefull if you want to interface with I²C-components that use 5V voltage levels.

License

Notifications You must be signed in to change notification settings

FelixWeichselgartner/RPi-I2C-LevelShifter

Repository files navigation

Raspberry Pi I²C Level-Shifter

A PiHAT for converting the Raspberry Pi I²C Signals from 3.3V levels to 5V levels, which is usefull if you want to interface with I²C-components that use 5V voltage levels. The project aims to save time in wiring up an external level-shifter and just plug a shield on top of the gpio pins of the Raspberry Pi.

Schematics, Layout

schematic


layout


Application

This is how the module is supposed to be used:

On Raspberry Pi 3B+:

3b+


On Raspberry Pi Compute Module 4 IO Board:

cm4


Testing

I tested the pcb, however I hand-soldered everything (which I can definitely not recommend). Everything is soldered exactly like in the schematic, even though I placed some parts differently.

Here is how my prototype looks like:

pcb



And here are my oscilloscope measurements on level shifting a rectangular pulse with the following frequencies:

40kHz:

osci_40kHz


200kHz:

osci_200kHz


500kHz (from here on it doesn't seem to be able to reach the full 5V):

osci_500kHz


This behaviours is confirmed by simulation.

And here a screenshot of the included LT-Spice simulation:

simulation_low_freq


And here a simulation of high frequencies. This shows (as the real graph above) that the mosfet is too slow for MHz frequencies. Replace the mosfet with a faster one if you have to a high frequency application.

simulation_high_freq


Dependencies

2N7002 MOSFET library (lbr/transistors_gaui.lbr):

License

The project is licensed under the MIT-License. For further information see LICENSE.md.

About

A PiHAT for converting the Raspberry Pi I²C Signals from 3.3V levels to 5V levels, which is usefull if you want to interface with I²C-components that use 5V voltage levels.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published