11/15/21 – Why is it so hard to explain grounding?

I think that the most common question that I ask people when I’m trying to help them out (after all the initial questions), is, “Are your grounds correct?”  It’s really important to get your grounds correct.  If the grounds aren’t correct, all sorts of issues will occur that will be nearly impossible to figure out.  The other issue is that trying to figure out grounding moves you from the realm of hobbyist to something a little bit deeper.  The nice part is that there are some rules of thumb that you can use to greatly simplify the issues that you will run into.  Hopefully laying out the rules of thumb will make it more understandable.  (Note:  This will not make you an expert on grounding, but it will hopefully give you some pointers.)

Rules of thumb:

  1. All current sourced by a power supply should return to that power supply.  (Don’t mix electrons up).
  2. All grounds should be connected together as close to the power supplies as possible.
  3. Big loops of wire, (especially with lots of current going through them) are bad.
  4. Bundles of wire containing both high current wires and signal wires are bad.

That’s it.  That’s all you have to worry about.  If you keep those simple things in mind, you will be fine.  Let’s dive into each of the rules and see what I’m trying to say about them.

All current sourced by a power supply should return to that power supply

OK.  Let’s talk about SharpeShooter3 (SS3) since it has five PC power supplies in it.  When I’m debugging, it actually has six power supplies in it, but we’ll ignore that.)

Four of the power supplies are connected in series to give me 48V.  Since each PC power supply only creates 0-12V, I basically connected the 12V of the first power supply to ground of the second power supply, etc.  To make that work, you need to disconnect the earth ground pin on the second, third and fourth power supplies.  If the earth ground isn’t disconnected, the power supplies will smoke.  (I think there is another connection that needs to be severed, but I can’t remember at this point).  If interested in that, read the old posts on the MaxPower card that I did.

So let’s assume for this discussion that those four power supplies form a single 48V power supply.  (Unfortunately, cheap 48V power supplies weren’t available when I made the MaxPower board.)   The 48V drives most of the coils in the pinball machine.  So that power supply has 48V and ground on the DC side.  (I’ll call that ground, gnd(48v) for this discussion).   So when I fire a coil, all of the current goes through the coil, through the MOSFET (which turns the coil on and off) and ends up at gnd(48v).

Now the next power supply, powers the computer and all the Gen2 boards.  The computer running the rules uses gnd, 3.3V, 5V, 5VSB and 12V.  The Gen2 boards use 5VSB and gnd from that same power supply.  (5VSB is the standby voltage that a PC power supply has.  It is always on even if the power supply’s higher voltages are turned off).  Let’s name that ground, gnd(5vsb) for this discussion.  Again, all of the current from that power supply needs to be returned to it.  Since the Gen2 boards are detecting when switches are closed, the switches must be attached to gnd(5vsb).  The inputs of the processor are internally pulled up to 5VSB.  When grounding the pin to indicate that the switch is closed, it must be attached to gnd(5vsb) because the current came from the processor’s power supply.

All grounds should be connected together as close to the power supplies as possible

So we have two power supplies with two different grounds (gnd(48v) and gnd(5vsb)).  You may wonder why we can’t just keep them completely separated.  That would work except for the MOSFETs which are where it starts to get interesting.  The Gen2 boards fire the solenoids.  To get a n-channel MOSFET to turn on and fire a solenoid, the gate of the MOSFET needs to be brought to about 3V above the source pin of the MOSFET (which is connected to gnd(48v)).  Since these are two completely separate power supplies, gnd(48v) may not be the same voltage as gnd(5vsb).

What you say?  But they are both ground.  How the heck can they be different voltages.  Just trust me…they can be because of how most switching power supplies work.

To get the MOSFETs to fire, we need to tie those grounds together.  Instead of connecting them near the MOSFETs, the best place is back near the power supplies.  In my case I have all the power supplies in the backbox.  The ground connection occurs in the backbox.  It doesn’t occur under the playfield where the MOSFETs are.  The reason for that is, if it was connected near the MOSFETs, some of the current from the 48V power supply may accidentally get mixed up and go to the 5VSB power supply.  Remember the first rule.  Don’t let current from one power supply get confused and go to the ground of the other power supply.

People have been known to add a 2 or 3 ohm resistor between the grounds to make sure that the current doesn’t get confused.  Yeah, that would work, but isn’t really necessary if you tie the power supply grounds together near the power supplies.

Big loops of wire, (especially with lots of current going through them) are bad

The only time that you really need to be conscientious of loops of wire is if it is carrying solenoid current.  Solenoid current can easily reach 5 or 10A which means it is really important to pay attention to loops.  Loops of wire with current running through it creates a magnetic field and can be affected by magnetic fields.  (That is how a solenoid works).  While a solenoid has many hundreds of turns to increase the magnetic field, even a single loop is bad.  Minimizing the size of loops is always better.

Do not do the following:  Do not run the 48V power line to power the solenoids down the left side of the bottom of the playfield, and run the gnd(48v) on the right side of the playfield to return the current.  Running the wires in this way, it would form an immense loop which is really bad.  (It also means that the loop of wire acts as an antenna which is a double whammy).

In a perfect world, I would run the solenoid power and grounds (48V and gnd(48v)) on the bottom of the left side of the playfield, and run little branches to each solenoid across the bottom of the playfield as necessary.  I would cable tie the 48V and gnd(48v) together because inducing noise between those signals doesn’t matter, so that would make the wiring that much cleaner.  Then I would run all of the logic voltages (5VSB and gnd(5vsb)) on the right side of the bottom of the playfield to keep them as far away from each other as possible.

The problem is the world is not perfect, so I didn’t really follow this rule 100%.  I tried to keep the 48V and gnd(48v) as far from the switch signals as possible.  Of course, if you have a pop bumper, by definition, there is a switch in close proximity to the solenoid.  Don’t worry about it.  It’ll probably be fine as long as you don’t cable tie those signals in a bundle and have the wires parallel to each other for 10 or 12 inches.

Bundles of wire containing both high current wires and signal wires are bad

This brings me to another point.  Impulses of current are also bad.  Going from 0A to 10A in a very short time induces voltage in wires that are run in parallel.  This is why I cable tie 48V and gnd(48v) together, but never cable tie those wires with a switch return.  The amount of induced voltage depends on the length of the wire where the signals are running in parallel, the square of the distance between the wires, and the speed of the change in current.  You can’t change the speed of the change in current (well you could, but then your flippers and pop bumpers would be weak, so that really isn’t an option).  You can minimize the length of wire that is parallel (i.e. don’t have gnd(48v) and logic inputs in the same bundle).  You can also try to make sure that those wires are as far from each other as is practical.  They will be close in many cases, but as long as they aren’t running in the same bundle, you will probably be fine.

So in my case Gen2 cards are distributed and so the longest lengths of wire that I really have under the playfield for inputs is 5 or 6 inches at the most.  If I have a 7 bank drop target, I put all of the inputs for detecting the drops are down in the same bundle because it makes things clean and tidy, and none of those wires are carrying much current, so they aren’t going to induce voltage in any other wires.

My ribbon cables for communicating between cards runs down the middle of the playfield.  That gives me some distance between the solenoid wires (48V and gnd(48v)) which are on the left side and the critical processor communication signals.  I’ve even broken this rule when going around the drop bank because it was a shorter ribbon cable to go near the solenoid wires that reset the drop bank target.

So I haven’t mentioned the lights and how they are powered.  Currently they are powered using 5V from the processor power supply.  (This is the high current 5V supply on a PC power supply)  I separate this voltage and ground from my 5VSB and gnd(5vsb) to make sure that the processors don’t get affected by the lights turning on and off.  That means that I have a third ground for lights that is gnd(5v).  That is probably not strictly necessary.  Since I am using LED bulbs, each bulb turning on and off really doesn’t create that much of an impulse in current.  Of each bulb takes 50 mA, so it would take 20 bulbs lighting up all at once to get an impulse of 1A.  Not nearly as much of a worry as the solenoids.  If I was really serious, I would run all those wires near the solenoid wires.  Ehhh, more than likely it doesn’t matter, and since the bulbs are distributed evenly around the playfield, I actually ran the 5V power down both the left and right side of the playfield.  That just made wiring easier for me.

That’s it.  Those are my rules of thumb when wiring a playfield.  If you follow them, you should have pretty good luck.  If interested, read up on the difference between a MOSFET and a Darlington transistor.  Old pinball machines used Darlington’s while most people are using MOSFETs in their homebrew pinball machines today.  Darlington’s back in the day couldn’t be driven directly from a processor because the amount of current through the Darlington is directly proportional to the amount of current put into the base.  This means that a second driver is needed to supply that current.  Glad we don’t have to do that anymore.  (If you have worked on pinball machines long enough, you have probably seen the big 10 ohm resistors that are limiting the current to the base of the transistor, and you have probably found a couple of them laying at the bottom of the back box because they got so hot they desoldered themselves.  Ahh, the good old days.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s