Hi i'm attempting to build an LED desk lamp that is remotely activated using a touch sensitive remote control (not too far away) that is also a sliding dimmer (probably in 4 or so segmants). Basically i have extremely limited experience and have a few basic questions:

firstly, how to convert UK mains electricity AC to DC?

which way would be most advisable/easiest to transmit signals from the remote to the lamp? IR or..?

how difficult would it be to dim LED's? i heard something about pulse width modulation but kno nothing... lol

how difficult would it be to make the remote touch sensitive, and how can i achieve this? capacitance? god knows

That is a cool sounding project. I think the first version should be wired so that you can get used to the technology. Easiest way to get a nice low DC working voltage that is safe is to use a transformer (do a Google for Wall Wart Transformer) then a bridge rectifier.

I would install 4 potentiometers (rotary or slider) to adjust you lights.

You could do it wireless, but it would be much more complicated. I would use an RF communication link to allow for two microcontrollers to talk. The remote microcontroller would just read data from the switch of your choosing. It would then transmit that to the other microcontroller that uses PWM (pulse width modulation) to vary the intensity of the LEDs.

But I would suggest trying the first project first to get your feet wet.

hi, thanks for the quick reply alan,
hmm yeah it is a possibility to make it wired wouldnt look as cool tho , ok so transformer to rectifier makes sense but how do i dim the LEDs themselves? i know that the higher/lower voltage changes the brightness but how would i achieve this?

to be honest im having major issues visualising the circuitry in my head, ok talking in really basic terms the transformer is attatched to the rectifier that turns it DC then that is attatched to ... a microcontroller using pulse width modulation?.... that is attatched to the LEDs - with another microcontroller in the remote "talking" to the main microcontroller? i think i understand sort of lol,

ok next issue is the potentiometers, how could i make them touch sensitive so the light can be on a sliding scale?? and how could this all be wired?

Well the microcontroller circuit is much to complex to explain easily... Also it would require a great deal of programming to make it work.

If you go the wired way using a rotary or sliding potentiometer you would connect the cathode of you LED to the negative of the power supply, then connect the positive of the power supply to your pot the other side of the pot to a fixed resistor and finally the other side of the fixed resistor to the anode of the LED.

The fixed resistor would allow current limiting when the pot was turned to its 0 value, something like a 10K pot should give you good variability. To calculate the value of the fixed resistor use this page and enter the voltage and characteristics of the LED you plan to use.
http://alan-parekh.com/led_resistor_calculator.html

You could power it form your computer. That is if your computer is close to the desk. USB power is anywhere from 0 volts to +5 volts dc this would erase one of your concerns. this would however mean you have to leave your computer on.

Dude, power it from a wall-wart type power supply. Do not, under any circumstances, fuck around with mains. Especially if you don't know what you're doing.

Powering the lamp from USB is probably a bad idea. AFAIK, the max you can draw is 500mA (that means the max power output of the lamp is a measly 2.5W) and not all USB ports can source that much power. The USB device has to make a special request to the host computer if it wants that much power. Suffice to say, that complicates things enormously. Just forget the USB thing, kay?

The principle of a light dimmer is quite simple. Instead of applying constant power to your light bulb or LED or whatever, you apply power to it say 50% of the time, which reduces the brightness. Essentially, you switch the light element on and off very rapidly, varying the ratio of on time to off time.

The remote control thing might be tackling too much at once. If you're having trouble understanding how a circuit like a light dimmer might work, you should probably nail that part of your project first before building a remote control interface.

right im getting more of an idea of how to do this light i just have a few questions left;

what transmitter/receiver should i use (frequency / bit rate etc) to relay the dimmer information to the main lamp??? any component manufacturer websites would be helpful.

how do i dim the LEDs (40, white)? i dont understand pulse width modulation / what components i would require to achieve it? / how can i do this from the information sent from the transmitter (using a microcontroller i guess).

basically i need to know all the components i require as i am producing a CAD image of the model this week.