I'm a newbie and I need help designing a circuit that achieves the following functionality using a Raspberry Pi:
When GPIO 17 on the Raspberry Pi goes high, I want to keep a relay powered on.
When GPIO 17 goes low, I want the relay to remain powered on for 30 seconds and then turn off.
Regardless of the GPIO state (high or low), whenever power is applied, the relay should automatically turn on at first startup.
I would appreciate any guidance or assistance with this circuit design.