Anyone workng on a PWM to use with step-ups?

papasan

Enlightened
Joined
Mar 25, 2001
Messages
621
Location
Northern Virginia
was caving last weekend with my underdriven 5W headlamp (it's prolly ~3 watts) and generally disgusted by the color temperature. the greenish beem isn't as bad as the old pee green luxeons but it's not nearly the snow white of the highly overdriven LSes. i'm hoping that eventually i'll be able to hook up a PWM to the output of the BB750...

-- (hmm, this wouldn't work would it? a constant current supply will increase voltage utntil the appropriate current draw is reached...hmm...i guess i'll need to replace the entire diver) --

...and crank up the BB750 all the way to get a nice white output while lowering the duty cycle to get better run times.

there is a large demand for good, reasonably priced headlamps from the caving community in my area. i've had several offers for my headlamp. if i get an acceptible-for-public-consumption unit ready i may make a few or outsource someone to manufacture them. i know several people here would go for them =).

I remember dat2zip mentioned that this would be his next big project, but i don't recall reading anything about it since.

unfortunatly, although i'm pretty good at copying other people's work i'm terrible with electronics.
 

Jonathan

Enlightened
Joined
Dec 14, 2001
Messages
565
Location
Portland, OR
Tonyb,

We've crossed threads a couple of times, and I think that we should talk...PM me. I have a boost converter design that I think would be a good start for your project, and I have published the Eagle cad files on the web. I think that the only thing that my design doesn't have is that it is too physically large for you.


papasan,

In any case, the LT1618 chip, as used in my design, and used in the Badboy designs (and as used in the Arc-LS) has a couple of pins that would be quite useful for PWM applications. One pin is the 'shutdown' pin, which will turn the whole circuit on and off. The other pin is the 'ADJ' pin, which is an analog input and can be used to adjust the output current in an analog fashion.

Presumably a PWM signal to one or the other of these pins could be used to strobe the output at high speed, and get a nice dimming action while maintaining that 'full drive color temperature' that we all love.

Some experimentation would be required, since there might be startup transient issues toggling the shutdown pin at high frequency, and PWM to the adjust pin would require jumping between two selected analog voltage levels. I've tried 0 to 5V PWM to the ADJ pin, with partial success...my input voltage was high enough to get significant light out of the LEDs even when the boost circuit was not operating, so I was PWMing between bright and very bright, rather than off and on /ubbthreads/images/graemlins/frown.gif

The PCBs that I've built bring out these pins to large solder pads, but I'm sure that one could use any of the other LT1618 designs with some careful pin bending and soldering.

-Jon
 

dat2zip

Flashlight Enthusiast
Joined
Jan 5, 2002
Messages
3,420
Location
Bay Area
I've hooked an Atmel uC to the Shutdown pin of the Badboy (LT1618) design. It works great.

You probably can use a simple 555 timer. That should work fine and with a variable resistor you could turn the brightness from dim to full.

The frequency of the 555 timer should be greater than 2KHz and less than 20KHz. Mine was running around 3.9KHz only be cause that's what I got from the uC dividers that was easy to come by. 1MHz internal oscillator divided by 256 (8 bit timer).

Ideally, you would set the output current for 350mA for the 1W and 700mA for the 5W and then PWM the shutdown pin to lower the output brightness.
 

Entropy

Enlightened
Joined
Dec 30, 2002
Messages
413
Location
Bridgewater, NJ
[ QUOTE ]
dat2zip said:
I've hooked an Atmel uC to the Shutdown pin of the Badboy (LT1618) design. It works great.

You probably can use a simple 555 timer. That should work fine and with a variable resistor you could turn the brightness from dim to full.

The frequency of the 555 timer should be greater than 2KHz and less than 20KHz. Mine was running around 3.9KHz only be cause that's what I got from the uC dividers that was easy to come by. 1MHz internal oscillator divided by 256 (8 bit timer).

Ideally, you would set the output current for 350mA for the 1W and 700mA for the 5W and then PWM the shutdown pin to lower the output brightness.



[/ QUOTE ]
Looks like the cat is now officially out of the bag as far as the BB design.

IIRC, didn't you also do PWM of the ADJ pin?

(I think your reasoning between full on/off PWM was avoiding color changes due to changed current?)
 

Doug S

Flashlight Enthusiast
Joined
Jun 20, 2002
Messages
2,712
Location
Chickamauga Georgia
Papasan: One thing to be aware of is that you will have somewhat lower efficiency using the PWM approach that you are considering. 700mA at 50% duty cycle will produce less light than 350mA at 100% and will also require more power to do it. The efficiency of the LED decreases at higher current densities and the Vf is higher. An LT1618 based design such as the BB series will have lower efficiency at 700mA than 350mA at the input voltages you are likely to use. Another consideration is that there are two factors that shift the color with higher drive: these are LED current density and die temperature. With your PWM approach you will get the effect of the current density only since the temperature will be increased only slightly.
I too am a caver and place a high value on efficiency. I think that I would be tempted to learn to like the color rather than take the efficiency hit. If the color is really an issue, it might be easier to just find a LED with better color. I have seen some with excellent color at low drive currents.
 

papasan

Enlightened
Joined
Mar 25, 2001
Messages
621
Location
Northern Virginia
tonyb: is it a secret? =)

jonathan: sounds liek you're on a good track. if you think i may be able to help in some way let me know. i'm pretty good with soldering and doing eagle PCB layouts.

dat2zip: i looked into programming ICs a while back but i dropped it after realizing the time and money investment i would be needing to make. if someone came out with some pre-programmed ICs for use in this very situation (many of the ICs used here have shut-down pins) i think they would go over well. have you discontinued your interest in this area? from bad results?

doug s: yes, i figured that eff. would take a hit, but i'm unsure (and i think most are as well) just how much of a hit that will be in the end result. bright, pure, white light is just awesome. everything looks better and there's a higher contrast ratio, so you can see more detail, and there's a much bigger 'wow' factor when the light is pure white. right now i'm getting 5 hours of light on 4AAs, i would be willing to sacrifice 15-30 minutes or so of light for a whiter beam. i have a 4D pack for long trips that would still give me over 20 hours of fully bright light. searching for a nice LS could be the best alternative, i agree, but it's not very viable for my budget when 5W LSes are $30 a piece.

one of the things that i am curious about is what happens to the output when the input voltages dives below the start-up for the PWM circuit. i am thinking that the light will not fire at all since the shutdown pin would be permanently on low. if this is the case then i'll probably drop my search for a PWM circuit, as i would never want to dismiss the possibility that i'll need the dying batteries to get out of a bad situation. or perhaps the designers of these ICs thought this through and low is on, hi is off? i'll have to look at some spec sheets.
 

Entropy

Enlightened
Joined
Dec 30, 2002
Messages
413
Location
Bridgewater, NJ
[ QUOTE ]
papasan said:
tonyb: is it a secret? =)

jonathan: sounds liek you're on a good track. if you think i may be able to help in some way let me know. i'm pretty good with soldering and doing eagle PCB layouts.

dat2zip: i looked into programming ICs a while back but i dropped it after realizing the time and money investment i would be needing to make. if someone came out with some pre-programmed ICs for use in this very situation (many of the ICs used here have shut-down pins) i think they would go over well. have you discontinued your interest in this area? from bad results?

doug s: yes, i figured that eff. would take a hit, but i'm unsure (and i think most are as well) just how much of a hit that will be in the end result. bright, pure, white light is just awesome. everything looks better and there's a higher contrast ratio, so you can see more detail, and there's a much bigger 'wow' factor when the light is pure white. right now i'm getting 5 hours of light on 4AAs, i would be willing to sacrifice 15-30 minutes or so of light for a whiter beam. i have a 4D pack for long trips that would still give me over 20 hours of fully bright light. searching for a nice LS could be the best alternative, i agree, but it's not very viable for my budget when 5W LSes are $30 a piece.

one of the things that i am curious about is what happens to the output when the input voltages dives below the start-up for the PWM circuit. i am thinking that the light will not fire at all since the shutdown pin would be permanently on low. if this is the case then i'll probably drop my search for a PWM circuit, as i would never want to dismiss the possibility that i'll need the dying batteries to get out of a bad situation. or perhaps the designers of these ICs thought this through and low is on, hi is off? i'll have to look at some spec sheets.

[/ QUOTE ]
Atmel AVRs require almost no initial investment to start working with.

An incircuit programmer that uses a parallel port can be built for on the order of $10-15. There are multiple C compilers available - GCC is free, and the demo version of Codevision is more than suitable for small projects and is free too, and the full version of CV is only $150 once you're "into" the hobby.

If you want to do things the "easy" way, Atmel's STK500 dev board is $80 from Digi-Key and supports almost all of their processors, has an onboard programmer, LEDs, switches, and an onboard TTL-to-RS232 converter for AVRs that have UARTs.
 

dat2zip

Flashlight Enthusiast
Joined
Jan 5, 2002
Messages
3,420
Location
Bay Area
papasan,

The micro-controller design is merely a time issue. Wish I had more of it. While I have a design that works, it was abandoned mainly because at the time, I had hoped to get both the switching IC and the uC IC in die form and go direct chip on board technology. In that way, I had hoped to keep the same board size and offer a smart drop in module for the 2AA. That idea didn't pan out and it dropped to the bottom of my list of things to do.

The Cool thing I had done was to use an RC network on one of the uC pins. The processor would go into deep sleep mode imediately on detecting the battery disconnect. If Power was applied before the RC network discharged, the processor would sequence to the next power state. In this way any flashlight would be able to sequence the module without any special inputs or switches. Thus, the same smart controller could upgrade the 2C, 4D and all the other flashlights that people like modding with.

O-well, such is life.

I'm sharing this now with everyone and if anyone wants my source code to continue development, I would be more than happy to share it with them.

There were some other technical hurdles to overcome, but, given some time, these could have been solved.

I have another smaller uC development kit sitting here for a different processor and I wish I had time to open that package and play with it. It's possible to use this controller as the main switching DC/DC controller as well as handle the PWM all in one package.

This one I'm hot to work on, and it's in the queue about two or three back from the top.

Wayne
 

DSpeck

Flashlight Enthusiast
Joined
Dec 19, 2001
Messages
1,189
Location
Toronto, Ontario
This thread sounds like something I've been wanting to see for a year now.

Here's my criteria:
I need a small cct board (either .5" x however long necessary, or 11/16" (.685") diameter) to drive a 5W HD white Luxeon from 2 123 cells, with dimming capability.

I'd like 4 levels of brightness:
L1 - like an Arc-AAA - maybe ~5%?
L2 - 25% drive
L3 - 75% drive
L4 - 100% drive

I'd prefer even L1 to have a fast enough blink rate the eye couldn't detect it. On my Xray ErgoElite, in the lowest modes I can see the flashing if I look, so it needs to be faster than that.

NO blinking modes needed.

This board or sandwich should have 2 remote pushbuttons for use up to 1.5" away from the board. One PB for on/off, one for brightness (this button would have level memory). Alternatively, it could work with one button, if it toggled on/off with a quick push, and stepped through the levels with a more sustained push, but it must have level memory also.

I don't really need any more modes than this, although a mom-on button would be useful at times, I guess. Basically, an all-in-one driver/dimmer board, with remote button(s).

The LS would be on its own heatsink, like the McLux uses.

If I could have a board like this, I'd be happy to trade a custom-made case/body for it, i.e. you make 2 boards and send them to me, and I'll make 2 cases/bodies, and send you one completed light, keeping the other one for myself.

Any takers? /ubbthreads/images/graemlins/grin.gif
 

paulr

Flashaholic
Joined
Mar 29, 2003
Messages
10,832
This compiler may also be of interest:

http://sdcc.sf.net

Programming those parts in assembler is also pretty easy, especially for something this simple.

I'd want to use an eeprom part (pic 16cf84 or whatever) so it could retain settings across battery changes. That may also include some PWM parameters that are adjusted to a specific LED.
 

Entropy

Enlightened
Joined
Dec 30, 2002
Messages
413
Location
Bridgewater, NJ
[ QUOTE ]
dat2zip said:
papasan,

The micro-controller design is merely a time issue. Wish I had more of it. While I have a design that works, it was abandoned mainly because at the time, I had hoped to get both the switching IC and the uC IC in die form and go direct chip on board technology. In that way, I had hoped to keep the same board size and offer a smart drop in module for the 2AA. That idea didn't pan out and it dropped to the bottom of my list of things to do.

The Cool thing I had done was to use an RC network on one of the uC pins. The processor would go into deep sleep mode imediately on detecting the battery disconnect. If Power was applied before the RC network discharged, the processor would sequence to the next power state. In this way any flashlight would be able to sequence the module without any special inputs or switches. Thus, the same smart controller could upgrade the 2C, 4D and all the other flashlights that people like modding with.

O-well, such is life.

I'm sharing this now with everyone and if anyone wants my source code to continue development, I would be more than happy to share it with them.

There were some other technical hurdles to overcome, but, given some time, these could have been solved.

I have another smaller uC development kit sitting here for a different processor and I wish I had time to open that package and play with it. It's possible to use this controller as the main switching DC/DC controller as well as handle the PWM all in one package.

This one I'm hot to work on, and it's in the queue about two or three back from the top.

Wayne

[/ QUOTE ]
Time is the primary reason I haven't done any AVR development myself in a long time. It doesn't take THAT much time, but I have too much else on my plate.

A number of the Atmel AVRs would make good switching controllers too - Onboard ADCs and PWM outputs.
 

papasan

Enlightened
Joined
Mar 25, 2001
Messages
621
Location
Northern Virginia
at least i'm not alone =).

my needs, at least for this particular project, are a little different tho. a permanent, or semi permanent, dimming effect to under-drive a 5W unit while keeping a good color balance. in my case it's imperitive that the light never function at full power as the LS is not sunk properly and is encased in a waterproof plastic shell.

i also think an integrated PWM / step up that uses the power switch as the mode adjustment, as dat2zip explained, would go over very well. then it could be hacked into any existing body, like a mini-mag or whatnot.

perhaps i'll look into proms some day, but i too have too much going right now to start a project of this sort.
 
Top