Flashlight microprocessor design

zipplet

Flashlight Enthusiast
Joined
Dec 11, 2006
Messages
1,139
Location
Ireland
Hi,

At the moment I'm working on code for a PIC microcontroller (10Fxxx series) to use as the microprocessor in a flashlight mod. For those of you that don't know, lights like the Fenix multimode series use something similiar to give you the various modes available.

I know roughly what modes I'm going to have, but I'd like input from others about what modes people would prefer in a light, in what order, and what types of UI people like. Should I add extra buttons to the light? Power off/on cycling like Fenix P1D-CE? How bright should the levels be?

There is even the possibility to make it programmable if I can work out a nice way for the user to do that.

Even better is, if I switch to a PIC microcontroller with ADC, I can make the processor detect a low battery condition. What I'd do when I detect it, I'm uncertain of right now. Light up a small red LED?

Your ideas, please ^_^
 
Whatever you do for the low voltage thing, don't do like EdgeTac did and start voltage warning that flashes the main beam on and off and can't be disabled. Another LED is ok, I'd say.
Also, do keep in mind that it's probably better to ignore the low voltage thing altogether and just use (or tell your customers to use) protected cells, otherwise the warning stays on all the time when using LiFePO4 cells.
 
Hi, I prefer a light that comes on at a low level and goes up from there, but others will want the light to come on high. No strobe or SOS for me! Right now I think the HDS/Novatac EDC P is about the best interface as the user can set it to his own preferences.
 
Oh right. Either put strobe on a separate setting that doesn't get in the way of normal operation, or don't include it at all. SOS is utterly useless.
 
Regarding the low battery warning I'm thinking of allowing the user to select the battery type that is being used. This also allows me to make the light shut down at the correct cutoff point, allowing unprotected cells to be used safely which would be a very nice feature.

Selecting the wrong type would not destroy the light, but would throw the battery low warning off.
 
Regarding the low battery warning I'm thinking of allowing the user to select the battery type that is being used. This also allows me to make the light shut down at the correct cutoff point, allowing unprotected cells to be used safely which would be a very nice feature.

Hi Zip,
That would be a very nice feature indeed.Not only would it allow for safer Li-Ion use,but it would also keep someone from over-discharging and damaging NiMH cells,that is,if the driver would support two NiMH input.

As far as output and levels,I would say three,10%,40%,100%.

I'm with Frank also,start at low,progress to high.If this is going to be configureable by the end user though,then this could be loaded with several different programs.Just make sure its reasonably difficult to enter the change mode,something like 10 __ms presses of the switch.

Also,it would be nice if you had the option of setting the output with a resistor.It would also be nice to be able wire around the PIC for a single level driver.

Michael
 
The PIC microcontroller I intend to use has an internal voltage reference module that allows me to determine the current battery voltage easily, so I'm definately making this configurable (the cutoff point). The PIC can run down to 2V making this a good for li primary/li-ion setups but not 2xAA. It's possible the PIC may run acceptably below 2V (just microchip only guarentee 2V).

Thanks for everyone's suggestions. Right now it's looking at a 3 stage light, and I'm going to make the levels programmable somehow, but I don't want a horrible UI. I wont bother with SOS, and I don't know if I'm putting in a strobe mode.

The PIC will achieve dimming via very high frequency PWM (in the Khz range) switching the boost/buck circuit, which will have it's output smoothed slightly with a cap. I intend this to be useable with dealextreme drivers aswell as custom designs. I may also look into controlling the driver directly without PWM, but it will require a PIC with more I/O pins. I'll see how the good the PWM is first.

The PIC I am using right now (10F222) has 4 I/O pins, of which I am allocating like this so far:
0: Power sense
1: Driver control
2: Warning LED
3: <unused>

The driver will be wired up so that if power is interrupted (light press on a reverse clicky) the PIC still has power for a couple of seconds from a capacitor. A schottky diode is used to prevent this cap feeding the buck/boost regulator. The PIC can sense the power loss through the power sense line which is directly connected to the power source, and take action - change modes and such. If power is lost for more than a couple of seconds the PIC loses power completely and resets.

The cap used does not need to be very big at all as the PIC10Fxxx series are very power efficient especially when running the internal oscillator at the slower speed (32Khz).

Unfortunately I'm going to need a bench PSU to test this setup properly so this will have to wait a little, I'm going to order one in the next couple weeks.
 
Top