TXB0108 8 Channel Level Shifter

Level Shifter
Click Here to View Larger Image

    Quick Start with TXB0108 Logic Level Shifter

    Using the TXB0108 Logic Level Shifter this quick start will show how to connect a UART channel between Beagle Bone Black (logic level 3.3V) and a Teensy 2.0 (logic level 5V). To validate the connection we will send an “a” from the Beagle Bone Black to the Teensy 2.0 and the Teensy will automatically respond with “Hello World”.


    • TXB0108 logic level shifter
    • Male header
    • Female to female jumper wires
    • Teensy 2.0 microcontroller
    • USB to USB-mini
    • Beagle Bone Black (BBB)


    1. Solder male header pins on the module. If you have not assembled the Teensy 2.0 board yet, do it now.
    2. Level Shifter
    3. Using the jumper wires connect all devices:
      *Note: You must have a common Ground between all devices. I used a breadboard to make a common ground node.
    4. Level Shifter Level Shifter
    5. Load the example code RS232.hex on to the teensy using the Teensy bootloader.
    6. Level Shifter
    7. Open Putty on your PC and connect to your BBB. If you do now know how to connect your beagle bone via Putty, follow this tutorial.
    8. Once you are connected to the internet and have Putty running execute the following commands:
      • sudo apt-get update
      • sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus –y
      • sudo pip install Adafruit_BBIO pyserial
    9. In a text editor create the following program on your BBB or import the teensy.py file provided:
    10. import serial
      					import Adafruit_BBIO.UART as UART 
      					UART.setup("UART2") #initialize BBB UART to use UART 02 
      					ser = serial.Serial(port = "/dev/ttyO2", baudrate=9600, timeout=4) #open comms with the teensy
      					if ser.isOpen(): #check if we can write something to serial
      					print "Teensy serial is open!"
      					ser.write("a") #send to teensy
      					buf = ser.readline() #grab the response from the teensy
      					print buf
    11. Execute the following command:
      • python teensy.py
      • Enter “a” to initiate communication
    12. Level Shifter
    13. Congratulations you have successfully used the TXB0108 Logic Level Shifter to make a UART channel between your BBB and Teensy 2.0!