Electronic – What to do with USB power and ground when you have an external power supply

attinyusb device

I have a externally powered USB device. (It's actually my old VIC-20 computer, sort of)

USB data is handled by an ATTiny85. The USB interface is based upon the V-USB easylogger. The ATTiny85 receives inputs from the VIC-20 on three of it's pins and is powered by the VIC's power supply.

My question is, do I need to worry about the VBUS line at all if I'm getting my +5v from another supply?

Also, I'm currently sharing grounds between the USB, ATTiny and VIC-20. Is that a possible problem?

Here's the USB portion of my schematic.

Schematic

Best Answer

You could leave it disconnected but it is conventional practice to do two things with the VBus Line when you are an externally powered device.

  1. VBus is often connected into a detection circuit that will determine if 5V is present or not. This is useful for the device to know that it is connected to the host or not.
  2. USB D+ and D- lines are often equipped with clamp diode packages to help eliminate transient spikes that may come in the cable of the USB. It is sometimes appropriate to connect these clamp devices between the USB GND and the USB VBUS.