[retired] [WIP] 20mm single sided & 17mm double-sided ?-amp linear driver - surprisingly good!

I honestly still have no idea how those relate. I can only report what I’ve found. I used the same momentary build I linked in post #151, and then changed the fuse value in the avrdude command.

Now that I have a momentary FW that I like (thanks wight and toykeeper), I’ll be putting this in my L5 (hopefully tonight). I’ll measure and report parasitic drain and if it’s pulling the current that it should.

No worries, I’ll do that testing myself when my boards get here. Thanks for giving it a go anyway.

Heh, phone autocorrected to ‘presenter’ but I meant prescaler.

Did I misunderstand what you wanted me to try? According to that table, 0x6a and a :8 divider with phase corrected should result in 2.4khz?

Or did i need to bump the chip frequency too?

I’ve been confusing you by referring to the divider and prescaler interchangeably. They are two separate things! The divider in that chart is set with fuses. That is the only divider there is.

The thing I had you adjust earlier (by setting the 0x02) is the prescaler. With both set your total is :64, not :8.

LinusHofmann wanted you to try:
4.8Mhz
:1 prescaler
:8 divider (0x65 fuse)
FastPWM

…which gives 2.4Khz. If you set the prescaler to :8 instead of :1 you get 300Hz (0.3Khz).

Yep, this is all your fault :wink:

So is 4.8Mhz default, or do I need to change something to get that? The rest of it I can manage.

I think that’s set with the other fuse, IIRC. You shouldn’t need to change anything for 4.8Mhz.

Alright I tried it with the settings wight outlined (this program, with 0x65 fuse)
Wights predictions appear to be correct. The second mode (64pwm) appears to be equal to what 37pwm was before, that is a very low firefly mode. The visible PWM is also noticeably faster to the naked eye.
……………
Are there any other drawbacks to keeping it this way other than the mode compression?

Not that I’m aware of.

Cool, thanks for doing the test. I may be able to live with 2.4khz and the reduced pwm range.

Got my OSHpark boards today but while laying out the parts to build one I realized that I’m still waiting on the QX7136s. :frowning:

Maybe I’m not thinking correctly, but in my mind while the pwm range is reduced, but the light output range is not. We still have sub-lumen lows and full on, we just have less notches in between. I feel like 191 notches is still plenty to find what mode levels you want.
………
I’m using 2.4khz myself. Coincedentally, there are also fewer modifications needed to have STAR work on this driver than using the previous way.

I think you’re right, beyond limiting ramping smoothness and just being a bit less intuitive to set up the modes I think that will work fine.

There might be some efficiency losses perhaps?

If you’re not fed up with firmware tinkering, you could change the low fuse to 0x6a and flash it again with the same firmware.
I believe that should up the CPU speed and change the pwm frequency to 4.7khz.

If I understand the chart posted by HarleyQuinn correctly, the CPU frequency is primarily changed by the low fuse bit: i.e (0x*5) for 4.8Mhz and (0x*a) for 9.6Mhz.

Not sure if the firmware will play nice without also changing “#define F_CPU” to match the new frequency though.

Really wish I could be playing with this stuff myself. Also keen to scope the fet output and see how it looks/responds at the different PWM frequences.

Cheers

I normally would love to tinker some more, but unfortunately I packed it into a light already and would prefer to not take it out (it was a tight fit). I hope to post pictures of my build tonight.

No worries :slight_smile:

Hopefully my 7136s won’t take too long to get here and I’ll run through a bunch of test then.
Cheers
Linus

In some other threads I read that upping the cpu frequency will increase power usage and heat (duh). I wouldn’t be too worried normally, but in an e-switch build I’m worried it would bump the parasitic drain up to unacceptable levels.

Yeah sure it’s probably not a good idea in a single cell setup or with a momentary as you mention. Was just curious what the limit of the 7136/fet is in terms of max PWM freq.
I think 4.7khz PWM shouldn’t really be visible anymore so that would be nice.

I’ll be interested to see what you find.

Just posted my build with this driver. Link