I'm trying to run a 220V siren from a digital clock that, upon reaching the set time, outputs 7.5V for about 2 seconds then stops. Now, I don't understand much about relays, but I did a little research and figured I needed one. So I bought a 5V relay module and an L7805 voltage regulator and started trying them out. I ended up wiring everything like on the image (I was particularly confused on how to wire VCC and IN on the relay) and it seems to be working (although the relay didn't turn off a couple of times and the siren kept blaring, but now it stops normally, even if I didn't really change anything).
So I'm just wondering if my wiring is correct or if I should scrap this and try again.

- 11
- 1
-
1The relay isn't designed to have VCC come and go, it's designed to have IN come and go and VCC always provided. – Ben Voigt Apr 12 '22 at 19:51
2 Answers
You can check in the Datasheet of the relay you ordered if the coil pins have an orientation (polarized). If it is polarized, than Vcc should be connected to GND and the IN pin to 5V to activate the relay. In your schematic, they are flipped. I don't actually know that this could cause a problem like you described.
The way you have currently wired it, you have grounded the IN terminal, which is the pin to tell the relay to turn on or off. So it will always be off.
If you wire IN to Vcc, it may work. But that can't really be guaranteed.
We don't know if the clock can deliver enough power to drive the relay. And you haven't given us the specifications of the relay module.
You have also missed off the capacitors that are supposed to be connected to the input and output of a 7805 regulator.

- 18,609
- 1
- 29
- 55
-
You're right. I could only find the datasheet of the relay itself, but here is a picture of the module. [link](https://imgur.com/TUjqNif) The clock is driving the relay perfectly fine without the siren connected, but as I connect the siren it does turn on, but seems to turn off by itself only about 75% of the time. Even if I disconnect the relay from the clock the siren just keeps on going. – Gian Apr 13 '22 at 12:47