steveRoss
Posts: 2
Joined: Thu Jul 03, 2014 5:20 pm

GPIO output

Thu Jul 03, 2014 5:31 pm

Hello, I am a newbe to the Raspberry pi and very interested in using the GPIO of the pi.

I am looking at using the GPIO to drive 5v relays. I have read the pins are set to 3.3 and 5v will hurt the chip. I am thinking that all inputs should be tied to 3.3v pin but outputs tied to the 5v pins draw from the power supply and the max current is what the supply will push - board current (700mA). If I hook 8 relays (Christmas lights controls) to the 5v line, will I hurt the Pi? What is the 5v pins used for and what should I be concerned about them.

Also where do I find a command listing of all the functions of the GPIO (IE GPIO.Cleanup, GPI.out)

User avatar
croston
Posts: 708
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: GPIO output

Thu Jul 03, 2014 6:08 pm

RPi.GPIO documentation can be found here --> http://sourceforge.net/p/raspberry-gpio ... /Examples/

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: GPIO output

Thu Jul 03, 2014 6:22 pm

...or you could go for the easy option and buy a relay board specifically designed for the Pi's 3.3V GPIO outputs
https://www.google.co.uk/search?q=raspb ... elay+board

edit: and there's a whole bunch of great tutorials over at http://raspi.tv/rpi-gpio

User avatar
joan
Posts: 14960
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: GPIO output

Thu Jul 03, 2014 6:25 pm

If you do go for a relay board it may be sensible to post a link to the model you plan to buy. Just to double check it is indeed compatible with the Pi.

steveRoss
Posts: 2
Joined: Thu Jul 03, 2014 5:20 pm

Re: GPIO output

Fri Jul 04, 2014 12:11 am

Thanks, those documents have helped me understand the GPIO functions a lot more.

What is the actual voltage of the output pin when I tell it to go High? Is it 3.3v or 5v? If I have it tied to a 5v relay will it actually be 3.3 v and the relay will consider it a high. Will I hurt the output pin if I apply 5v to it?

Thanks.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: GPIO output

Fri Jul 04, 2014 12:29 am

steveRoss wrote:What is the actual voltage of the output pin when I tell it to go High? Is it 3.3v or 5v?
3.3V - everything to do with the Pi's GPIOs is always 3.3V ;) (or GND of course)
If I have it tied to a 5v relay will it actually be 3.3 v and the relay will consider it a high.
Depends how 'sensitive' the relay (or it's driver circuit, if it has one) is, as to whether 3.3V will be 'enough' to switch it or not. The Pi's GPIO pins also have limited output current.
Will I hurt the output pin if I apply 5v to it?
Dunno. But it certainly doesn't seem worth the risk. ('hurting' a GPIO pin is irreversible, and makes it unusable)

User avatar
Cancelor
Posts: 777
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: GPIO output

Fri Jul 04, 2014 6:52 am

12v produces smoke!!!! :(

5v will be just a permanent.
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

Return to “Beginners”