Sub panel bonding

Can the ground bar in a sub panel be grounded back to the main electric panel or must it be bonded to the sub panel box? First picture yellow conductor is attached to ground bar. Second picture the yellow conductor is attached to neutral/ground bar in the main panel.

The grounding terminal must be bonded to the cabinet at all electrical panels, whether it’s a service panel or “sub” panel.

The neutral conductors must remain isolated from the equipment grounding conductors at all but the service panel.

Thanks Jeff,

The neutrals were isolated in the sub panel. The grounding terminal was not.

Is the yellow conductor run in with the feeder conductors? If so it’s an equipment grounding conductor and needs to green, green with yellow stripe, or bare.

If that yellow conductor is connected to both the neutral terminal and the grounding terminal, then the neutral terminal is not isolated.

Subsequently, if the grounding terminal is bonded to the enclosure, the neutral terminal is also bonded to the enclosure.

What if it’s only a 3-wire feed?

According to the OP the photo’s are of two different panels. One where the yellow EGC originates and one where it terminates.

My question is “when” there is only a 3-wire feed (HHN) to a remote distribution panel does this still apply?

A feeder within the same structure must have an EGC along with the feeder conductors so a 3-wire feeder (H-H-N) is not permitted unless it’s a separate structure and installed under an older version of the NEC.

So when the service disconnect is at the pole, is the house considered a separate structure?

If so, when older NEC versions allowed a 3-wire feeder were the neutrals still required to be isolated from the grounds at the panel?

In older codes a three wire feeder to a detached building was allowed. The neutral was again bonded to the grounds. You could have no metallic path between buildings.

I didn’t catch that initially…

And the neutrals and grounds were also bonded to the panel, preferably with a ground rod at the building, correct?

Thanks Jim.

If the detached building is served by a feeder, not a single circuit, a grounding electrode is required.

The detached building panel was treated like a service and the bond was established.