lunar accents logo
LED circuits

website index terms and conditions help
home design applications technology educational getting-started company products

LED Device with Batteries

inquire about articleprint articlefeatured articlesupdatesrequest-article

I would like some advice on a LED project that I have. The device will use 2 AAA batteries to power 6 standard (color) 20ma LEDs. I am interested in having the following functionality: Upon the installation of the batteries one or all of the LEDs would blink on for some duration (most likely less than one second) every 90 seconds or so. Once the on/off button is pushed the blinking stops and all the LEDS light until the on/off button is pushed again. The first time the on/off button is pushed it will cancel the flashing until power is cycled to the board. I would also like to add a photocell so that only the blinking function does not work while light is present. Any suggestions of make and model of appropriate microcontrollers and electronics would be greatly appreciated.

Driving LEDs for Batteries

When you mention standard color, I assume you are referring to one of the readily available LED colors, red, orange, yellow, white, blue, and green. A buck regulator or resistor might be used in conjunction with red, orange or yellow. However, since white, blue and green LEDs have a much higher typical forward voltage, this configuration will no longer work. You may need to add more batteries to increase your supply voltage, or drive the LED at a much lower current, which will in turn decrease the forward voltage across the LED junction. The other alternative is to incorporate an boost regulator to increase the voltage supplied to the LEDs. Since your product will include various colors, your board may require two configurations. However, if you wanted to consider a buck-boost regulator, this would allow you to configure the board either way. National Semiconductor offers a wide range of LED drivers including several buck-boost regulators. Possibly consider the LM3478 or LM5020 for this design.

Surface Mount LEDs

Consider the Luxeon Rebel or Nichia Rigel for LEDs. The Rebel is often available in various bins with pricing that corresponds to the intensity. This can allow you to select an LED that meets your requirements, but is not too bright or expensive. The Nichia Rigel currently comes in a half watt or one watt package, and either with or without an integrated lens. The version with lens will provide a narrow beam closer to 60 degrees, as where the non-lens version is standard at 120 degree beam angle. To achieve close to the same performance of a P4 package, you may not even need to drive the LED as high as the typical rating. This will also help to minimize your forward voltage drop, which is a factor in your application.

Blinking LEDs

A very basic microcontroller, such as the PIC10F204, can provide you with the functionally required to create your blinking LED routine. If your regulator comes with an enable pin, connect the output from the PIC directly to it. If the regulator you choose does not offer an enable pin, you may want to consider a separate low side driver, connected to your PIC micro. The firmware should be very strait forward, and would consist of a basic timing loop to generate your delay. On the PIC10F200, you are forced to use the internal RC clock setting. At the lowest speed, your firmware might only require three stacked registers to create the 90 second timing loop. You can also use the comparator option to accept an input from your light sensor. When no light strikes the sensor, allow the microcontroller to sleep. This will preserve your battery life. The option register allows you set a wake up on pin change or comparator change. This turns the microcontroller back on when light strikes the sensor. Anyone with experience using the PIC microcontroller should have no problem producing the code for your LED controller.