D.I.Y. Illuminated tailcap

Awesome, thank you! Look forward to picking up a few to mod existing lights.

FWIW, I updated STAR_1mode a little to remove the rest of its memory-related functions. It no longer writes to eeprom at all.

Would still need some small changes to run at a low mode instead of turbo, though.

The “alternating slow and fast party-sequence” looks pretty obnoxious.

Do you think it’d be okay with just a quick spin at boot, then showing only a steady color according to voltage? (the spin gives the voltage time to settle a bit, and visually indicates “measuring, please wait”)

I really should get or build some so I can test it and get the standby power down even further. I think I found a way to reduce standby by about 0.3mA by putting the MCU into a deeper sleep.

Don’t worry. Your led spin sounds cool and nothing like those crazy RGB party leds. Plus people could disable it if they wish.

+1, sounds really cool and not annoying at all, unlike my epileptic seventies disco tailcap.

I was thinking about a “spinning led” as well, might need 8-10 leds to really get the full effect though…

Something like this:

But I’d want it to be slower, and I think I would like it to have a “tail” (ie. one 100% lit led, one at 50, one at 15 or something like that - same color, just dimmer).

How many leds can one realistically fit on one of these boards if they are modified?

Wouldn’t want the effect on all the time though, that would quickly get annoying, unless it starts of fast, but then slows down to really slow after a short while…

Thank you very much! I’ll be giving this a go soon and may shoot you a PM to verify things before flashing. Still waiting on all the pieces to arrive :).

On a 19mm PCB w/ the donut hole in the middle? I’d ballpark 10 LEDs in the orientation used on rev6 and 20 LEDs in the orientation used on rev5. Note that we are limited on IO pins with the SO8 package: it’s got 8 pins where 3 are reserved for power/ground/reset. I believe TK also wants to use one for voltage monitoring. That leaves 4 pins available. Charlieplexing the LEDs should give 12 addressable LEDs. Offhand I don’t think that it would be possible to overload the voltage monitoring pin with 1 pin of the charlieplex, but if possible then 20 LEDs could be individually addressed. (It would also be a big pain to do since we also want to do voltage monitoring at the same time as the spin.) Depending on the desired patterns 50% of the LEDs can be hooked up in parallel to one another (typically those diagonally across from one another). For example, that would allow 4 pins to control 24 LEDs in pairs.

There would be no hardware PWM for these charlieplexed LEDs, so a tail effect would be harder to achieve. Software PWM could be used, maybe AVR136 (files) could be a good reference.

I don’t have experience with charlieplexing, but the ATtiny13A has very limited code space. Cramming spinning patterns in (many pin state changes for the charlieplexed pins) and also software PWM could be impractical. Depending on the pattern I believe that some (all) LEDs will also not receive 100% duty cycle…

Soft PWM is possible but pretty obnoxious to deal with. It’d be easier to use a MCU with more hardware PWM channels. But this is limited since it can’t spin or do PWM in deep sleep mode, and it probably should be asleep most of the time to keep standby power down. Hardware PWM is possible in a light sleep mode, but I suspect it might use less power in deep sleep even if the LEDs are brighter.

The current design uses 3 pairs of LEDs, though a 4th pair could probably be added without a lot of extra trouble. Three works well because they can be red/green/blue.

I’ve been too busy to get and assemble any tailcaps yet, but I have a Convoy S7 waiting for some extra bling (as if mirror-shined steel isn’t already blingy enough). :slight_smile:

Edit: It also occurs to me that the tailcap really doesn’t need to run at the full 4.8 (~4.0 actual) MHz. It’s probably a good idea to underclock the MCU to save power, especially if it’s not doing any PWM. I’m looking forward to seeing how low I can get the standby power…

If y’all want different versions I am happy to make a change, I am just waiting for some kind of a consensus or instruction. Obviously wight has the Eagle skills, he can do his own versions if he wants too.

I really like the current design… I just need to get some actual hardware; either pre-built or a bag of enough parts to build and adjust my own.

I really intended to build one of the “smart” boards this past weekend and then all sorts of unexpected things came up. I’ve got all the parts sitting here ready to go, just gotta put it all together. Hopefully I can get that done in the next few days. I’m anxious to see what’s possible with this design.

yes! different versions! colors! spinning! switch ability! thank you….

I still don’t see any obvious way to do a soft config on the tailcap (without interfering with the driver’s UI). It could maybe do something like “32 fast taps to turn the tail lights on/off”, but that’s a pain and even while “off” it’d still have some parasitic current. Would probably be a good idea to do periodic voltage readings even in “off” state, and enable a red beacon or something when it’s low.

we could use my little slide switches like Rev4 to ground a pin like soldering a star would, but that only gives us one config option and takes away an mcu pin. Or instead of the slide, use a tiny momentary switch and each button push cycles through a config option.

If using a tiny slide switch was a thing, why not use it to break the entire tail LED circuit?

That’s what Rev4 did. Either switch between two present brightnesses, or between on/off.

The little pots that I used under the driver spring in one of the versions has an off position too, and it can also perhaps someway present a range of voltages to the MCU that can be interpreted as different tasks? (bs-ing away here, I have no idea about anything)

I got some of the newer Ledring boards in and just build one with two red leds.
I like the easy on top assembly, very well done!

I am still totally unsure how big the resistors should be, I just used a 31k and no bleeder because it’s the original BLF X6 driver which seems to work without one… I have red LEDs which were advertised as very efficient (Stück SMD 0805 LED superhell, stromsparend ROT OF-SMD2012HR von OPTOFLASH (HRot 460-700mcd))
So I will use a even bigger resistor next time. I measured around 50ua.

I ever-so-slightly modified your STAR_1mode to change to a single low mode, used Atmel Studio 7 to generate a .hex file, and then flashed using a USBasp to the Attiny 13a using MHV AVR Tools 20131101 (and also Extreme Burner AVR just to try it out - super easy program) - I’m happy to report all went well! Thanks again for your help :). The process took less than 5 minutes and could be repeated in under a minute. The tail PCBs arrived from OSH Park, so now I’m just waiting on the Convoy host to put it all together.

In the meantime, I modded my BLF C6 Cu to dual amber tail LEDs with higher value resistors, much more subdued :sunglasses: .