Lamp- smooth dimmer

Hi,

I´m beginner in Arduino and building electic circuit therefore I need your help.

I would make the torch (lamp) with smooth dimmer.

I would make torch with twice power led diode (http://www.dx.com/p/ultrafire-cree-xm-l-t6-700lm-white-aluminum-smooth-reflector-silver-180243#.VAhp72u0My1).
Main controle will be Arduino Nano. I would like to use twice potentiometers with switch to control. I have battery pack 6x 1,2V NiCd to power (battery pack have 8,4V after charging)- It is posible make battery pack with reduce battery voltage for example 5 x 1,2 V.

Logic: I need smooth dimmer brightness of the light separately for each diode in the rande 0-100%.

I would like to ask you for your help with wiring diagram and with Arduino programming.

Thank you in advance

Best regards

Martin Pernica

mapernica:
I would like to ask you for your help with wiring diagram and with Arduino programming.

Meanwhile show us what you've got and the code progress.

Take a look at the [u]Examples[/u]. There is an example for reading a potentiometer, and another example for fading an LED. (You can modify the Fade-LED example to use the pin-13 LED that's already mounted on the Arduino board.)

You should be able to combine those two examples so that the pot adjusts the LED brightness. Then, you can modify it for two pots and two LEDs.

Once your firmware & pots are working, there are examples for controlling a higher-current device with a MOSFET.

If you are running off a regular flashlight/torch battery, that should be all you need because the batteries should properly limit the LED current. If you are using higher-current batteries, you'll probably need a dimmable constant-current power supply that's designed specifically for driving high-power LEDs.

NOTE: If you end-up needing a special constant-current LED power supply and you plan on using the pots to control brightness (with no automatic-program control), you can use the pots directly with the dimmable power supply and you don't need the Arduino.