Sunday, 2 April 2017

arduino - 5V to 3.3V logic level converter


I am trying to connect an ESP8266 module to an Arduino. Giving the fact that ESP8266 runs at 3.3V and the Arduino at 5V i need a logic level converter from 5V to 3V3.



Is there a way i can build one using discrete components? I searched the web and found recommendations for TXS0104E / 74LVC245 / BSS138, unfortunately none of the local shops sell them.


Although the 3.3V TX pin from the ESP8266 does not require a logic converter since Arduino will read the 3V3 signal as HIGH, i would like to add some protection for the wifi module. Is a 3.3V zenner diode a wise choice for this?



Answer



You can use any N-Channel MOSFET, not just BSS138.
It is pretty simple. This is bidirectional level converter:


schematic


simulate this circuit – Schematic created using CircuitLab


UPDATE:
By "any" I meant any jellybean small signal mosfet. Simply with low Vgs voltage threshold.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...