[Oshpark] BLF SRK FET v3 (LFPAK56 / Triple Channel / ATtiny13A+85)

76 posts / 0 new
Last post

Pages

HarleyQuin
HarleyQuin's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 487
[Oshpark] BLF SRK FET v3 (LFPAK56 / Triple Channel / ATtiny13A+85)

BLF SRK FET v3
.

An adaptation of the BLF SRK FET v2 by RMM, which evolved from the original BLF SRK FET driver by Mattaus, Comfychair, WarHawk-AVG and many others.

.

Version History

v3(.0)
First version, introduced in this post.
Triple Channel and LFPAK56

v3.1
Narsil support, became outdated quickly after DEL’s testing of FET drivers

v3.2
Support for ATtiny 25/45/85 (Narsil) and DEL’s R5
This version kept most features of the BLF SRK FET v2,
as well as several redundant component places for testing purposes

v3.3
Updated version featuring
- Triple Channel with 11x AMC7135
- LFPAK56 MOSFET
- Supporting 13A and 25/45/85 (Narsil)
- R5 for ringing protection
- Indicator LED at MCU pin#3 or pin#7
- Dedicated bleeder resistor from Bat+ to GND
- Wider path from GND to FET source

v3.4
Optimized for High Current

.

.

BLF SRK FET v3(.0)
.

First notable change is the use of an

  • LFPAK56 MOSFET

Then there are

  • 9 additional AMC7135 (Q2-10) for a high mode without PWM

And you can use

  • Pin3 as third channel and connect either the FET or Q2-10 to it

Pin5 is hardwired to the single 7135 (Q1) for the low modes.
Pin6 and Pin3 can (using a fancy 4-pad-connector) alternatively be connected to Q2-10 or the FET. Use Pin6 for the channel you want to PWM, be it the FET or Q2-10. Use Pin3 for the channel you want to just switch On/Off.

.

.

.

You can still use it as a dual channel SRK FET driver with LFPAK56: Connect Pin6 to FET using a zero-Ohm-resistor and you have all the functions of the v2 driver but can use the NXP MOSFETs.

.

But the additional 7135s are where the fun begins:


The OTC was just for testing.

.

This particular driver has the FET connected to Pin3 and Q2-10 to Pin6. It has 6 modes:

Off – [0mA] – (Pin5, Pin6 and Pin3 OFF)
Moon – [~1mA] – (PWM-2 on Pin5, Pin6 and Pin3 OFF)
Low – [35mA] – (PWM-34 on Pin5, Pin6 and Pin3 OFF)
Medium – [350mA] – (Pin5 ON, Pin6 and Pin3 OFF)
High – [3500mA] – (Pin5 and Pin6 ON, Pin3 OFF)
Turbo – [All-In] – (Pin3 ON, Pin5 and Pin6 OFF)

Moon and Low use PWM at 19kHz (9.6MHz, Fuse7A, PhaseCorrectPWM, Divider1).
Medium switches Q1, High switches Q1 and Q2-10, Turbo switches the FET.
I could now PWM Q2-10, but I don’t need to: the mode spacing of 35-350-3500 is still my favourite.

.

Oshpark links, eagle pics and changelog later. This driver lies on my workbench and begs for attention… LOL

.

EDIT:

Oshpark Link

.

.

Eagle Layout

.

A closer look to the main section

Oshpark Boards:
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

Edited by: HarleyQuin on 03/23/2017 - 20:12
HarleyQuin
HarleyQuin's picture
Offline
Last seen: 5 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 487

Changelog

The basic circuit follows the one BLF SRK FET v2 by RMM is using. I deliberately designed v3 to only add functions and kept all that was already there, including 2S support with LDO, OTC, Temperature Probing, Switch Pads for Pin 2 and 3, Gate and Pulldown Resistors, Star Solderpads, 5 LED Wire Pads.

You find a detailed partlist when you follow the link to v2, so in the following I stick to the changes and additions.

FET
LFPAK56 instead of D2PAK package

Channels
There are now 3 channels for current regulation
1. The single AMC7135 (Q1)
2. The FET
3. Up to 9 AMC7135 (Q2-10)
Pin5 of the MCU is hardwired to Q1.
Pin6 can be connected to the FET or to Q2-10
Pin3 can be connected to the FET or to Q2-10 as well
The selection is done with the 4-pad-connector:
Bridge the pads vertically to connect the FET to Pin3 and Q2-10 to Pin6 (like I did above)
Bridge the pads horizontally to connect the FET to Pin6 and Q2-10 to Pin3

Capacitors C1/C2 (for MCU, LDO)
I redubbed CLDO as C2
In 2S configuration with LDO you need both capacitors

Momentary Switch
Connect one cable of the switch to SW- (=GND) and the other cable either to SW+(2) or SW+(3), depending on whether the firmware uses Pin2 or Pin3 of the MCU (Pin2 is commonly used)

Oshpark Boards:
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

MRsDNF
MRsDNF's picture
Online
Last seen: 9 min 16 sec ago
Joined: 12/22/2011 - 21:18
Posts: 11470
Location: A light beam away from the missus in the land of Aus.

Nice work HQ. Its a shame I dont understand most of it. Thats my fault. No one elses.

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

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

Thx MRsDNF. If I had a fraction of your skills with a lathe I’d be a happy man. Smile

Oshpark Boards:
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

MRsDNF
MRsDNF's picture
Online
Last seen: 9 min 16 sec ago
Joined: 12/22/2011 - 21:18
Posts: 11470
Location: A light beam away from the missus in the land of Aus.

You crack me up. LOL

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

The Miller
The Miller's picture
Online
Last seen: 5 min 45 sec ago
Joined: 12/14/2015 - 12:08
Posts: 9648
Location: Charente France

Well this looks very nice.
I am with MRsDNF that most is not directly understood by me (and that this is my fault)
I think it looks nice enough to be used for that special BLF watch Kronological was working on, besides just put it away from sight in a SRK Wink

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

Oshpark links, eagle pics and changelog added

Oshpark Boards:
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

finges
Offline
Last seen: 1 day 11 hours ago
Joined: 11/19/2014 - 14:50
Posts: 438
Location: Germany

Nice work. Basically it is like the tripledown driver in big? Can you please share your firmware?

pilotdog68
pilotdog68's picture
Offline
Last seen: 4 days 4 hours ago
Joined: 05/30/2013 - 23:31
Posts: 6346
Location: Held against my will in IOWA, USA

finges wrote:
Nice work. Basically it is like the tripledown driver in big? Can you please share your firmware?

seems like similar functionality but with bonus goodies in the design.

Kudos Harley

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

djozz
djozz's picture
Offline
Last seen: 35 min 56 sec ago
Joined: 09/07/2012 - 17:04
Posts: 10824
Location: Amsterdam

Very nice driver, and I love the x10 mode spacing!

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 month 20 hours ago
Joined: 01/04/2014 - 06:47
Posts: 4954
Location: H-Town

Incredible!

Great job!

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

finges wrote:
Nice work. Basically it is like the tripledown driver in big?
To be fair my inspiration for triple channel stems from @wight and his long retired A17-Hybrid driver. We owe him a lot.

But, having said this…

pilotdog68 wrote:
Kudos Harley
Same to you, PD. If it wasn’t for you, triple channel might never have come out of its niche. So thanks for taking the time to develop and publish your drivers, I know how much work it takes. Beer

Admittedly I stopped following TripleDown when it went to Bistro / Narsil, so I can’t say at one glance whether this v3 driver is compatible to TripleDown or not. I still stick to the good ol’ 13A. It was so time-consuming for me to understand its functions and to adapt the firmware, that I don’t muster the time to add another MCU to my portfolio, yet.

.

@WarHawk-AVG
Thx for stopping by, been a while Smile

Oshpark Boards:
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

pilotdog68
pilotdog68's picture
Offline
Last seen: 4 days 4 hours ago
Joined: 05/30/2013 - 23:31
Posts: 6346
Location: Held against my will in IOWA, USA

I haven’t left the the 13a either. There are very different versions of the TripleDown with different purposes, your “quad pad” thing accomplishes most of the differences. The firmwares should be mostly compatible, just without the other goodies you added

My Favorite Modded Lights: X6R, S8 , X2R , M6, SP03

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

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

finges wrote:
Can you please share your firmware?
Well, errr, it’s nothing but an adapted version of JohnnyC’s Star Momentary, made for ATtiny13A, and very clumsily set up (simple if mode_idx==…, then…), embarassingly without good commentary, as I always change the code and don’t adapt the… commentary.

- sigh -

I’ll see what I can do.

.

pilotdog68 wrote:
I haven’t left the the 13a either…
Good to know. I’ll need to take a closer look.
Oh, and the “goodies” are not mine. It was RMM who added all the fancy stuff in BLF SRK FET v2, I just left it in the design.

Oshpark Boards:
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: 5 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 487

I thought I had this github thing figured, but I can’t get it to work atm.
ok, plan B:

This is the main part of the code. Triple channel for ATtiny13A. Very simple, very straighforward, very memory consuming.
But… it works

.

Here’s my aide-mémoire:

Oshpark Boards:
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

finges
Offline
Last seen: 1 day 11 hours ago
Joined: 11/19/2014 - 14:50
Posts: 438
Location: Germany

Thanks, if you get github up and running I would like to download the whole .c if this is possible. I try to get a tripledown driver to work in a dual switch light. But the e-switch does not change modes so I’m a little stuck at the moment and thought maybe your firmware would work with the tripledown driver and e-switch.

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

Here you are:

https://github.com/HarleyQuin/Flashlight-Firmware/blob/master/STAR_momentary_BLF_SRK_16.c

Please remember it’s for ATtiny13a and only supports momentary switch.

Changelog to the original STAR Momentary v.1.6, from the top of my head:

- Renamed definitions for Port B
- Included a variable called highest_mode for mode change
- Removed wrap-around at mode change
- Included a 3rd timeframe (very_long_press_dur) for turnoff and straight-to-turbo
- Changed output routine (set_output())
- Each mode has (and needs) its own if…then routine (change the variable highest_mode if you add or remove modes!)
- Pins 5/6/3 can be turned ON or OFF (no PWM-0 or PWM-255 needed)
- Pin_3 set to output
- Added blinking 3 times in Low-Voltage-Protection
- Removed what I deemded not necessary for my build, but don’t remember all of it…

I hope that works for you. If not, give me a note and I will help out the best I can.
HQ

Oshpark Boards:
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

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Nice Job on this! There's sooo many pad/options, trying to trace them is mak'n my head spin! But I see how a lot of it is working.

I also see you are using a FET gate pulldown, 33K, but not using an Rgate resistor - did you find it necessary? I've used anywhere from 12K to 47K for the pulldown, but we assume can go up to 60K or so. I've settled for 47K for now on the BLF Q8 driver, but haven't scoped it. For the Rgate, we are using a 100 ohm, and I see Richard recommends a 10-50 ohm.

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

Yes, RMM recommends 20-50 Ohm for the gate resistor, but he kept quiet about the pulldown resistor. I don’t have a scope so I just kept reading what these R are for and how their value should be. This is not as easy as it looks, as both are often referred to as “gate resistor”. And the funniest calculation was this, which the author deemed as minimum knowledge needed about gate circuit resistance in MOSFETs. Well, he lost me at point 1…

So this was my train of thought:

Although frequency does not really matter in my design (no PWM), spikes will in all probability occur at switching. Now I’m not sure which of the two R prevent that, so my intention is to use both.

The pulldown resistor is said to be necessary to keep the gate from floating. Values between 1k, 10k and 100k ought to work. BLFers had good testing and scope results in the tens of kOhm, so I used the nearest I had which was 33kOhm.

The (series) gate resistor shall protect the output pin of the MCU by preventing overcurrent. There’s talk of values between 10 and 150 Ohm. I have no such value at hand… Well, the Attinys are said to have overcurrent protection although I couldn’t confirm it. But a lot of BLF FET driver were built without a gate resistor, so I dared to build it with a 0-Ohm-resistor for now. But I plan to use a gate resistor after my next parts order, because it might help preventing spikes, might protect the MCU and will not hurt the output. I thought of 50 Ohm, but I’m open to suggestions.

.

Err, another thing, while we’re talking resistors… R1 and R2 (LVP).
How high can we go to
- keep parasitic drain as low as possible
- while still get reliable voltage measuring from the MCU?
With my values of 33k/8k2 (I still prefer behind D1) I measure a parasitic drain at sleep_mode of 0.25mA. Now you use (before D1) 220k/47k for ages and probably with good measuring. One might think of even higher values, like 2M2/470k, 22M/4M7. Is there a limit where the MCU will not be able to measure the voltage anymore? Could that be calculated?

Oshpark Boards:
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

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Can't recall, maybe Mike C tried higher values for R1 and R2 - he said what those were, can't recall - hgiher than my 10X though and pretty sure proven to work fine. I used 10X factor because I had them, common sizes. But I also bought limited qty of values bout 3X higher than that, effective cutting the R1/R2 drain by another factor of 3 -- didn't try this yet. Dunno if there is a theoretical limit on the values, but 1M or 2M for R1 sounds familiar think it was tried and worked.

The 13A is well proven to tolerate spikes better than the 25/45/85, so, these gate resistors are probably not needed at all on a 13A, but on the scope, things look much better with them.

 

More important for reducing parasitic drain than tweaking higher R1/R2 is making a correction in the firmware to shut down the AtoD when goin in sleep mode - forgot the difference but it's big. First recommended by Halo in the 24/45/85 thread - dunno, others might have done this in custom firmware but as far as I know, none of the standard open source versions do it.

I'm seeing 0.007 - 0.009 mA drain in a few stock better lights, so it's done and out there. For me, I just think no one should have a concern about draining the battery simply because it's left in an e-switch flashlight vs. a power switch light.

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

That’s very helpful, thanks. I’ll look into both.

I’ll change R1/R2 from 33k/8k2 to 330k/82k first, just to see the practical result. In theory it should lower the parasitic drain (@4V) about 0.09mA, pushing it from 0.25mA to 0.16mA. I might try another x10, which would save another 0.009mA, and see if voltage measuring will still work.

Turning off ADC rings a bell. Found it again in post #2 of Toykeepers Firmware repository. She mentions @Crux:
Investigate, measure, and document ultra-low-power sleep modes. Crux’s posts here and here, ideas here (link is external) and here (link is external) and here
The firmware I just use has an ADC_off routine, but it’s only called when there is no voltage monitoring. Calling it before starting sleep mode looks easy, but I’ll have to find where to put the ADC_on command to reenable it after a switch press.

But that looks very promising and together might bring the drain down by x100. Smile

Oshpark Boards:
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

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Narsil has the support, so could check there as well, 7/11 version is the latest: Shared project folder on Google Drive

Here's the full function:

/**************************************************************************************
* SleepUntilSwitchPress - only called with the light OFF
* =====================
**************************************************************************************/
void SleepUntilSwitchPress()
{
 // This routine takes up a lot of program memory Sad
 
 //  Turn the WDT off so it doesn't wake us from sleep. Will also ensure interrupts
 // are on or we will never wake up.
 WDT_off();
 
 ADC_off();  // Save more power -- turn the AtoD OFF
 
 // Need to reset press duration since a button release wasn't recorded
 wPressDuration = 0;
 
 //  Enable a pin change interrupt to wake us up. However, we have to make sure the switch
 // is released otherwise we will wake when the user releases the switch
 while (IsPressed()) {
  _delay_ms(16);
 }
 PCINT_on();
 
 //-----------------------------------------
 sleep_mode(); // Now go to sleep
 //-----------------------------------------
      // Alternate method? --> set_sleep_mode(SLEEP_MODE_PWR_DOWN);
 
      // Hey, someone must have pressed the switch!!
 
 
 PCINT_off(); // Disable pin change interrupt because it's only used to wake us up

 ADC_on();  // Turn the AtoD back ON
 
 WDT_on();  // Turn the WDT back on to check for switch presses
 
} // Go back to main program

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

Just what I needed Beer

that should fit in here very nicely

void sleep_until_switch_press() {
	WDT_off();	// Turn the WDT off so it doesn't wake us from sleep
				// Will also ensure interrupts are on or we will never wake up		
	press_duration = 0;	// Need to reset press duration since a button release wasn't recorded
	while (is_pressed()) {	// Enable a pin change interrupt to wake us up. However, we have
		_delay_ms(16);		// to make sure the switch is released or we will wake when the user releases it
		}
	PCINT_on();
	sleep_mode();	// Now go to sleep
			// Hey, someone must have pressed the switch!!
	PCINT_off();	// Disable pin change interrupt because it's only used to wake us up
	WDT_on();	// Turn the WDT back on to check for switch presses
}				// Go back to main program

Oshpark Boards:
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: 5 months 3 weeks ago
Joined: 03/29/2013 - 04:47
Posts: 487

New resistors for R1/R2 aren’t there yet, bit I couldn’t resist changing the code. Just adding the two lines about ADC brought the sleep mode current down from 0.254mA to 0.89mA 0.089mA at 4V. It’s even down to 0.068mA at a more relevant 3V.

That’s so simple and effective, when you know what to do. Again thanks TomE for the hint.

void sleep_until_switch_press() {
	WDT_off();
	ADC_off();     // <++++++++++++++
	press_duration = 0;
	while (is_pressed()) {
		_delay_ms(16);
		}
	PCINT_on();
	sleep_mode();
	PCINT_off();
	ADC_on();     // <++++++++++++++
	WDT_on();
}

.

EDIT Oct 16: The above values were with 33k/8k2 as R1/R2. In the meantime I changed to 330k/82k and that brought the current when off down to 11µA (0.011mA) with a cell that is 3.3V resting. LVP still working as before. Now that’s really good.

Oshpark Boards:
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

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Cool! Think there's a typo there on the values?

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

Yes, sure it is. Ah, these zeroes…
Corrected

Oshpark Boards:
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

finges
Offline
Last seen: 1 day 11 hours ago
Joined: 11/19/2014 - 14:50
Posts: 438
Location: Germany

HarleyQuin wrote:
Here you are:

https://github.com/HarleyQuin/Flashlight-Firmware/blob/master/STAR_momentary_BLF_SRK_16.c

Please remember it’s for ATtiny13a and only supports momentary switch.

Changelog to the original STAR Momentary v.1.6, from the top of my head:

- Renamed definitions for Port B
- Included a variable called highest_mode for mode change
- Removed wrap-around at mode change
- Included a 3rd timeframe (very_long_press_dur) for turnoff and straight-to-turbo
- Changed output routine (set_output())
- Each mode has (and needs) its own if…then routine (change the variable highest_mode if you add or remove modes!)
- Pins 5/6/3 can be turned ON or OFF (no PWM-0 or PWM-255 needed)
- Pin_3 set to output
- Added blinking 3 times in Low-Voltage-Protection
- Removed what I deemded not necessary for my build, but don’t remember all of it…

I hope that works for you. If not, give me a note and I will help out the best I can.
HQ


Thanks, i just tried it and it works on the tripledown driver with a e-switch Smile
Finally I can use that driver in my e-switch lights.
Do you think it is possible to add a memory function, so that when power is cut via the clicky switch it remembers the last mode and starts in this mode? This would make it usefull for dual switch lights too.
Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

The more I look at this, the more I'm intrigued and interested. If you could extend the MCU pins to accomodate an 85, that would be great. But besides, the BLF Q8 SRK board has the stock 10 uF C1 and we add a 0.1 uF C2, though. Our C2 has to be close to pins #4 and #8 - I've found it works well with the 25/45/85's. I almost always air wire it across the MCU on stock drivers.

It looks like you got other important things in place, like the RGate and gate pulldown which we are populating. Plus the LDO would be a huge+ over what we have.

We designed ours for FET+1, and using pin #3 for an optional indicator LED. If your driver could accomodate that option as well, it would be right there with ours, but of course, your's can be configured for so much more.

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

finges wrote:
Do you think it is possible to add a memory function, so that when power is cut via the clicky switch it remembers the last mode and starts in this mode?
The STAR Momentary firmware does not include any memory options or saving functions, so that part would need to be made up from scratch or transferred from a clicky firmware. I’m really not a firmware guy, but I think it is possible.

.

Tom E wrote:

If you could extend the MCU pins to accomodate an 85, that would be great. But besides, the BLF Q8 SRK board has the stock 10 uF C1 and we add a 0.1 uF C2, though. Our C2 has to be close to pins #4 and #8 – I’ve found it works well with the 25/45/85’s.

It looks like you got other important things in place, like the RGate and gate pulldown which we are populating. Plus the LDO would be a huge+ over what we have.

We designed ours for FET+1, and using pin #3 for an optional indicator LED.

This can be done.

- ATtiny85,
- C2 closer to MCU,
- indicator LED to pin3, very well.
Anything else? Wink

While I’m already sketching the board…
Could you give me some input, just to know if I might omit options if the space was needed.

- Is the outer diameter of the Q8 board (46.02 mm) enough or would the “ears” of BLF SRK FET still be needed?
- As momentary switch pin2 is most commonly used, is pin3 for the switch an option at all anymore?
- There was talk of a snubber circuit for the FET, is that still in discussion?
- what for are in Q8 (v3) the two small rectangular pads above BATT LED?
- Is the Zener Diode in Q8 the usual Zener-Mod-Diode and not necessary with an LDO version?

Any feedback is welcome.

Oshpark Boards:
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

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Oh boy - not sure if I'm stepping on toes. Yours is a more generic board since it serves many possible options, while ours is more single/special purpose.

 

- Is the outer diameter of the Q8 board (46.02 mm) enough or would the “ears” of BLF SRK FET still be needed?

The ears would serve well for a generic SRK board that could be used in various/most clones that don't have a retaining ring. Actually I requested it for ours, since our OSHPark BLF Q8 is only gonna be used a prototype, typically in the cheap SRK clones available today. It turns out though we haven't found a need - we can still get a tight press fit, least on the clone I'm using so far.

- As momentary switch pin2 is most commonly used, is pin3 for the switch an option at all anymore?

I'm not aware of it being used on pin #3

- There was talk of a snubber circuit for the FET, is that still in discussion?

Hhhmmm, not sure - can't recall details, but we are not using it at this point, but DEL is going to be scoping our new board, so if he's satisifed, it won't be used or considered I'd think

- what for are in Q8 (v3) the two small rectangular pads above BATT LED?

Ok, that's a good question - I see them, they are there.. Just not sure. Maybe either sets of pads can be used for wiring up a indicator LED, not sure...

- Is the Zener Diode in Q8 the usual Zener-Mod-Diode and not necessary with an LDO version?

No, it's not meant to be the typical zener diode. It was intended to be optional, only if we could not get a stable VCC input to the MCU with the other enhancements. Richard's new MTN17DDm v1.1 uses az ener the same way as our intention, but it doesn't look like we need it. In fact it's not recommended because of the leakage that adds to parasitic drain significantly.

 

Tom E
Tom E's picture
Offline
Last seen: 32 min 54 sec ago
Joined: 08/19/2012 - 08:23
Posts: 10615
Location: LI NY

Any updates? Still very interested in the progress, Great Job btw!

Pages