David Newton said:
Peeps.
I built my first lamp last July using 4 x 4000mcd blue LEDs and turn it on
since then for about 1 hr a week. I still has the same two IKEA D cells as
it started with with no dicernable reduction in brightness...
David
I would suggest the used of a small PIC with an Analogue to Digital
converter (A-D)
The 12F675 - 8-Pin or 16F676 - 14-Pin cost is about $1.50 from agents in
small quantities
I prefer the 16F676, it costs about the same as the 12F675 but has many more
pins to
play with and the Flash PICs allows in-circuit reprogramming.
(Just as the friends get bored, you can add new tricks to your gadget
by reprogramming the PIC.)
The NiCad's 3.0 to 5.2 volts falls nicely within the PIC's operating voltage
range
Using the internal oscillator and an external FET or Transistor to drive the
LEDs
will result in a very low parts count.
You would probably require a very low current, voltage reference of say
1.25v
to set a threshold on one of the analogue inputs. As the supply drops, the
A-D
will register an apparent increase in voltage as the batteries discharges
- just pick the correct value to shut down.
With the PIC you can
a) Use the A-D to measure the battery voltage and shutdown the system
to sleep mode (few uAmp - probably less than the NiCads self discharge
voltage)
b) Use a single simple pushbutton to switch on and off.
c) Have all sorts of fun with light effects and multiple LEDs.
d) Can indicate (with LED flashes) when batteries are fully charged.
e) Automatic turn on and off at specific times (needs accurate clock)
f) Automatic turn off after x hours
g) .....(just be creative - you don't seem to have a problem
You could even use four NiMH batteries or three rechargable Alkalines.
Charging these batteries is series can be a problem.
Gerhard