GPIO Protection
Posted:
Thu Jun 04, 2015 2:28 pm
by thekraken
I want to use an esp as a transparent bridge to a 5v microcontroller (arduino). With the esp-link firmware the gpio's can be used to reset the microcontroller for uploading sketches.
Can I wire a esp's 3v GPIO directly to a 5V reset pin (high)? Or SHOULD I use some kind of protection, if so what?
https://github.com/jeelabs/esp-link/tree/master
Re: GPIO Protection
Posted:
Thu Jun 04, 2015 8:39 pm
by lethe
You shouldn't directly connect the reset pin to your ESP, since it is pulled to 5V on the arduino board.
You can use a NPN transitor to pull the arduino reset low like this:
base -> 4k7 ohm resistor -> ESP gpio (the resistor could probably have a higher value, but 4k7 should be safe)
emmiter -> GND
collector -> arduino reset
The transistor type does not really matter, pretty much any general purpose NPN should work (BC547, PN2222 or whatever you have available). This also has the added benefit, that the arduino reset circuit (button/capacitor) cannot mess with your ESPs boot mode.
Re: GPIO Protection
Posted:
Fri Jun 05, 2015 10:50 am
by thekraken
Thank you lethe, used a nps2222a and it works just fine.