No knobs! No 555s! No reason whatsoever!
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
The common-cathode RGB LEDs arrived sooner than I expected, so this badge SAO is all done! And here's a little video where I explain the different parts in more detail.
Now that I know the ATtiny10s work, it's time to publish the project! I am still waiting for some common-cathode RGB LEDs to arrive; until then I can just test one channel at a time.
The most recent KiCad PCB is actually a little different than the physical PCBs in the photos. I originally routed power to sides of the LED, but that's easy to fix with a little hidden rework on the underside of the PCB. The lovely Oshpark After Dark front side is unharmed!
Create an account to leave a comment. Already have an account? Log In.
Yes, really! Let's discuss why! :D
Alright, let's pretend I have perfect 250, 500, 1k, and 2k ohm resistors in series, just to make things cleaner. Now let's say each switch shorts out a resistor when it's toggled ON. Let's also say there's a 2k ohm resistor in series that can't be shorted, so we never let out the magic smoke.
If I toggle all the buttons OFF, the LED is still on! Dim, but still on! That's no good, I want my LED to be OFF when all the switches are OFF.
Okay, fine, let's try putting all the resistors in parallel, and wire it up so each switch breaks a resistor. Now, if all four switches are OFF, no current can flow and the LED is off! HOWEVER: the equivalent resistance of the resistors in parallel is not linear. There's mathematically no way to get evenly-spaced equivalent resistances. We can't even get close (feel free to try! it's kind of relaxing to compute equivalent resistances, if you ask me).
So, resistors in series fail to turn the LED all the way off, and resistors in parallel fail to provide evenly-spaced brightness options. I don't know about you, but $0.75 worth of microcontrollers sounds like a pretty good solution to me :)
The equivalent resistance of the resistors in parallel are not what you need. LEDs are current controlled. Assuming a constant voltage on the resistors, each one adds his share of current into the LED. Even with the E12 resistors you will probably not see the less than optimal linearity. If you want you can get 2k, 1k, 499 ohm and probably something like 250 ohms, or you use 2*499 in parallel. Or 2* 1k, 1k, 2* 1k in parallel and 150 + 100 ohms. As resistors cost nearly nothing (less then 0,1 ct in bulk for 1% chip resistors), you could even use identical resistors in series and parallel configuration to make the binary weighted resistors.
A µC is not only it's cost in parts, but it also needs some program to do anything. This is extra effort and has to bring additional use. Which it doesn't in this case.
BtW: If you want to short out the series connected resistors, you would not want a 2k resistor that can not be shorted, but some low value for max. brightness, e.g. 250 Ohms (220, 270) that gives max. brightness.
(Sorry, I'm unable to directly reply to your reply!)
Aaaah, I see what you mean! You're right, but it comes too late and now we both have to live with this unnecessary monstrosity I've created :)
(sorry to keep replying, I think this is the last one!)
Okay, actually, there is a saving grace to the microcontroller approach, heh. I'm not *only* driving the LED on the side of the badge; I'm also sending 3.3V PWM power to the three ports at the top of the badge. This enables me to control the brightness of three auxiliary SAOs. I genuinely can't remember why I wanted to design it this way instead of simply driving one LED; this SAO has been on my workbench for well over a year.
There's so much wrong with this project. I love it!!!
Use a capable micro controller? No, let's use 3.
Use some nice interface? No, 12 slide switches.
Thanks for sharing.
The original draft included a knob and a bistable 555 to turn the whole thing on/off, too ;) I sorta regret taking it out, but it would have made this big SAO even bigger. Glad you appreciate the project!
Become a member to follow this project and never miss any updates
Really? Microcontroller? Three of them!? for this task?
It would be so much easier to give each switch its (roughly) binary weighted resistor, let's use 220, 470, 1k and 2k2 and these combined resistors control the current to the LED, switched off or in parallel.