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]
305 questions
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
2
votes
0 answers
Pump running even if relay says "off"
I have a relay that should be switched off when the analog value is too high by the Arduino code:
int digitalPin = 4; // for the relay
int analogPin = A0; // for the soil moisture sensor
int digitalVal; // digital readings
int analogVal; // analog…
Revolucion for Monica
- 155
- 1
- 9
2
votes
1 answer
How do I use a 5v/120v relay that is not mounted on a board
I bought an arduino kit, and it came with, amongst other things, a 5v relay to control 120-220v.
The relay is only that, there is only the 5 pin relay, and it's not on a board on which one can screw in the leads
I was wondering how I can use…
Sebastien Tremblay
- 23
- 3
2
votes
0 answers
Simple relay switching program crashes UNO
A very simple
digitalwrite(pin, HIGH)
delay(1200)
digitalwrite(pin, LOW)
delay(1200)
crashes the uno after about half an hour. Of course it works again after pressing the reset button.
It's switching this relay
Which is connected to a 230v 80W…
user31208
- 49
- 7
2
votes
3 answers
Double clap sensor not working as intended
I have this double clap sensor code written, it seems it would work but it seems to trigger the double clap even on a single clap, any ideas?
int soundSensor = A1;
int relay = A2;
int relay2 = A3;
int relay3 = A4;
int relay4 = A5;
int claps =…
lukasz
- 43
- 3
2
votes
0 answers
Using Arduino BLE Nano to switch an electric circuit on and off
I'd like to use an Arduino Nano BLE to activate or deactivate an electric circuit.
I intend to use a relay to do so, but activating a relay seems to require a current with more intensity than what we can get out of a digital output (about 20 mA).
Is…
user9891
1
vote
1 answer
Grove relay stuttering
I have bought this Grove relay: Grove - Relais | Kiwi Electronics.
I use it to drive a low-power water pump with a 9v battery. So the pump circuit is isolated from the Arduino circuit.
When the Arduino sends 'high' to the relay, this relay begins to…
mvermand
- 397
- 1
- 5
- 15
1
vote
0 answers
Eleminate noise from a Relay in ArduinoFFT
I have built a circuit with an Arduino Nano to measure frequency from my music, it's basically this schema but I changed the code a little bit to fit my needs.
My problem is I want to add a Relay (I have an arduino single relay module) to the…
Alex Dupuis
- 125
- 3
1
vote
1 answer
XH-M131 Photoresistor Relay Module NC position
I have purchased XH-M131 Photoresistor Relay Module to automatically light my outdoor yard at sunset and turn it off at sunrise. I'ts working as it is supposed to, However, if I power off the relay, the light goes off.
I want this to be a closed…
motion channel
- 57
- 2
- 9
1
vote
1 answer
DH11 and uno relay controle fridge
I want to control my bar fridge with temp sensor and relay,
This is my first project with code, i copied this:
https://robojax.com/learn/arduino/?vid=robojax-DHT22_11_TM1637_relay
But
I want some extra code that will prevent the fridge (ie relay)…
SV Savannah
- 67
- 8
1
vote
1 answer
srd-05vdc-sl-c and coil operating time
I'm using Arduino UNO to control an imatic relay board with 16 relays model srd-05vdc-sl-c.
I use all the relays to control some linear actuators and everything is working fine.
My only question is: are the coils used for these relays for…
Marcus Barnet
- 171
- 7
1
vote
1 answer
The current direction for digital output pins
I am new to Arduino. The digital pins can be configured as output (https://www.arduino.cc/en/Tutorial/DigitalPins) for triggering some sensors. I am now setting a digital (output pin), say no. 7,which is connected to the in1 pin of a SRD relay…
jingweimo
- 201
- 1
- 2
- 5
1
vote
0 answers
Wemos D1 is not triggering Relay
Update: I realized my relay module was 12V and the current leaving the digitalpin from my Wemos D1R1 is only 3.3V. I bought a 5V relay module that I read in some articles that it could work, but it didn't.
My new question is: is there an easy and…
diegodacal
- 11
- 4
1
vote
1 answer
Stuck Arduino Relay?
I am looking for a relay that stays on (NC=Normally Closed), and when I send a new signal switches to off (NO=Normally Open).
So the relay doesn't consume any power while being in a specific position.
Do you guys know any type?
Thanks :)
Magnus
- 31
- 7