Hi,
I apologize in advance as I feel like this question is really straight forward, but for the life of me, I can’t figure it out. I should also add that I am fairly new to this, so bear with me.
Here is what I am trying to do: I am trying to control the opening and closing of a 5V relay (JZC-11F) from pin D0. I feel that this is as basic as it comes, and yet I can’t get it to work.
Here is a quick and dirty diagram of my connections:
Here is a picture of the wiring, as I am new to Fritzing, so not sure my diagram is accurate.
D0 goes to one side of the coil, with the other side being connected to GND. I have the + side of the relay connected to the VIN and the NC side connected to an LED. I have put an LED in the D0 as well to verify that it was providing current.
The code is as simple as it gets:
pinMode(D0, OUTPUT);
digitalWrite(D0, HIGH);
delay(1000);
digitalWrite(D0, LOW);
The LED that is connected to D0 and to the coil flashes, but the LED controlled by the relay doesn’t. If I plug the coil directly into the 3.3V rail, then I can hear the relay opening and closing as I connected it and disconnect it, so I feel that it is an issue with D0 not providing enough power to the relay, but from everything I have read, this should work or am I completely wrong here?
Thanks a lot in advance for the help and my apologies if this was covered somewhere else, but I did some searches and couldn’t find anything helpful.
Cheers,
B.