Do all GPIO pins have to start at same value? (high or low)

I’ve configured two GPIO pins:

  1. Relay for camera shutter trigger
  2. Hot-shoe input

Do both these GPIO pins have to be the same level (high or low) when the flight controller boots up?

Testing on my workbench, setting RELAY_DEFAULT sets the initial levels of both GPIO pins. Is there any way I could set parameters so one GPIO initiates LOW and the other GPIO initiates HIGH?

The reason for my question is that my camera’s docs direct to set RELAY_DEFAULT=1. The camera expects the relay to go LOW to trigger the shutter.

The problem is that with RELAY_DEFAULT=1, the signal pin on the GPIO used for hot-shoe input has a positive 3.5V. Through testing, it appears the hot-shoe works best when the GPIO signal pin is LOW, and has no voltage.

As it happens, the GPIO relay will still trigger the the shutter if I set RELAY_DEFAULT=0 - but I’d feel better if each GPIO powered up to the recommended states.

GPIO output.
See this discussion. For practical effects GPIO PWM outputs start as inputs till being programmed; in that case the external electronics saw high inputs on PWM signals and moved the motors during some instants. Soldering pulldowns solved the problem perfectly.

GPIO input.
For assurance and unless the internal electronics (external and on the FC) are perfectly known I would place pullups or pulldowns (choose the safest alternative).

Thank you Webillo -

I appreciate your reference discussion link - although I’m not sure I have the electronics expertise to fully grasp it’s significance.

When I first installed this particular hot-shoe with RELAY_DEFAULT=1, I implemented a pull-up resistor to eliminate the float causing the ISR Flood. It worked - but after 24 hour hours - it mysteriously stopped working. It’s really unsettling not to be able to explain why.

My work-around was to set RELAY_DEFAULT=0 and connecting the hot-shoe signal wire to the Aux port with an in-line 2K resistor. That works here on my work-bench - but I have no documentation to validate that it’s a reliable or safe method. And it reverses how the camera documentation recommends configuring the relay for the camera shutter - although the camera shutter seems to operate OK like that.

When engineering electronics I’m a novice - and feel safer not going “off the reservation.”

BTW - I’m familiar with the boot-loader issue mentioned by @rmackay9 in your reference link. When the firmware changed about a year ago that changed the parameters for relay operation, I posted some comments after testing how it worked with my GoPro shutter.

I need both the camera shutter relay and hot-shoe input to work. Being able to have two GPIO’s default to different levels seemed promising. But if that’s not possible, I’ll have to keep working to find a way that’s safe and reliable.

I’ll report back with my findings.

1 Like