Main Site Documentation

Panda II OutputPort goes high when RST button is pressed


I’ve got a Panda II and I’m trying to run a set of relays with it. I’ve previously posted about the project:

I thought maybe that the output ports were simply in an undefined state upon reboot (the so-called “third state”), but it appears it is not. It’s very definitely going “high” to about ~0.8V upon reset for about 2-3 seconds, and then dropping to zero (I assume just as I initialize the OutputPort). This is enough to trigger the transistor (2N2222) I have connected to that port (through a 2k2 resistor).

I tried putting a 47k resistor between the port and ground, but that did not work.

I tried using a different GPIO pin, but that did not work either (tried Di8 and Di20).

What can I do to prevent this? Should I use a smaller value resistor between the port and ground? The folks over at seem to think that the MCU shouldn’t change port states just because it was reset.


This came up numerous times on this forum so search should show many answers.

But anyway, all pins are defaulted to inputs with internal pull up resistors enabled. Those are about 50K


I see in you recommended a 1k external pulldown to prevent the pin going high upon startup. That’s fine, but does that mean I’ll be pulling ~3.3mA through the pin all the time, or just during startup?


Correct, you will pull 3.3ma as long as the pin is set high. You can experiment with higher values.


I’ll have 16 of these pins, at what point should I worry about how much power I’m drawing through the FEZ?


I had this problem too. If you’re using a bread board there is a quick and easy fix. My friend suggested that you have a pin allocated to “enable” which you drive low at the beginning of the program. Essentially, you disable all the inputs on your breadboard when the “enable” pin is high (i.e. when you reset your board) then when the program finally initializes, the first thing you do is drive in the pin low to re-enable all your other pins.


How would you arrange this sort of thing? A PNP transistor maybe on the 5V line that drives all my SSRs?

I’m not experienced at all in hardware design…


It struck me that I might be able to use a PNP transistor as a switch instead of an NPN. That way, I can simply keep the output high, and my solenoids wouldn’t switch on upon reset. Sound like a viable plan? Downsides?


PNP is a no-go, since I’m driving the transistor from 5V and the output is only 3.3V. I just experimented a bit with pulldowns and it seems a 10K will do the trick. That’s not much current, so I can live with it.