I want to use the Raspberry Pi's 3.3v GPIO pins to control whether a 5v LCD screen is on or off. The Raspberry Pi has a 5v pin but it cannot be turned on or off using Python or similar. Only the 3.3v GPIO pins can.

Therefore, to do this I want to use a CD40109BE level shifter (datasheet) to shift the GPIO pin's voltage from 3.3v to 5v but I'm not quite sure how to connect it up.

Here's a schematic of what I want to do with the chip:


simulate this circuit – Schematic created using CircuitLab

But how would I do it? What pins and components would I need to use? I tried the schematic from this answer but it didn't seem to work for me and I only want to use a single input and output.

Thank you

  • \$\begingroup\$ Welcome to EE.SE, Billy. You need to include a datasheet link for the LCD so we know what type of input it has. Please edit your post to include it there. \$\endgroup\$
    – Transistor
    Commented Nov 27, 2017 at 18:19
  • \$\begingroup\$ Hello, the LCD screen does not have a datasheet but here is a link to the product. amzn.eu/6OWDXoW \$\endgroup\$
    – Billy
    Commented Nov 27, 2017 at 19:09
  • 1
    \$\begingroup\$ "I tried the schematic from this answer but it didn't seem to work" - that schematic should work if you put +3.3V on pin 1 and +5V on pin 16. Exactly how do you expect the output to turn the LCD on and off? (CD40109 output can only source ~0.5mA, so it could control a switch but can't supply power directly to the LCD). \$\endgroup\$ Commented Nov 27, 2017 at 19:13

1 Answer 1


That is an TC1602A-01T display and the datasheet was found by searching for "1602 LCD datasheet".

The CD40109BE is designed for shifting logic-level signals. In your case you want to switch the backlight on and off. Reading the datasheet reveals:

enter image description here

Figure 1. Datasheet extract. Note the warning!

The CD40109BE is not suitable for switching 100 mA.

enter image description here

Figure 2. R1 limits the current to a safe value. Q1 allows switching from a 3.3 V GPIO. Source: 1602 LCD backlight LED.

\$ R_1 = \frac {V_{SS}–4.1}{0.1 } \$

For a 5 V supply this would give R1 = 9 Ω. The nearest standard value is 10 Ω and this would be fine.

  • \$\begingroup\$ Thank you. This seems to be working except for the fact that when the LCD screen is off, it is ~3v when it should be 0v. 3v still shows the backlight. (nb: My R1 is 100Ω because I don't have any 10Ω resistors) \$\endgroup\$
    – Billy
    Commented Nov 27, 2017 at 20:59
  • \$\begingroup\$ (1) "... it is ~3v when it should be 0v." What is? Please reference the schematic. For example, "I measure 3 V between A and GND when the GPIO pin reads 0.2 V." (2) Put 3, 4 or 5 x 100 Ω resistors in parallel. \$ R = \frac {100}{n} \$ where n is the number of resistors. (3) What value is R2. (4) What transistor did you use? \$\endgroup\$
    – Transistor
    Commented Nov 27, 2017 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.