Let me add to this:
- it is not possible to put in enough safety tips that you are safe from harm when messing with electricity; you are always putting yourself at risk when you play with hazardous voltages and currents
- read what the pros say; find yourself a book on electrical product safety, something about meeting IEC 600650 or UL600650.
- realize that by creating or modifying anything which uses AC line power, you are creating the possibility of a shock or fire hazard not only for yourself, but for anyone who ever comes in contact with what you've done, possibly years later.
If I'm sounding like a party pooper, forgive me. It's not a party if you electrocute yourself or someone else or start a fire. All of which have happened.
Some specifics, which, as I said, are not alone enough to keep you safe:
- In general, if you can buy a widget which comes pre-approved by a safety organization, you are paying a bit of money for someone else with training to have figured out what's less hazardous for you. A few bucks is far cheaper than a funeral

- Use a three-wire AC cord, with safety ground. Don't think you can be clever or smart enough to successfully follow all the dance steps for safety with double insulation, the only recognized safety requirements for two-wire power.
- Use an IEC power inlet jack like this:
http://www.mouser.com/catalog/specsheets/KC-301138.pdf which does several things for you: it lets you use modular cords; it eliminates you having to figure out how to strain relieve a power cord; it incorporates a fuse holder; it has been pre-tested by safety testing labs and is certified to be "not known to be hazardous" (which is NOT the same thing as known safe). This one sells in the USA for $2.09 at the time I wrote this.
- If you want, there are IEC inlets which have AC power switches AND fuseholders in them, eliminating another place for you to accidentally mess up your AC wiring.
- Once you get out of the power entry module, as Joe says, your first order of business is to get the third-wire safety ground bonded to the chassis. Which means, among other things, that you must have a metal chassis to bond to. One way to do this that has been accepted by safety labs before is the following: Drill a hole in the chassis; sandpaper a 1"/25mm diameter area around the hole down to clean, bright metal. Stick a screw of at least #8 or M4 through the hole from the outside and put a toothed/star washer over the screw. Place the ring terminal of your green safety wire (yep, you had to crimp on, not solder, a ring terminal to do this right) over the star washer, ensuring that the teeth of the washer touch the ring. Over that put a star washer, and over that a nut. Tighten the nut down snugly, making sure the star washer teeth bite into the chassis and the ring terminal. Anything less than this procedure can let the ground connection work loose with vibration and/or metal creep, and may set you up for shock hazards in the future. Loctite can't hurt, but the star washers are what holds.
- Use heat shrink on any exposed AC power terminals
- Either do proper crimps on Faston terminals and ring terminals or properly solder AC power wires. Solder may NOT be used for pressure connections, and do not tin copper wires which are put into compression terminals, like screw terminals. Why? Solder creeps under pressure. Tinned wires which are held by pressure in screw fittings can become loose over time and make a fire hazard.
- Test your input jack ground for continuity to the ground prong of the (unplugged!!!) AC line cord. If it's not continuous, you have a safety problem, because all accessible metal must be grounded.
This is just a smattering. Go learn and be safe.