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]
294 questions
18
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,155
- 9
- 31
- 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
1 answer
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
- 2
- 12
- 28
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
- 6
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
5
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
- 181
- 2
- 4
4
votes
1 answer
Detect 2 wire thermostat output
I have a 2 wire thermostat. R is +24VAC, W is Heater. I have no Ground wire (C), and I cannot open the thermostat.
When the heater goes on, the thermostat internal relay gets powered and connects R and W together.
How can I detect when the heater is…
zip85
- 41
- 2
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
- 1
- 4
- 8
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,155
- 1
- 10
- 33
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
3
votes
3 answers
How to perform multitask using arduino such as update data as well as check condition?
Here data is updated after every 2 seconds. But when the condition is true then the valve and motor process starts and data is updated only after completion of that part (i.e., data is updated after 25 seconds). I want data updation and condition…
Jashanjot Kaur
- 59
- 2