Showing posts with label LED. Show all posts
Showing posts with label LED. Show all posts

Sunday, 26 July 2026

WS2812 LED Project Idea

Introduction 
This short blog offers a simple solution for creating an LED light using WS2812 modules. The idea is meant as an example for students wanting to design their own LED light as a low-powered lamp replacement, entertainment device, outdoor garden light or any similar LED light devices.

Inspiration
It can be interesting for students to frequently mix up the electronic devices they are asked to conceptualise, design and build. From a post by the author Wech Holger on Hackster.io, a WS2812 LED software solution was sourced and updated for a different PSoC device. The post provided an idea for the LED light and a subsequent separate microcontroller project for students with varying technical capabilities.

WS2812 Connection Diagram
WS2812 Connection Diagram

Hardware
Focusing on the LED portion of the design, off-the-shelf WS2812 modules were selected. For this example design, four Adafruit #1426 modules with 8 x WS2812 LEDs were connected in series.

Generic WS2812 LED Strips with Headers
Generic WS2812 LED Strips with Headers

Two interconnecting boards were used at the electrical ends of the LED modules to make the series circuit.

For the hardware layout, the LED modules are arranged on a circular circuit board as shown below.

Example WS2812 Interconnecting Circuit Boards
Example WS2812 Interconnecting Circuit Board

The role of the interconnecting boards was to provide power and to gang the series IN-OUT communication connections. Several modules could be connected in this fashion.

Extract of WS2812 Light Schematic

Extract of WS2812 Light Schematic

To connect the LED modules, pin headers and sockets were fitted. The design could be simplified in several ways. One solution could be to remove the sockets and then solder pin headers directly to the interconnecting circuit boards.

Testing
To test the LED design, the example project Outlook-LED.cywrk from Hackster.io was rebuilt for an Infineon CY8CKIT-059 development board. The communications wire bus was moved to a new pin - P1.7.

PSoC Creator Updated Pin Mapping for Outlook-LED.cywrk
PSoC Creator Updated Pin Mapping for Outlook-LED.cywrk

The image below shows the LED board fitted into a garden LED bollard.

LED Bollard used for WS2812 Testing
LED Bollard used for WS2812 Testing

In the clip below, three LED colours were tested. The colour selection was activated using the terminal interface provided in the example PSoC project.

Tuesday, 11 November 2025

WS2812 PSoC5 Creator Project

Introduction 
This short blog continues a previous post about a WS2812 addressable LED for an Infineon (Cypress) PSoC 4 microcontroller. This blog focuses on the project for the PSoC 5 with testing performed on a CY8CKIT-059 development board.

Rebuilding the Project
The PSoC5 project, ‘ws2812_test’, was downloaded from a post on the Infineon Community site.

Upon opening the PSoC5 project, the same issue noted in the previous blog with the PSoC4 was observed. The missing component is evident in the top-level design of the PSoC project.

Missing Components in PSoC Top Design
Missing Components in PSoC Top Design

Unlike the previous post, where the WS2812 library was not included in the compressed project, the WS2812 library is included in the compressed project.

WS281xLib in PSoC Project Folder
WS281xLib in PSoC Project Folder

The issue with the missing component was resolved by updating the project Dependencies in PSoC Creator.

PSoC Creator Dependencies - StripLightLib Error
PSoC Creator Dependencies - StripLightLib Error

The dependency for the existing WS2812 library was deleted. Next, the dependency for WS281xLib was added again to the project. The WS2812 folder in the local ws2812_test project was chosen.

PSoC Creator Dependencies - WS281xLib
PSoC Creator Dependencies - WS281xLib

After exiting the project Dependencies window, the Top Design sheet in the project displays the previously missing WS2812 component.

Updated Components in PSoC Top Design
Updated Components in PSoC Top Design

Before rebuilding the project, a resistive pull-up was added to the SW button to suit a PSoC development board.

Switch Input Pin Configured with Resistive Pull-Up
Switch Input Pin Configured with Resistive Pull-Up

The CY8CKIT-059 development board does not appear to have a resistive pull-up connected to the pushbutton switch ‘SW’ on the development board.

CY8CKIT-059 User Push Button Connection
CY8CKIT-059 User Push Button Connection

This information is noted in Section 3.1 Theory of Operation, in the User Manual. With the default code implementation, the WS2812 will be driven by the development board as soon as the board is powered via the USB KitProg or PSoC connector.

Note from CY8CKIT-059 User Manual
Note from CY8CKIT-059 User Manual


Testing
A WS2812 module with eight LEDs was tested using the CY8CKIT-059 development board. The default code is configured for a single LED in blue, as shown below.


A modification is shown below for festive celebrations!


The LED colours for the above example were extracted from Line 117 in the PSoC project StripLights.c file. Setting of the two LED colours used with the Modulo operator, as shown below in main.c

Updated Code in Main.c from Line 54
Updated Code in Main.c from Line 54

Downloads
Linked below is an updated release of the PSoC project with the corrected dependencies to suit the CY8CKIT-059.

Updated Original PSoC5 Application - WS2812_test


Sunday, 29 June 2025

Salvaging Components from an Atom LED Baton

Introduction 
This brief blog details the salvageable components from the circuit boards of a mains-powered LED light baton manufactured by ATOM.

ATOM Baton Nameplate
ATOM Baton Nameplate

Attempting a Repair
When the LED baton, Atom part #AT9877, initially failed to switch ON, the initial thought was that a repair should be possible. Disassembling the unit and checking the control board revealed some damaged resistors.

Damaged Resistors on Circuit Board
Damaged Resistors on Circuit Board

After replacing the resistors and retesting the baton, it became apparent that multiple components on the board had failed. The additional failed components included the main switching FET and, after a subsequent test, the onboard fuse. Although a repair seemed feasible, reliability was in question, so the part salvage route was instead chosen. 

Parts Salvage
As the baton was already partially disassembled, the control board was easily removed. Two plastic holders were fitted to the ends of the board, and then those clips were fixed into the baton’s metal housing. The board mounting solution is an interesting alternative to mounting holes, which are usually included on circuit board designs.

Plastic Circuit Board End Clips
Plastic Circuit Board End Clips

The wires to the control circuit board were cut, and the control board assembly was removed. Remaining fitted to the baton's chassis, which could be salvaged, were solid core mains cable, the LED boards and some fixings, including terminal blocks.

Each of the two LED boards was fixed in place with seven plastic pins, as shown in the image below. The clips were removed by pushing them from the other side of the baton. 

Plastic Clips Holding LED Circuit Boards to Baton Chassis
Plastic Clips Holding LED Circuit Boards to the Baton Chassis

The 60 LEDs per board were checked using the diode test on the multimeter; both LED boards could be salvaged or kept for similar LED baton repairs.

LED Strip Markings
LED Strip Markings

Turning attention back to the control circuit board, this was a double-sided (population) design. The control board consisted of surface mount parts on the copper (solder) side and through-hole components on the opposite side. Surface-mount parts were held to the circuit board with an epoxy adhesive, such as the Chip Quik AD1-10S or Henkel Loctite 3621, making reworking or salvaging parts difficult. The benefit for the manufacturer, however, is that this design results in a simplified process during soldering (usually reflow).

Baton Control Board - Solder Side
Baton Control Board - Solder Side

If easily removed, the diodes (red box in the solder side image) can be salvaged from the solder side of the circuit board. The two larger rectifier diodes marked as US5M are from the manufacturer Suntan.

A datasheet for the main switching FET (yellow box 
in the solder side image) could not be sourced, and the part number for the 8-pin controller was not easily readable.

Baton Control Board - Top Side
Baton Control Board - Top Side

Reviewing the through-hole component side of the control board, the combination of six inductors and chokes (purple boxes in top side image) could be salvaged with minimal risk of damage.

The bridge rectifier (green box) from NextGen components, part KBP210, could be removed and tested.

The manufacturer for the majority of the electrolytic capacitors (red boxes) was Axboom. The three large mains rated 47 uf 350 V devices showed no signs of damage or bulging and could be salvaged. 

Long or larger components, such as the capacitors on this board, are secured with white glue or silicone, although this material can easily be cut off.

There is a safety capacitor (blue box) on the board marked with JNC, JY332M; a datasheet could not be found. This appears to be a 400 V AC 0.0033uF Y5U capacitor, and although the Y5U specification drifts when the temperature changes (image below), the part may be useful for other designs or repairs.

Example - Y5U Safety Capacitor vs Temperature
Example - Y5U Safety Capacitor vs Temperature

The varistor (black box) on the AC supply appears to be from SONGLONG LISHANG, part 07D471K. This varistor could be tested and used for repairs.

Although the fuse was damaged on this baton, Littelfuse TE5® 392 series markings T1AL250V, it could be salvaged on a working control board.

Sunday, 26 March 2023

Maker LED Flasher

Introduction
This blog details a prototype flasher circuit board for a school Maker community. The board design is built to accommodate through-hole and surface mount components. Featuring two component mounting styles allows the board to serve multiple uses in a school environment.

Dual LED Flasher PCB
Dual LED Flasher PCB

Circuit
The circuit in the blog uses a well-worn astable LED flasher design made with discrete components. A transistor pair, wired in a common emitter configuration that drives a total of four LEDs were used. As a DC 9 V battery powers the circuit, more LEDs could be added to the design to interest young Makers.

 

LED Flasher Circuit
LED Flasher Circuit

For the feasibility review of the prototype by the Maker community, both circuits were placed on one side of the circuit board. A single switch (surface mount) was used to control power to the through-hole and surface mount sections.

PCB
An ABS enclosure from a local supplier was initially chosen for the prototype. PCB dimensions and the mounting hole locations for the circuit board were extracted from the ABS enclosure.

Components for the flasher circuits were placed on the top layer of the board. The battery connector was relegated to the bottom layer allowing a battery to be placed inside the ABS enclosure. Routing of the board used two copper layers.

Dual LED Flasher Routed PCB
Dual LED Flasher Routed PCB

3D Printed Case
With many Makers communities having 3D printers a printed enclosure was created based on the commercially available product

3D Model of Plastic Case
3D Model of Plastic Case

The Fusion 360 and STL files are located at the end of this post.

3D Printed Plastic Case
3D Printed Plastic Case

Making
The image below shows the through-hole portion of the circuit board after being populated and partly soldered by a school student. 

Half Populated LED Flasher Board
Half Populated LED Flasher Board

All the through-hole LEDs and capacitors were taken from salvaged components.

To hold the circuit board in position, round head metal self-tapping screws, 3 mm between crests, 7.5 mm in length were utilised.

The surface mount portion of the board was hand populated as a second step for this blog as can be seen in the image below.

Fully Loaded Flasher PCB in 3D Printed Plastic Case
Fully Loaded Flasher PCB in 3D Printed Plastic Case

The video below shows the through hole portion of the flasher board operating.


The second image shows the surface mount section in operation during testing.


Captures from Circuit
For those Maker communities interested in checking the circuit waveforms with a oscilloscope, below are some captures taken from the transistor collector and base connections.

Voltage Measured at Transistor Collector
Voltage Measured at Transistor Collector

Voltage Measured at Transistor Base
Voltage Measured at Transistor Base

Summary
The LED flasher detailed in this blog was published as an example for Maker communities. Available for download below is the artwork for the circuit board and the file for a suitable 3D-printed case.

Flasher Schematic




Flasher PCB

Flasher Gerber

Flasher PCB Bill of Materials

3D Case in Fusion 360

3D Case as STL*

* If the plastic case is used, 4 x round head metal self-tapping screws, 3 mm between crests, 7.5 mm long may be required.



Sunday, 27 June 2021

Failing B22 E27 LED Bulbs

Summary
This blog reviews E27 or B22 style LED bulbs and the heat produced during operation.

LED Bulbs
In many mains powered LED bulbs a non-isolated, AC to DC LED driver is central to the design. For some bulbs, the Printed Circuit Assembly (PCA) containing the LED driver is separate from the LEDs. The LED
Printed Circuit Board (PCB) is usually metal backed to assist in heat dissipation. Both the LEDs and driver assemblies generate heat however the majority of heat is generated by the LEDs. 

Failed LED Bulbs
After several LED bulbs failed
across a period of weeks whilst daytime temperatures were high, the bulbs were opened for investigation. A failed Surface Mount (SMT) LED on the PCA was easily identified by black dots. Other LED bulbs had failed controllers.

Single Failed LED (Black Dots)
Single Failed LED (Black Dots)


LED Testing
The LED driver on the bulbs was identified from the manufacturer Bright Power Semiconductor. The manufacturer datasheet detailed the LED driver‘s
single string capability was 120 mA with a maximum string voltage of DC 72 V.

Based on the driver string voltage, current with the dimensions of the LED in the bulb, the LED manufacturer appeared to be Everlight however this is not substantiated.

Using the specifications of the Everlight LED as a reference; a forward voltage of 9.15 V and 100 mA maximum current, a single LED board was left on the board. The single LED was powered from a benchtop power supply and measurements were taken.

For a constant current of 100 mA, the forward voltage was approximately 9.1 V. Measuring the temperature of the single LED after 15 min showed the case temperature of the LED reached 85°C mounted against the metallised board.

Temperature of LED Case
Temperature of LED Case

The rear of the metallised board reached nearly 40°C in the open air. When installed in the bulb, the temperature of the metallised board is expected to be higher considering the enclosed space.

Temperature of LED Rear Side
Temperature of LED Rear Side
 
Changing the power supply to constant voltage mode with a 125 mA current limit, several measurements were performed at different voltages. Temperature measurements were also performed with a 26°C ambient. The graphed results are illustrated below.

LED Temperature vs Forward Current
LED Temperature vs Forward Current

Summary
During the testing process in this blog, a maximum LED case temperature of 101°C was measured with an ambient of 26°C.

Highest LED Temperature
Highest LED Temperature

It should be noted that many LEDs will operate continuously with a junction temperature at or above 100°C. Manufacturer datasheets usually provide graphs showing luminous flux changes with temperature which help determine derating performance.

The derating of luminous flux versus temperature varies considerably between LED manufacturers.
For the LED described in the blog, which was suspected to be manufactured by Everlight, the maximum junction temperature was 115°C. The derating curve to 115°C is shown below.

Everlight Luminous Flux vs Temperature
Everlight Luminous Flux vs Temperature

Using the bench tests results from this blog, it would be anticipated that with all LEDs active and an ambient temperature over 40°C, the LED junction temperature would exceed the datasheet rating. 

LED Bulb Driver and LED PCA's Showing Heat Discolouration
LED Bulb Driver and LED PCA's Showing Heat Discolouration

Interestingly many over the shelf LED bulbs do not detail maximum operating temperatures on their packaging or datasheets. For the LED bulb described in this blog, the high generated temperature was likely a contributing factor to the reduced lifetime of the bulb.

Sunday, 28 February 2021

LED Downlight Repair LD-18000R

Summary
This blog details the repair of a downlight (Model LD-18000R) with the replacement of the LED chip and the creation of a new LED retaining clip.

Fault Symptoms
Following several days of flickering, the LED in the downlight failed. Only a portion of the full light output was produced. Shown below is the downlight fully powered.

LED Downlight Failure - Low Output
LED Downlight Failure - Low Output

Downlight Disassembly
With the LED disconnected from the LED driver, the rear plastic plate of the LED was opened to allow access to the cabling.

LED Downlight Rear Plate Fitted
LED Downlight Rear Plate Fitted

LED Downlight Rear Plate Removed
LED Downlight Rear Plate Removed

The two screws allowing pivoting of the downlight in the base were removed. This step was not an essential step for repair as the metal retaining ring was screwed directly onto the aluminium heatsink.

LED Downlight Base Removed
LED Downlight Base Removed

The retaining ring was unscrewed from the aluminium heatsink to access the reflector.

LED Downlight Reflector in Heatsink
LED Downlight Reflector in Heastink

The reflector was set in place with a small amount of clear silicone. Using gentle prying the reflector was removed without damage.

LED Downlight Reflector
LED Downlight Reflector

While inspecting the LED fitted to the heatsink, a crack in the plastic retaining clip was noticed. It was not known if equal pressure was applied LED. The capture below shows a hairline crack in the plastic near the top left countersunk screw hole.

LED Retaining Clip - Cracked
LED Retaining Clip - Cracked

Replacement LED
To verify failure of the LED, the LED was powered using a benchtop power supply with approximately DC 32 V. Only a portion of the LED is illuminated in the capture below.

Damaged CREE LED
Damaged CREE LED

The 36 V Cree LED was marked as a CXA1507N which specifications of a colour temperature near 5000K (cool). Replacement CREE LED’s with a 3000K (warm) temperature were selected due to availability.

Replacement CREE LED's
Replacement CREE LED's

Repairing the plastic LED retaining clip was an option however for longevity a new holder was created using a spare Printed Circuit Board (PCB). For the board used in this blog, the PCB was 1.6 mm thick, FR4 with a temperature grade (TG) 140 Celsius.

LED Retaining Clip on PCB
LED Retaining Clip on PCB

The outline of the plastic retaining clip was traced with a permanent marker onto the PCB.

LED Retaining Clip Tracing on PCB
LED Retaining Clip Tracing on PCB

Below is the PCB, drilled and shaped then placed against the CREE LED for verification.

Shaped Replacement LED Retaining Clip

Due to the PCB sitting physically higher than the previous plastic clip, new longer self-tapping screws were required. The longer screws would hold the PCB and LED to the aluminium heatsink. 

The replacement self-tapping screws were slightly larger than the previous screws meaning these needed to be cut into the aluminium block.

New Self Tappers for LED Heatsink
New Self Tappers for LED Heatsink

 
Isopropyl alcohol was used to remove the old heatsink paste and aluminium swarf. 

The positive and negative connections were soldered to the CREE LED. New heatsink paste was then applied lavishly to the rear of the LED.

Replacement CREE LED with Heatsink Paste
Replacement CREE LED with Heatsink Paste

The replacement LED holder was deburred, cleaned, fitted then screwed down to the heatsink.

CREE LED with Replacement LED Holder
CREE LED with Replacement LED Holder

A brief power-up test was made to ensure the operation of the LED before reassembly.

Replacement CREE LED Test
Replacement CREE LED Test
  

Reassembly
For reassembly of the downlight, the plastic cover was fitted back to the aluminium heatsink.

LED Downlight Rear Plate Replaced
LED Downlight Rear Plate Replaced

New white silicone was applied around the edge of the heatsink before the reflector was fitted.

Threaded LED Aluminium Heatsink
Threaded LED Aluminium Heatsink

The base and retaining ring were assembled then the aluminium heatsink screwed into the ring.

Reassembled LED Downlight
Reassembled LED Downlight

As a final verification of operability, the LED was connected to the LED driver for testing.

Final Thoughts
The cost to replace each CREE LED in the set was less than USD 5.

For the faulty downlight, workshop time was required to create a replacement LED holder. Similar downlights did not have damaged LED holders.
 

Second CREE Downlight
Second CREE Downlight

Taking into account the cost of the LED and workshop materials, the repair cost was less than a new downlight. Furthermore, because the downlights were less than three years old, replacement of the LED’s appeared a reasonable investment. 

If the downlights were several years old, purchasing the replacement LED’s may become an issue. The remaining life of the LED driver would also need to be considered carefully before performing the repair.