[WIP] 15mm PAM2803 w/ ATtiny13A rough layout / possibility

212 posts / 0 new
Last post
Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

How will the programming need to differ from other 13A controlled drivers? Would it be possible to swap a 105C mcu and leave LVP unconnected? Build one and see?

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Rufusbduck wrote:
How will the programming need to differ from other 13A controlled drivers?
The only difference is that we’d disable LVP when building the firmware. From HarleyQuin’s work earlier in this thread I think it’s safe to say that standard PWM freqs are OK. Lower PWM freqs could be required to eliminate buzzing/whining. I still don’t have anything built; my donor drivers have not arrived from FT yet.

Rufusbduck wrote:
Would it be possible to swap a 105C mcu and leave LVP unconnected? Build one and see?
I can’t remember = build one and see. Worst case scenario, simply tie LVP pin to Vcc. Leaving the pin ‘floating’ could lead to unpredictable results…

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

Quote:
I’d be interested to know if there is a better FET that could be used.
Irlm2502 Rdson 40mOhms at 2.5V vs 40 mOhms at 4V. I’ll have another look at the lfpak 33 but it might be too big.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

This lfpak33 sold by RMM seems to have good specs too.
The lfpak33 is similar in size to the others but with obviously a different footprint. I don’t know if that’s advantageous or not.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

wight wrote:
From HarleyQuin’s work earlier in this thread I think it’s safe to say that standard PWM freqs are OK. Lower PWM freqs could be required to eliminate buzzing/whining. I still don’t have anything built; my donor drivers have not arrived from FT yet.

I used the usual 18 kHz. What bothered me most was that at PWM-1 it still gave 16mA. That’s pretty much for a lowest mode.

.

The FET I used in my first Nanjg110 conversion (Post#24) was a IRLML0030TRPbF, which has (according to datasheet) even a slightly lower Rds than the IRLML2502.

.

Out of curiosity I made a quick and dirty draft of the LFPAK33 in the 17mm board. It’s a mere finger-exercise just to see the part in the board. The LED pads are not on opposite any more, which could be a severe blow if height is a factor. A smaller inductor would give more space on the board, but we might lose more efficiency with a worse inductor than we gain with the LFPAK33. But I’m only guesstimating here.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Here is another layout which stays closer to the Fasttech driver.

The advantage of this design would be, that most parts could be sourced from the Fasttech driver. Only the ATtiny13A and the OTC are missing. Including R2 and R3 and the SS24 diode I could not fit it resonably onto 15mm, so this is a 17mm design. C2 might be not sufficient, though.

It’s an earlier version where I tried to stick to the supersized SS24 diode. I abandoned the idea as far as I’m concerned, as the BAT60A works so well. But perhaps someone else has use for the design.

17mm layout to source most parts from the Fasttech boost driver

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Update:

  1. I received the FT boards today. Along with the diodes ImA4Wheelr sent me and the v018 PCBs from OSH Park I had everything I needed to start testing.
  2. First I built the boost circuit on my v018 PCB. This functioned as expected.
  3. Next I populated the MCU and transistor. Since (as HQ keeps reminding me) I never bothered to hook Gate up to MCU Pin 6 like it’s supposed to be I bridged 5 and 6 together for now. Unfortunately this setup has not worked correctly. The driver lights the LED but I have no modes.

Maybe tomorrow I will troubleshoot the situation. The issue is most likely the lack of pulldown resistors. I forgot or did not realize that the FT board uses 0603 sized components. Maybe I will re-do my board with that size of component.

EDIT: Bad news (for me). I was hoping to “trouble shoot” the driver in the sense of “install those resistors and see if it works”. Unfortunately I got motivated just now and installed the resistors. The behavior remains the same. That means that the next step is real troubleshooting with DMM / scope / loupe etc. That is definitely not going to happen tonight, but might happen tomorrow.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

wight, At what current does the LED light? Could it be a firmware issue?
HQ- true, not quite diametrically opposed but if OTC were rotated 90^ clockwise towards the via the LED pads would be closer to opposite on the lfpak33 board. I was looking at the Rdson graphs rather than the rating at 10V. According to the graphs the 2502 drops below 40mOhms at 2.5Vgs vs 4Vgs for the 0030 (look at figures 12 and 11respevtively). In any case the proof would be in the pudding or maybe I’m completely misinterpreting those graphs.
If the driver has a spring on it then it seems to me that it might be ok clearance wise to go ahead and put the odd 0603 resistor on the bottom especially if, as with pull down resistors or caps the part is grounded to one of the pads and only one via per part is needed. 3 or 4 such part placements might clear a fair amount of space for a larger inductor and make soldering the darn things easier to boot.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

@wight

No modes: I re-checked your v018 and can’t find a difference in the circuit to my boards. So in theory it should work.

.

Which firmware did you use and could it be simplified? This very simple firmware did the job for me.

One idea is the OffTimeCapacitor: the stock values for STAR firmware might not work (combination of OTC-value and ADC_crit/delay in the firmware). If mode change would require only a few ms press, you could hardly do it.
Other parts of more sophisticated firmware might be affected as well (ADC, WDT, delay, Fast/Phase, frequency).

Another thumbs up to ImA4Wheelr for sending you his spare BAT60As and I’m glad that these seem to work in your boost circuit as well.

Pin 5/6: I ‘kept reminding’ you only twice (once per board version), so I consider myself far from nagging Smile

.

.

@RBD
PM sent.

OTC 90 degree: On the 17mm board this might work. On the 15mm it might collide with the programming clip. On board re-programming was one of my major design goals, so I need space around the MCU. The 0603 cap is higher than the 0603 resistor.

FET Rds: I only looked at the value at 4.5V (typ.) and there the 0030 won Silly
I can source the 0030 here for 16ct at the shop around the corner, that’s the reason I like it most.

I avoided components on the spring side at all cost. That’s why I used these nice vias and paths. Most of the lights I plan this driver for have no room to spare in the battery tube.
I converted several Solarforce L2m and clones not only to 18500 but to AA as well, this is tight, I already dented several Eneloops on the minus side. The Mini-Maglite (2AA) has only 3 quarter of a turn from tight to falling off. The G10 lost space in the battery tube when I made them tailstand.
None of these lights have a spring on the driver side, simply no room. I’m extremely happy that Oshpark came up with the 0.8mm boards, which will give some relief.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

@all: I used the stock Nanjg-105d firmware from FT to avoid a late night flashing session. FWIW the relevant RDSON figures are those in the VGS range of LED Vf to PAM2803 overvoltage protection.

@RBD: It appeared to be the full amount of current, but I did not put a meter on it. It was past my bedtime.

@HQ: Thanks for rechecking HQ – that jives with my own checking. Even if you only reminded me twice, I probably appreciated it both times. Since I was running the Nanjg ontime firmware I did not install an OTC.

I will now try shorting the output cap, maybe the pulldown is not fast enough.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

First off, I appreciate the time you both are investing in this and I hope you two don’t mind my input but please consider me a voice of ignorant curiosity and anything I learn is shared with others. If at any time you wish me to bugger off just let me know and I’ll do so.
With regard to theRdson I just assumed that the Vf is around 3V with an LED current ~1A so that would be the voltage available at the gate and that the ratings at 4.5V and 10V were not as critical as the expected Rdson value at 3V. This might be completely wrong if the boost voltage is spiking but that’s a bit above me. I don’t have a preferred fet but as HQ asked about other possibilities I chimed in along with my reasoning.
Until there are preprogrammed ic’s available for this all I can do is mess around with transplanted ones but I still enjoy the puzzle and the process.
As far as driver space goes, what can I say? I cheat and if I need more room I make it but I can certainly understand the requirement to keep it one sided if possible.
Thanks again guys.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Based on my fidding over the past hour the driver pretty clearly works. I just can’t remember / don’t know how to change a firmware over to properly support this hardware configuration (PWM on Pin 5). I have been able to do this in the past. It should be pretty straightforward stuff, but getting everything setup correctly is just way beyond my patience right now. (It requires knowledge of setting up the AVR’s registers which I have lost.)

I should have fixed the pin5/pin6 discrepancy on the PCB some time ago so I would not have to worry about this.

In the meantime I can turn the light on or off depending on what firmware I flash. Crying

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Follow up: Just to be 100% sure that the driver was working normally I flashed STAR (ontime) on there and then bridged pin 5/6 again. Modes worked fine. At this moment I have very limited desire to figure out the right register settings to get output on Pin 5. I’ll simply correct the PCB to use Pin 6. The next steps are really testing how necessary the pulldown resistors are!

Rufusbduck wrote:
If at any time you wish me to bugger off just let me know and I’ll do so.
You’re certainly not bothering me.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

OK, this is the last test before I call it quits for the evening; the results are good I think.

I have removed both pulldown resistors and the circuit seems to operate just fine. I had 3 modes beforehand and I still have 3 modes now. At the moment it looks like we can get away without having them, although using the OTC may change things. https://oshpark.com/shared_projects/Azs6WH8H

HarleyQuin wrote:
[…]
To get PWM=1 lower it may be necessary to drop PWM frequency.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

That’s good news wight.

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

DavidEF
DavidEF's picture
Offline
Last seen: 1 day 1 hour ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA

Rufusbduck wrote:
That’s good news wight.

+1 I’m excited that there is significant progress being made RE: programmable boost drivers!

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

Rufusbduck wrote:
If at any time you wish me to bugger off…

No, me neither. I’m truly unsure where I got you on the wrong foot but I did not mean to if I did.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

@wight

congrats, good to hear you got it working

Firmware Pin6 to Pin5: With Star Ontime it’s not that straightforward anymore ever since it uses dual-channel and fast/phase.
It’s easier with DrJones Minidrv, just in case you don’t want to wait…
DDRB=1; // (2) // PB0 (pin5) instead of PB1 (pin6) as output
TCCR0A=0b10000001; // (0b00100001) // PhasePWM for PB0 (pin5)
OCR0A=modes[mode]; // (OCR0B) // use output compare register of PB0 (pin5)

Mode change: Did you try 1xAA or 2xAA or both? 2xAA was the critical part, losing the PAM2803 w/o the 2 resistors.

PWM=1
I just tried 3 frequencies and it’s the same as with linear driver, the higher the frequency the lower the output on low levels.
4.7 kHz (fuse 65) : 25mA
18 kHz (fuse 75) : 15mA
37.5 kHz (fuse 7a) : 9mA
This is with fresh cells of course. No difference between 1AA and 2AA.
Is 37.5 kHz (9.6MHz cpu, FastPWM) the upper limit or can a higher PWM-frequency be reached?

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

djozz
djozz's picture
Offline
Last seen: 6 hours 45 min ago
Joined: 09/07/2012 - 17:04
Posts: 17754
Location: Amsterdam

came across this driver at KD:


http://www.kaidomain.com/product/details.S009810
13.5mm 5-Mode Circuit Board for AA/AAA Battery ( 5pcs a pair)

Looks like a boost driver with Attiny-like MCU. Has anyone ever bought one, is this interesting in any way, or is this project way past looking at drivers already in existence?

DavidEF
DavidEF's picture
Offline
Last seen: 1 day 1 hour ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA

djozz wrote:
came across this driver at KD:

http://www.kaidomain.com/product/details.S009810
13.5mm 5-Mode Circuit Board for AA/AAA Battery ( 5pcs a pair)

Looks like a boost driver with Attiny-like MCU. Has anyone ever bought one, is this interesting in any way, or is this project way past looking at drivers already in existence?


HaHa! I don’t think that driver has anything on what’s being built here:
kaidomain wrote:
output voltage: less than 1.5V 400mA
Still interesting though, for small, low output lights.

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

DavidEF
DavidEF's picture
Offline
Last seen: 1 day 1 hour ago
Joined: 06/05/2014 - 06:00
Posts: 7699
Location: Salisbury, North Carolina, USA

Wait a minute! Are they serious? 1AAA 3W LED Voltage-step up 10mm circuit board

kaidomain wrote:
Maximum current output: >800mA when battery is fully charged

Can you really get 800mA from a single AAA cell?

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

Rufusbduck
Rufusbduck's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 04/04/2012 - 15:34
Posts: 10389
Location: Golden state

Quote:
or is this project way past looking at drivers already in existence

Sounds like it functions but still a wip so probably some unknowns for discovery in field testing and obvious questions like a bleeder resistor for LTC (maybe in 2cell lights bypassing boost IC).

Three Tanna leaves to give him life, nine to give him movement. But what if he eats the whole bag?

Scott

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

djozz wrote:
came across this driver at KD: http://www.kaidomain.com/product/details.S009810 13.5mm 5-Mode Circuit Board for AA/AAA Battery ( 5pcs a pair) Looks like a boost driver with Attiny-like MCU. Has anyone ever bought one, is this interesting in any way, or is this project way past looking at drivers already in existence?
Hmm. The pictures are low quality, but I see on top:
  • inductor
  • SOIC8 IC (same physical size as common ATtiny or PIC MCUs)
  • SOT23-3 (identified on PCB as Q2?)
    and on the bottom:
  • SOT23-3 (at top)
  • Capacitor (identified as C1, top right)
  • Diode (D2 on left)
  • Capacitor (C2 on left)
  • Diode (D1? on right)
  • SOT23-3 (Q1? at the bototm)

Transistors are often packaged in SOT23-3, but that seems like a lot of transistors. Sometimes “Modes chips” (simple purpose-built PWM flashlight driver controllers) are packaged in that form factor as well. MCUs, MOSFETs, boost controllers, and many other things can be packaged in SOIC8. We can assume that this on is not a MOSFET since all the pins aren’t together on the PCB traces.

This is at least vaguely interesting for now, but not enough for me to order some.

DavidEF wrote:
HaHa! I don’t think that driver has anything on what’s being built here
Meh. It’s different and using 100% made up [eg imaginary] specifications. Who knows what it is.
DavidEF wrote:
Wait a minute! Are they serious? 1AAA 3W LED Voltage-step up 10mm circuit board
kaidomain wrote:
Maximum current output: >800mA when battery is fully charged
Can you really get 800mA from a single AAA cell?
To get 800mA output the driver should need >2A input. This is quite possible with LSD NiMH AAA, but not with Lithium primary AAAs.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

HarleyQuin wrote:
@wight congrats, good to hear you got it working Firmware Pin6 to Pin5: With Star Ontime it’s not that straightforward anymore ever since it uses dual-channel and fast/phase. It’s easier with DrJones Minidrv, just in case you don’t want to wait… DDRB=1; // (2) // PB0 (pin5) instead of PB1 (pin6) as output
TCCR0A=0b10000001; // (0b00100001) // PhasePWM for PB0 (pin5)
OCR0A=modes[mode]; // (OCR0B) // use output compare register of PB0 (pin5)

Mode change: Did you try 1xAA or 2xAA or both? 2xAA was the critical part, losing the PAM2803 w/o the 2 resistors.

PWM=1
I just tried 3 frequencies and it’s the same as with linear driver, the higher the frequency the lower the output on low levels.
4.7 kHz (fuse 65) : 25mA
18 kHz (fuse 75) : 15mA
37.5 kHz (fuse 7a) : 9mA
This is with fresh cells of course. No difference between 1AA and 2AA.
Is 37.5 kHz (9.6MHz cpu, FastPWM) the upper limit or can a higher PWM-frequency be reached?

Thanks a lot HQ. I remembered some of that when trying to get STAR ontime working the last time, but clearly not enough! I even tried Minidrv since I knew you’d been using it for testing and it’s so straightforward. I was missing something or making a mistake. Who knows where, I didn’t save the code. Doesn’t matter, it’s working now (STAR ontime).

I went ahead and tested about 20-30 mode switches on 2xAA. They were resting at >1.2v each. Nothing bad seemed to happen. Smile

  • Sorry I got confused about the PWM freq stuff. Maybe we should try PWM=0/255. That’s “a thing” with either fast or phase correct, but I forget which. If necessary a new firmware could be written with soft-PWM to go lower.
  • Offhand the datasheet seems clear about the PWM calculation. w/ a prescaler of 1 FastPWM = clk/256. That said I am very rusty at the moment and this might be a better question to ask in a firmware thread.
  • IIRC increasing the PWM freq can significantly affects the response curve for the thing receiving the PWM. In other words we get “mode compression” where the modes shift towards high or low.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

wight wrote:
Maybe we should try PWM=0/255
RMM wrote:
0 PWM with “Fast PWM” is never truly off while the attiny is on (a good exploit for even lower moonlight levels with the FETs)

Disclaimer: I didn’t compare “Phase Correct PWM” with “Fast PWM”. Just looking at Fast PWM, 0/255 = ~8mA input current while 1/255 = ~16mA input current. On the output side that seemed to be ~1mA vs ~2mA. All of this was measured using a free HF DMM set on the 10A scale, so very rough measurements. I’d say that it’s still probably not low enough to really be a ‘low’ moonlight… but I didn’t try it in a flashlight or in the dark.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588

djozz wrote:
came across this driver at KD:

I think this is the same driver HKJ has tested here
It’s only 1xAA.

800mA with 1.5V perhaps, but not with a single AA/AAA. Extrapolate the light blue line (current in) to 1.5V and you would need about 3.5A input current without voltage sag to get an output current of 800mA…
With a bench power supply it might work.

As far as I remember I checked all of HKJs driver tests when looking for a good boost driver. The drivers based on the PAM2803 (nanjg110 and our Fasttech-driver, HKJ tested both) had a better efficiency than this one and were only topped by the LD30 which is much more complex. But I did this long before this thread started when I hadn’t hoped to get a driver with good modes.

If you want to compare drivers you can find a remarkably long list of tested drivers on HKJs website
www.lygte-info.dk/info/indexLedDrivers%20UK.html

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 6 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 588
wight wrote:
I went ahead and tested about 20-30 mode switches on 2xAA. They were resting at >1.2v each. Nothing bad seemed to happen. Smile

Very good. As I said I was very reluctant to burn my scarce PAM2803 (a real nuisance that they can’t be sourced in small numbers), but that would give me enough hope to try a built without the resistors.
I’m yet unsure whether I will remove them from my design as long as nobody can tell us for sure what they are for in the FT-driver, but it would certainly free some space. The 15mm driver is very tighly packed, small pads, and just so to avoid clearence errors. Not really easy to build…

.

wight wrote:
PWM freq stuff. Maybe we should try PWM=0/255.

That’s a good one, I had completely forgotten about this 255-not-truly-on / 0-not-truly-off issue. And I had only tested FastPWM modes with 3 frequencies, not PhasePWM. No reason behind it, was the quickest way to programm. Will try other values.

Just for the record: my results (25/15/9mA) are LED current, not input current. Measured with a shunt between driver and LED. Darn bright.

Calculations are fine, I had made a table for comfychair ages ago, will include it below.
37.5kHz would be possible only with FastPWM/divider1/9.6MHz and that might be the highest frequency. Soft PWM is above me.

PhaseCorrect FastPWM
kHz CPU freq divider fuse CPU freq divider fuse
1.2 kHz 4.8 MHz :8 0×65
2.4 kHz 9.6 MHz :8 0×6a 4.8 MHz :8 0×65
4.7 kHz - - - 9.6 MHz :8 0×6a
9.4 kHz 4.8 MHz :1 0×75 - - -
19 kHz 9.6 MHz :1 0×7a 4.8 MHz :1 0×75

CPU frequency is set by the fuse (Low Fuse bit 0 and 1) and “#define F_CPU” should be set accordingly.
PWM is set by TCCR0A (where 0×23 is FastPWM and 0×21 is PhaseCorrectPWM)
The divider is set by the fuse (Low Fuse, bit 4) and can be :1 or :8

This way you can reach 19 kHz with Phase correct PWM and Fast PWM.

In addition you have the prescaler (TCCR0B) which is not the divider. You can combine divider and prescaler and set them differently.

Oshpark Boards:
HQ ProgKey: Universal Driver Programming Key . Boost: HQ 15mm/17mm programmable boost driver with ATtiny13A
46mm Triple-Channel: BLF SRK FET v3 . 17mm Linear: HQ10D / HQ4D / HQ4S . Contact Boards: 22/24/26mm

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA
  • Ah, that’s right. I remember referencing your table in the other thread. Big Smile
  • I’d rather avoid getting into soft PWM because (a) that’s firmware stuff I’d rather avoid and (b) I’m pretty confident that it will increase power usage by the ATtiny a lot.
  • Caution made plenty of sense in that case. I’ll be sure to post here if I burn one, but it seems fine so far. Looks like PAM2803 has gotten cheap on AliExpress: $0.20 USD /ea in QTY=10 seems good to me!
  • In fact, with cheap PAM2803 available in reasonable quantities the door is open to fully scratch-built drivers. Too bad that “good” inductors cost as much as the whole FT driver. I wonder how much advantage there is to using one which is properly specced. I assume that the one on the FT driver saturates or acts badly a lot of the time.
  • TK points out over here that LVP can still be useful for a AA boost driver. Using “low” modes extensively can easily pull batteries way, way down without the user noticing.
  • I think that these drivers may end up being reflow only. Proper hand-soldering pads for the inductor will eat a lot of space.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

OK, pursuant some of those things… v22 switches to the Coilcraft XLF4020 footprint (here is the Eagle part I created for it – note that the tDocu markings are the full maximum 4.3×4.3mm the datasheet allows for). This is by no means a final layout; it is just food for thought. RSENSE has been reduced to 0603. R1 is under the MCU, R2 is to the right of the MCU. They should be spaced properly for the clip. The XLF4020 footprint should accept the inductor from the FT donor board. Looks like I forgot to hook up the OTC.

As can be seen, there is plenty of room for LED- but not enough room for LED+. Looks like progress to me though. Ah! I should just move C(OUT) to the left. LED+ can be located between C(OUT) and the diode. Hmmm Smile

EDIT: I forgot to mention (a) doesn’t pass DRC but it’s close (b) apparently I’ve been using a 0.75mm keepout for this project for a while.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

wight
Offline
Last seen: 1 year 3 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Revisions:

  • Passes DRC.
  • LED+ and LED- added
  • OTC hooked back up

I still think that we can do much better than this.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Pages