Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By VahaC
#58420 Next code does not work
Code: Select allvoid setup() {
  pinMode(2, OUTPUT);
}

void loop() {
  digitalWrite(2, HIGH);
  delay(1000);
  digitalWrite(2, LOW);
  delay(1000);
}

Relay is connected to 5V
ESP-01 to 3.3V throw AM1117
after turning on LED on the Relay does not blink but is all time on.

Where is mistake?
Why my simple example does not work?
User avatar
By RichardS
#58421 You are driving the relay through a transistor or FET type circuit right? ESP can not drive a relay directly, that is to say almost any magnetic coil relay, solid state relay would work most likely but even then.... you need to read the specifications, if it takes more than a few milliamps to drive you need a driver IC in between.

http://www.learningaboutelectronics.com ... ircuit.php

RichardS
User avatar
By RichardS
#58428 seems to have a driver on the board

whats that other blue box?

make sure all grounds are on, and there is +5/3.3 on the relay board

RichardS