GarrettVD
Posts: 9
Joined: Wed Feb 27, 2013 7:41 pm

GPIO pin states on startup

Tue Sep 10, 2013 3:06 pm

Hi,

I'm working on a project where I am controlling a 5v active-low relay via a 74HC95 shift register, controlled via the GPIO pins of the Raspberry Pi. Everything is working perfectly, however, when the Raspberry Pi powers up, the state of GPIO can be unpredictable and is causing my relay (and subsequent attached periphery) to activate when it should not.

Question: Is there a way to (programatically) control the state of the GPIO pins as soon as the device is powered on? I was thinking of created a script and updating the rc.local to set the state. But I am not sure if this will be activated quickly enough. Also considering using NPN transistors to control the 5V power to the relay, controlled by a GPIO as the Base; but not sure which one to use, or which pin(s) are guaranteed low on startup.

Thanks,

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: GPIO pin states on startup

Tue Sep 10, 2013 3:11 pm

A quick google search for "raspberry pi gpio pin state on boot" yields:

http://www.raspberrypi.org/phpBB3/viewt ... 63&t=50423

It's not an exact answer to your question, but it's a good start
Dear forum: Play nice ;-)

Return to “Interfacing (DSI, CSI, I2C, etc.)”