1
\$\begingroup\$

I am creating simple expansion board for my Raspberry Pi with a few I2C components (EEPROM, RTC,...) and I would like to add a USB to serial converter to be able to connect to the RPi's serial port for debugging purposes (console access).

Until now I've been using a simple module with CH340 and I've decided to "just move" the chip onto my expansion board. Unfortunately the official CH340 datasheet is only in Chinese and the unofficial translation is not detailed enough.

I am not sure how to power the chip. In all examples it is powered from the USB port via voltage regulator (I need 3V3 logic for my RPi) however I have 3V3 available from RPi and I would like to power the CH340 chip from it to avoid using additional voltage regulator. Is this possible or does the CH340 need to be powered from the USB port?

\$\endgroup\$
2
\$\begingroup\$

It is not necessary to power the USB to serial converter device from the USB cable. There are plenty of "self powered" USB devices that are USB compliant.

I have made multiple products using a chip like the FTDI FT232RL and powered it from the local power rail of the MCU (in my case with that chip it was a local +5V).

You may still want to monitor the 5V coming from the USB connector so that you can tell if it is plugged into the upstream port. A simple connection of the USB 5V to a parallel pair of components (0.1uF capacitor to ground and a 10K resistor to ground) can then feed into the input of a 74LV14 to provide a USB VBUS detect.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This sounds interesting. I do not need VCC detection, all I really need is to be able to connect to the RPi via serial port. FTDI chips are more expensive and this is really just for me to be able to connect to RPi in case something is not working... \$\endgroup\$ – Radek Hladík Nov 13 '19 at 16:29
0
\$\begingroup\$

I believe, to be standard compliant, the CH340 should be powered from the upstream USB port so that it can also provide protection against short circuits and overloads. The CH340 should share a ground with the Pi but otherwise only the TX and RX lines (and any others your want) will go from the CH340 to the Pi.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ That is unfortunate... I have to add an additional voltage regulator while RPi has a rather good one \$\endgroup\$ – Radek Hladík Nov 13 '19 at 9:49
  • \$\begingroup\$ You do but it's a matter of 3 components if you keep it simple. A SOT-23 packaged voltage regulator and a pair of capacitors. \$\endgroup\$ – hooskworks Nov 13 '19 at 9:54
  • \$\begingroup\$ I understand. It is just that I like to keep things simple and avoid duplication of things :-) \$\endgroup\$ – Radek Hladík Nov 13 '19 at 10:37
  • \$\begingroup\$ This answer is incorrect. The concept of a self powered USB device has always been a compliant configuration. In fact any USB hub device that is powered by its own plug in power supply is an example of self powered device. \$\endgroup\$ – Michael Karas Nov 13 '19 at 17:15
  • \$\begingroup\$ Hubs, like root ports, are considered differently as far as i know to end devices since they are intended to supply power whereas the end devices only consume. The exception being OTG devices. \$\endgroup\$ – hooskworks Nov 14 '19 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.