Page 1 of 2

ESP32 VIN pin as 5V output

Posted: Wed Aug 14, 2019 12:20 pm
by Schroeder
Is it possible to use the ESP32 VIN pin as a 5V output to power a 5V 2 channel relay for example?

And if it's possible, is it safe?

In my project, before i use a 5V power source to power the ESP32 and the relay, i want to try out powering both the ESP32 and the relay with the USB port. I know that the ESP32 dont have a 5V output pin as arduino does, but i saw some projects using the VIN pin to power a 5V relay, but some other project used differents power sources, one 5V for the relay and a USB power source for the ESP32.

So, is it possible or even safe to use the VIN pin as a power output?

Re: ESP32 VIN pin as 5V output

Posted: Wed Aug 14, 2019 4:53 pm
by Agree007
Suggest you find the circuit diagram for you board, it will show how the 5V pin are conneted to the usb input or you can try messure the resistens between the 5V pin and usb 5V in with an ohm meter.
If direct conneted and/or there are zero ohm, it all depend on your usb power supply how much you can draw from the 5V pin.

Re: ESP32 VIN pin as 5V output

Posted: Wed Aug 14, 2019 5:05 pm
by Schroeder
Thanks for the reply!

This is the board i'm using:
Image

The VIN pin is only labeled as VIN, there is nowhere saying it could be used as output and assume it's for 5V input purpose.
I dont know alot about electronics, so my fear is if i connect this VIN to a GND pin while the ESP32 is connected to the USB port, i dont know if its going to close the circuit and fry the board or the pin :lol:

Re: ESP32 VIN pin as 5V output

Posted: Thu Aug 15, 2019 6:33 am
by Agree007
You should never connect any Vxx pin to ground 😉

Vin means you can power the board from that pin, when you dont use USB power, so when you power your board via the USB port, you will have 5V on the Vin pin and I have used it to power some motor driver modules without any problem.

Re: ESP32 VIN pin as 5V output

Posted: Fri Aug 16, 2019 12:05 am
by Schroeder
Yep, it worked hahaha :D So the ESP32 DOES have 3.3v and 5v output. Much thanks!

Re: ESP32 VIN pin as 5V output

Posted: Fri Aug 16, 2019 11:01 am
by ESP_Sprite
Schroeder wrote: ↑
Fri Aug 16, 2019 12:05 am
Yep, it worked hahaha :D So the ESP32 DOES have 3.3v and 5v output. Much thanks!
Note that the ESP32 itself does not. Your devboard probably has a secondary chip to allow it to work on 5V as well, but the ESP32 by itself will malfunction and potentially release the magic smoke when you try to power it from 5V.

Re: ESP32 VIN pin as 5V output

Posted: Wed Nov 11, 2020 7:10 pm
by Nomad576
Indeed, I use the VIN for 5v out on many projects, it works just fine, I have driven relays, as well as daughter boards such as the VS1053B MP3 board which I use to listen to my WIFI radio stations. There are times where I have actually piped the 5V down to a board and distributed it to several other boards and it seems to hold up well. This has, however been a hidden trap when I decided to use an 8 volt power supply, and wired it to that daughter distribution board instead of going through the VIN, the ESP32 survived with no problem but I blew the amplifier board and the VS1053B. It was my own fault I was distracted and, well things happen over and over again. Right now all 3 of my home built WIFI multi channel radios are down, I still have one single station radio working fine using a different decoder board and driving simple headphones instead of the amplified stereo system that I had set up through out our small house. I ordered some new VS1053's from China, they came in yesterday crushed beyond recognition, it appears they were run over by a Sherman tank, well perhaps they just got stuck in a sorting machine. I am awaiting reply from the seller after sending them photo's. Sad to as things take forever now to get from China. I try not to order from there any more but these particular boards just are not being sold in the USA for some reason. They are very secptable to over voltage or static shock, worse then any other boards I have worked with in my many years of tinkering with semi conductor chips. I just looked at my stack of shot boards, there were six including the two brand new crushed boards. That comes to about 55 bucks, man if my wife were still alive, she would skin me for spending so damn much on toys! She passed away 3 months ago, I sure do miss her, after 51 years and 4 days together, well it is as if half of me has been buried with her.

Re: ESP32 VIN pin as 5V output

Posted: Thu Nov 12, 2020 6:15 am
by ESP_Sprite
Yeah, chips made for 5V usually don't survive on 8V indeed. And my condolances to you wrt your wife.

Re: ESP32 VIN pin as 5V output

Posted: Sat Dec 19, 2020 2:17 pm
by niveven
Nomad576 wrote: ↑
Wed Nov 11, 2020 7:10 pm
Indeed, I use the VIN for 5v out on many projects, it works just fine, I have driven relays, as well as daughter boards such as the VS1053B MP3 board which I use to listen to my WIFI radio stations. There are times where I have actually piped the 5V down to a board and distributed it to several other boards and it seems to hold up well. This has, however been a hidden trap when I decided to use an 8 volt power supply, and wired it to that daughter distribution board instead of going through the VIN, the ESP32 survived with no problem but I blew the amplifier board and the VS1053B. It was my own fault I was distracted and, well things happen over and over again. Right now all 3 of my home built WIFI multi channel radios are down, I still have one single station radio working fine using a different decoder board and driving simple headphones instead of the amplified stereo system that I had set up through out our small house. I ordered some new VS1053's from China, they came in yesterday crushed beyond recognition, it appears they were run over by a Sherman tank, well perhaps they just got stuck in a sorting machine. I am awaiting reply from the seller after sending them photo's. Sad to as things take forever now to get from China. I try not to order from there any more but these particular boards just are not being sold in the USA for some reason. They are very secptable to over voltage or static shock, worse then any other boards I have worked with in my many years of tinkering with semi conductor chips. I just looked at my stack of shot boards, there were six including the two brand new crushed boards. That comes to about 55 bucks, man if my wife were still alive, she would skin me for spending so damn much on toys! She passed away 3 months ago, I sure do miss her, after 51 years and 4 days together, well it is as if half of me has been buried with her.
I'm very sorry for your loss! And thank you for your wonderful answer.

Re: ESP32 VIN pin as 5V output

Posted: Wed May 12, 2021 2:53 pm
by Fedor710
Schroeder wrote: ↑
Fri Aug 16, 2019 12:05 am
Yep, it worked hahaha :D So the ESP32 DOES have 3.3v and 5v output. Much thanks!
Please note that the trace between the usb line and the Vin pin is quite thin on most boards. I managed to break my fist ESP32 this way, powering a LED strip.

Since you likely only burn the trace between the USB port and Vin, it is possible to power the broken board via the Vin pin, and even reprogram it still. It's just really inconvenient.