Quick Explanation / TL;DR: / READ ME
If you have called to ask for help, one of the things we often ask you is, “Are you using a power inverter to power your laptop? Do you have your laptop plugged in to the wall?”
There is a reason for this, and we see product get killed every year because of it. If you don’t want the “why” and just want to know what to do, stop reading after this next line (or skip to the more detailed “solutions” section at the end):
DO NOT PLUG POWER INTO YOUR LAPTOP WHILE YOUR MOATES DEVICE IS CONNECTED TO ANYTHING ELSE, LIKE YOUR CAR!!!
Full Explanation Why
Alternating Current (or “AC”) does not rely on ground to operate, guaranteeing only the difference between two terminals and that the voltage periodically changes polarity (plus and minus “alternating”). AC is what comes out of the wall in most electric grid delivery. Direct Current (“DC”) is what comes out of batteries and other DC power sources. With DC, potential stays one direction without changing polarity and voltage produced by a battery is expressed as a positive number of volts. The negative terminal of the power source is generally assumed to be where you are measuring from when talking about DC.
Ground is not zero volts. Ground, electrically speaking, is just the place we agree to call zero. It’s just a convention, a spot to measure from.
AC can have both a negative and positive component with respect to ground. It can also be entirely positive with respect to ground. It can also be entirely negative with respect to ground. As long as the DIFFERENCE between the two AC terminals varies according to specification, they can be valid AC. For instance, two wires varying between -220 and -100 volts and two wires varying between 50 and 170 volts can both be 120VAC because ((-100) – (-220)) = 120 and ((170) – (50) = 120. It doesn’t matter that neither of these AC voltages is centered around what we are calling zero volts (“ground”). In most residential electricity, the “neutral” wire is supposed to be connected to earth ground (literally, a stake in the ground) at the power distribution box but this is not required for AC current to be present – only the varying voltage potential between two points is required even though neutral really is earth ground in most residential electric.
DC is generally (but not always) expressed as a positive voltage with respect to ground. If you were to reverse your multimeter’s leads and connect the minus lead to the positive terminal of the battery, the chassis (assuming the negative terminal is connected to the chassis) would measure -12V. The voltage supplied by an ECU to a throttle position sensor is generally 5V, with respect to sensor ground. If you were to measure the voltage at the TPS sensor +5v supply with your multimeter ground connected to the +12v terminal of the battery, you could expect to see (+5V – +12V) = -7V instead of +5V. If you move your multimeter minus terminal to the TPS- pin, you should see +5V between TPS- and TPS+ reference. The voltage didn’t change – how you observed it changed because of where you chose to call ground.
Ground is just a convention that we agree on. If you do funny things with ground, you will get strange results.
If you have AC voltage without an explicit ground, you have an infinite number of ways to make DC from it. In most cases, AC-DC supplies pick a potential in the middle of the AC range and “call it” ground. They then use electronic components to create a voltage that is always a fixed difference from the AC voltage picked and call this the output. The AC-DC supply provides BOTH “ground” and “supply” as outputs. As long as whatever DC load is connected only ever sees these ground and supply terminals, it will operate perfectly as it has a constant voltage potential (DC Voltage). For most common DC devices (cellphones, laptops, etc.) this is perfectly acceptable because the electrical energy inside the device is largely self contained and it doesn’t need to interface with other devices powered by DC. For sake of an example, let’s assume that we stick our multimeter minus lead into the ground. Our AC input measures -60V to +60v with respect to the earth, for 120V total difference. Our power supply outputs +42V and +30V with respect to the earth. The difference between the output terminals (+42V, +30V) is +12V, and a 12V DC load would be perfectly happy.
If you have a DC voltage and you want to create a AC voltage, there are also an essentially infinite number of possible ways to do it. As long as the difference between the outputs measures appropriately and the signal switches like it should, an AC device should function correctly. If we agree that ground is the negative battery terminal, our power inverter plugged into a cigarette lighter socket on a vehicle receives +12V and 0V from the battery. It can output a voltage that swings between +120V and 0V. It can output a voltage that swings between 0V and -120V. Both of these will be A-OK for something plugged into the power inverter looking for AC because the difference between the AC outputs varies by 120VAC.
So what happens when we take our example AC-DC power supply (supply +60/-60: receive +12V in the form of +42V and +30V) into our power inverter supplying +0V and -120V? The power inverter is giving a 120V AC output so the AC-DC supply works fine. The AC-DC supply chooses 18V below max input (+60V – +42V) for its output and 30V below max input (+60V – +30V) for its output. The AC-DC supply is being fed 0V maximum and -120V minimum. It outputs 18V below max input (-18V) for its output and 30V below max input (-30V) for its “ground” coming out, which is a difference of +12V (-18V – -30V) so completely acceptable to run our 12V widget that we’ve plugged into the inverter.
But what happens if our widget, powered off -18V and -30V, gets connected by a USB cable to the vehicle? If we measure all of our supply voltages from the same spot, -30V is a different potential than the terminal of the battery, which we agreed was “0” when we called it ground. This difference in ground voltage supplied to two devices with a connection in between is called a “ground loop.” Ground loops happen when two wires that are both supposed to be at the same ground potential get connected together with power supplies driving ground to different absolute voltage potentials. If you have two power supplies that are trying to push “ground” to two different voltages and you connect them together but they don’t agree about where “zero” is, so you end up with current flowing from “ground” of one power supply to “ground” of the other power supply, trying to equal things out. Most of the time, the small cables (USB, ribbon, etc.) supplied with our devices which provide the path from one ground potential to the other aren’t cut out for supplying many amps of power than can be supplied by a modern DC power adapter, leading to far more current flowing through wires that were not designed for it. Heat, smoke and damage are the usual result.
- Car battery (12V and ground), DC-AC inverter plugged in to the cigarette lighter(120V AC out with no common ground reference), AC-DC power adapter plugged in to inverter (+18V and “ground”, with ground floating somewhere between the voltages coming out of the inverter) connected to a Laptop with its USB ports connected to AC-DC adapter ground. Ground loop forms from AC-DC power adapter “ground” through laptop through USB port through USB cable to device connected to car battery ground.
- Bench power supply (providing 12V and ground) to ECU connected to laptop powered by AC-DC adapter (providing +20V and ground). Laptop and ECU connected by USB port ground, AC adapter for laptop and AC-DC power supply for ECU trying to achieve different “ground”
- Car battery (12V and ground) connected to DC laptop charger. DC laptop charger creates 20V to charge laptop but does so with a “hidden” DC-AC conversion coupled with an AC-DC conversion. DC goes in, DC goes out but ground is “lost” in a hidden AC conversion in the middle. By the time DC comes out, ground potential has shifted from ground supplied to it. Ground loop forms from laptop ground connected to floating ground of DC-DC converter and battery ground of car connected to ECU connected together by USB ground wire.
So why don’t you just isolate all your Moates devices?
Solutions for ground loops?
- The standard recommendation is “don’t run your laptop on a charger/inverter.” This allows ground of the laptop (which is connected to pins on the USB port) to float to whatever potential it is connected to instead of being driven to a certain potential by a charging adapter.
- Another solution is to explicitly tie the laptop’s ground to the power ground supplied to the ECU and link the chargers together, but be aware that whatever wire you use to do this may need to carry a significant amount of current.
- Using chargers which explicitly reference a common ground potential and don’t try to push ground to two different places would be ideal, but it’s often hard to determine how power supplies are designed prior to purchase.
- If you have to use two different power supplies (car battery and inverter+AC adapter, two AC adapters, etc.) use a multimeter to measure the voltage between the ground pins with them plugged in and powered. If it isn’t zero volts, you’re almost guaranteed to have a ground loop. You can also unplug everything so no adapter is powered and measure the resistance from one ground to another. It should be low, ideally zero. Anything more than a single digit number of ohms is likely to give you a ground loop.
- Using isolated communications is another solution. These may not be available for all devices but most of our emulators and “active” gear have a 4 pin port for direct communication, which would allow either the BT or Iso options, with an appropriate cable. (Pinouts are documented.) The two things we sell to enable this are:
- Bluetooth interfaces (there are no wires – communications happens over radio energy)
- The Optoisolator cable. (which uses a device that turns electricity into light to allow communication without an electrical connection)