Mike C drivers and X85 firmware.

31 posts / 0 new
Last post
Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden
Mike C drivers and X85 firmware.

I have a bunch of different drivers for different applications and have been asked a number of times about making them available. I’ve sent a few here and there, but had not made them publicly available before. Now they are…

Firmware X85 v1 available in following post.

NOTE: I do not consider my driver designs as open source hardware. As OSH Park currently do not support sharing for public order with downloading source disabled, so I won’t openly share on OSH Park until they do. They are planning to implement this but can’t tell me when. In the meantime, those that want to build a driver using my designs can order through me. I’ll do the OSH Park order and just forward your address to them (I won’t be adding anything to the price). These boards are not for everyone. I do some things a lot differently and some may frown on my methods.

I can also sell fully built, flashed, tested and calibrated drivers, but they will probably not fall under the category of “budget”. I’m not saying that my built and programmed drivers will be worth the price I ask, it’s just that it takes time for me to make them. I’ve made stencils for them so it’s not as bad as it used to be. I can share all stencils if there is interest, the BMF-SRK driver without a stencil takes for ever…

I can also offer fully built lights as time permits. It’s what I do for fellow climbers and underground explorers, and is what started all this development in the first place. It won’t as cheap as building yourself though, and I don’t have a vast amount of hosts laying around so it won’t be as fast either.

List of drivers available.
F-8 v2 (17mm FET driver with 8 x AMC7135): http://budgetlightforum.com/node/46224
G-12 (17mm driver with 12 x AMC7135): No driver page for it yet but I used one here: http://budgetlightforum.com/node/48112
G-16 (20mm or 24mm driver with 16 x AMC7135): No driver page for it yet… An earlier 23mm version is in this light under different name: http://budgetlightforum.com/node/42886
BMF-SRK: No driver page for it yet… For a photo of the latest version, see post #1036 here: http://budgetlightforum.com/comment/963041#comment-963041.
ZY-T08: This link will have to do for now: http://budgetlightforum.com/node/40759

The BMF-SRK and ZY-T08 driver are dedicate 6V drivers with LDOs. The others are both 3V and 6V compatible, depending on components used when building them. For 6V versions a zener diode is used. Voltage monitoring is working in all configurations on all drivers.

Edited by: Mike C on 07/24/2016 - 04:11
Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

X85 Firmware v1 : http://www.mikec.se/Stuff/X85.zip

Here is a first release of my firmware that I use for my drivers. It’s been totally changed many times, is constantly undergoing changes, has a heap load of crap that is unnecessary, it’s messy and hard understand, and most certainly has bugs in it… But this latest version I’ve tested seems good so far…

The zip file linked above also contains the BAT files I use to flash with AVR dude. As I use the no init “brown out detection” trick for temporary storing stuff it is important that the fuse settings are set correctly, check the BAT files for fuse settings I use. One BAT file is for flashing normally, another when flashing and enabling PB5/reset pin as IO, and finally a test BAT file just to test the clip connection before flashing.

I’ll only start with very basic instructions and will have to fill on more as time goes, it’s just too much. Also, I was thinking about making a “release” version of it, cleaned up without all the development stuff, but to be honest I don’t want to have to manage it. I’ll release what I use in my lights, be it full of stuff that no one else needs or not.

The drivers it supports are the ones I will be listing. The F8 in the OP, G-12 (17mm with 12xAMC7135), G-16 (20mm with 16xAMC7135), BMF-SRK (latest version post #1036: http://budgetlightforum.com/comment/963041#comment-963041) and the ZY-T08. All of these drivers are available as of now according to the OP in this thread. I just haven’t made dedicated driver threads for them yet, I need a break from my computer screens now…

When compiling for a certain driver type, definitions are used. Here is a quick list of the most import ones:

Driver type: One of these must be defined, the others commented out or removed.

#define F8 // F-8 & ZY-T08
#define G12
#define G16 // G-16 & BMF-SRK
#define LOW // Low output modes for development testing.

Switch setup One must be defined, the other commented out or removed.

#define DUALSWITCH
#define OFFSWITCH

Driver config Define DOUBLE_CELL if driver is for light with 2S config, comment out for 1S.
Define PB5_IO if reset pin will be enabled as IO, comment out if not.

#define DOUBLE_CELL
#define PB5_IO

Note: I have made a fuse reset system with Arduino and a board I’ve designed so I can clip on to the MCU and reset it while it’s in the light. If you don’t have this it will be a pain in the *** to flash the MCU again, so you might not want to enable PB5/Reset pin as IO. If not set to IO there are some limitations, and the solder pads on my drivers must be soldered so what ever would have been on PB5 should be soldered to PB3. All my drivers have these solder pads. Pin config for all drivers:

PB0 = PWM dedicated AMC
PB1 = 1 x AMC
PB2 = 2 x AMX
PB3 = 4 x AMC and solder pad.
PB4 = input pin (voltage divider, off time cap and E-switch).
PB5 = Solder pad.

On the F-8 the FET is connected to a solder pad only. This solder pad can be soldered to connect to either PB3 or PB5.
If connected to PB5, then any amount up to all 8 AMCs can be used, but PB5 must be set to be used as an IO with the correct fuse settings. Once set to IO the MCU can’t be flashed again unless you use a high voltage serial programmer and reset the fuses. I have an Arduino and built a addon board according to this page: https://arduinodiy.wordpress.com/2015/05/16/high-voltage-programmingunbr... I had a few problems on the way, but it’s now working fine.
If you connect the FET to PB3, then maximum four AMCs can be used as the remaining four would now on the same pin as the FET.

G-12 kind of works the same way, but has four additional AMCs instead of the FET. G-16 has eight additional AMCs. With PB5/Reset pin as IO, any amount of AMCs up to full number can be used, otherwise it’s any amount up to four, then all of them on for boost mode.

I only use PWM on the single PWM dedicated AMC between constant current steps. With 8 x AMCs on as highest mode available before turning on the FET, I see no need to PWM the FET. Not even with 4 x AMC would I care about PWMing the FET, so I won’t be making any firmware version that can PWM the FET.

Interface and modes: There are four “standard” interfaces. How they work is described in the C file.
UI 1 and 2 have up to 4 modes including BOOST.
UI 3 uses RAMP1 and BOOST.
UI 4 uses RAMP2 only.
I use UI 4 for moon mode because it’s not possible to accidentally go from moon to full boost within just a few button presses.

#define UI 1
#define MODECOUNT 4

Modes: The mode values consist of two bytes. The first is PWM value of the PWM dedicated AMC, the second is the amount of AMCs on in constant current.
MAX is basically all output pins on in constant current. However, as I have mode level readouts I’ve defined the readout results differently when all pins are on depending on what driver it is.

#define MODE1 20,0
#define MODE2 100,0
#define MODE3 0,2
#define BOOST 0,MAX
#define RAMP1 15,0
#define RAMP2 15,0

I hope the rest of the definitions down lower are self explanatory, at least enough until I get some instructions written… The amount of time it’s taken me to get to this stage is pretty long, so don’t hold your breath for full instructions, it’ll take some time. There are comments next to a lof of stuff, some of them should assist.

Almost everything is user configurable… but how to configure it all is quite complicated… If everything is defined correctly from the start, not much should need to be user configured. However, I’ve noticed that when compiling for DOUBLE_CELL (2S config) drivers, the voltage should be calibrated. I had to keep the same resistor values for 2S or the off time cap would take too long to charge. To solve this I switched to 2.56V internal reference voltage for 2S drivers. It works, and should work OK out of the box, but the measured results are more off than with 1.1V on 1S lights so I do the calibration routine… Well, to be fair I wrote this firmware so I know how to use it, it’s pretty easy for me so I calibrate all my lights.

A list of what can be configured on the light by the user (all options configurable with both dual switch and off switch only setups).
UI 1 to 4, mode count 1 to 4, all mode brightness levels, mode direction, boost timer, low voltage monitoring, low and critical voltage thresholds, critical low output mode or shutdown, temperature monitoring, max temp threshold, mode memory (can include or exclude boost).

Special modes and functions:
Strobe and beacon with brightness modes and speed adjustment, SOS with brightness modes( no speed adjust), noob mode, safety lock, two reset to default routines (one without calibration values, the other a full reset).

There is also the start of an experimental routine that checks the temperature profile of the host (cooling time). I haven’t touched this code in a long time. So far I am OK with just high temp step down, but I’d like to have some sort of thermal regulation later.

I first made the dual switch version with all it’s options. When making a off switch version I originally stripped out most of the config crap, but later changed my mind and “ported” all dual switch config options to off switch and then combined it all by #definitions. By doing it this way the code is definitely not optimized, it just makes managing easier as I don’t have to change function specific code in two places.

I’m planning on making an E-switch only version… someday…

That’s enough for now, I can answer questions about this stuff here and add instructions as I go along… providing there is some sort of interest of coarse.

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

X85 dual switch functionality

A video that describes the interfaces and special modes. Sorry about the quality, crappy mobile phone camera that couldn’t lock any brightness or focus settings.

Note: The firmware changed slightly since I made this video but I couldn’t be bothered to make a new one. The difference is with special mode 3 (programming mode brightness for UI 1 & 2 modes). I’ve removed the timeout that exits programming mode. It will now stay in constant programming mode until the light is turned off for about 5 to 6 seconds, so there is no rush to adjust those modes to perfection.

This post describes how my X85 firmware works for dual switch lights (lights with both a clicky switch and a momentary “E” switch). There are four user interfaces (UIs):

E press = Press with E-switch, P press = press with power switch.

UI 1
Next mode: Short E or P press.
Previous mode: Long E or P press.
Boost: In mode cycle.

UI 2
Next mode: Short P press.
Previous mode: Long P press.
Boost: E press (not in mode cycle). Hold for 1.5 seconds to lock.

UI 3
Adjust mode: Short P press enables mode adjustment (indicated by three quick flashes).
Boost: E press. Hold for 1.5 seconds to lock.

UI 4
Adjust mode: Constantly adjustable.
Boost: Not available, UI 4 mode is adjustable all the way up to maximum output.

Adjusting output in UI 3 and 4:
Increase brightness: E press and hold.
Decrease brightness: Double E press, hold on second press.

UI 3 mode adjusting times out after about one second of no activity. A flash indicates timeout and the new brightness level is saved.
UI 4 mode adjusting always available. Timeout for saving is the same, but no flashes to indicate timeout.

Setup
The setup menu and all other features are accessed by holding the E-switch pressed while turning on the light, counting the amount of blinks that correspond to the menu of interest and then releasing the E-switch. Directly after releasing, additional E-switch presses access settings under that specific menu, and then additional presses to modify that specific setting. If no additional presses are entered directly after releasing the E-switch from the first blink out menu, the light will in most cases perform a readout of some sort. Also, single long presses (L) are in some cases detected (holding E-switch for about a half second).

Copying in the text with setup info into here looked crap so I put it here instead: http://www.mikec.se/Stuff/SetupDsw.txt
Left column is blink counts while holding E-switch on startup. Columns to the right are by pressing X number of times.

Examples
These are the steps to set the UI.
1: Turn on light with E-switch pressed.
2: Count 1 blink then release the E-switch.
3: Immediately after releasing E-switch in step 2, press 1 to 4 times quickly to select UI 1 to 4.
4: The light will flash a sort of “entry accepted” blink (fade in, fade out). Done.

To engage the safety lockout feature, follow the steps above except for step 3:
3: Immediately after releasing E-switch in step 3, press and hold the E-switch for about half a second.
When locked, the light blinks every now and then. To unlock from safety lockout, either repeat or set any UI as in first example.

To readout the voltage level:
1: Turn on light with E-switch pressed.
2: Count 1 blink then release the E-switch.
3: The light now flashes 1 to 5 times depending on cell voltage level. If it does a fade out instead of blink, the level is below level 1.

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

X85 off switch functionality

A video that describes the interfaces and special modes. Sorry about the quality, crappy mobile phone camera that couldn’t lock any brightness or focus settings.

Note: The firmware changed slightly since I made this video but I couldn’t be bothered to make a new one. The difference is with special mode 3 (programming mode brightness for UI 1 & 2 modes). I’ve removed the timeout that exits programming mode. It will now stay in constant programming mode until the light is turned off for about 5 to 6 seconds, so there is no rush to adjust those modes to perfection.

This post describes how my X85 firmware works for off switch lights (lights with only a clicky switch). There are four user interfaces (UIs):

UI 1
Next mode: Short off press.
Previous mode: Long off press.
Boost: In mode cycle.

UI 2
Next mode: Short off press.
Previous mode: Not available.
Boost: Long off press (not in short press mode cycle).

UI 3
Adjust mode: Long off press enables brightness adjustment (indicated by three quick flashes).
Boost: Short off press.

UI 4
Adjust mode: Constantly adjustable.
Boost: Not available, UI 4 mode is adjustable all the way up to maximum output.

Adjusting output in UI 3 and 4:
Increase brightness: Short press starts increase of brightness. Stop with short press.
Decrease brightness: Double short press starts decrease of brightness. Stop with short press.

UI 3 mode adjusting times out after about one second of no activity. A flash indicates timeout and the new brightness level is saved.
UI 4 mode adjusting always available. Timeout for saving is the same, but no flashes to indicate timeout.

Setup
The setup menu and all other features are accessed by short off presses directly after a cold start (turning on the light after it has been off for 5 to 6 seconds or longer). To enter the menu off interest the corresponding amount of off presses must be entered, each off press within a second of the previous. The light will then give a confirmation flash (quick fade in/fade out) and then await input in the form off additional off presses to access a specific function or setting within that menu. If no additional presses are entered directly after the first menu selection confirmation flash, the light will in most cases perform a readout of some sort. Also, single long presses (L) are in some cases detected (holding the off switch off for about a half second).

Copying in the text with setup info into here looked crap so I put it here instead: http://www.mikec.se/Stuff/SetupOsw.txt
Left column is press count directly on cold start to access that menu. Columns to the right are by pressing X number of times.

Examples
These are the steps to set the UI.
1: Turn on light after it has been off for at least 5 to 6 seconds.
2: Within one second perform three off presses.
3: Wait for the confirmation flash (quick fade in/fade out).
4: Enter 1 to 4 short off presses quickly to select UI 1 to 4.
5: The light will flash a confirmation flash. Done.

To engage the safety lockout feature, follow the steps above except for step 4:
4: Immediately after the confirmation flash, perform a long off press by holding the off switch off for about half a second.
When locked, the light blinks every now and then. To unlock from safety lockout, either repeat or set any UI as in first example.

To readout the voltage level:
1: Turn on light after it has been off for at least 5 to 6 seconds.
2: Within one second perform three off presses.
3: Wait for the confirmation flash (quick fade in/fade out).
4: The light now flashes 1 to 5 times depending on cell voltage level. If it does a fade out instead of blink, the voltage level is really low, below level 1.

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

I think things are just getting lost with all of the activity on BLF recently. Browsing the ‘Recent Posts’ page doesn’t work as well as it used to.

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

Major Projects:  Illuminated Tailcap, TripleDown/TripleStack Driver

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

pilotdog68 wrote:
I think things are just getting lost with all of the activity on BLF recently. Browsing the ‘Recent Posts’ page doesn’t work as well as it used to.

Well, I’ll let this thread hang around for awhile. If there is no interest at all I’ll just delete all info in it and continue on in silence like before.
fixed it
Offline
Last seen: 1 month 1 week ago
Joined: 12/08/2015 - 14:27
Posts: 393
Location: Canada

That’s a truckload of code! I can barely imagine how much time you must have put into it. Almost makes me glad I’m limited to an attiny13a for now :]

LightRider
LightRider's picture
Offline
Last seen: 1 year 3 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
Mike C wrote:
pilotdog68 wrote:
I think things are just getting lost with all of the activity on BLF recently. Browsing the ‘Recent Posts’ page doesn’t work as well as it used to.
Well, I’ll let this thread hang around for awhile. If there is no interest at all I’ll just delete all info in it and continue on in silence like before.

Please do not delete! You have viewers. The complexity of the subject makes it hard to interact with in the short term. It takes some prep to get to a place where one can even ask a question. I’ve been watching this thread and trying to absorb the great info. There is some excellent functionality here and over time it will help many! As I’m needing new drivers, I have come to this page, and to your work even prior to this posting. Each time I have not been able to use the information, but each time I come back, I get farther into what you are doing and soon I will be able to interact with this great firmware/drivers. They offer some things that are not currently out there so what you are doing is relevant, it’s going to take some time though. No doubt there are others thinking the same thing. Thanks for your work!

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

fixed it wrote:
That’s a truckload of code! I can barely imagine how much time you must have put into it. Almost makes me glad I’m limited to an attiny13a for now :]

Thanks. I’ve been quite tired of it lately, but now I think it works as I have intended… But to be honest I don’t want to do more extensive testing and bug searching for a while, I just want to relax thinking all the quirks have been worked out for awhile Smile
PPDB22 wrote:
Mike C wrote:
pilotdog68 wrote:
I think things are just getting lost with all of the activity on BLF recently. Browsing the ‘Recent Posts’ page doesn’t work as well as it used to.
Well, I’ll let this thread hang around for awhile. If there is no interest at all I’ll just delete all info in it and continue on in silence like before.

Please do not delete! You have viewers. The complexity of the subject makes it hard to interact with in the short term. It takes some prep to get to a place where one can even ask a question. I’ve been watching this thread and trying to absorb the great info. There is some excellent functionality here and over time it will help many! As I’m needing new drivers, I have come to this page, and to your work even prior to this posting. Each time I have not been able to use the information, but each time I come back, I get farther into what you are doing and soon I will be able to interact with this great firmware/drivers. They offer some things that are not currently out there so what you are doing is relevant, it’s going to take some time though. No doubt there are others thinking the same thing. Thanks for your work!


Ok, point taken. I haven’t exactly released this stuff in steps so I guess a little understanding from my side is due. My companions and I wouldn’t have such awesome lights without BLF, and this stuff wouldn’t exist at all, so I kind of owe it to leave this stuff here, be it of interest or not.
DavidEF
DavidEF's picture
Offline
Last seen: 13 hours 42 min ago
Joined: 06/05/2014 - 06:00
Posts: 7386
Location: Salisbury, North Carolina, USA

Mike C wrote:
fixed it wrote:
That’s a truckload of code! I can barely imagine how much time you must have put into it. Almost makes me glad I’m limited to an attiny13a for now :]

Thanks. I’ve been quite tired of it lately, but now I think it works as I have intended… But to be honest I don’t want to do more extensive testing and bug searching for a while, I just want to relax thinking all the quirks have been worked out for awhile Smile
PPDB22 wrote:
Mike C wrote:
pilotdog68 wrote:
I think things are just getting lost with all of the activity on BLF recently. Browsing the ‘Recent Posts’ page doesn’t work as well as it used to.
Well, I’ll let this thread hang around for awhile. If there is no interest at all I’ll just delete all info in it and continue on in silence like before.

Please do not delete! You have viewers. The complexity of the subject makes it hard to interact with in the short term. It takes some prep to get to a place where one can even ask a question. I’ve been watching this thread and trying to absorb the great info. There is some excellent functionality here and over time it will help many! As I’m needing new drivers, I have come to this page, and to your work even prior to this posting. Each time I have not been able to use the information, but each time I come back, I get farther into what you are doing and soon I will be able to interact with this great firmware/drivers. They offer some things that are not currently out there so what you are doing is relevant, it’s going to take some time though. No doubt there are others thinking the same thing. Thanks for your work!


Ok, point taken. I haven’t exactly released this stuff in steps so I guess a little understanding from my side is due. My companions and I wouldn’t have such awesome lights without BLF, and this stuff wouldn’t exist at all, so I kind of owe it to leave this stuff here, be it of interest or not.

It’s definitely of interest! Thanks for posting this info! Please don’t think it isn’t of interest!

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

fixed it
Offline
Last seen: 1 month 1 week ago
Joined: 12/08/2015 - 14:27
Posts: 393
Location: Canada

Mike C wrote:
I just want to relax thinking all the quirks have been worked out for awhile Smile
I know exactly what you mean Smile Debugging firmware is about as much fun as debugging multithread code and ignorance is bliss.

On top of what PPDB22 wrote, keep in mind that there are probably under twenty people here who could read and understand that code. And I think we could really use a “firmware index” thread.

finges
Offline
Last seen: 19 hours 13 min ago
Joined: 11/19/2014 - 14:50
Posts: 493
Location: Germany

fixed it wrote:
And I think we could really use a “firmware index” thread.

There is such a thread http://budgetlightforum.com/node/38364
fixed it
Offline
Last seen: 1 month 1 week ago
Joined: 12/08/2015 - 14:27
Posts: 393
Location: Canada

finges wrote:
There is such a thread http://budgetlightforum.com/node/38364

Thanks, I knew of ToyKeeper’s repository but somehow never realized that thread was also a sort of index.

Mike C, if I remember correctly, you’re the one whose drivers have cell level readout, OTC and e-switch all on the same pin, right?

FmC
FmC's picture
Offline
Last seen: 3 weeks 5 days ago
Joined: 03/31/2013 - 05:23
Posts: 2194
Location: Brisbane, AU

Thanks for sharing your time & work, Mike C. Beer

Mitko
Mitko's picture
Offline
Last seen: 1 month 3 weeks ago
Joined: 09/19/2014 - 05:20
Posts: 1537
Location: Bulgaria

Great 10x for your time and efforts m8, so far so good, you did a good job on the firmware too – i like F-8 v2

Actualy, most fo the time ppl dont need that fancy firmwares ( including me), 2-3 modes plus eventualy moonlight…. and strobe( for bikers)

MRsDNF
MRsDNF's picture
Offline
Last seen: 4 hours 26 min ago
Joined: 12/22/2011 - 21:18
Posts: 12934
Location: A light beam away from the missus in the land of Aus.

FmC wrote:
Thanks for sharing your time & work, Mike C. Beer

Likewise. I dont understand a lot that goes on here but do understand the time put in. Beer

 

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

                      "My man mousehole needs one too"

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.

 

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

Thanks for the positive comments all Beer

fixed it wrote:
Mike C, if I remember correctly, you’re the one whose drivers have cell level readout, OTC and e-switch all on the same pin, right?
Yep. All the drivers listed in the OP work like this and use my X85 firmware.

Mitko wrote:
Actualy, most fo the time ppl dont need that fancy firmwares ( including me), 2-3 modes plus eventualy moonlight…. and strobe( for bikers)

Yeah, I do know what you mean. I thought so too, but then I wanted to use constant current instead of PWM, and that required more pins, so I combined three functions on one pin, then after using them down in mines I got all these different ideas, and took ideas from friends… and then wanted to be able to configure the lights I’d built for them with them in the mines… and now here we are Smile
All the development stuff, configurable stuff and readouts are totally useless for people who flash their drivers and are done with it. I use that stuff because I set people’s lights up as they want in person out in the field away from computers and crap. Maybe one day I’ll release a “clean” version with all that crap cut out, leaving the bare essentials. Who knows, it might even fit into the ATtiny25 by then.
ToyKeeper
ToyKeeper's picture
Offline
Last seen: 4 hours 30 min ago
Joined: 01/12/2013 - 14:40
Posts: 9734
Location: (469219) 2016 HO3

Mike C wrote:
Who knows, it might even fit into the ATtiny25 by then.

Bistro uses 2048 bytes. Meanwhile, blf-a6 with the runtime config parts removed uses 710 bytes. The difference is almost entirely the soft config options. I wouldn’t be surprised if yours went from 7500 bytes down to 2000 without the config options.
Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

A light with one of my drivers and firmware is in the mail, so I have updated post #3 with dual switch setup info.

I’ve thought a little about making a clean version and I don’t think I will. If most of the features and functions are useless… don’t use them. Set the right driver type, then the mode levels under DEFAULT SETTINGS at the top of the C file, and it’s done. I believe I’ve made those definitions easy enough to understand, so if there is no interest in the rest, there’s no need to bother about the rest. Boost timers, low voltage thresholds, mode direction and all that stuff is also set by definitions. Set ‘em and forget ‘em.

Besides, making it smaller so it fits into the ATtiny25 is pointless for me. I’ll save like 0.5$ by switching to the 25, even less for low voltage versions, at least when buying from my component supplier. It’s too much work for 50 cents.

LightRider
LightRider's picture
Offline
Last seen: 1 year 3 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

Dual switch= wow! I’m determined to build one of these now. I’ve started plans to build a BLF d80 with an added side switch. I think that will be my perfect opportunity. I will keep you informed.

CheapThrills
CheapThrills's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 07/02/2011 - 10:45
Posts: 3552
Location: Suomi

OK, time for some user opinions from here!

Tested this light a few times now.

To be short, what I like:

- Voltage level / real voltage indication
- PWM not noticeable (big factor for me)
- UI1. It is very good for my use “As Is”. 4 modes with either this “back & forth” style or shot-cycle style is what I like.
- UI4: the adjustment goes insanely low BUT the brightness steps go slower at the lowlow end. I have had several adjustable lights back some time ago, where you had to be really fast to catch the lowest low to stick with you. Not with this.

Not so favorite things to me:
- UI2 & UI3, I´m not a special fan of Boost mode although it might become handy if you use lower mode and just want to take a Quick Peek with higher power mode.
- Dual switch light in general, I have owned only a couple of them but again, this is about who prefers and what…

At the moment, I havent programmed parameters. Changed one mode a bit though.
I think as far as I have tested, that this driver works flawlessly! Cool

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

Thanks for the comments, appreciated Beer

The light goes as low as all the way down to 0 in PWM off that single PWM dedicated AMC7135. I slowed it down so once could easily make a moon mode.
I use fast PWM. I tested phase correct PWM, but the moonlight levels where a lot more spaced with phase correct and I couldn’t be bothered to have a routine that switches between fast and phase correct depending on PWM level… So I just kept it on fast PWM through the whole range.

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

Updated firmware to v1.3, a few changes regarding off time measurements, voltage measurements and timeouts.

Post #3 updated with a video showing dual switch interfaces and mode selections.
Post #4 updated with off time info and a video showing off switch interfaces and mode selections.

Sorry about the quality of the videos, the crappy phone camera kept changing brightness and focusing. And I sound like I’m falling asleep… It was late, I hope what I say makes some kind of sense and it’s not just all mumbo jumbo (a lot of it is). I tried to make the videos short and not just blabber on but I didn’t succeed, they are pretty long. I might have to make better ones later.

Note: The firmware changed slightly since I made those videos but I couldn’t be bothered to make new ones. The difference is with special mode 3 (programming mode brightness for UI 1 & 2 modes). I’ve removed the timeout that exits programming mode. It will now stay in constant programming mode until the light is turned off for about 5 to 6 seconds, so there is no rush to adjust those modes to perfection.

A heads up. A few people have ordered boards through me, I don’t know the progress, but for those that are interested in these boards it might be good to know that I’m taking three months of leave starting 1st of August. My girlfriend and I will be taking our self built camper van on a climbing trip through Europe to be (as Americans would call it) “dirtbag climbers”. so I won’t be spending much time in front of computers. I might pop in once every two weeks or so but I wouldn’t count on it. So if anyone want’s to build one of my drivers (or order a fully built one) within the next three months or so, drop me a PM so we can sort it out before I leave.

MRsDNF
MRsDNF's picture
Offline
Last seen: 4 hours 26 min ago
Joined: 12/22/2011 - 21:18
Posts: 12934
Location: A light beam away from the missus in the land of Aus.

Amazing how you guys do what you do and that does not include building campers. The holiday sounds like something you have planned for awhile.

 

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

                      "My man mousehole needs one too"

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.

 

leroycp
Offline
Last seen: 6 hours 17 min ago
Joined: 12/27/2015 - 19:24
Posts: 731
Location: Stewart TN

Following. Please do not delete. Thank you

Tom E
Tom E's picture
Offline
Last seen: 4 hours 6 min ago
Joined: 08/19/2012 - 08:23
Posts: 12194
Location: LI NY

Real nice Mike! Haven't looked at the code yet, but will try to get to it soon. I hear you though - it's a ton of time and easy to get burnt out on.

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

MRsDNF wrote:
Amazing how you guys do what you do and that does not include building campers. The holiday sounds like something you have planned for awhile.

We have taken our van through Europe every year the last four years but been limited to four weeks of vacation. Returning from the last was painful, we had the alps in our rear view mirror for hours and hours on our way back. How long do we have to be away to want to go home again? Four weeks is not enough, so now we’re trying three months. Our home away from home:

Tom E wrote:

Real nice Mike! Haven’t looked at the code yet, but will try to get to it soon. I hear you though – it’s a ton of time and easy to get burnt out on.


Thanks. If you want to use some of it for Narsil, feel free. Although a lot of it is specific for my driver design, there might be something of use without much modifications.
MRsDNF
MRsDNF's picture
Offline
Last seen: 4 hours 26 min ago
Joined: 12/22/2011 - 21:18
Posts: 12934
Location: A light beam away from the missus in the land of Aus.

Are you sure thats not the Tardis? Looks massive inside. Is the van left or right hand drive? There is no way I could get my head around the steering wheel on the wrong side and driving on the opposite side of the road to what we do here. Smile

 

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

                      "My man mousehole needs one too"

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.

 

Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

MRsDNF wrote:
Are you sure thats not the Tardis? Looks massive inside. Is the van left or right hand drive? There is no way I could get my head around the steering wheel on the wrong side and driving on the opposite side of the road to what we do here. Smile

It’s not massive inside, I shot that photo with a wide angle lens Smile

Left hand drive. Except for the UK we all drive on the right side of the road here in Europe. I’ve done a fair bit of driving in the UK and Australia and don’t mind right hand drive at all, it just takes a day or two to “convert” each time.

HiTiT
Offline
Last seen: 7 months 3 days ago
Joined: 06/30/2012 - 18:12
Posts: 98
Location: Israel

Thanks for sharing!
F-8 v2 looks fantastic!

I just can’t download the firmware for some reason Sad

Quote:
The requested URL /Stuff/X85.zip was not found on this server.
Mike C
Mike C's picture
Offline
Last seen: 1 day 5 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2317
Location: Sweden

HiTiT wrote:
Thanks for sharing!
F-8 v2 looks fantastic!

I just can’t download the firmware for some reason Sad

Quote:
The requested URL /Stuff/X85.zip was not found on this server.

I took that link down as I’m doing a re-design of my driver range that will require firmware changes. It is however still downloadable from ToyKeepers firmware repository: http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files