You can gain lots of control over your LEGO lighting by using a microcontroller and constant current driver board. This will allow you to create individualized brightness levels and animated effects for 16 LEDs (more if you use additional driver boards, for a total of 64 LEDs per I2C port).
Wiring Cables
You'll use the AW9523 driver breakout to control the LEDs. The board is conveniently designed with 16 pairs of pads for the connections to your LEDs. You can wire the LEDs directly (red to Vin, blue to numbered GPIO current-source pin), or do some extra wiring prep to make detachable wiring cable assemblies.
Cable Assembly
Twist the wire pairs to make them more managable. You can do this by hand or chuck them into a drill for speed.
Then, add a short length of heat shrink tubing to each LED wire.
Solder the red LED wire to the red wire of the smaller female JST cable, and the blue LED wire to the black wire of the JST cable.
Board Cable
Next, solder the larger male JST cable to the driver board. The black wire will go to pin 0, the red to the associated Vin pad.
Plug the cable ends together to connect.
You can now create cable assemblies for all of the LEDs you want to use. It can be helpful to add color-coded heat shrink tubing to help differentiate the lights.
Lamp Lighting
To light up a typical Winter Village lamp, simply run the LED up through the base as shown.
The translucent yellow brick will look amazing when illuminated from within!
Here's what the lamp will look like when we plug the board into the QT Py and code it with CircuitPython in the next pages.
Now you will connect the driver board to your QT Py via the STEMMA QT cable and code it.
Text editor powered by tinymce.