Designing an Edge Indicator with Side-Emitting 4020 RGB LEDs
A side-emitting RGB LED can put a status light at the edge of a thin enclosure without mounting a conventional LED through the front panel. Its useful feature is the direction of the light: the electrical circuit, PCB footprint and enclosure window still need to work together.
The PMD Way SMD 4020 LED collection includes common-anode side-emitting 4020 RGB LEDs. These are conventional three-colour LEDs, not addressable pixels with a built-in data receiver. This guide concentrates on designing an edge indicator around that distinction.
Start with the light path and package drawing
Draw a section through the PCB, LED and enclosure wall. Mark the emitting face, window position and available clearance. A package that fits the board outline can still shine into an opaque wall if its height or orientation is wrong.
Use the exact component drawing for pad positions, polarity and mechanical dimensions. The name “4020” is not a complete footprint specification, and another manufacturer's similarly named part may have different connections or optical geometry. Confirm the drawing's viewing direction before translating it into a PCB library.
Make a simple mechanical mock-up before ordering a finished enclosure. A temporary board and a representative window sample can reveal whether the light reaches the intended area and whether the user can see it from normal operating positions. Test the actual arrangement rather than judging brightness from an exposed LED on a bench.
Understand the common-anode connection
In a common-anode RGB package, the positive sides of the red, green and blue dies share a connection. Each colour needs its own controlled current path from its cathode. One resistor in the common connection does not independently control three colours.
Texas Instruments' RGB driver selection guide explains the relationship between LED connections and driver architecture. Common-anode LEDs suit current-sinking outputs. A driver also needs sufficient voltage headroom to regulate current after allowing for the LED's forward voltage.
The PMD Way listing specifies 18 mA maximum per colour. Treat that as a limit, not a recommended operating point. It does not establish that all three dies can run continuously at that current in every enclosure temperature. Obtain the applicable thermal and electrical specifications for a production design.
Do not copy a pin order from a through-hole RGB LED or assume a package marking has a universal meaning. Identify the common connection and individual colours from the exact drawing. If documentation remains uncertain, resolve it before committing the PCB layout.
Choose a current-control arrangement
Separate resistors with suitable switching devices
For a few indicators, each colour can have a series resistor and a suitably rated switching stage. Calculate the resistor using the supply voltage, that colour's forward voltage, the switching-device voltage drop and the intended current.
As an illustrative calculation only, assume a 5 V supply, 2 V LED drop, 0.1 V switch drop and a 5 mA target. The resistance is (5 − 2 − 0.1) / 0.005 = 580 Ω. Selecting 620 Ω gives approximately 4.7 mA under those assumptions. These assumed values are not specifications for the PMD Way LED.
Repeat the calculation for each colour. Then check maximum supply voltage, minimum forward voltage, resistor tolerance and dissipation. A nominal calculation alone does not establish the highest possible current. Choose an initial test current conservatively and measure the result.
A constant-current RGB driver
A dedicated driver can simplify control of several indicators. The TI LP5012, for example, is a 12-channel I2C constant-current RGB driver. It illustrates this architecture; it is not evidence that an arbitrary breakout board is compatible with your supply and controller.
Check current-setting components, output voltage limits, logic levels, start-up behaviour and thermal dissipation. Set the output current for the LED, not the driver's maximum capability. If the LED supply is above the microcontroller supply, use an appropriate interface rather than exposing a GPIO directly to an unsuitable voltage.
Match the optics to the indicator's job
A direct window may be sufficient when the LED sits close to the enclosure edge. A light pipe can move the visible indicator to another position, but its entrance must suit the LED's emitting direction and location. VCC's light-pipe design guide discusses alignment, spacing and mechanical arrangements.
Inspect the assembled indicator with neighbouring lights on and off. Light escaping into another window can make an inactive channel appear active. An opaque divider, changed spacing or a better matched optical component may help; raising current is not a reliable cure for poor coupling.
Red, green and blue light can appear as separate spots near the package. Try the intended diffuser and viewing distance before deciding that the mixed colour is acceptable. Keep any light pipe or window clear of the package unless the component's mechanical design expressly permits contact.
Build colour control around real observations
Equal numerical settings do not guarantee equal perceived brightness. Test the indicator through the final window and adjust each channel's contribution. Record useful settings for the states the equipment actually needs rather than trying to reproduce every possible colour.
PWM changes the time a channel is on; it does not reduce the instantaneous current during each pulse. Maintain a safe current limit at full duty cycle. Check the driver's input and output logic before deciding whether software values need inversion.
Use colour alongside a label, icon or distinct blink pattern where a status matters. For example, a steady “ready” indication and a clearly different fault pattern are easier to interpret than two subtly different mixed colours.
Inspect assembly before debugging software
| Symptom | First checks |
|---|---|
| One colour missing | Pad mapping, solder joints and that channel's current path |
| Unexpected mixed colour | Channel assignment, current settings and window diffusion |
| Light visible in the wrong window | Emitter orientation, internal reflections and separation |
| Brightness changes after enclosure assembly | Alignment, obstruction and mechanical pressure |
Use the soldering and handling requirements for the exact component. Kingbright's LED technical notes provide useful background on surface-mount handling, but another manufacturer's reflow profile should not be transferred to an unidentified LED.
Finish by recording the package drawing, footprint revision, current settings and optical arrangement together. The repeatable result is a complete indicator assembly: electrical limits, physical alignment and visible behaviour all checked in the same design.