Chat freely about anything...

User avatar
By SebasT
#91017 Hallo, i'm stuggling with a project and would like to ask for some help.

I have a air quality measuring device with an usb interface. It uses a ch340 chip to communicate. I'd like to connect to this device using a NodeMDU ESP8266. The ch340 chip is connected to the main board of the device on a disconnectable add-on pcb (together with some other functionality). When I remove it and interface with the UART directly it works. I, however don't want to lose the functionality of the add-on PCB. I tried soldering wires to the G, Tx, Rx pins of the ch340 chip, but this does not seem to work. Any advice? Is it even possible to connect to an UART with two devices this way?

Thanks for any help and best regards.
User avatar
By eriksl
#91023 I don't think this is going to work, sharing serial lines (either TTL or "real").

You might want to have a look at software USB implementation for the ESP8266. I know it exists, but I am not too sure whether it works really well. USB is very strict on timings.

Otherwise, if you think you may get lucky, you might try desoldering the ch340 altogether and then connect the serial data lines, that should work, both are TTL level.

Please note that the ESP8266 has two UARTs, but from the second UART, only the TxD pin is usable, the RxD pin is on the flash SPI pins and cannot be used.