The benches in my lab have power strips mounted under and the back of the lower shelves. Originally the lighting was hard wired into the strips, but I changed the wiring so it has a separate plug as I didn't want them always on.  The fixtures do have switches on them, but once I altered them for indirect lighting, they are hard to reach.  For awhile I've just been plugging and unplugging the overhead lights, and wanted to finally fix that.

I could have just used a power strip for this, but I wanted a cleaner look with just the switch at the front of the shelf, without any cables dangling around.

I dug all the parts out of my stock.  

  • A scavenged metal project box formed the case.
  • A panel mount AC socket
  • A panel mount rocker switch
  • An AC cord with moulded in strain relief 
  • A pair of (spinning disk) hard drive magnets

I used a dremel with fiberglass cut off wheel to cut the openings, and file to smooth them. The AC cord has a moulded in strain relief, intended to go into a panel slot, so I just cut an appropriate one in my case.  However, it was meant for thicker material, so could wobble around.  I simply filled the gap with some hot glue so it wouldn't wobble.

To attach it to the shelf, I decided to epoxy on some hard drive magnets to the bottom. (The case is aluminium, but the shelving is steel). Anyone who has pulled these magnets from hard drives knows that they are glued onto a plate.  Trying to get the magnet off the plate sometimes works, but leaves a thin magnet which can easily be cracked.(assuming a more modern 3.5" drive). More often though, the magnet will break apart in the attempt.  So most of the ones I've saved have the plates still on.  I left the plate and just glued it to the case bottom.  I could have screwed it, bit didn't feel like dealing with the issues of trying to drill next to a powerful magnet, or even put a screw in.