Ignore it, it is wrong.My gut tells me I should use an optoisolator.
No you can't. You will need a transistor to drive the relay from the signal given by the GPIO pins. Connect a 1K resistor to the GPIO pin with the other end of the resistor to the base of a transistor (NPN type). Connect the emitter to ground and the collector to one end of the relay. Connect the other end to the 5V line. NOW connect a diode ( 1N4001 will do ) with the anode to the 5V side of the relay and the cathode to the other side of the coil. If you do not use a diode you can damage your Pi.I want to control its relay using the GPIO port of my Raspberry Pi Zero. I'm confused if I can drive the 5 volt coil directly with the 3.3 volt GPIO pin
You ALWAYS need a current limiting device when driving an LED, a resistor is the simplest example of a current limiting device.Then my question is, can the GPIO pin drive the LED directly or do I need a current limiting resistor?
Users browsing this forum: No registered users and 10 guests