Not working D12/D13

Jurkylius
Posts: 4
Joined: Sun Feb 17, 2019 3:51 pm

Not working D12/D13

Postby Jurkylius » Thu Feb 28, 2019 9:54 am

Hi,
I have this problem. I using DOIT ESP32 Devkit 36 pin version.
I need using 8-relay module with only set pinMode. Pins between D32-D14 working good but pins D13/D12 not. If I connect it on relay (len on relay channel lighting lower) and arduino sketch in serial monitor write me this message:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
cmd len -1
ets_main.c 371
ets Jun 8 2016 00:22:57

Arduino code:
void setup() {
pinMode(LIGHT_PIN, OUTPUT);
digitalWrite(LIGHT_PIN, HIGH);
}

void loop()
{
if(millis()-entryOneSec >= 1000) {
entryOneSec = millis();
if(millis()-entryThirdteenSec >= 30000) {
entryThirdteenSec = millis();
digitalWrite(LIGHT_PIN, LOW);
}
if(millis()-entrySixteenSec >= 60000) {
entrySixteenSec = millis();
digitalWrite(LIGHT_PIN, HIGH);
}
}
}

When I disconnect this two pins all work. Can anyone help me for this?
Attachments
ESP32-DOIT-DEVKIT-V1-Board-Pinout-36-GPIOs-updated.jpg
ESP32-DOIT-DEVKIT-V1-Board-Pinout-36-GPIOs-updated.jpg (96.81 KiB) Viewed 8850 times

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

Re: Not working D12/D13

Postby ESP_Sprite » Thu Feb 28, 2019 10:19 am

Not sure what's with D13, but GPIO12 is a bootstrap pin; the input value it has on startup sets the flash voltage. If you put the wrong level on this pin at bootup, the ESP32 effectively won't boot.

Jurkylius
Posts: 4
Joined: Sun Feb 17, 2019 3:51 pm

Re: Not working D12/D13

Postby Jurkylius » Wed Mar 06, 2019 6:31 am

Yes I mean GPIO 12 and 13. Can I want using GPIO 12/13 as OUTPUT with relay or this pins can't be connected?

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

Re: Not working D12/D13

Postby ESP_Sprite » Wed Mar 06, 2019 7:17 am

Yes, you can. Just be sure your relay board does not have a pull-up resistor on its input; that would have the side effect of pulling up GPIO12 on reset, which causes the ESP32 to switch to the wrong flash voltage.

Jurkylius
Posts: 4
Joined: Sun Feb 17, 2019 3:51 pm

Re: Not working D12/D13

Postby Jurkylius » Wed Mar 06, 2019 7:48 am

Ok. Thanks for advice. I using this relay module and I think it have pull up rezistor.
Attachments
relay.jpg
relay.jpg (38.35 KiB) Viewed 8655 times

Who is online

Users browsing this forum: No registered users and 30 guests