11 votes

Pin 13 fires relay when powering on... How to disable?

There are three things you can do: Remove the bootloader entirely and program the board with a hardware programmer (USB-ASP, Another Arduino, etc). Edit the bootloader source, recompile, and ...
Majenko's user avatar
  • 105k
9 votes
Accepted

What happens if I don't use a relay for 5V pump

You should put a resistor in series with the led to limit the current. The IO pins cannot source enough current to run the pump without damaging themselves. That's why you need a buffer of some kind. ...
ratchet freak's user avatar
8 votes
Accepted

How to make a 5-volt relay work with NodeMCU?

I have several of these modules. They have an optional opto-isolator built-in, but you have to remove the jumper to use it. Connect your GPIO trigger as you have it Run the relay's Vcc and Gnd pins ...
dandavis's user avatar
  • 1,037
7 votes
Accepted

Can I power two 5V with Arduino powered with 9V power adapter?

The voltage will be fine - as long as you plug it into the DC barrel jack, and don't try to wire directly to the 5V pins. The barrel jack has a voltage regulator on it that will convert 7-12V down to ...
John Burger's user avatar
  • 1,875
7 votes
Accepted

Frequent ON OFF in SSR

You need to implement hysteresis. Set two temperature points around set_temp. One a little higher to be a limit for turning the heater off and a one a little lower then set_temp to turn the heater on. ...
Juraj's user avatar
  • 18.1k
7 votes
Accepted

Fan regulator control from Arduino

To control AC power for inductive load (motor) a Triac is used. The concept is called phase cutting. It works for a resistive load (heater) too. This module is designed for phase cutting. It contains ...
Juraj's user avatar
  • 18.1k
7 votes
Accepted

Switching a Solenoid Using Arduino's 5V Output?

Low-side switching an inductive load (such as a relay) using a microcontroller (such as Arduino), NPN BJT transistor (with full base resistor calculations), and snubber/flyback diode Note: this answer ...
Gabriel Staples's user avatar
6 votes

Esp8266 Vin pin

(Answering in more detail, as this is the top search hit for "ESP8266 Vin", at least for me) TL;DR: Vin is NOT directly connected to USB power. There is a protection diode between USB+/VU and Vin, ...
Jules Kerssemakers's user avatar
6 votes

How to perform multitask using arduino such as update data as well as check condition?

You need to think about this with a real-world analogue. I like to use boiling an egg... There are three ways you can boil an egg: Blocking operation Put the egg in the boiling water Stand there ...
Majenko's user avatar
  • 105k
5 votes
Accepted

Digital pin output voltage, not triggering 71mA relay coil

The digital output pin cannot output sufficient current to drive the relay directly. Iirc this question was already asked. You need to add between the Arduino and the relay a driving stage, for ...
Igor Stoppa's user avatar
  • 2,125
5 votes
Accepted

Turn Arduino on with timer every 24h

One approach would be use of a DS3231 (Precision Real Time Clock) module. Such modules sell on Ebay for under $1. Search for ds3231 arduino. Typically, these modules have a six-pin connector, with ...
James Waldby - jwpat7's user avatar
4 votes

Do I need a transistor if my relay has an optocoupler?

That isn't just a relay you are linking to. That's an entire board that, among others, contains a relay (blue box). This board already has a transistor to drive the coil inside the relay. It also has ...
Gerben's user avatar
  • 11.3k
4 votes

Can you connect more sensors of the same type to a single board while not using up more pins than if you were to use a single sensor?

If the connection is a digital sense pin then you can use a parallel-in serial-out IC to read them all simultaneously and then shift it in. Takes up 3 pins on the arduino a latch a clock and a data ...
ratchet freak's user avatar
4 votes

What happens if I don't use a relay for 5V pump

this is not an answer to the question you asked, but you need to understand this: generic DC relay advice. Use commutating diodes. this is not a special kind of diode, it is a particular use of a ...
geek emeritus's user avatar
4 votes

Need assistance decyphering agriculture systems control code created by absent team member

Just about all the comments are lying, mostly from copy paste-code-edit where the comment wasn't edited. It's a great example of why comments should not be used to explain code. The timing code is ...
ratchet freak's user avatar
4 votes
Accepted

Wemos: relay shield doesn't work on top of the stack

Yes, there is a pin conflict. The relay uses D1, however D1 is (as you can see from looking at the schematics) part of the I2C connection for the SHT30. You will have to find some way of modifying ...
Majenko's user avatar
  • 105k
4 votes

Please help me with my project of water pump relay switching too fast

The problem lies in the specification itself. According to your rules, what should the pump do if the water level is exactly 2 cm? Granted, there is no such thing as an exact physical measurement. But ...
Edgar Bonet's user avatar
  • 43.1k
3 votes

Multiple non-blocking countdown timers?

The "blink-without-delay"-pattern shows how this can be solved but with several time periods and logic this becomes complex. Some abstraction is needed. The Timemark library provides a solution. ...
Mikael Patel's user avatar
  • 7,969
3 votes

Multiple non-blocking countdown timers?

Would a non-blocking timer solution work? Yes. Your "timer" doesn't have to be anything more than a start time from millis() and a flag. Then your loop just compares the start time to the current ...
slash-dev's user avatar
  • 2,029
3 votes
Accepted

Relay switching problem with ATmega328P + 10 relays

I can see lot of problems. No decoupling capacitors on ATMega. Capacitors on both sides voltage regulators are usualy essential for regulator stability. Big voltage drop on regulator - if it's ...
KIIV's user avatar
  • 4,752
3 votes

Arduino relay. risks?

Basic safety precautions: Always fully unplug the lamp before working on any wiring, even when working with the low-voltage side of things. Invest in a proper enclosure and follow the rules of ...
Majenko's user avatar
  • 105k
3 votes

Is there a cheap relay that can control voltage from stuff like bulb lights with a 5 V control output?

You can use a 5V Solid-State Relay module to control light bulbs. They cost $4-6 from US-based suppliers and $1-3 from a Chinese supplier. Just hook up the supply to the center pin and the load to ...
zdub's user avatar
  • 141
3 votes

Turn Arduino on with timer every 24h

The timer or timer-circuit itself would have to draw some current. Any of the pico-power AVR chips draw very little current in sleep mode - in the 10s of micro-amps for the 328, if I recall correctly. ...
JRobert's user avatar
  • 15.3k
3 votes

Need help with the basics on serial control

You are assuming that Serial.readString() will magically know how long a string you meant to send, and wait until it's all there. It doesn't guarantee that. If your PC uses Linux or Mac, you can use ...
Mark Smith's user avatar
  • 2,181
3 votes

How to make a 5-volt relay work with NodeMCU?

The relay has no reference for what the voltage from the NodeMCU is. Since the power supplies of the two devices are isolated (from each other; the laptop may not be isolated itself, but the battery ...
Ignacio Vazquez-Abrams's user avatar
3 votes
Accepted

Need to set an output pin without it going LOW during initalization

Arduino sketches are actually (somewhat constrained) C programs. As such, what is true for C is usually true for sketches. In C, a segment of code usually ends with a ";". It matters not if there ...
st2000's user avatar
  • 7,325
3 votes

Why would digital outputs on Arduino Due be less than 3.3V?

The output impedance for the MCU used in the Due is about 46ohm. Along with the relay's impedance this forms a voltage divider that results in a final voltage that is lower than the unloaded voltage ...
Ignacio Vazquez-Abrams's user avatar
3 votes

Arduino Uno - relay with separate power

This relay is designed to operate on 5V. Most commonly this will come from the Uno's 5v pin. If you want to externally power the relay itself then make sure to connect the +5 to the Vcc on the ...
SDsolar's user avatar
  • 1,165
3 votes

Wiring diagram for Arduino to prevent relay firing on reboot

You can add a pull down/up resistor between the wire and ground/vcc so that when the arduino pin is set to high impedance during reboot the wire is pulled low/high as desired.
ratchet freak's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible