No electrical power in 1997 chevrolet k1500

I have 1997 chevrolet Silverado k1500. When I turned the key the other day, there was no electrical power. No gauges. No lights. I checked the battery and terminals and those are fine. When I turn the key slightly the § park illuminates but when i turn the key further it goes out. Then there is a buzzing sound from just to the right of the brake pedal. When I depress the brake pedal, the buzzing ceases but then a relay from under the hood in the relay center buzzes. Then when I turn the lights on, all buzzing ceases. But, the lights are not illuminated. I switched the buzzing relay with the a/c relay but that did nothing. I am wondering if there is a main relay that controls all the electrical power?

I checked the battery and terminals and those are fine
Please explain what method(s) you used to verify the battery is fine because it sounds like it is just dead...If it is dead, next step is to determine if the battery just cr@pped out or something is draining it. Step one, provide info requested above...

I used a test light initially. Then, tried to jump the engine. It wouldn’t even turn over. I changed the ignition starter switch. I still had no power. Then, I happened to look on the floorboard and i thought a relay might have been sticking out some. Now, I am not sure. I pressed on it and everything worked except that the starter switch must have not been quite the right one as I didn’t have windows, radio, blower fan. I put the old one in and everything worked. I ran the truck for a few days and one nite I was backing up and the engine quit. Same symptoms as before. I changed out the relay on the floorboard under the dash that i thought was bad but it didn’t make a difference.

Then, tried to jump the engine. It wouldn't even turn over

How long did you wait before trying? Reason I ask is a stone dead battery would drag everything down. It can take a few minutes to get enough juice to make the starter motor turn.

A test light isn’t sufficient. You need a meter. A cheap one can be had for under $20. It will pay for itself on this job alone.

One cheap test, turn on headlights. Do they come on? If so, now try cranking. Do they go out or remain on steady?

Look at the legend either in the owners manual or on the backside of a cover over the fuse box. It should identify the relay you’ve been messing with. Post that if you can.

When I first jumped the battery I left it on for a couple of minutes . Just now I checked the battery fuse under the hood and it looked good . I then went to the battery and tightened the positive terminal about an eighth of a turn . I put the negative terminal back on the battery and tighten that down . And the pickup started and everything looks like it works . I had two relays out from underneath the hood on the floorboard and I put those back in . That was while the pick up was running . So those relays must be good . So I’m going to run it for a little bit and see if this problem happens again . Thanks a lot for commenting and helping me out . I appreciate it .

Those side terminal battery cables and connections are notorious for corroding. You may have temporarily solved the problem, but you should go back and clean up both terminals, check the connections at the other ends of the cables, and check under the ends of the cables themselves for corrosion under the insulation.

Agree w @NYBo , sounds like you had some corroded battery connections there. I had something similar happen on my Corolla, I’d turn the key to “on” and everything seemed to light up ok on the dash, but when I tried to start the engine all the dash lights went out, and no cranking either of course. Lucked out, turned out to be loose and corroded battery connections. Suggest to buy one of those $2 battery connection cleaning tools and give the posts and connecters a good cleaning.

As mentioned above, the actual condition of a battery requires something called a “load test”. That’s not something a diyer’s do usually, requires special equipment. But many times auto parts stores will provide that service gratis to their customers. You could ask your local auto parts store if they’ll give you a free battery and charging system test. They provide this service b/c they’ve found when the battery doesn’t test ok, the customer will buy the replacement battery at the store. Batteries must be fairly profitable.