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.
Asked
Active
Viewed 869 times
0
-
1Hi @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 Jan 04 '20 at 09:13
-
1Rpi'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 Jan 04 '20 at 09:16
-
1Now 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 Jan 04 '20 at 09:22
-
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 Jan 04 '20 at 09:30
-
1Of 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: https://raspberrypi.stackexchange.com/questions/27928/power-a-5v-relay-from-gpio-pins. Cheers. – tlfong01 Jan 04 '20 at 09:35
-
1Ah, 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 Jan 04 '20 at 09:44
-
1The 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: https://penzu.com/p/ac4c4419. – tlfong01 Jan 04 '20 at 14:25
-
nobody commented with the simplest possible answer - use the gpio pin to drive an NPN transistor - 3v will flip the transistor that can let 5v pass through – bsautner Feb 16 '22 at 15:53