I want to design a circuit that is capable of blocking reverse voltage signals but allowing forward voltage signals to pass through.
The original problem and solution:
I was designing an Arduino to ESP8266 interface with a pair of the Arduino pins as a serial port. For the Arduino TX to send data to the ESP8266 RX, the circuit was a very simple resistive divider to divide 5V to 3.3V, which worked well. The problem came when I needed to do the same for the ESP8266's TX pin. As the ESP8266 operates on 3.3V voltage levels, feeding 5V by mistake into the ESP8266 would certainly mean disaster. Therefore, I was trying to figure out a way to let the ESP8266's 3.3V signal pass through to an Arduino IO pin without being distorted or its voltage decreased by a drastic amount while still protecting the ESP8266 in case the user on the Arduino makes an error and feeds 5V into the ESP8266.
The solution I came up with originally was to use a Schottky diode like the 1N5817, as shown in the schematic below, to prevent the Arduino IO pin from back feeding into the ESP8266:
The new problem: In my tests, it turned out that the Arduino was completely incapable of receiving serial data from the ESP8266, most likely because the voltage level was too low. If I short a wire across that diode, the serial data gets through with no problems.
Is there any way to properly prevent voltage back feeding from a 5V IO pin to a 3.3V IO pin while still preserving the original voltage when the 3.3V side is transmitting a signal to the 5V side?
A few requirements for the solution:
- The components used must not be too large, as PCB space is precious
- Would prefer hand-solderable components (e.g. for resistors, 1206 is a good size)
- Prefer SMD components