1

I am working on a PCB board design. I am using an STM32 as processor and an FT232RL as a USB to serial UART interface.

If I make a circuit as in the attached schematic, can I transfer data with USB without problems?

enter image description here

New schematic:

enter image description here

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Enes Orhan
  • 29
  • 5
  • 1
    It depends. Why have you selected 5V supply for the IO pins as not all (but some) MCU IO pins are 5V tolerant, and why there is a 1 kohm in series with the data signals, it might limit the communication speed. Also since this chip is only powered via USB, it will have no power when USB is disconnected or PC turned off, and the MCU will try to power this chip via the 1k resistor and RXD pin. – Justme Aug 27 '21 at 08:56
  • Actually it is constantly powered with 5V, I couldn't understand why there is no power when the usb is disconnected. The 1 kohm resistor was for more efficient transmission of signals. Unnecessary resistors? – Enes Orhan Aug 27 '21 at 09:15
  • So if it is constantly powered with 5V, you are short circuiting that 5V with 5V that comes via USB and possibly damage the PC? I am also extremely puzzled why you think 1kohm resistors make the signal transmission "more efficient", would you please explain why you think it does? – Justme Aug 27 '21 at 09:27
  • Does it work fine without adding resistors? – Enes Orhan Aug 27 '21 at 09:33
  • No if you use 5V VCCIO. Your MCU pins may not be 5V tolerant. I don't know which MCU pins you use and if they are 5V tolerant or not. – Justme Aug 27 '21 at 09:46

2 Answers2

0

USBDM, USBDP look good, just like the FT232R's datasheet:

ft232r

The only problem may arise is the power source.

Do you intend to power your MCU from the PC or the MCU has its own power? You have connected the power of the PC to the PCB, this means you will power the PCB from your PC, so do not connect any other external power to the PCB if that is the case. Choose only one power option.

And a friendly note: Consider using a USB isolator to isolate your PC from the PCB, if your PCB has its own power. Example:

isolator usb

Image Source: My notes.

EDIT

I also think you may want to check if the TX/RX pins of your STM32 mcu are 5V tolerant. If not, you will need to check if Ft232RL supports a internal level converter for IO pins (to give 3.3V to TX/RX instead of 5V), if not, you may use an external level converter IC, or a level converter technique (with a diode and resistor look it up) or the cheapest option is a voltage divider, which Id not reccomend)

  • The PCB has its own power, the system is powered by an external battery. Actually I think if I remove the supply voltage between USB and FT232 it will be ok, I will just transfer data. What do you think about this? – Enes Orhan Aug 27 '21 at 09:24
  • Yes, remove the Supply voltage from the USB/PC then, but keep the GND connected. You will be ok. You may as well use an isolator as I mentioned to make sure you dont fry your PC usb port by mistake. – Christianidis Vasileios Aug 27 '21 at 09:31
  • It will be wrong as the FTDI needs to know when USB is connected. The datasheet has schematic example for that. And then the question is that there is no point powering the FTDI with 5 volts at all. But all the extra info how you want the circuit to work belongs in the question, because it affects what we can suggest in our answers. – Justme Aug 27 '21 at 09:32
  • What you said remains clear, why is it pointless to supply it with 5V? If you have a better suggestion, you can explain it with a schematic. – Enes Orhan Aug 27 '21 at 09:35
  • Sorry I remembered wrong and this chip needs 5V as its VCC if you use internal oscillator. But using 5V for VCCIO can damage your MCU. That's why your circuit is dangerous. Although you have 1k resistors to protect from overvoltage. But it can still stress the MCU IO pin protection diodes. The schematic for self powered device is already in the datasheet. – Justme Aug 27 '21 at 09:42
  • @Justme all STM32 MCUs use 3.3V logic? OP did not mention which STM32 is using – Christianidis Vasileios Aug 27 '21 at 09:49
  • STM32F103 and STM32F072, both are used – Enes Orhan Aug 27 '21 at 09:50
  • @ChristianidisVasileios Some pins are 5V tolerant, some are not and only go up to VCC and VCC can't be 5V. – Justme Aug 27 '21 at 09:51
  • 1
    @EnesOrhan both STM32F103 and STM32F072 have built-in USB, why do you want an external USB serial port? – Justme Aug 27 '21 at 09:53
  • Actually, the PCB was designed by someone else. I am trying to understand and improve the system. Are the internal USB pins you're talking about, pins 32 and 33? – Enes Orhan Aug 27 '21 at 09:57
  • 1
    I don't have the datasheet for both chips open to look that up for you. I am sure you can just open the datasheet for the respective MCU and check yourself. – Justme Aug 27 '21 at 10:01
0

Based on your post and comments to other answers, the schematic is wrong as you are connecting 5V supply from PC and your local 5V supply together.

What you seem to want is the self powered configuration and there is an example schematic in the datasheet for that. Only difference is you might want to use 3.3V IO supply as your MCU pins may or may not be 5V tolerant. The chip still requires 5V VCC if you use the internal oscillator.

Justme
  • 127,425
  • 3
  • 97
  • 261