posted 4 years ago
I believe that the "correct" way is to ground the solar panel with a ground rod at the base of the mount, and then run a continuous grounding conductor to the battery shed and have another ground rod at that location. There are also requirements in the electrical code about having a ground-fault interrupting breaker, although if it would apply to your situation or your location is above my pay grade.
That being said, requiring a 12v system to be grounded seems silly to me. Even open circuit your panel probably doesnt exceed 18 volts, and as such there is really no electrical hazard to speak of. Just make sure you fuse the wiring from the battery bank in the off chance there is a short somewhere in that power line. If you use DC breakers, remember to orient them correctly - the battery is the Line side, and the panels are the Load. Since solar panels have a limited output, even a dead short will never burn out your wires if they were properly sized.
Edit: If you live in an area with a lot of lightning, grounding would probably not be a bad idea; but you might then also need a lightning arrestor on your power lines to actually protect the electronics.