King_Mudkip
Posts: 5
Joined: Tue Feb 24, 2015 6:59 am

Having a GPIO pin export a signal during bootup

Tue Feb 24, 2015 7:05 am

Hello, I am currently making a device which I want to run during the raspberry pi's bootup.

I have decided to do this by having a GPIO pin switch onto 'high' when the powers on, and stop once the Bootup is complete, however, after much research (approx. 10 mins of Googling) I cannot find any explanations on how to do this. I understand that it would probably require me to modify the boot code in some way, But again, I have no idea how to do that.

Help?

mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Re: Having a GPIO pin export a signal during bootup

Tue Feb 24, 2015 11:37 am

Can you explain better?
Do you want to have in gpio the moment on when the boot starts and when the boot is completed?
Run something when the boot is completed is too late?
www. ???
www. ???
GMT+1
Skype: mrdebug

King_Mudkip
Posts: 5
Joined: Tue Feb 24, 2015 6:59 am

Re: Having a GPIO pin export a signal during bootup

Tue Feb 24, 2015 11:54 am

Basically I have this'll little circuit that I made A while ago that has a little Spinning LED loading wheel, And I thought it could be cool to have it turn on during boot up.

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Having a GPIO pin export a signal during bootup

Tue Feb 24, 2015 12:19 pm

Hi,
Try a basic drive circuity, need two 4k7 resistor, one NPN transistor (2N2222, 2N3904, BC548, etc).
Choose a gpio pin. Connect two resistor to this pin (one lead of each). One of remain resistor lead to 3v3, and other to base of transistor.
Transistor emitter to GND.
Collector to - of you device, and + of device to VCC need to power it. Or other logic to start/power you device.
All GND (- of battery or other PSU) need to interconnected.
If power are applied to RPi, GPIO start at high impedance (input), a current flow across two resistor and base emitter of transistor, biasing and flow current on emitter collector.
At end of boot process, put this pin on output mode and set to low. Transistor de-biased and open emitter collector, powering off you device.

King_Mudkip
Posts: 5
Joined: Tue Feb 24, 2015 6:59 am

Re: Having a GPIO pin export a signal during bootup

Tue Feb 24, 2015 12:33 pm

Im not quite sure I know what you mean (im new to this), could you draw a diagram?

Return to “General discussion”