Replacing a ceiling-mounted light fixture with a ceiling fan is a fairly simple do-it-yourself job: You just need a drywall saw, some screws, a new electrical box that's sturdy enough to support the weight of the fan, a bit of adhesive and your fan kit.

Plus, you'll need a city building permit.

That's right. Phoenix, Tucson and most other cities want to know when you're replacing a light fixture with a ceiling fan so they can send an inspector over to make sure you're not trying to hang a heavy vibrating fan from a box designed to support the considerably lighter, stationary light fixture.

The permit will cost you around $75 or $100 (depending on where you live), and the inspector could save you from becoming the victim of a poorly anchored fan that lands on your bed while you're sleeping.

In fact, you're supposed to get a city permit whenever you mess with the electricity, plumbing or structure of your house.

When you replace your water heater, you're supposed to get a permit. Before you put up a fence, you need a permit. If you build a retaining wall, you need a permit. When you replace all of your roof shingles or reroof over old shingles for the third time, you need a permit.

You need a permit if you change the location of a toilet, sink or tub. You're supposed to get one before you convert your carport or patio to a room or garage. If you add electrical outlets, change a window to a door, replace a small window with a bigger one, remove or move a wall inside your house or alter your driveway, you need a permit.

And, of course, if you add a room, install a pool or do other major construction, you'll need a permit.

It doesn't matter if you get the permit or if your contractor does, but you're the one responsible for making sure a permit is issued. So either get it yourself or ask your contractor to show it to you.

Mike Hammett, public information officer for the city of Phoenix, says a permit is "insurance that everything has been checked over and meets codes for safety."

In fact, that's what it's for. A city building inspector will look at your plans for altering or adding to your house and advise you if your project doesn't live up to city codes for safety and soundness.

The inspector will visit your home before, during or after you've done the work - the bigger the job, the more visits you'll get - to ensure that the products you're using are rated for fire safety, that any work involving electricity or gas complies with regulations, and that you're not creating a safety or structural problem in your house by removing a load-bearing wall or adding a room that will leave too little space between your house and the one next door, for example.

Still, you don't need a permit for simple jobs like painting, changing your kitchen countertops or replacing a toilet or sink with the same item in the same place. In fact, if you're replacing a ceiling fan with another ceiling fan in the same place, you don't need a permit.

The size or price of the job doesn't affect your need for a permit. It's the nature of the work that determines whether you have to get one. If you're not sure, call the city and ask.

I always get the proper permits, partly because it's important to comply with the law, and partly because I don't want to deal with the consequences of ignoring it.

Suppose you skip the permit and a nosey neighbor decides to report you to the city. You could potentially have to remove an entire addition if the one you built is not structurally sound. You might have to tear out your new drywall so the inspector can look at the wiring behind it.

If you try to sell your home with an unpermitted addition, county records won't reflect the addition's square footage, and that could affect your selling price. Plus, the bank will want to know what kind of work has been done on the house before it will give your buyers their loan, and a missing permit could kill the sale.

It's pretty easy to get a permit for a small DIY job: Just trot down to the city office building and pay your fee. Bring your plans with you, and if your project is simple, someone will look at them on the spot and schedule a visit from an inspector. In Phoenix, you can even do this part online.

For larger projects, it might take a couple of days for someone to study your plans and approve your permit, and you might have to schedule more than one inspection.

Hammett says the inspectors are sensitive to the fact that you probably want to get to work on your project without any delays.

"They're there to help you get your project complete . . . but safety is the bottom line," he says. "It's true: It's an extra layer."

But Ron Boose, a building official in Tucson, says it's well worth it. "I know of a couple of ceiling fans that have fallen right off of the ceiling," he says.

For more do-it-yourself tips, go to rosieonthehouse.com. Rosie Romero is an Arizona contractor