mains relay notes

Viewed 17 times

I have this relay and need to use it to control Mains voltage via a switch instead of a micro controller. Is this possible? I am no electronics guru, but the way I would believe this to work is to put the switch inline of the “In” and then to ground? Please let me know if I need to be more specific. Relay Diagram

 New contributor
  • If you connect Vcc to 5V, GND to 0V then wire your switch between GND and IN pressing the switch will activate the relay. BTW, please remember that mains voltages can kill so put the relay in a plastic box before connecting the mains to it. – Dougie 3 hours ago
  • Belongs in Electronics not here in RaspberryPi – Dougie 3 hours ago
  • @Bwillz, All professionally engineered 5V relay switching AC mains can be controlled by two methods: (1) MCU such as Arduino and Rpi, (2) Manual switches, which has two purposes (a) Panic button, used when the microcontroller gone crazy, (b) For testing, (c) … And usually the box is structured into physically separated (Lego like) parts for easy assembling, testing, and maintenance: (i) Mains input + grounding + manual power switch (ii) 5V relay to be controlled by hand, by hardware tester, such as signal generator, (iii) MCU, such as Rpi, Arduino, MicroBit, etc. / to continue, … – tlfong01 2 hours ago   
  • @Bwillz, You may like to modify your a bit narrow question broader, eg (1) “How to make a mains power relay switch which can be controlled by (1) Rpi4B python, (2) by hand which overwrites Rpi, as an alternate control method (red alarm button), for emergency, … “. Comments and counter suggestions welcome. This way, your question can be beneficial for other visitors which wish to know how to control by Rpi, AND ALSO BY HAND, which as I earlier said, is important in software controlled mains switch design. – tlfong01 2 hours ago   
  • @Bwillz, You might like to read my answer to the following question to get a rough idea a Rpi independent relay box: raspberrypi.stackexchange.com/questions/96277/…. You see I have manual switches inside the (well earthed) metal box. The Rpi control are 3V3 input signal routing wires leading to OUTSIDE of the the box. These are pull up type, low activate signal wires connected to BOTH a manual switch AND rpi GPIO pins. This way, I can either control by hand or by Rpi, WITHOUT physically reconnecting any wires. – tlfong01 1 hour ago   

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: