Custom SkyRay King SRK Driver

311 posts / 0 new
Last post

Pages

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Custom SkyRay King SRK Driver

Everybody knows about the SkyRay King (SRK) flashlight/snowflake (no two are alike or made by the same company or have the same driver). 3 XML light smaller than a beer can, 4×18650 battery pack, ton ‘o lumens in the palm of your hand for way less bucks than a tank of gas.

Nice light, but kind of a sucky driver. Or drivers. Crappy PWM, only two modes, iffy drive current, large parasitic drain, etc. Well, I had enough of mine, so I decided to build my own driver… I’m currently testing the firmware with a 24 × 380 mAh AMC7135 chips on an XML2/T6/3C SRK.

8 AMC7135 regulator chips per LED – regulated 3.05 amps per LED. One could stack more…
ATTINY85 CPU (8K of flash memory, no running out of code space anytime soon)
Thermal monitoring (sensor is on the CPU chip)
Battery monitoring.
VERY low parasitic drain (a 24 AMC board measured less than 10 microamps)
15 kHz PWM
Handy pry hole for removing the press-fit driver.

Been going ape with the firmware (very much a work in progress):
PWM modes: moon, 3.125%, 6.25%, 12.5%, 25%, 33%, 50%, 100%
Ramping (2 second and 4 second)
Slow strobe (10 Hz)
Fast strobe (16 Hz)
Random strobe (8-20 Hz random pulses)
Morse code (i.e. SOS)
Beacon (biips every second)
Alpine distress beacon
Status (blinks battery voltage and temperature)

If the light is on:
Advances to next mode by short button press.
Goes to previous mode by medium button press.
Shuts off by long button press (or clicking to the OFF mode).

If the light is off:
Hidden mode activated by turning it on with long button press (over 1 sec)
Medium button press turns on last mode used then resets pointer number to the start (i.e. short cycle memory) so the next click starts at the beginning of the mode list.
Short button press turns on in the last mode used (i.e. mode memory) and the next click advances to the next mode.

The driver mode list is programmable. If you hold the button down when you apply power, the mode list is returned to the standard values, the light flashes three times. If you then turn off the power the light is in its factory state. Or, you can select a desired mode and hold the button down until it flashes three times. Repeat for each desired mode (the first mode you store is the “hidden” mode. When you have all your desired modes saved, turn off power to the light and then turn it on again.

Monitors the battery voltage. When it gets low, the light blinks twice and light level is cut in half… the battery voltage should then rise for a while. This repeats until it can’t go any lower. I am seeing a 0.01 volt accuracy.

Monitors the temperature in the driver compartment. The light blinks four times and the light level gradually reduces if it passes a set threshold, comes back to normal level if the temperature drops. If it passes a shutoff value, the light shuts off. I am seeing around a 1-2 degree C accuracy. I now need to find out how the driver CPU temperature corresponds to the case temperature to better set the thresholds.

Edit: updated user interface/features description.

Edit 2: Updated picture, mode info, and temperature protection description.

I got in a workable board and built it up. Measured full up 9 amp board parasitic drain at less than 10 microamps. In my 3 x XML2/T6/3C on copper sinkpad SRK measured:

Moon: 0.25 lumens (might be around 1 lumen with plain XML’s)
Other modes: 50, 210, 550, 770, 1200, 2600 lumens (with SRK driver it was 1800 lumens)

Edited by: texaspyro on 06/19/2013 - 01:37
FMS
Offline
Last seen: 9 months 1 week ago
Joined: 02/14/2013 - 20:03
Posts: 76
Location: Australia

Sounds great, wish I had the skills to do that! Will you be offering these, would love a better SRK driver.

DasEtwas
Offline
Last seen: 4 years 3 months ago
Joined: 08/02/2011 - 20:10
Posts: 237
Location: Germany

Reading awesome Smile If you sell these, it seems I have to buy a SRK Big Smile

ryansoh3
ryansoh3's picture
Offline
Last seen: 10 months 1 week ago
Joined: 08/04/2012 - 08:21
Posts: 3890
Location: US

Looks good! Do you have a price in mind? Smile

BLF ≠ B-grade Flashlight Forum

 

Flomotion
Flomotion's picture
Offline
Last seen: 6 months 5 days ago
Joined: 12/02/2012 - 15:13
Posts: 1405
Location: Pacific Northwest

texaspyro wrote:
Everybody knows about the SkyRay King (SRK) flashlight/snowflake (no two are alike or made by the same company or have the same driver). 3 XML light smaller than a beer can, 4×18650 battery pack, ton ‘o lumens in the palm of your hand for way less bucks than a tank of gas.

Nice light, but kind of a sucky driver. Or drivers. Crappy PWM, only two modes, iffy drive current, large parasitic drain, etc. Well, I had enough of mine, so I decided to build my own driver… waiting for boards to be made… I’m currently testing the firmware with a single AMC7135 chip on an XML.

8 AMC7135 regulator chips per LED – regulated 3.05 amps per LED. One could stack more…
ATTINY85 CPU (8K of flash memory, no running out of code space anytime soon)
Thermal monitoring (sensor is on the CPU chip)
Battery monitoring.
VERY low parasitic drain (my single AMC7135 test board is <5 microamps)
15 kHz PWM
Handy pry hole for removing the press-fit driver.

Been going ape with the firmware (very much a work in progress):
PWM modes from moonlight to full blast
Ramping
Slow strobe (10 Hz)
Fast strobe (16 Hz)
Random strobe (8-20 Hz random pulses)
Morse code (i.e. SOS)
Beacon
Status (blinks battery voltage and temperature)

Advances to next mode by short button press.
Shuts off by long button press (or clicking to the OFF mode).
Hidden mode activated by turing on with long button press (over 1 sec)
Medium button press turns on at previous PWM level, resets mode number to the start (i.e. short cycle memory) so the next click starts at the beginning of the mode list.
Short button press turns on in the previous mode (i.e. mode memory) but keeps the mode pointer. Next click advance to the next mode.

Monitors the battery voltage. When it gets low, light level is cut in half… the battery voltage should then rise for a while. This repeats until it can’t go any lower. I am seeing a 0.01 volt accuracy.

Monitors the temperature in the driver compartment. Light level cuts in half if it passes a set threshold, come back to normal level if the temperature drops. If it keeps getting higher, the light shuts off. I am seeing around a 1-2 degree C accuracy.

If the light shuts down, it will blip a code to tell you why…

Please lets your Admirers, Know when the Magic Begins for the Rest of Us!!

Flomotion

zeremefico
zeremefico's picture
Offline
Last seen: 1 hour 22 min ago
Joined: 03/27/2012 - 02:44
Posts: 1390
Location: Greece

My SRK deserves that.
Make that driver available soon:-)

₪₪₪₪ ΟΥΔΕΝ ΚΡΥΠΤΟΝ ΥΠΟ ΤΟΝ ΗΛΙΟ ₪₪₪₪

My YouTube channel

Flashlights & edc gear

K40M F16

borstar_micke
Offline
Last seen: 4 years 1 month ago
Joined: 08/16/2011 - 18:26
Posts: 460
Location: Sweden

I’m interested too, just received my WB SRK and while it’s bright, I’m actually more impressed by my ZL SC52:s output considering it’s size…

mhanlen
mhanlen's picture
Offline
Last seen: 1 year 11 months ago
Joined: 03/01/2013 - 11:42
Posts: 2601
Location: Eastern USA

This would instantly make me love my SRK. Provided it doesn’t cost more than an SRK… that is even if you’d make it available. Very cool!

FMcamaroZ28
FMcamaroZ28's picture
Offline
Last seen: 9 months 1 week ago
Joined: 10/08/2012 - 09:05
Posts: 972
Location: New Jersey

so when you say boards, you mean more than one.

awaiting group buy thread!

spoggles
Offline
Last seen: 7 years 6 months ago
Joined: 05/24/2013 - 08:09
Posts: 32
Location: Montreal

Very cool! count me in if you sell them.

Pulsar
Pulsar's picture
Offline
Last seen: 3 months 1 week ago
Joined: 07/29/2011 - 00:41
Posts: 5848
Location: Maine

Not sure if this is going to turn into a group buy… But count me in for one too! Not sure if the 3xXML 3×18650 sky ray will use the same driver, bit if it doesn’t, should not have a problem finding an owner

JohnnyMac
JohnnyMac's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 04/12/2011 - 16:03
Posts: 8864
Location: Eastern PA

Impressive stuff!  The interface sounds great and board is a great looking design.  Nice big pads to solder to as well. 8)

If you decide to make these available to the rest of us (and I'm sure hoping you do!) you could sell it with just the MCU programmed and installed and whatever else except for the AMC7135 chips so we can save you some labor and finish them up on our own.  Just a thought. Wink

troisanh
Offline
Last seen: 10 months 1 day ago
Joined: 02/24/2013 - 07:19
Posts: 746
Location: midwest

Sweet stuff man I’d be in for couple when they are available so keep me in mind.

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I don’t think that I will be building up assembled units, but if there is enough demand I could have them professionally built. The assembly house that I use has around a $500 minimum, so it might be doable for around 100 boards. I would need to find a source for full reels of affordable AMC7135 chips.

Otherwise, I could sell blank boards or maybe kits of parts. I ordered the prototype boards from OSHPARK. They do boards in multiples of three. They were around $16 for three boards. For 100 boards, SeeedStudio should be quite a bit less. Assuming professional assembly, a completed board should be less than $20.

I forgot to mention another feature in the firmware… battery sag compensation. If you are in a PWM mode and the battery voltage falls below a set value (where the regulator chips can no longer regulate), it starts increasing the PWM value to help compensate for the reduced voltage. Not all that sure that I like it… there is the potential for a little flicker around the threshold voltage and since it increases the current draw on the low batteries, it will reduce the time until the light has to shut down.

Rockspider
Rockspider's picture
Offline
Last seen: 8 months 1 week ago
Joined: 12/07/2011 - 04:10
Posts: 397
Location: Italy, Venice

Wow! Great looking board and look at all those features! Yike! Not sure I'll ever need all those programmed features, but interested in a board for sure.

I'm a little bit scared of how difficult will be to memorize how many settings one can have with one button only... maybe I'd prefer just 3-4 modes preprogrammed (from moonlight to fullblast) without blinkies and be very well set!

Let us know if/when those will be available.

Smile

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Rockspider wrote:

Wow! Great looking board and look at all those features! Yike! Not sure I’ll ever need all those programmed features, but interested in a board for sure.

I’m a little bit scared of how difficult will be to memorize how many settings one can have with one button only… maybe I’d prefer just 3-4 modes preprogrammed (from moonlight to fullblast)

If you can compile a C program for the Atmel chip (i.e. WINAVR) and program the chip, the driver code is very easy to setup for whatever modes and features you want… I am looking into making the modes programmable from the light.

Stittville Ed
Stittville Ed's picture
Offline
Last seen: 5 months 2 weeks ago
Joined: 11/20/2011 - 08:22
Posts: 801
Location: Stittville, New York

Great job on your build Smile
I would be in for a kit or any other way you would do this.

I think I would need 2 because this would be so great of a setup I would buy another SRK!!!!!!!!!!!!

Pulsar
Pulsar's picture
Offline
Last seen: 3 months 1 week ago
Joined: 07/29/2011 - 00:41
Posts: 5848
Location: Maine

either way, i will be in for one… kit, assembled….

Slim Pickens
Slim Pickens's picture
Offline
Last seen: 19 hours 47 min ago
Joined: 04/28/2012 - 19:50
Posts: 1229
Location: Lehigh Valley

Quick quesion: is (or are) there any conditions( s ) one could utilize to program a function that informs the user that Vbatt has dropped or will imminently drop below the point needed for regulation (e.g. very quick and subtle double PWM blink back and forth from 100 down to 50% or similar)?

It’s superfluous but as a flashie I’ve always wanted that feature. Done properly I think one should have to be looking for it in order to see such a notification.

Sirius9
Sirius9's picture
Offline
Last seen: 44 min 35 sec ago
Joined: 03/04/2012 - 19:23
Posts: 4651
Location: South Europe

I was avoiding SRK because it's stupid modes but with this driver, situation would change for sure so, if I ever manage to get SRK for 15$ (or at least under 20$) I will definitivly buy this driver.

Anyway, subscribed and watching Smile

 

FlashPilot
FlashPilot's picture
Offline
Last seen: 15 min 24 sec ago
Joined: 05/10/2010 - 16:07
Posts: 4814
Location: USA

What a great idea texaspyro! Its nice to see that youre making some positive headway on your driver. If you can do these for under $20, please include me for at least 2. This would make a very good light a truly exceptional one. Good luck to you!

Old-Lumens
Old-Lumens's picture
Offline
Last seen: 4 years 11 months ago
Joined: 11/04/2011 - 11:39
Posts: 7478
Location: Tyler, TX, USA

I would be interested, but I don't know if it would be one or more, till you know more.Wink

My PayPal address: oldlumens (insert the @ sign here) gmail.com

My YouTube Flashlight Video Channel

The BLF Modding Links Thread 

http://imageshack.com/a/img922/1374/jQ2wdL.jpg

 

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I just put in some hooks for the user to program their desired modes… if the button is pressed when power is applied to the light, it will erase the current configuration to the default and enter programming mode (indicated by three blinks). You then click through the default mode list to the desired mode and hold the button down for a second to store the mode. Repeat the mode selections for the modes you want then power down the light (loosen the tailcap) to exit programming mode.

PyTech
PyTech's picture
Offline
Last seen: 1 week 5 days ago
Joined: 09/01/2012 - 06:21
Posts: 635
Location: Highland, California. USA

I’m in too, if selling.

-Sean

leaftye
Offline
Last seen: 11 months 3 weeks ago
Joined: 07/25/2012 - 17:43
Posts: 4278
Location: San Diego, CA

I'll finally get a SRK if you'll sell me this driver.

The low mode should be lower.

Pavithra_uk
Pavithra_uk's picture
Offline
Last seen: 4 months 2 weeks ago
Joined: 04/24/2012 - 22:47
Posts: 779
Location: SRI LANKA

great work texaspyro

Im also try to do pcb layout 7135 based driver (used Tiny13A instead of 85)
sadly pcb manufacturing company here quoted me a cost which was higher than price of SRK

Pavithra_uk
Pavithra_uk's picture
Offline
Last seen: 4 months 2 weeks ago
Joined: 04/24/2012 - 22:47
Posts: 779
Location: SRI LANKA

idea:
its better if you can add input capacitor and output capacitors (3)
new 7135 datasheet has input cap and another one between ground and output

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Pavithra_uk wrote:
sadly pcb manufacturing company here quoted me a cost which was higher than price of SRK

Try OSHPARK.COM and Seeedstudio’s Fusion PC board services. OSHPARK will make you three boards for $5 a square inch ($1.67 per square inch per board). Price includes shipping(at least in the US).

Seedstudio is a bit less, but you need to buy more buy more boards.

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I have the user mode programming code working.

You can set up the mode list in any order that you want (OK, the first mode is always set to OFF) and include any of the standard levels (currently moon, 10%, 25%, 50%, 100%) and patterns. The mode list is stored in EEPROM and is maintained between battery changes.

Sweeeeet…

BTW, moon mode on a SRK could be 50 lumens or so…

leaftye
Offline
Last seen: 11 months 3 weeks ago
Joined: 07/25/2012 - 17:43
Posts: 4278
Location: San Diego, CA

How low do you think moon mode could go?

The low mode should be lower.

texaspyro
Offline
Last seen: 2 years 5 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
leaftye wrote:

How low do you think moon mode could go?

Unknown at this time… AMC7135 chips require a certain minimum pulse width to turn on. At 15 kHz PWM, this is around 1.5-2% of the full PWM range. That produces a very dim output. Couple that with the capacitive load of driving 24 chips and you may need to boost the PWM some more to get the LEDs to light up. The minimum setting might vary depending up the LEDs and AMC7135 chips that are used. A setting that just lights one light could put 50 lumens out another one.

Once you get the width wide enough to turn on the LEDs, each PWM step should increase the output around 10-12 lumens.

Pages