3
\$\begingroup\$

I'm working on a board that will include a TP-UART IC + an ATMEGA328-AU on the same device.

enter image description here I'm now facing the potential risk of damaging the host computer or the TP-UART IC if I'm mishandling the power source of the board.

The device can be powered through the KNX bus (typically 30V) and the TP-UART IC has its own built in regulator and will output 5V or 3.3V for an host MCU.

The thing is that I want to be able to power the device from VUSB (when I'm not connected to the bus) and I also want to be able to debug my firmware (so tied to the KNX bus AND the VUSB from the programer / computer)

I've seen some potential solution using P-channel mosfets / some autoswitchinp power mux (TPS2112) or even just opamp, but I really don't know what would be the safest and if there isn't any risks of back feeding 5V from VUSB to the VCC pin of the TP-UART IC

Edit: @akwky pointed out that if the board is powered by both P1 and VUSB, the internal on-chip regulator may have a slightly different voltage from VUSB. So I edited the schematic by adding a Zener diode Voltage Regulators (1SMA5918BT3G) to hopefully clamp the voltage to 5.1V going to VCC/VIF. Maybe I should have put this diode only on PIN 7 of the TP-UART. What do you think?

enter image description here

\$\endgroup\$
6
  • \$\begingroup\$ Hi! Are you saying the TP-UART chip will use its internal regulator to provide 5V for your device? I can't seem to find how that would work, from the datasheet. The VIF pin seems like a 5V power input to me (chapter 1.2.7). Can you clarify? Anyway, why not use just another diode from (an external?) voltage regulator, similar to what you're already doing in +5V_SELECTOR? \$\endgroup\$
    – akwky
    Commented Jun 24, 2020 at 9:17
  • \$\begingroup\$ Maybe I've misunderstood the data sheet but the general description say : [...] It generates further a stabilized 3.3V or 5V supply to use by a host controller.[...] \$\endgroup\$
    – Sandra
    Commented Jun 24, 2020 at 11:42
  • \$\begingroup\$ Also the PIN that output +5V or +3.3V from the onboard regulator is VVSP not VIF (correct me if I'm wrong) \$\endgroup\$
    – Sandra
    Commented Jun 24, 2020 at 11:48
  • 1
    \$\begingroup\$ No need to apologies :) I found this particular datasheet incredibly cryptic to be honest... \$\endgroup\$
    – Sandra
    Commented Jun 24, 2020 at 12:36
  • 1
    \$\begingroup\$ I wanted to rectify that the PIN VVSP isn't the output power supply from the "on-chip" regulator as I was previously assuming. The documentation refers to this PIN as "Buffer Voltage VSP / interstate voltage" I'm still having no idea on what this exactly mean but my understanding is that the VSP PIN is just used to hook a bunch of bypass capacitor so the on-chip regulator can still provide a stabilized +5v or +3.3v even when the load on VB+ is changing \$\endgroup\$
    – Sandra
    Commented Jun 25, 2020 at 12:03

2 Answers 2

2
\$\begingroup\$

From the datasheet, there is no risk to the TP-UART if you power through the USB when there's no external power (I assume KNX is P1). Relevant information is in Section 1.1.1:

enter image description here

This tells you that there is no damage if \$V_\mathrm{VCC} > V_\mathrm{VSP}\$ and when \$V_\mathrm{IF} \geq V_\mathrm{VCC}\$ respectively. These are the conditions that would be met if you were using \$V_\mathrm{USB}\$ to power the device.

\$\endgroup\$
7
  • \$\begingroup\$ I found this table really confusing, thanks for confirming me that I can power the chip when there is no external power. But how about connecting it to USB when there is actually power on P1? (to catch serials output for debugging while connected to the bus for instance) \$\endgroup\$
    – Sandra
    Commented Jun 22, 2020 at 20:40
  • \$\begingroup\$ Yes this is the way the Arduino Nano board protect VUSB from the +5V generated by the on board regulator when using +7V to +20V (VIN input). I thought that using a Schottky will help me avoid getting a low VCC voltage... There might be a better solution \$\endgroup\$
    – Sandra
    Commented Jun 23, 2020 at 8:35
  • \$\begingroup\$ @Sandra Your protection diode D3 will protect your USB port, so no problem there. One thing, it appears that you don't have TXD and RXD connected on the TP-USART - is that intentional? \$\endgroup\$
    – awjlogan
    Commented Jun 23, 2020 at 8:38
  • 1
    \$\begingroup\$ @Sandra - no problem! Protecting the USB end is preferable, which you've done (diode and fuse). Btw, very nice schematic to go with the question :) \$\endgroup\$
    – awjlogan
    Commented Jun 23, 2020 at 8:52
  • 1
    \$\begingroup\$ Thanks you so much! And now I think I'm having a clearer understanding on the 1.1.1 table notes \$\endgroup\$
    – Sandra
    Commented Jun 23, 2020 at 9:02
1
\$\begingroup\$

I would recommend adding a diode between TP-USART's Vcc (pin 7) and the 5V power rail.

My concern is that if both voltage sources are powered, their voltages will always slightly differ. In extreme case, the VUSB can reach 5.25V, while the TP-USART onboard regulator might deliver only 4.75V. As these are both low impedance paths, large current may flow between VUSB and VCC, causing damage.

schematic

simulate this circuit – Schematic created using CircuitLab

(I've accidentally burned USB ports once by connecting a USB programmer into an externally powered 5V device.)

\$\endgroup\$
4
  • \$\begingroup\$ I thought that my fuse would have prevent large current flow between VUSB and VCC when the TP-UART might have a slightly low output voltage, but what you are pointing out make a lot of sense. Any recommendations? I saw that you draw a circuit using 1N4733A Zener diode, should I replace my Schottky diode D3? \$\endgroup\$
    – Sandra
    Commented Jun 25, 2020 at 10:29
  • \$\begingroup\$ Hi again, sorry for the misleading part number. The only suggestion I was trying to offer was the D10 between Vcc output of the TP-USART and the 5V rail. Using Zeners doesn't make much sense. \$\endgroup\$
    – akwky
    Commented Jul 2, 2020 at 7:12
  • \$\begingroup\$ "Using Zeners doesn't make much sense" Now I'm a bit confused :s \$\endgroup\$
    – Sandra
    Commented Jul 13, 2020 at 18:10
  • 1
    \$\begingroup\$ Hi again. I messed up when making the original schematic. I intended to add Schottky diodes, but mistakenly put Zeners in there. Since I can't find symbol for Schottky in the editor, I've now replaced these with normal symbols. I've also changed the part number to match your D3. Using the same part for the D10 should be fine. \$\endgroup\$
    – akwky
    Commented Jul 14, 2020 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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