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

User avatar
By Dika
#49896 Hallo everyone..
As far as i know, gpio pin in esp8266 is Active High logic.
I also have 8 channel relay, like this
Image
But the relay has Active Low Logic.
How do i reverse one of them?
Right now, if esp8266 PIN 1 active/1/true, then the relay will be turn off and vice versa.
Is there any way to make it same logic?
Thank you :)
User avatar
By martinayotte
#49914 By default, ESP8266 is not active high or active low by itself, it is your firmware that decide how pins are handled and which idle state is used to define such activeness, except for few pins, GPIO15/GPIO2/GPIO0, which their idle states should correspond to boot process states : GPIO15 pulled down, GPIO2/GPIO0 pulled up. Other GPIOs don't have any issue.
So, if your relays are driven with Active Low, GPIO2/GPIO0 don't have any issues, but GPIO15 has.
In such case, you have to use an hardware inverter, in other words a simple MOSFET.