User Tools

Site Tools


oak:tutorials:serial_through_arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
oak:tutorials:serial_through_arduino [2018/01/06 20:54]
pfeerick amended warning about 5v tolerance
oak:tutorials:serial_through_arduino [2018/01/06 20:57] (current)
pfeerick ammended warning about 5v tolerance due to corrections to datasheet
Line 78: Line 78:
 ==== Warning regarding direct connection to 5V UART ==== ==== Warning regarding direct connection to 5V UART ====
  
-I'll leave the below for posterity, but the answer is pretty simple... the ESP8266 (and hence the Digistump Oak, as the ESP8266 is the microcontroller the Oak is based on) has 5v tolerant I/O pins. You should **NOT** put 5v on the VCC connector, as that WILL kill the Oak, but due to confusion resulting from mistranslation of the original Chinese datasheet which has been cleared up in later releases, and also by the CEO of Espressif (shown ​below), the I/O pins of the ESP8266 have snapback diodes that protect the chip from over-voltage up to 5.8v, and also from reverse voltages. ​ +{{ :​oak:​tutorials:​esp8266_5v_tolerant_io.png?​150|}}I'll leave the below for posterity, but the answer is pretty simple... the ESP8266 (and hence the Digistump Oak, as the ESP8266 is the microcontroller the Oak is based on) has 5v tolerant I/O pins. You should **NOT** put 5v on the VCC connector, as that WILL kill the Oak, but due to confusion resulting from mistranslation of the original Chinese datasheet which has been cleared up in later releases, and also by the CEO of Espressif (shown ​on the right), the I/O pins of the ESP8266 have snapback diodes that protect the chip from over-voltage up to 5.8v, and also from reverse voltages. ​
- +
-{{:​oak:​tutorials:​esp8266_5v_tolerant_io.png?​200|}}+
  
 Several users ([[http://​digistump.com/​board/​index.php/​topic,​2036.msg9266.html#​msg9266|1]],​ [[https://​github.com/​digistump/​OakCore/​issues/​56#​issuecomment-197618541|2]]) have reported success wiring an Oak's Tx/Rx pins directly to an Arduino'​s 5V UART.  The   ​[[https://​www.adafruit.com/​images/​product-files/​2471/​0A-ESP8266__Datasheet__EN_v4.3.pdf|ESP8266 data sheet]] describes over-voltage protection on all GPIO pins (pg 17+), suggesting the Oak should be able to safely read 5V TTL signal directly. ​ However, it is not well known whether operating in this way degrades the life of the ESP8266. ​ Inserting a resistor (300+ Ohm, typ. 1K) between the Arduino'​s 5V transmit pin and the Oak's Rx pin will help to limit current into the Oak, although the signal level received by the ESP8266 will still be 5V at the Oak Rx pin, and the same caution regarding the longevity of your Oak still applies. ​ If you choose to connect your Oak to a 5V serial signal, either directly from an external 5V UART or through a current limiting resistor, do so at your own risk. Several users ([[http://​digistump.com/​board/​index.php/​topic,​2036.msg9266.html#​msg9266|1]],​ [[https://​github.com/​digistump/​OakCore/​issues/​56#​issuecomment-197618541|2]]) have reported success wiring an Oak's Tx/Rx pins directly to an Arduino'​s 5V UART.  The   ​[[https://​www.adafruit.com/​images/​product-files/​2471/​0A-ESP8266__Datasheet__EN_v4.3.pdf|ESP8266 data sheet]] describes over-voltage protection on all GPIO pins (pg 17+), suggesting the Oak should be able to safely read 5V TTL signal directly. ​ However, it is not well known whether operating in this way degrades the life of the ESP8266. ​ Inserting a resistor (300+ Ohm, typ. 1K) between the Arduino'​s 5V transmit pin and the Oak's Rx pin will help to limit current into the Oak, although the signal level received by the ESP8266 will still be 5V at the Oak Rx pin, and the same caution regarding the longevity of your Oak still applies. ​ If you choose to connect your Oak to a 5V serial signal, either directly from an external 5V UART or through a current limiting resistor, do so at your own risk.
oak/tutorials/serial_through_arduino.txt · Last modified: 2018/01/06 20:57 by pfeerick