Hot answers tagged

3

From the Amazon page you linked to: 1 dc+ : Dc power supply positive pole 2 dc- :Dc power supply negative pole (i.e. ground) Arduino: VCC: positive DC power supply GND: ground technically, VCC = the voltage at the collector of a transistor, these days it's used as shorthand for the positive output pin of an IC.


2

That appears to be a 12 "solid state" relay. That means that it is designed to be both powered by and switched by 12V. You're trying to drive it with slightly more than 1/3 of its rated voltage. Don't do that. Edit: Note that none of the relays being discussed are true solid state relays. These are are all conventional coil relays that include cicuitry ...


2

Try add some power filter like this: Between the breadboard and ESP board.


2

(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, which has a limited current capacity. If your board provides VU, that one is directly connected to USB power. As long as you only power 1-2 tiny devices, it ...


2

Probably because the pump will use more current (mA) than a GPIO pin of the Arduino can deliver. A GPIO pin on the Arduino can deliver 20 mA, or 40 mA max (but not advised for longer time). Therefore, a separate power supplyis used, where the base pin of a transistor is connected to a GPIO pin (with a resistor) to 'switch' the transistor on and off. The ...


1

@michel-keijzers has pointed you in the right direction. Depending upon the power requirements for your pump, you might consider looking specifically at logic-level power MOSFETs as the type of transistor in your circuit. You might also investigate the use of a pull-up resistor to fully turn on a MOSFET.


1

Below code is an example of what you described; pressing the button will turn on the LED and it will only turn off if 10 minutes passed or button is pressed again. Read the comments in the code: #define btn 5 #define rly 6 bool btnState; bool ledState; unsigned long timer = 0; void setup() { pinMode(btn, INPUT_PULLUP); pinMode(rly, OUTPUT); } void ...


1

"Arduino Pro Mini hooked up to the 5V power supply via the RAW and GND pins, but the supply is a regulated 5v wall supply. " That is the problem. RAW pin expects more like 6V to 6.5V for the regulator to output 5V. If you are supplying 5V, connect to the 5V, or VCC and GND pins. If you are connecting to USB via an FTDI Basic or equivalent, and the 5V ...


1

Finally, I found it! Google Image: https://www.google.com/search?biw=1974&bih=1050&tbm=isch&sxsrf=ACYBGNSImNFTI2vRTPD5bbjE-eRkJUzdow%3A1571311366907&sa=1&ei=Bk-oXcSJN5K78gKG4brgCw&q=HFD2%2F005&oq=HFD2%2F005&gs_l=img.3..0j0i24l6.1135292.1138931..1139132...0.0..0.80.289.4......0....1..gws-wiz-img.......0i5i30j0i30.yfdL1Ivd0sU&...


1

I think this method inefficent. Because ESP32 continuously listens to the button state. You will try this method . Working for me . int R1 = 2; NexDSButton bt0 = NexDSButton(0, 8, "bt0"); uint32_t dual_state=0; void setup(){ nexInit(); pinMode(R1, OUTPUT); } void loop(){ bt0.getValue(&dual_state); if(dual_state==1) //When pressed dual state button ...


1

As far as I can see, the relay will stay on when val is less or equal than 500, and stay off when val is higher than 500. However, there might be a problem when val keeps fastly moving around 500; it will switch on and off quite fast. To prevent this, you should make two 'triggers', e.g. turn it on when the value <= 480, and turn it off when the value >=...


1

Unless you require galvanic isolation (and it's highly unlikely that you do) you don't need the relay. The EN pin only needs to be above 1.3V to turn the unit on, or below 0.9V to turn it off. The voltage range is anything up to 30V. Just connect the EN pin directly to an Arduino IO pin. Write a HIGH for on and a LOW for off. And of course connect the ...


1

You can leave them energized for more than 30 minutes. My 16 year old car with 250,000 km still has the original fuel pump relay. I can't imagine how many hours of continuous use it received over this period of time. The relay in my car is not the same make / model as the relays you are using, so you should check with the manufacture to see if there is a "...


1

Below code is an simple example of what you described, each button will turn on the relays defined for them and turn off other relays. except for button 4 which will toggle relay 1 and 4. int relay1 = 2; int relay2 = 3; int relay3 = 4; int relay4 = 5; int sw1 = 6; int sw2 = 7; int sw3 = 8; int sw4 = 9; int sw1Status, sw2Status, sw3Status, sw4Status; int ...


1

Voltage is only part of what a relay uses. Check the current requirements for the relay coil/input as well. For example the common result for "3V relay arduino" will produce results for relay MODULEs that contain something akin to a SRD-03VDC-SL-C relay (labeled on the relay itself). Spec for the RELAY (separate search by relay part no) yields a data ...


1

Sure you can. This site isn't a great place for open-ended questions like this though. Since you have a serious real-world need I'll give you some guidance anyway. You'd need to break it into pieces and solve each one in turn. First create code that recognizes long and short presses (not using delay().) You'll probably want to respond on releasing the ...


1

If your chosen power supply is of a good quality and provides proper ground isolation then it shouldn't be a problem to connect the grounds of the two systems together. However, since there are so many bad power supplies available on the internet (and even some "good" power supplies are somewhat iffy when it comes to grounding) it is safest to hedge your ...


1

Can I directly connect an ESP GPIO pin to the base of the transistor where the arduino is connected? No. You will effectively be connecting two outputs together, and that is very bad. Instead you will need to add a second transistor in parallel to the first - one controlled by the Arduino and one controlled by the ESP-01. Can I put a relay module ...


1

I think what you're looking for is to declare your functions near the top of your file, usually before the first function you write, setup(), in this case. So add this just above your setup() function: // Forward function declarations void displayNumber(void); void checkUp(void); void checkDown(void); void checkStart(void); void countDown(void); C ...


1

Here is some code that might help you; leaving out the temperature and humidity stuff: // constants // number or relays const int relays = 4; // pins for the relays const int relayPins[] = {2, 3, 4, 5}; // relay cycle times const unsigned long relayTimes[] = { 5*60*1000, // 5 min 60*60*1000, // 1 Hour 2*60*60*1000, // 2 hours 12*60*60*...


1

I had this same issue with an ESP8266 NodeMCU-12E using Cayenne in the past. It would drop connection for no apparent reason, but no matter what, most of the time it'd never reconnect until a reset. Here's what I did: CAYENNE_DISCONNECTED(){ Serial.println(F("Cayenne disconnected, rebooting...")); ESP.restart(); } I've never used Blynk before, but ...


1

When you set a pin to HIGH then that pin will provide 5V. When you set a pin to LOW then that pin will be set to 0 volts. Which direction the current flows depends on what is at the other end of the wire. Current always flows from higher voltage to lower voltage. If you set a pin to HIGH and the thing it is connected to is at ground then current will ...


1

To drive a relay you'll need a transistor (a MOSFET is a good choice) and you'll need a diode across the relay coils to protect the transistor from the reverse current pulse when you remove power from the relay coils. As Majenko says, if you Google "Arduino relay" you'll find lots of articles covering the topic. (And if you use a digital output line from ...


1

Yes it is possible. Use the Blynk example sketch to activate the pin of the esp8266. Read the pin of the esp8266 with the ATMega. Handle in ATmega sketch the esp8266 pin as a second button.


1

As Wendall says in his comment, you probably have an issue with the power-on state of your logic pins before the Arduino finishes booting up. In addition to that, you should not drive a relay directly from an Arduino logic pin, for a couple of reasons: It can't provide enough current to drive a relay coil. The relay emits a strong surge of reverse current ...


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