[Oshpark] HQ 15mm/17mm programmable boost driver with ATtiny13A

It’s a bit early for that, Gunga, since so far only one prototype has been made so no beta testing with several to see what problems arise and what needs fixing. If interest holds then it’s possible RMM or 3tronics will pick them up. Since you and I can’t fix very much we need these to be more thoroughly worked up before it’s worth it for those who can to try more than a few at a time.

^ This

I’m shelling out all I can to give others options to step in.
But I consider these far from ready.
I tried to point out the lines where we stand in the “4 OPs”

Atm I can spare more time at the PC than at the rework station, so there are more boards than testing on my side.
Toykeeper’s motto is: release early, release often. I’m working on it. - nod -

It is beautiful :slight_smile: Both the finished v1 board and the layout for v3. They make me wish I had the time and equipment to build one, even though I don’t understand half of what is going on in there and wouldn’t know what light to put it into :smiley:

Thank you for the in depth history, I for one find it both interesting and helpful in furthering my understanding. Why the change in capacitors from the FastTech board? I understand the reasoning on the inductor but is it just to get better quality caps or to be more certain if the values?

Oh sorry. Desperate for a good driver and jumping the gun. :slight_smile:

Thx. And we’ll find a light for you to put it in :wink:

.

I just wanted to play it safe.

  1. Wight himself wasn’t sure whether Cout (=C2) of the boost circuit is enough to act as decoupling for the ATtiny. That’s why I added C3 in 0603 footprint to at least give the option to add some capacitance.
  2. The FT driver has (iirc!) 10µF as C2. PAM2803 datasheet says for C2: 6.8µF min., 10-22µF recommended.

So for the first build - to rule out any errors from possible lack of capacitance - I populated C2 and C3 and pushed in the highest values I had for 0805 (22µF, measured ~20µF) and 0603 (4.7µF).
In the next build I wouldn’t mind to use 10µF for C2 and either leave C3 empty or take a 1µF or 2.2µF.

I already consider to remove C3 from the board to get some space if needed (LVP resistors perhaps), but I tend to implement LVP in 17mm boards first for further development and only when we have a solution there I will start to see what can be put into 15mm.

.

:slight_smile:
In OP I redubbed “released” to “shared”.
Just to avoid a misunderstanding that we have finished, tested, evaluated, ready-for-industrial-production boards.
We haven’t.
Just some boards I cobbled together for personal use and did not mind to share.

It is just proof of concept code but you could try this:

#define F_CPU 4800000UL 
#include <avr/io.h> 
#include <util/delay.h> 

#define FET_PIN PORTB1

int main(void)
{
while( 1==1 )
{
/* Empty the gate. */
DDRB |= (1 << FET_PIN);
_delay_ms( 1 );
DDRB &= ~(1 << FET_PIN);

    for( uint16_t i = 0; i &lt; 150; ++i ) 
    { 
        /* Charge a bit. */ 
        PORTB |= (1 &lt;&lt; FET_PIN); 
        PORTB &amp;= ~(1 &lt;&lt; FET_PIN); 
        _delay_ms( 200 ); 
    } 
} 

}

It's a slow ramp on the FET gate charge which repeats forever. It goes from 'invisible' to 'a bit too bright to look at directly' on a BLF-A6 FET+1 driver. From the spec sheet, your small FET should charge much more quickly as the gate charge is about 1/8th. You can avoid the higher end by reducing the '150' loop counter. Slow down the ramp by increasing the '200' delay. If the steps are too large, a CPU frequency of 9.6 MHz instead of 4.8 MHz should help. And if it's still too bright, PWM could be done with some work. Oh and keep an eye on the FET if you run this, it could get fairly hot at moderate output.

How this would behave with a depleting cell depends on the output voltage of the boost circuit at near zero load (ie. I don't have a clue). On a li-ion setup I can compensate for the lower voltage with more charge. Could perhaps do something similar here if there was a voltage readout, which I understand would be tricky to fit in there. The other "fix" is to just have more modes.

Also, I've never tried this but the weird code could be probably replaced with regular PWM and a resistor of the right value between the PWM pin and the FET gate. I'm not sure about the component sizing (not my domain and seems very tight) but ideally, I think you could keep pin 6 as it is and connect pin 5 to the FET gate via through a resistor, or the other way around. That would make one PWM channel pulse the FET full on for the high modes and the other give the FET only partial charge for the low modes. It would be much easier to adapt current dual-PWM firmware that way. A simple matter of disabling output of the unused PWM pin for any given mode.

A completely different option would be to keep the "full on" short FET pulse but with lower frequency to reduce the PWM duty cycle. You can get N times lower output by decreasing PWM frequency by a factor of N. But it will become ugly at some point. It is also somewhat annoying to code, like what I posted above.

Anyway, this long rambling post is just to say there are options so don't worry too much about current lack of a very low mode. I hope I didn't write anything too crazy :)

Ordered some of each board. Hopefully, I will have the time to join in on the testing. Has anyone identified a low cost source for the inductors in the US?

I just ordered my allotment of boards from OshPark and forgot to order the 17mm set of these. :frowning: Will have to get a set on the next order, wanted to test in a P60! These look very interesting.

Good work!

There seem to be a lot of inductors on eBay but the nice short ones HQ used might be only mouser/Digikey.

I just don’t have the time right now to read all the separate threads on this topic. Mostly, I just want to know what range of smd footprints will work with these boards.

Regarding inductance rating. I see recommended above 4.7uH. In another thread there is a pic that says it has a 2.2yH, Coilcraft XFL4020 used. Was yH a typo? Sorry for the newbie questions but I haven’t spent any quality time with inductors and don’t have time right now to do so. I only understand what they do at a high level.

guys, thats me: :laughing:

.

@fixed it
That sounds promising.
I admit I understood only every second word of what you said, but i’ll dig into it.
I’m no firmware guy but I usually can adapt what others come up with.

.

@ImA4Wheelr
Here in EU these Coilcraft inductors even increased in price about 70% in the last 12 months. They were expensive back then, they need to be weighed in gold by now.

Any other inductor with the µH-specs and size should do, I tried several (look at my 3rd pic in post#4).
The other (non-Coilcraft 2.2µH) inductors have mostly higher DC-resistance and thus are less efficient, like, losing some 5-10% output in 1AA and (some) runtime in 2AA.
All inductors I tested (same board, swapped inductors, same cell, measured output current; very humble and unprecise testing scenario) did work on the Nanjg110. Only difference I experienced was efficiency.

Datasheet does not say above 4.7µH, it says minimum 2.2µH, 4.7µH recommended. All commercial driver of this kind I recollect have 2.2µH inductors. I tried 4.7µH and the only difference was that they were less efficient at similar size (as they have by design a higher resistance than the 2.2µH). 4.7µH might/will have advantage in other terms (saturation?) but i wouldn’t know anything about it. I’ll stick with 2.2µH. You can take the inductor from the FT-driver for starters.

y makes for µ on a keyboard without a µ.

.

@mattlward
Allow for 12-15 hours and you get another 17mm driver board to choose from.

Hey HQ, thanks for the update… I will wait a day or 2. So, the build is a parts steal right? Any idea what kind of output might be there?

Good point.
I added the SMD part sizes in the HQB15 v3 post. All HQB15 (v1/v2/v3) have the same parts.
In the HQB17 v1 post the footprints are stated. Notable difference is the larger inductor.

.

Yep, oncoming HQB17B is specifically meant as the simplest possible part swapping build (keeping fingers crossed that C2 will be sufficient).
Output should be in the 750mA range with 2AA. Very well within the spec of the PAM2803. Output depends on R1 (Sense Resistor) and the FT driver has R1 = 0.120 Ohm (“R120”), could change with any production batch, as always.

Maybe I should have summarized:

- The code I posted is to test the behavior of the FET with a partially charged gate. Quick & dirty way to see low output. Don’t leave it running too bright too long.

- Plan B: It can be integrated into other firmware for low modes, with some difficulty.

- Plan A: The hardware can be changed a little to get similar low modes with slightly modified existing attiny13a firmware. The resistor value can be approximately worked out from behavior of the code I posted.

  • Plan C: Use lower PWM frequency. Also complex but definitely possible and with no hardware changes. Has risk of visible PWM eventually. Might eat up valuable firmware space.

The major unknown is how much the results of A & B will depend on part variations. I’ve not done enough testing to have any clue. It could be that each driver must be flashed with different settings to get the same output. I think that would be annoying but still better than no low modes at all.

Yeah, some clarity about output expectations for 1xAA or 2xAA would be nice. Also, I don’t know anything at all about driver development. Does this need a custom firmware written for it, or do (any/all) the already available Tiny13 firmwares work? I’ve been trying to follow along, but I’m way over my head.

That is a very interesting approach, fixed it, thanks for posting! Most spend their time trying to bypass triode, not linger in it. Like you said, it'd be interesting to test what kind of dissipation occurs if you drive it that way and whether the trade-off in efficiency is worth it.

This isn’t about high power. Output remains the same and is limited by the power handling ability of the boost ic to ~1A Max or lower by choice of sense resistor. What’s new is the addition of the Attiny 13A. This opens all the AA and 2xAA cheapo and not so cheapo lights up to mods without annoying strobe modes or with modes of choice. Non muggle modes for muggle lights.

Thanks for the responses HQ. I’ll raid my parts bins tonight and then order what I need.

HQB17B v1

17.6mm boost driver board
designed to source as many parts as possible from the FastTech boost driver

.

EDIT: More capacity really is needed: see post #30
Either you need to add a capacitor at C3 or swap for a larger C2 (like 22µF)

.

Oshpark Link

.

Parts size
(more on parts and values see partlist overview in post#2)

Switch: PAM2803, SOT-23-6
L1: max 4.3x4.3mm
D1: DO214AA
C1: 0805
C2: 0805
C3: 0603 (optional)
R1: 0805
R2: 0603
R3: 0603
MCU: ATTiny13A-SSU, 8S1
OTC: 0603 (optional)
FET: N-Channel, SOT-23-3

.

.

The highlighted parts are those from the FT-driver, just add an ATtiny, C3 and - if needed - an OTC.