I'm wondering if you might be better off, starting with a simple resistor, with a value calculated to give perhaps 70mA (so 10mA worth of safety margin), so voltage variations on the 5V rail and resistor tolerances, don't exceed the LED's maximum of 80mA (all 4 combined, 4 x 20mA).
Hopefully that will work out just fine, and you can check the current with a multimeter.
Well, that's what I have now.
Later, you can PWM that 5V rail bit, with a transistor (or similar), to modulate the brightness level, if necessary.
This is to be a display for an LTE modem/firewall (based on Mikrotik RBM33G with a 4G/LTE modem), in a remote cottage, only used to show the connectivity and other information in an user-friendly way. (Instead of just a simple OLED or similar display, I wanted a nice display so I could use Tux or similar mascots: I've got some artists in my family that can do stuff to make it not only informative and intuitive, but
funny and personally relevant.)
Essentially, the optimum brightness of the display will vary on the environment it will be placed in. If in a dark corner somewhere, a dimmer display is better, otherwise I might need the maximum brightness. But the dimming (PWM or DAC-controlled) is mostly to make the display turn on and off smoothly, especially if I choose to let it turn on automatically for a few minutes if connection drops or reconnection is made. Having something flicker on/off too suddenly can be distracting; hence, the popularity of "breathing" indicator LEDs.
There is quite a lot to learn, to design your own decent transistor circuits. Especially ones which will control the current well, and cope with what can be quite wild (big), variations in Hfe and other transistor parameters.
What you seem to have drawn out, looks like you are somewhat nearer the beginning of such a journey, rather than being close to the end of such a journey.
I am, absolutely! I am a complete Uncle Bumblefuck in the early Suck-Hard-and-Fail-Often part of the learning curve in electronics circuits, definitely! Especially so when it comes to current control. I've played with sensors and voltage-based stuff, but not much with current-controlled/dependent things like LEDs. I do have done electronics courses (but I focused on digital logic!), so I know how to read and draw circuit diagrams (badly that, I admit!); I just have almost no experience with practical circuits and especially known good approaches. Which is why I asked, and am very grateful for everyones support in this thread, yours definitely included.
I might get torn to pieces, for saying this, on the forum. But I have been led to understand, that even if you design transistor circuits, every day, for a living, and have done so, successfully for the last five or ten years (which was much more common in the 1960s and 70s). You still have much to learn about electronics and transistors.
Bah (to being torn to pieces); the same applies to software development as well. Even though I've been paid to write code in half a dozen different programming languages off and on during the last three decades, I
still learn more just about every day. And I still have much to learn about programming.
If you're determined for precise/individual current control, and designing it yourself. You could either go the op-amp route, or the various integrated circuits, specifically designed for driving LEDs, at precise currents. But I don't think those are necessarily/usually used in relatively simple backlight schemes, which your display, seems to have/need.
True, and I agree: this is quite over the top.
Perhaps a better way to look at this project of mine is to consider it a tool for hobbyists like me using this display (with Teensy 4 or similar microcontrollers –– I do intend to use parallel I/O for this), with lots of options on tuning it. The component count (7 SOT-23 packages and 10 passives in 0805, 14 passives if I double the positions for the current setting resistors) may seem high, but I find it acceptable due to adjustability it gives me.
How constant is the temperature?
Ambient will be between +15° and +40°C, and I do not care if the display brightness changes a bit (say, current varies by 5% within this range) depending on the ambient temperature.
How accurate does the current need to be? If it needs to be well-regulated, then the only sane way is with an op-amp and voltage reference.
Only accurate enough to not yield visible artefacts. Say, 1% peak-to-peak maximum noise.
The reason for using REF3333 is that there
might be some step-like fluctuations on the 3.3V rail from the MCU. It is quite true that a couple of capacitors or a Pi filter would probably stabilize it just fine, but considering how easy and cheap it is to just throw a reference and a couple of capacitors there to be sure, I'm, uh,
happier with the latter.
Something like
MCP6009 (quad RRIO op-amp) could drive the LEDs directly, is cheap (Mouser has stock, <0.5€ apiece), and if driven from +5V, should be able to drive up to 20mA per channel, in Howland current pump configuration –– but I don't see how to have the pumps share resistors, so that makes for 16 of them. To allow adjusting the maximum current for each LED individually, I could just use a voltage divider between the reference and the positive input of each quad op-amp (or one in serial for global physical brightness knob, followed by one per op-amp positive input for tuning the per-LED maximum brightness). Thing is, I don't have the experience to have an opinion how this would compare to the schematic I showed above.