I made a thing. Havenât tried it yet; will have to wait until tonight.
Itâs a âgoodnightâ mode on my CNQG brass 18650 light. The idea is that itâll provide light for about an hour then shut itself off (as much as possible). Itâs intended to be ceiling-bounced from a night stand while going to bed.
More specifically, it blinks out the voltage (whole volts then tenths), ramps up from moon mode to low over a couple seconds, then ramps back down over about an hour, then shuts itself off.
If my measurements and calculations are correct, it should last about a year per charge. It looks like itâll use about 8mAh per night, or about 10mAh if I forget and leave it âonâ all day. On a 3100mAh cell, that works out to very approximately a year of runtime. This mode bypasses LVP though, so I made it blink out the voltage first to let me know when itâs about ready to be charged.
At the moment I have it in the main mode sequence between moon and low. So, itâs moon, goodnight, low, med, high, turbo, then all the blinkies. On other lights Iâd probably put it a bit later in the cycle though, like just after battcheck.
Does this sound like a thing anyone else might find useful?
I could see replacing battcheck with it.
I could also leave off the blinking the charge level every time and instead give a few warning blinks when it under 50% then go to low, and if the cell is under 25% give the warning blinks and stay in moon.
In âgoodnight modeâ it doesnât actually enter the part of the code which checks the voltage. It also never goes above the âlowâ mode, since it ramps slowly from there to moon. Then it shuts down into the lowest-power mode it can, which uses a small fraction of what moon mode uses.
Warning blinks could be useful, but itâs likely they might not be seen since the user is presumably trying to sleep.
So, basically, itâs already executing the LVP procedure⌠just a bit slower and smoother, and without actually checking the voltage. With an estimated 300+ full nights worth of charge per cell, and a voltage reminder before starting, Iâm not too worried about it.
Anyway, itâs kind of a quick kludge I added to one of my personal lights. Iâm wondering if itâd be worth making it more robust for others to use.
I am intrigued. I often use my flashlights for this purpose. However, I usually is lights with a magnetic tail and an eswitch. Right now Iâm using an Olight s30. This way it sticks nice to the metal on my night stand and I can still asp access the button on the side. Idk if this feature would be useful enough to sacrifice the side switch or not? I think itâs cool though.
Prior to the s30 I used the candle mode on one of dr jones rgbw drivers. I no longer have this light, but this would be a nice feature on lights with a candle mode as well.
Hah, so far the delay mechanism is designed to be small, not configurable.
It just goes through each PWM level from âlowâ to âmoonâ, in order, and delays at each step for 255 seconds. Then it shuts off. When I checked last night I think that ended up being 49 minutes total, but Iâll probably reflash it to get it closer to 60 minutes.
Alright guys, I need some help. Talk to me like Iâm a total noob.
I am still using 13aâs, but I have found a few bugs in my version of blf-a6 that was adapted for Triple channel. So I figure now is as good a time as any to try bistro on a 25. I haev not even used the new system of config files or whatever they are called, I just alter the c file for every build and have a library of the ones I have used in other lights.
So, step by step, how do I configure bistro and flash to a 25, assuming I am already setup to flash hex files to 13âs?
Do you use linux or Atmel studio to compile right now?
Flashing the hex file is easy, exactly the same as what you are doing now, just with a command line change to the 25 instead of the 13A and the associated fuses.
Compiling is a bit different due to the extremely tight space constraints.
I have a hex file for bistro tripledown in the Texas Avenger thread that is setup for a 19.1K R1 that you can try, just make sure you get the correct fuse settings and command, I can dig the one I use out if you need.
The weather is supposed to cool down this weekend, hopfully it wonât be 90f in the house with 80-90% humidity and I will be able to work on the drivers a bit more. Gonna calibrate one for a 22k R1.
The nice thing about bistro is that since it has so many user adjustable settings you donât need to adjust much on a light by light basis. Simply select a different mode group.
I use Win w/ATMEL Studio 7. I copy all the header files (.h files) into the same folder where the main source code is - much easier to track and control, for me that is... I've built Bistro successfully. I believe I have it all working fin under 1 solution with 1 project. I could ZIP up the complete Studio 7 solution and post it on my google driver, with the proper AVRDude BAT files, if you want -- when I get home - @work now.
Interesting, when I tried to compile in Atmel 7 it just spit out errors. When I tried the exact same files in linuix it worked perfect. Never could figure out the issue so just stuck with linux, it was not worth the time to mess with atmel, I prefer Atom for messing with the code anyways.
BTW, I have not seen anyone on here mention it but it is possible to use Atmel studio to flash things with AVRdude without having to actually mess with avrdude directly.
Been using ATMEL since the beginning - never a problem, but of course I've worked with dozens of dev environments and compilers for years (ok - several decades), so I can usually find & fix compiler/linker related issues quickly.
If you still want to use/try ATMEL 7, just dnld one of my complete zips.
I use Atmel Studio 7 to compile, and avrdude to flash.
I just copy/paste the commands from a txt file, so if I need different ones for the 25 can somebody help with those.
Tom, that would be great. I am totally clueless on how to use the header and bat files.
I havenât even looked at the code for bistro, Iâm hoping itâs still easy to remove things. I like simplicity, but I just noticed LVP is nonfunctional on the modified version of blf-a6
But really step by step would be great. Like currently I do this:
pull open c file in wordpad
alter mode groups/turbo timer (by comparing to similar lights I have that had good levels)
Hey guys. I hate to barge in but I see your active conversation and Iâm in a bind.
I am getting error message:
program enable: target doesnât answer. 1
Initialization failed, rc=â1
Double check connections and try again, or use -F to override this check.
Iâm trying to flash Bistro onto pds triple stack but I get the this error. I think it might be related to using a different attiny25 than I was using before, but Iâm unsure. Any help?