Logical level converters

Logical level converters

Active today
Viewed 30 times

Is there a way to change GPIO function to use it as 5v power pin. Because all of the power pin used for the Touch Screen.

  • You can use the 5V output of the RPi and the 3.3V GPIO output with Bi-Directional Logic Level Converter using N-channel MOSFET and resistors. If you need to build the logic converter. – Ephemeral 6 hours ago
  • Hi @Thang Nguyen, Welcome and nice to meet you. Ah, let me see. First, one clarification. (1) The Rpi has a 40 pin connector. Some pins are “power” pins which supplies 3V or 5V power to a device who takes power do work, eg a relay.. Beside power pins, there are also “GPIO” (General Purpose Input Output) pins which input/read/receive logic level (High or Low) signals from device such as sensors, or output/write/send logic levels to outside devices such as a LED (Or to signal input of relay to switch it on (Note 1). – tlfong01 5 hours ago
  • Rpi’s logic is 3V3, means signal below around 1V means Low level, above around 3V means High level. Note 1. So you see, a relay’s power terminal takes power from Rpi’s power pin, at the same time reads Rpi’s GPIO output/control signal to turn on or off the the relay switch. – tlfong01 5 hours ago
  • Now there are two kinds of logic family: (1) 5V or TTL logc with below 1V as Low, and very roughly above 4V meas High. (Old type of )Arduino and many other devices use 5V logic. (2) Rpi and other smaller guys use 3V logic. Now the problem is that 3V logic guys don’t know how to talk to 5V logic guys. Now I guess your question is this: “How to convert/shift/step up 3V logic signals to 5V logic signals? – tlfong01 5 hours ago
  • Actually there is another confusion: A Rpi GPIO pin in output mode can output/write/send output Logical High signal to a device say LED. This time the GPIO pin while sending an output signal, is at the same time giving power to the LED to turn it on. The LED takes at most 20mA, so the Rpi GPIO pin can entertain. But what about there is a “strong” LED which take 50mA? In other words, we need to shift up Rpi GPIO pin , also need to make it stronger to supply more current. – tlfong01 4 hours ago
  • Of course the EE guys always have a solution, actually many many solutions, killing two birds with one stone, shifting the GPIO guy higher and making it stronger. Ah, it is 5:30pm, my jogging time, so I will call it day. See you tomorrow. You may like to read my answer to the following question to find many ways to make logic level up/low shifter or converter: raspberrypi.stackexchange.com/questions/27928/…. Cheers. – tlfong01 4 hours ago
  • Ah, one more confusion, I mentioned logical level shifting device, but actually there are single/mono directional “shift up” only, “shift down only” circuits, and also “bidirectional, automatic shift up/down converters, … Isn’t confusing! – tlfong01 4 hours ago
  • The 6 or 7 level converters I referred above each has pros and cons. For example, if you are doing I2C, you don’t have much choice but MOSFET modules (TSX/TBX 0102/04/08). But if you want 9V or 12V logic, and only one channel, then 2N2222 with max sink current of 500mA is perhaps the best. If want 4 channels with strong current, you might like HCT125. And HCT25 and TBX 010x have chip select/enable inputs for you to demux, so if very flexible for prototyping and troubleshooting. you want to DIY everything, here are more references: penzu.com/p/ac4c4419. – tlfong01 4 mins ago   Edit


All the Pi GPIO are 3V3 (and can only supply about 20 milliamps).


Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: