I am trying to control a 5V relay with a push button with an indicator LED using GPIOs 0, 1 and 3. I have pulled up the GPIO0 and using it as output, so that when I drive it low, the LED should glow, but its not happening. Is there anything wrong with my schematic?
Is there anything wrong with my schematic?
If you are using a switch similar to this one: -
Image from here courtesy of RS components.
Then, the switching contacts are between pins 2 and 4 (or 1 and 3). Your schematic shows this: -
So, it looks possible that you may not have wired up the switch correctly. You can confirm this by linking the data sheet. In other words, between pins 1 and 2 is a dead short.
Of course, if you put a feeble switch like this directly across a 100 nF capacitor, when the switch closes, you get an almighty current surge into the switch that may weld the contacts closed. This type of switch has the following current rating: -
50 mA is just not going to cut-the-mustard when shorting out a charged capacitor if this switch is similar to the one used. Data sheet link required.