A relay is a part that acts like a switch that can be controlled by an Arduino. They usually are powered by sending current through a coil, which moves a piece of metal to touch a contact within it. (Note there are also solid state relays which act more like a transistor.) The moving parts is why some devices make a "clicking" noise when they turn on/off a light or another device attached to it.
Questions tagged [relay]
310 questions
20
votes
2 answers
When should I use a transistor, mosfet, and when should I use a relay?
I am used to relays some, and they are useful, especially for large loads like a incandescent light bulb or other 120V AC device. However, it seems like overkill to use a relay for a bunch of LEDs linked together (parallel) that use 60 mA (too much…
Anonymous Penguin
- 6,365
- 10
- 34
- 62
9
votes
4 answers
Turn Arduino on with timer every 24h
I'm currently working on an Arduino project that sends the charge of my car battery once a day via an ESP8266 to me. During the winter I don't drive my car, and I would like to get informed when the battery drops beyond a critical value, so I can…
Dirk Pitt
- 133
- 1
- 5
9
votes
5 answers
Reasons why it is not OK to connect a relay directly from an Arduino digital pin
After looking into various schematics on controlling a relay via an Arduino, I have noticed that, most of the time, transistors are used to switch the separate supply into the relay coil rather than directly supplying the relay with the 5-Volt…
DorkOrc
- 145
- 3
- 3
- 10
7
votes
2 answers
Pin 13 fires relay when powering on... How to disable?
Pin 13 fires relay when powering on... How to disable?
I'm using pro mini 5v 16MHz and a DC 12V 2 Channel Relay Module Optocoupler. The relay Jd-VCC is powered by a 12V and it's VCC is 5V (the same as Arduino VCC). The relay is active low and I…
P-nut
- 71
- 1
- 2
6
votes
5 answers
How to make a 5-volt relay work with NodeMCU?
I have hooked up 2 channel 5-volt relays with NodeMCU v1.0 as shown in the fritzing below.
Relay are powered with a different power source than NodeMCU.
As of now, I am powering the NodeMCU from my laptop and the relay board from a 5-volt…
Ciasto piekarz
- 575
- 3
- 12
- 28
6
votes
2 answers
Controlling mains (230 V) supply up to 5/10 amps using Arduino
I am looking for a simple, low cost solution to control on/off of mains supply to certain equipment. The control will be done using one of the output pin of Arduino Uno.
The input trigger and how to control it is application dependent. e.g.…
Rajendra
- 301
- 1
- 3
- 4
5
votes
1 answer
Switching a Solenoid Using Arduino's 5V Output?
I'm a bit stumped on how to switch on a solenoid using a transistor using my Arduino Nano's 5v Output. The solenoid runs on 12V, so I used an NPN transistor to connect the 12V source to the solenoid whenever Arduino sends current to the transistor's…
I Like
- 205
- 1
- 7
5
votes
1 answer
Uno with LCD acting strangely - power issue?
I've got a Uno (Elegoo UNO R3) running with
- Ethernet shield (Kuman K15),
- 4 relay board (Elegoo 4 Channel DC 5V Relay Module with Optocoupler )
- Matrix Orbital 2041 LCD connected via I2C (11mA typical, 90mA with backlight)
- A series of buttons…
kolcun
- 51
- 1
4
votes
3 answers
Esp8266 Vin pin
I've read that Vin pin is directly connected to usb cable in esp8266 (which is 5V). I wonder if I can power a relay 5V and a servo motor Sg90 with this pin? And is there any danger of doing that ?
Radja
- 53
- 1
- 1
- 4
4
votes
3 answers
What happens if I don't use a relay for 5V pump
I am trying to build an automatic watering system by following some examples. However, I don't have all the components for the entire system, therefore I have built it in Fritzing using only the components that I have (see scheme below):
I didn't…
Physther
- 207
- 2
- 4
- 8
4
votes
3 answers
Arduino Uno - relay with separate power
i want to operate a relay with an ARDUINO UNO, but i want to use a separate power supply for the relay. Ive seen relays with VCC and jVCC (dont know what that is), but mine only has this pins: GND, IN1, IN2, VCC.
how should i connect it to the…
randall
- 41
- 1
- 2
4
votes
1 answer
Need to set an output pin without it going LOW during initalization
For a control system I am using a relay module that controls a larger relay for high-current electrical stuff, as part of a battery protection circuit for my solar plant. This module switches 120 VAC for the larger one. The larger one is set up to…
SDsolar
- 1,175
- 3
- 11
- 35
4
votes
1 answer
Controlling relays with IR and button
What I have:
1 x 8 channel relay
1 x IR receiver
1x Arduino Uno
1x momentary switch
1x breadboard
1x 10K resister
I think the wiring is all ok as for the most part things are working as they should..ish.
Just a few bugs I need to fix.
The goal was…
Michael Sinclair
- 45
- 7
4
votes
1 answer
Not sure if logic analyzer shows an error or perhaps just a 'relay bounce'
I have an Arduino controlling a relay. I was taking a look at the timings using a logic analyzer and at the onset of the relay switching, it quickly switches again.
This seems to be occurring randomly and I thought it could be highlighting a…
oduffy
- 79
- 1
- 6
4
votes
4 answers
How to implement a 2D lookup table?
This is my first post to this forum. I am fairly experienced in electronics, but am in the process of learning C, Arduino coding, and how to use microcontrollers in general for various applications.
I have a toy-like 5 degree of freedom (DOF) robot…
PhilosophStein
- 165
- 1
- 1
- 4