Page 1 of 1
Setting up GPIO to supply 5V (ON or OFF)
Posted: Fri Dec 22, 2017 10:42 am
by GladiTek
Hello, I'm a long time lurker of these forums but only now decided to register to ask you this specific question:
Is it possible to supply 5V with any free GPIOs on the board? Also is it possible to turn it ON/OFF with a script?
I have a protoype board that needs 5V supply when the value is "1" and 0V when value "0".
I'm still fairly new to python and raspberry I/O so any help is appreciated.
Re: Setting up GPIO to supply 5V (ON or OFF)
Posted: Fri Dec 22, 2017 1:14 pm
by mahjongg
No its is not, at least not without more hardware.
All GPIO's (of any RPI) are 3.3V only.
There are 5V headers on the GPIO pinheader, but they just distribute 5V from the power supply directly.
Just use a transistor as a switch to control the current running through a 5V powered device.
Re: Setting up GPIO to supply 5V (ON or OFF)
Posted: Fri Dec 22, 2017 10:08 pm
by pcmanbob
Depending on what it is you want to drive with this 5v there are other options besides a transistor.
You can use a 74HC125 or SN7407 to level shift the 3.3v of the gpio output to 5v you could also use an opto-isolator to switch the 5v.
It just depends what it is you are trying to drive with the 5v and how many outputs you need at 5v.
all the above can be driven from the GPIO using python and simple gpio output commands to give 5v or 0v.
Re: Setting up GPIO to supply 5V (ON or OFF)
Posted: Wed Dec 27, 2017 9:31 am
by GladiTek
Hello, thank you for your replies.
At the end the engineer of the prototype board told me it's not important to have 5V (even though he stated otherwise before) so I just use regular 3.3v output as value "1" for now.
Still very useful info, thank you everyone.