I want to connect my microcontroller (dsPIC33E) to a PC via USB. Since the particular microcontroller doesn't have a built-in hardware for the USB protocol, I have to use an external chip (e.g. TUSB1106PWR or MAX3454EEUD+), i.e. a USB transceiver that I plan to connect to a UART port of the microcontroller.
The microcontroller has its own isolated power supply (3.3-5V), and what I want to know is do I need to isolate the data bus via optocouplers?
As I see it, there are three options regarding power supply:
- To use a separate (isolated) power supply for the microcontroller. The same (isolated) power supply is used to supply the USB chip, i.e., voltage supply and ground pins on a USB connector are NC.
- The microcontroller is supplied by its own (isolated) power supply, and the USB chip is supplied by the USB port/cable.
- Everything is supplied by the USB - the microcontroller and the USB chip. In this case, I don't need to use the isolation.
Addition to the original question:
Let's say that a microcontroller has its own (isolated) power supply, and the same power supply is used to supply the USB transceiver. Now PC has its own (possibly isolated) power supply. I have a situation exactly like this.
I'll now write a series of questions, I apologize if I oversimplified the questions. Simply yes or no will do with a reference to a question:
Q1. If the two grounds are not tied together, then there is no voltage between the two grounds, since there is no reference point - correct?
Q2. If we tie together the two grounds, that becomes a reference point for the whole system. If both supplies are isolated, or at least one of them, then there will be no voltage difference between the two grounds. Tying them together we would simply reference those two grounds - correct?
Q3. If the two power supplies are not isolated, and they are both connected to the AC mains, then something really bad could happen, since the two grounds can be at a different potential, and they are both referenced to N. If we tie the two "grounds" together, due to the voltage difference current will flow from higher potential to lower, and depending on the voltage difference, something might get burned - correct?
Q4. Since D+ and D- come from the PC side, if we don't tie together the two grounds, then the USB transceiver wouldn't be able to represent voltage levels on D+ and D-, since there is no reference point - correct?
Q5. If USB transceiver operates in a differential mode (it looks for the voltage difference between D+ and D-), then we don't need to reference PC's ground at all, i.e., we don't need to tie the two grounds together - correct?