I'm working on a lamp project that I found online. It's a DIY lamp with a whiskey bottle for the base. The project itself just uses a standard 110V plug that goes right in to the wall, but I wanted to modify this just a little to include some LED's and maybe a timer chip or something, and I was wondering what's the correct way (or if it's even safe / possible) to run a smaller dc circuit somehow off of power taken from the 110 AC? How would you go about doing something like that? I imagine I'd need some kind of rectifier?
There are two ways to handle this. The first is to directly transform your AC 110V waveform down to something much lower, say, 20V. Then, you use a full-wave rectifier to smooth out the 15-20 VAC waveform, and then regulate that down to your 5V to drive your LEDs.
The other way is to full-wave rectify the 110V AC into the ~160V DC. You can then use a switching regulator to bring that high voltage down to what you need it to be, in this case, 5V. Switching regulators should be fairly easy to find on sites like Digikey, and aren't too hard to use.
I think you can also buy an assembled SMPS and use that and directly get your 5V out from the mains supply.
Edit: This only applies if you know what you're doing! If you don't want to expose yourself to potentially lethal electricity, follow jippie's advice and get a wall wart. Unless you're interested in actually designing your own rectifier, most of this information isn't necessary since wall warts are super cheap.