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

Saturday, December 24, 2016

LED Bunker Light Teardown

I recently picked up this LED bunker light for $33 and I thought it'd make an interesting tear down.

Bunker Light
AT5700 bunker light

When you remove the diffuser from the front the first thing you see is the PCB that holds the 32 LEDs.  Ideally you're meant to be able to loosen the screws and turn the PCB slightly and then lift it out, the only problem with that is that there isn't enough room to get your fingers down the side of the circuit board.  As it took me a couple of minutes to remove the PCB I'd suggest that in their next design iteration they route some indentations into the edge to allow you to hold onto the board.

LED PCB
Surface mount LEDs

The light is just a low power bunker light for non task illumination and is rated for outdoor and indoor use.

Specifications
Box specifications

The LED driver is mounted to the back of the PCB and seems to be of the constant current type.  It's hard to tell but I think the voltage range of 12-25 volts indicates that it will regulate the output to 350mA and vary the voltage accordingly.  When measured the LEDs were drawing 350mA at 12V for a power of 4.2W.  The box indicates a power draw of 6 watts so the difference is likely to be what gets wasted in the driver.

LED Driver
LED driver specifications

The light was chosen because of its small size, almost too small in fact.  As we'll see later, the 70mm thickness doesn't leave much space for cabling.

Dimensions
Dimensions

The connector that supplies power to the board has a cover over its soldered terminals on the front side of the panel.  I assume that this is to prevent shorting occurring and not a safety thing as the voltages on the board are low and still accessible on the sides of the surface mount LEDs.  It's a good idea but I wish they'd put the same amount of thought into the installation process as it's quite hard.  Ripping a surface mount component off a board isn't that hard to do.

LED PCB
Insulator over connector solder points

The main problem I have is that the driver is mounted to the back of the LED PCB.  During installation you have to first connect the cabling to the terminal block.  This means that you need to leave about 8 inches of extra wire so you can get a screw driver in there before putting the board into the base and if you can't shove that extra cable into a wall or wherever the light is going, it has to be curled up inside the fitting and that's hard as there is only about 30mm of space behind the board.  I think a better solution would have been to mount the driver to the base of the fixture so that the driver can be wired in first and then connect the LED PCB via the header connector to the driver.  The connector on the PCB could be also moved to the front side to allow connection after mounting the LED board.  There is plenty of room, you just bring a small cable up the gap beside the PCB and connect it on the front side.

LED PCB
Rear of the PCB as it sits upside down in the base

Curious about how the LEDs were arranged I mapped out the layout of the board.  In the image below each different section of copper track has its own colour to clearly identify them.

LED PCB
Electrical layout of PCB

This shows that the 32 LEDs are arranged in 4 serially connected groups of 8 parallel lights.  I would usually have an issue with this because there isn't any form of load balancing, but I think the lights are under-driven enough that it isn't a concern.  I'll take a minute to explain that better.  If the LED driver is generating 12 volts with a constant current of 350 mA, you would assume that each component is getting 43.75mA at 3V, but due to manufacturing tolerances it's unlikely that the 350mA will get evenly split between the 8 LEDs in each group.  You then have a situation where one will be drawing more current than the others and if there isn't enough of a safety factor in the design it will eventually fail.  When this happens, the 350 mA will now be divided between the 7 remaining lights and another will fail this will continue until an entire group fails.  The reason that I'm not too concerned about this is that I think the packages are 2835 LEDs and they can usually handle more than the (0.04375 x 3) 131.25 mW per device.  The forward voltage of a white LED is usually considered to be above 3V.  This is what makes me think that to get the reliability they wanted, all they had to do was add extra LEDs to split the current and under drive each chip.  You would probably find that if there were only 7 LEDs in each group the higher current would cause the forward voltage to increase and instead of regulating at 12V, the driver may go to 13V.

Schematic
LED schematic

It's not too bad for $33 but I think the design could be improved with only some minor adjustments.

Sunday, December 13, 2015

Christmas Lights and Their Control Signals

Merry Christmas.  I recently bought a set of LED Christmas lights for a display at work.  They were nothing special, just a cheap set of 4 colour lights that can flash and dim the lights in different patterns.  One thing that stood out was that the plug that connected the string of lights to the power supply only had two contacts.  So how is the controller able to control 4 different colours with only 2 contacts?

Lights
LED Party Lights
The first thing that came to mind was that there must be some sort of communication bus operating over the power rails controlling something like a WS2812 LED (I always come up with the most complicated solution first).  After watching the lights operate it became obvious what was happening.  The blue and green ones operate at the same time, and the orange and red ones are on at the same time as well.  So instead of controlling four different strands of lights the controller only needs to control two, red and orange, blue and green.  This can be easily done by connecting the red/orange and the blue/green LEDs with opposite polarity.  As the lights are LEDs and only conduct when voltage is applied with the correct polarity, applying a positive voltage to the connector, will light up half the lights, and applying a negative voltage will light up the other half.

I didn't have the time to test the set I bought for work, so I bought another smaller set of 100 lights from Bunnings for $10.

Lights
Lytworx LED Lights from Bunnings

Lights
Light String
The power supply is a small light isolated plug-pack that weighs only 51 grams.  I didn't want to open it as the case seems to be ultrasonically welded together and doing so would destroy it.  Given the weight, I'm almost certain that it's a switch-mode supply.  When a scope probe is placed near the case a 12.5 kHz switching signal can be detected with a 250 kHz ringing component.  The observed waveform and frequencies involved are commonly associated with switch-mode supplies.

Plug Pack
Power Supply
The supply has a button on the top that cycles the lights through different display modes.

Plug Pack
Button to change between modes is shown
Something to note that will become important later is that the output voltage of the supply is 31 volts.  How do you power 50 (half at a time of 100) LEDs from 31 volts?  The only other bit of interesting information here is the maximum power of 4 Watts.  That's similar to a USB charger.  Although you could power the lights from a 5 Volt 1 Amp source, without a boost converter the size of the cabling would have to increase to reduce losses.  I do however wonder what will happen if the USB power delivery specification becomes ubiquitous.  It can supply 20 Volts at up to 5 Amps.  Will Christmas lights of the future come with a power supply?  You might just get a string of LEDs with a small in-line button to switch between modes and a USB connector.  What's more likely is a string of lights with a USB connector and bluetooth connectivity (it's trending towards free) to control something like a string of WS2812 lights.  This means that the manufacturer doesn't have to worry about providing a power supply.

Specs
Power Supply Specs
There are 8 different light patterns.  Combination, In Waves, Sequential, Slo Glo, Chasing/Flash, Slow Fade, Twinkle/Flash, and Steady On.  For patterns that require all the lights to be on at once, the voltage alternates between positive and negative at a rate of about 140 Hz.  This means the lights aren't on all the time but the changes are too fast for the eye to notice.  To dim the lights you just need to reduce the fraction of the time that they're on.  If you're unsure of how this works read up on pulse width modulation to catch up.

Light Programs
Different Light Patterns
The string of lights is connected to the power supply via a simple barrel jack.

plug
2 Pin connector
To see if the lights you have use pulse width modulation, wave the lights around quickly.  You should see a dashed line of lights similar to the pattern below.  By comparing the length of the blue streaks to the spaces in between them you can see that the light is on for about 40% of the time.

Lights
Longish exposure showing PWM of LED lights
To see how the 31 Volt supply was connected to the lights I sat down and traced out the wiring.  It turns out that there are 10 strands of lights connected in series.  Each strand contains 10 lights in parallel.  This means each strand is supplied with 3.1 Volts.  This is an interesting point.  All the LEDs seem to be supplied with the same voltage.  The problem with this is that red/orange LEDs only need about 1.8 volts while blue/green ones need closer to 3 volts.  I'm not sure how the red ones are running on 3.1 Volts.  Do they have an integrated resistor or diode on board?  I have a feeling they may all be white LEDs with tinted dies.  When the lights are off and viewed at the correct angle the colour of the light is still visible.  That shouldn't happen.  LEDs don't emit a specific colour of light because they are that colour, the emit coloured light because of the properties and geometry of the semiconductors used.

Below is a small scale representation of the lights containing 2 strands of 4 lights.  The circuit on the left is the easiest way to understand the electrical layout.  This circuit can be rearranged to form a single long string of Christmas lights.  As seen in the image below, one wire runs the length of the string as a current return path, there are also 2 wires that almost run the whole length as well, however between strands there is only one wire.  In the lights I bought, this occurs every tenth light.

Schematic
How the Christmas lights are wired
There you go.  The designers have used a simple arrangement for maximum effect.  By taking advantage of the unidirectional nature of the LEDs and controlling them with PWM, they've created a simple enjoyable product.  To see how the electrical signals correlate with the light patterns, I taped the set of lights around my scope and probed the signal.  Enjoy!


For completeness I've included the labels on the light string as well.


Specs
Light specifications
.
Specs
Light Specifications
.

Friday, October 30, 2015

Using a Solder Paste Stencil for a Prototype

If you've seen any of my previous post you'll know I'm in the process of making a PCB that contains a configurable LED Grid.  Why?  Something to do I guess.  Anyway I finally got around to assembling the board I had made by BreadboardKiller.  I've assembled small surface mount PCBs in the past and have always manually applied the solder paste by hand with a syringe.  It's hard to get right, you might not get paste in the right place, you can use to much or too little, but when it's a only a few parts it's not too hard to fix.  This board has 96 surface mount components on it, which means that doing it by hand was going to be a close to impossible.

I decided to get a laser cut Kapton stencil from OSH Stencils.  At 40 dollars it looks expensive for a piece of plastic, but that includes a one off cost for set of board holders the exchange rate wasn't kind either.  These are the black acrylic L shaped pieces in the image below.  The stencil was only 20 dollars US which was well worth it.

There are demonstrations on how to use the stencils online but I'll show my setup.  The board holders are taped down and the stencil is aligned and taped down on on side to act as a hinge.  This allows a board to be put in the holder, have the stencil flipped over it, the paste applied, the board removed, and the process repeated.  Application of the paste is easy.  Squirt some out of the syringe where it needs to go, and use the paste spreader (basically a credit card) to swipe the paste across the stencil.

PCB Assembly
PCB Assembly Set-Up
The stencils are easy to use and make sure you apply the right amount to each pad.  For this project I chose to use lead free solder as I assumed that I'd get it everywhere when using the stencils.  I was right.  I wasn't sure how to clean it but mild soapy water did the job.

Solder Paste Stencil
Solder Paste Stencil

Solder Paste Stencil
Part of Stencil for LEDs

Solder Paste Stencil
Part of Stencil for Resistors

Solder Paste Stencil
Stencil label
Once again I used my toaster oven to solder the boards.  It has no automatic controls, I stand there and watch the board and time the steps by counting aloud to myself.  The temperature is also set manually by turning the dial.  The process is described in a previous blog post.  It helps to put a little bit of solder paste on a fiducial mark so that I can see the moment the solder liquefies through the oven window.

PCB Reflow
PCB in Oven After Reflow
It's important to shield the board from direct IR radiation from the heating elements, that's why there are trays above and below the board.

PCB Reflow
PCB in Oven after Reflow
After the surface mount parts were soldered the through hole parts were added by hand.

PCB
Assembled Board with LEDs
When I designed the board I screwed up and made the holes in the footprint for the terminal blocks too small.  This means they had to be enlarged by hand, and because of the way the tracks were laid out, the positive terminal block has to go on the other side of the board.  No biggie.

PCB
Assembled Board

PCB
Assembled Board

Surface Mount Resistors
Surface Mount Resistors
The parts seem to have been soldered nicely.  There isn't an excess of solder or too little, and there's that nice little fillet you expect to see as well.

Surface Mount Resistors
0.25 Watt 1206 Resistor
The LEDs are harder to judge as the pads are under the board, but they all work.

Surface Mount LED
Osram GW JCLMS1.EC-GUHQ-5L7N-1 LED
Just to prove they all work.

LED Grid
LED Grid
To show the reconfigurable nature of the board I disconnected the jumpers that power the middle section of the LED grid.

LED Grid
LED Grid with Sections Turned Off
Over all I'm very happy with the results.  Obviously boards produced this way aren't going to be of the same standard as professionally made ones, but these are rather sturdy and fine for prototypes.  I'd gladly use OSHstencils again just for the time that it saves me.

Saturday, September 5, 2015

LED Array Test PCB

A quick post today.  I was discussing the idea of an illuminated display recently and was unsure of how bright LEDs would appear when driven with different currents.  After looking around, I found some nice 100mA white LED devices and thought I'd make a PCB to do some tests. My original plan was to make a 7x7 grid of 4 LED clusters for a total of 196 lights, but the price of the PCB was too much.  As I'm using a prototyping service that gives me 5 copies of the board I decided to break it up into smaller boards that could be tiled.

As this was for testing, I wanted the lights to be configurable, so each cluster of 4 LED's goes to a standard pin header.  To power a cluster, you just add a jumper to the header.  Simple.  The board also includes some current limiting resistors to help current sharing, but the board isn't designed to be a standalone device, and needs external control to be driven properly.  This is why the header pins are in between the LEDs and the resistors.  If needed an external connector and be plugged onto the header pins to drive the LEDs, removing the resistors from the circuit.

After weighing up my objectives I decided to use 20 ohm resistors to limit the current, but at 100 mA the dissipated power would be 0.2 Watt.  It turned out to be more economical and flexible to use 2 x 10 ohm resistors instead of 1 x 20 ohm.

PCB Rendering
Top Layer
Breaking the board up into smaller portions is probably a blessing.  I'm not even sure I can solder these let alone a board that had something like 300 components, but I'll give it a shot.

When designing boards, if possible, write some notes on them so you'll know how to use them in the future.

PCB Rendering
Bottom Layer
I'll release the boards after a little more work (pressed for time at the moment)

PCB Rendering
Tiled PCBs

Tuesday, August 25, 2015

RF LED Dimmer Teardown

I was recently contacted by someone that had read my post about MeanWell LED driver units with dimming capabilities.  They needed advice on how to connect a driver unit to a wireless dimming controller they'd purchased.  After a couple of attempts at connecting the two it became clear there wasn't a simple way to it because of the way they're designed.  After buying one for myself for 20 bucks I thought I'd do a teardown and analysis of how the wireless dimming controller works and explain why they can't easily be connected.

RF LED Dimmer
The wireless dimming control unit is designed to operate from a 12 - 24 volt input and vary the brightness of a regulated load up to 8 Amps via PWM switching, whereas the MeanWell LDH-45 driver is a DC-DC converter that has an input terminal to switch an unregulated load on and off in a PWM manner.  The PWM input has a maximum input voltage of 8 volts, I think it can do more but the documentation is unclear.  So in theory we can put a resistor divider across the 12 V output of the dimming controller to reduce the voltage to a safe level and connect it to the PWM control terminal.  See if you can spot the mistake I've made in my logic.  I'll explain it later on but needless to say the connections in the diagram below wont work.  I'll give you some clues, disconnecting the positive output of the dimmer causes the light to go out, but disconnecting the PWM DIM terminal causes the light to stay on.

Initial Incorrect Connection


A 3 button remote control key fob unit is used to increase and decrease the brightness of the lights as well as turning them off.

Remote control key fob
For the low price I paid I expected the remote to be a low quality PCB with cheap components in a flimsy case.  Surprisingly the remote control is well built, with a water resistant rubber seal.

Rubber waterproof seal
There isn't anything too interesting in the remote.  It contains a user replaceable battery, some surface mount tactile buttons, and a status LED.  The marking on the crystal indicates that unit operates at 433.92 MHz.

Remote control PCB
The main dimming unit is also reasonably well constructed for such a cheap item.  Although screw terminals would've been nicer, it comes with spring loaded connectors like you'd see on the back of a set of speakers.  These are directly soldered to a medium quality single sided board of low complexity.

Bottom of LED Dimmer PCB
After the board is removed the operation of the device becomes clearer.  You can see that it contains a radio module (with a coil of wire for an antenna) that communicates with the key fob, some memory, an unknown microcontroller, a switching FET, a pull up resistor for the I2C line, and 3 extra components that make up the power supply.  The board is named "RF-DIMMER-MBK-V7"

Top of LED Dimmer PCB
The memory IC is an ATMEL 24C02N 256 byte serial EEPROM device.  I assume this is used to store the  device state as it is able to return to its previous on/off and dimming state if power is removed and reapplied later.

ATMEL 24C02N - 2048 bit serial EEPROM
The RF control module is connected to the board via a 4 pin header.  Two of these are connected together and I assume send data to the microcontroller.  The other two are 5 volt and ground lines.

RF Module PCB
Although it's incredibly hard to see, the switching MOSFET is a 50N03-10 CP device.  It has a 30 volt maximum VDS and a maximum drain current of about 50 Amps (Not at the same time of course).

Switching MOSFET
To explain why the device didn't operate as I first expected, it helps to colour code the different nodes on the circuit board below.  Once again the input is on the right.

Black - The negative input terminal and ground point for the rest of the circuit.
Red - The positive input terminal.  It's directly connected to the output positive terminal and supplies power to the rest of the control circuit.
Purple - This is the input voltage after is has passed through a reverse protection diode
Yellow - This is a 5 V line supplied by 7805 voltage regulator
Dark Blue - This is the data line that is returning from the RF module
Light Blue - The Mosfet gate drive
Green & White - SDA and SCL lines of the I2C bus
Orange - Negative output terminal

Voltage Node on PCB
To help make it even clearer why my first connection attempts didn't work I redrew the schematic in a more conventional fashion.

RF LED Dimmer Schematic
As you can now see, the circuit is relatively simple. It takes the input voltage through a reverse polarity protection diode and feeds it into a linear regulator to provide a 5 Volt line.  This is used to power the memory IC, RF module, and an unknown microcontroller.  The microcontroller reads data from the RF module and stores this configuration data in the EEPROM memory.  The microcontroller then adjusts the PWM waveform driving the gate of the MOSFET turning the load on and off rapidly and changing the brightness of the light.  It does this by effectively disconnecting the negative terminal of the load.

Why my first idea didn't work is becoming clear.  I assumed that the switching element would be on the high side of the load, with the load connected to ground and the switch between the load and the 12 volt line as in figure b below.  Connecting a voltage divider as a load would have produced a PWM signal between 0 and 6 volts, but this wasn't the case.

The switching mosfet is on the low side of the load as in figure a below, and for a good reason too.  This allows the gate drive voltage of the mosfet to be independent of the supply voltage.  A high side switch would require a p-channel mosfet and a gate voltage of 5 volts less than the input to drive it, but because the input voltage can vary from 12 to 24 volts the gate drive voltage would also have to vary.  This can be done, but it adds extra parts.  It's much easier to use a low side switch and drive it with a 5 volt signal that doesn't change as the input voltage does.  As this device is designed to control LEDs that aren't connected to anything else, it doesn't really matter.  The problem only arises when you are connecting multiple devices.  Placing a resistor divider across an output like this will give a PWM signal that changes between 6 and 12 volts.  This means that the light will come on and stay on.  Disconnecting the positive output of the dimming unit will cause the PWM DIM and the -DIM terminals to be connected with a resistor, placing 0 volts on the PWM DIM turning the light off.  If you disconnect the PWM DIM line the light will turn on as mentioned in its data sheet (leave unused wires unconnected).

The MeanWell LED driver really requires an output configuration similar to figure c, where the output terminal is forced to high or low voltage, the other configurations can force the output to a high or low voltage but not both.
Load switching configurations. Assume 12 volt input on the left of each figure, load on the right.
To look at the waveforms of the dimming device.  I placed a dummy load resistor on the output and measured the voltage across it.  The image below shows the device at two of its 32 dimming settings.

Voltage across load at dimmest setting
Voltage across load at approximately quarter-brightness
After thinking about it, there is a way to connect the unit to the MeanWell controller.  The voltage used to drive the FET is exactly what we need to drive the PWM DIM pin.  So if you were to open the box and solder on a wire to the light blue trace in the above diagram everything should work.  Bringing the output of a microcontroller out to the real world without protection isn't ideal, and the current the microcontroller can supply is unknown.  You could give it a go, it should work.

Voltage on the MOSFET gate
As an aside my initial tests were with a long strand of LEDs and I got some strange results.  What was happening here was when the low side switch was turned off the cabling in my setup was coupling in noise from the mains voltage.  Testing with a resistor fixed that though.  Doh! 
Initial incorrect experiment