- a "camping" LED lamp- I used one like this one
- an Arduino or other programmable microcontroller
- a timeswitch
- a "wall-wart" power supply
- transistors capable of switching about 500mA
Step 1: Pulse width what now?
LEDs aren't like incandescent lightbulbs in the way they dim. If you supply an incandescent lightbulb with a reduced voltage, it doesn't put out as much light. LEDs don't work quite like this, and tend to turn on suddenly with a small increase in voltage. The usual way of dimming LEDs is to turn them on and off very quickly- this is known as pulse-width modulation (PWM), because by varying the amount of time the LED is switched on (the pulse width) you can control precisely how bright it appears.
All we need to do is write a simple program that will turn on the LEDs dimly at first, with short pulses separated by longer periods of being switched off, and gradually increase the length of each pulse so making the LEDs appear brighter.
This gets a little bit more complicated when you involve the human eye. It turns out, if you halve the amount of light an LED is actually producing, it appears more than half as bright. The human eye perceives a very small difference in low light levels as significant, but doesn't notice small differences between higher light levels. This means if we were to brighten the LEDs uniformly (starting at 10% brightness, then 20%, then 30% and so on) to a human observer it looks like it gets brighter very quickly at first, then slowly increases through higher levels of brightness. To compensate for this we need to switch the LEDs on more slowly at first, then accelerate through higher light levels.
If that all sounds overly complicated to just turn some lights on, don't worry- I've done the maths so you don't have to!