We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

GPIO: safe ports to use as output port

  • Hello everyone,

    I have a problem, a big one šŸ˜•

    Today I have connected 8 GPIO ports to SSR device. During every power up, omega puts gpio 6-7-8-13 (Those I have tested, havent tested all ports) on! after some time 6 goes down. Just checked with multimeter if it is a noise oriented but not, ports were 2,5 volts. Since I am planning to connect those lines to a contactor and run big devices with it, it is very dangerous. Definately these ports are being used (designed) for other uses also (even during boot). I can make them low after boot but it is too late already. They work as expected after boot (via a bash script).

    So, I really wonder, which ports stays during boot and after boot (safe to use as output pins).

    I would be very happy if you could help.


  • @esunayg I have a few comments/observations that may or may not help:

    • Personally,I would not rely on output levels during power up - these could vary for both electrical reasons due to circuit events during power up and (as you suggest) possible software actions during the boot sequence. Is it at all possible that your circuitry for accessing the SSR device could be briefly disabled during a power up sequence?
    • My testing shows that even when power up and system boot is complete, some GPIO pins are input pins and some are output pins and that the level of different pins can be either 0 or 1.
    • Any pin that is set to be an input pin is effectively floating unless actively driven to 0 or 1 (or has an appropriate pull up or pull down resistor) thus these input pins may be in an arbitrary state during and after power up until set as output pins with a defined state.
    • Not sure if it would assist at all, but it may be worth ensuring all the pins you wish to use have an appropriate pull up or pull down resistor

  • Thank you @kit-bishop ,

    • I am planning to put a mechanical relay on 8 port relays common input ports as NO output of relay (it is a regular chinese 8 port solid state relay). But I dont think it will help. I have created a well isolated design (as well as my knowledge :). It is grounded also. I really wonder why it does same routine. I have made a video also, I can send it to you.

    • My real need is, can be all gpio as input port during boot and after boot? I mean if omega need some gpio which must be used during boot (like for expansion packs etc.) as output, could someone please make a list so we should avoid using them as output (like pic datasheets).

    • Those ports were actually not floating on my omega. And they had a fixed output ports as high. I will also try with smaller pull down again.

    Thanks again.

  • I am driving an external relay board, where I need to pull the driving line to gnd to put the relay in the on state

    The input stage of the relays is an optocoupler with the anode tied to VCC through a 1K resistor, and the cathode side goes through a led to the driving input coming from the Omega.

    To be stable during boot and initialisation I need a pullup resistor on that driving input, but:

    • to which voltage should I pullup... 3V3 or 5V?
    • which would be a good pullup resistor value? 10K, 100K, 200K


  • Found the solution.... use an I2C IO expander like the MCP23008 used on the relay expansion.

    This has a power-on-reset circuit that provides controlled power up

  • @Johan-Simons I previously used a similar I2C I/O expander with my Arduino - it worked well.
    In case you are interested, the expander break out I used was http://www.gravitech.us/i2c16gpex.html which uses a PCA9535 chip which provides similar capability to the MCP23008 but with 16 I/O pins rather than 8. Also, the documentation on PCA9535 says:

    • No glitch on power-up
    • Internal power-on reset

    It worked well for me.

Looks like your connection to Community was lost, please wait while we try to reconnect.