In a typical Proffie install, neopixels work by being permanently wired to Batt+, having the neo neg go to an LED pad which powers up when the blade is powered, and having the actual pixel LED behaviour controlled by the data line.
So if the LED neg pad is powered every time the blade is powered, I should be able to also connect a regular 3mm LED to the same pad and it should light up with the blade and then switch off again when I switch the blade off. Shouldn’t it? I realise I wouldn’t be able to programme it to do anything - just light up. But I have an upcoming install where this might be useful.
So my question is, would this work the way I think or not? And if not, I’m curious to know why.
You’d be subject to the IDLE_OFF_TIME if it’s defined, which keeps the FETs on until it times out.
If that is not specifically defined, I think default is immediately off.
Of course this affects any accent LEDs you might want to have on, so…
Thanks Brian. Sounds like the concept is sound then!
Those limitations are fine. I’m looking to build a removable chassis back half using a Shtok six ring connector disc. But the illuminated switches are in front of the disc and six lines doesn’t give me enough to control them separately, as I’ll be using main blade batt plus, main blade neg, main blade data, switch 1, switch 2, switch neg. But if I split batt plus and main blade neg and use them for the switch LEDs, they should switch on and off with the blade which is all I really need.
That’s not how IDLE_OFF_TIME works.
ProffieOS styles have a bunch of code in it that tries to figure out when it’s ok to turn off the blade. That code is usually pretty good about turning the blade off as soon as the blade is retracted. However, if you have a bunch of stuff going on below the “onoff” layer, or if your style is designed to display stuff even when the blade is off, then power won’t be turned off until you hit the IDLE_OFF_TIME timeout. If you have a blade that displays stuff all the time, and you don’t have an IDLE_OFF_TIMEOUT, then the blade would just stay on forever. (Or until you cut the power.)
So, for well-behaved styles, this should work fairly well.
It might not work perfectly though, as there may be events sent to to the blade which turns the power on, but doesn’t actually show anything on the blade. The power is then turned back off again. Such events would make your plain LED blink.
Do you mean pads feeding addressable LEDs are turned off together? That makes sense, but surely that can’t include dedicated pads feeding regular LEDs, as the only way they can animate is by the single fet turning on and off or dimming. Or have I got the wrong end of the stick?
But I can see what you mean about other accent LEDs potentially confusing things for my piggybacked switch LEDs. And Prof, noted on all points. It at least sounds like it’s worth trying. The particular hilt that prompted the question is pretty simple with just the main blade and the switch LEDs as described - no other accents at all. (Which is unusual for me as I generally try to squeeze accents onto any saber where I can ft them in. But this isn’t one of those sabers). But I’ll set a short Idle_Off time to be on the safe side.
Thanks as always. I’ll report back once I’ve tried it.
FETs are absolutely controlled individually.
When you have several FETs driving the same blade, they are all turned on/off as close together as possible to avoid having one FET heating up more than the others. When using PWM mode, FETs are synchronized to the same timer, so they all turn ON at the same time, but the off time depends on how bright the LED should be. Having them synchronized to the same timer means that if they are set to the same brightness, they also turn OFF at the same time. Having them synchronized this way makes it possible to hook up multiple FETs to one (larger) load. If you don’t synchronize them, the FETs would burn out if you tried doing that.
ok I retract anything I’ve said incorrectly. I was trying to convey that IDLE-OFF_TIME would turn off all pads at the same time, so accents and the add-on LED would all turn off at that time… unless that’s wrong too.
If that happens for all styles, then it something we should try to fix, as it would affect battery life. If it happens for some styles, it might be less important, but it would still be good to take a look and see if it is fixable. I suggest starting a new thread specifically for this problem.