u/mateus2k2

ESP32 as a USB to UART

ESP32 as a USB to UART

I have a PCB from an old ereader (Kobo Touch) that has some serial connections on the PCB and I want to see them. I found someone that says they have done it, so I know it's possible. I managed to put some pins on the RX and GND role on the PCB and plug then into the ESP32, but I just get garbage on the serial console. See photos of the setup.

I realy don't want to buy an adpter board just for this.

https://preview.redd.it/gimn26i7sdwg1.jpg?width=3472&format=pjpg&auto=webp&s=ec16480516d123a93e565556d67429ca8858959b

https://preview.redd.it/12bp8ci7sdwg1.jpg?width=3472&format=pjpg&auto=webp&s=cc5125b059d222fb64441d60c91357486e422f1c

The code:

#define RXD2 18
#define TXD2 17


void setup() {
  Serial.begin(115200);      // USB (PC)
  Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2); // PCB UART
  Serial.println("ESP32 STARTED");
}


void loop() {
  // From PCB → PC
  while (Serial2.available()) {
    Serial.write(Serial2.read());
  }


  From PC → PCB
  while (Serial.available()) {
    Serial2.write(Serial.read());
  }
}#define RXD2 18
#define TXD2 17


void setup() {
  Serial.begin(115200);      // USB (PC)
  Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2); // PCB UART
  Serial.println("ESP32 STARTED");
}


void loop() {
  // From PCB → PC
  while (Serial2.available()) {
    Serial.write(Serial2.read());
  }


  From PC → PCB
  while (Serial.available()) {
    Serial2.write(Serial.read());
  }
}

https://preview.redd.it/ighi9c0hsdwg1.png?width=1653&format=png&auto=webp&s=1b6ec7afe60390475f90bec76afabffd178737b1

https://petit-noise.net/blog/kobo-touch-%e3%81%aeuart/

https://petit-noise.net/blog/kobo-touch-%E3%81%ABusb%E3%82%B7%E3%83%AA%E3%82%A2%E3%83%AB%E3%82%92%E7%B9%8B%E3%81%92%E3%82%8B/

reddit.com
u/mateus2k2 — 1 day ago