UPDATE: Ukraine 2022

I am so utterly disappointed with Putin's decision to invade Ukraine. His lengthy dictatorship of Russia has put him out of touch with his people and the world as a whole, and it's so heartbreaking that he is willing to risk so much only to separate the many friends and families of two nations...

The only sane voice in this conflict seems to be that of Ukraine's president, Volodymyr Zelenskyy, who released a well put plea for the Russian people to look beyond Putin's propaganda and see him for the tyrant he is

28/02/22 Update

A YouTube channel I follow called Супер Сус just released a video showing current life in Kyiv. In their usual videos they would show off abandoned metro tunnels or even explore the Chernobyl exclusion zone, all in a very colourful/expressionist way. But the thing that hit really hard in their latest video is seeing the hermetic doors being shut in the Kyiv Metro to protect the civilians on the other side... Like in their older videos whenever they come across a hermetic door they would explain that the door would close in the unlikely event of an attack on Kyiv... and here we are...

05/03/22 Update

For those that have friends & family living in Russia that are too deep in Putin's propaganda, below is a good website that shares a similar experience between a son living in Ukraine and a father living in Russia:



The important thing is to keep the communication channel open. Don't be be angry and blame them for Russia's war/invasion of Ukraine. Make it clear that you are against Putin and his chokehold of the Russian people


PROJECT: Half-Life 2 AR2, Update #17 - RGB LED Driver

Guess who is back to crunching simulations in LTspice, this time trying to figure out how well the RGB LED driver works ;^)

RGB LED, Configuration, & Driver Overview

The RGB LED I have decided to use is the BROADCOM ASMT-YTD7-0AA02, which also comes with a diffused silicone cap to mix the emitted light

The LEDs will be divided into 4 zones/strings inside the AR2 Barrel:

Finally, after comparing LED drivers like HV9980, LT3597, LP5009... I decided to settle on the LT3496 to drive the above configuration. The thing that makes this driver special is that it has a Buck-Boost mode, which is a must when the nominal battery voltage hovers close to the total forward voltage of the LED sting (particular for the GRN & BLU channels). Below is the LTspice simulation for the RED string:

A few key points about this LT3496 configuration:

  1. Reducing the current sense voltage (CTRL pin) from 100mV to 50mV lowers the peak LED current during ON-OFF transition from 110mA to 80mA (think reducing swing range of error amplifier). LEDs are rated for 100mA peak 100ns pulse and though the 110mA pulse was only for 25ns, I really wanted to be sure I am not hitting the 100mA maximum limit
  2. Reducing the switching frequency from 2.1MHz to 1.25MHz improves converter efficiency, as ON losses are lowered from 96mW to 76mW. Reducing the frequency beyond this brings diminishing returns, as losses are more or less ~70mW, while LED ripple current is increased (for same size inductor, 10μH)
  3. Chosen VC filter (22K & 470P) helps minimize LED current overshot and improves settling time (during OFF-ON transition)
  4. OVP resistor divider sets the LED string over-voltage protection to 35V. So if in the unlikely scenario that say a single LED fails in the RED string, the string will be safely shutdown to make sure it does not impact the GRN/BLU strings 

RGB LED in Detail (Or Why We Need a Buck-Boost Mode)

Remember when I said having a Buck-Boost mode is super useful when the nominal battery voltage hovers close to the total forward voltage of the LED sting? Well lets look at this in more detail... First off I will be using a 4S LiFePO₄ battery, so I expect the voltage to be:

  • 14.4V maximum
  • 13.6V nominal
  • 10.0V minimum

I plan to drive each LED channel at 80% maximum DC current rating, so I expect the individual forward voltage to be:

  • RED 2.3Vf nominal @ 40mA, & a maximum of 3.0Vf
  • GRN 3.1Vf nominal @ 40mA, & a maximum of 3.6Vf
  • BLU 3.1Vf nominal @ 40mA, & a maximum of 3.6Vf

So with a 3 series LED string the forward voltage will be:

  • RED 6.9Vf nominal & 9.0Vf maximum
  • GRN 9.3Vf nominal & 10.8Vf maximum
  • BLU 9.3Vf nominal & 10.8Vf maximum

And with a 4 series LED string the forward voltage will be:

  • RED 9.2Vf nominal & 12.0Vf maximum
  • GRN 12.4Vf nominal & 14.4Vf maximum
  • BLU 12.4Vf nominal & 14.4Vf maximum

Note how the LED string forward voltage spans the range of the battery voltage, meaning we can't just use a Buck or Boost regulator, as we will run into cases where battery voltage is too high/low for regulator to function. This is exactly where the Buck-Boost mode saves the day, as it can happily regulate the string voltage to required value :D

Linear vs Switching (Or When Things Get Hot)

So first of all we can't use a linear regulator to drive 4 series LEDs, unless we increase the battery voltage (as it would need to be ~2V higher than maximum forward voltage of the string). A linear regulator can just about drive 3 series LEDs, as in this scenario the battery voltage mostly gives enough headroom. With that said, lets compare how a linear regulator compares to a switching one

NOTE: I am setting the LED string brightness with a 1kHz PWM waveform that is at 50% duty

So using a switching regulator reduces the average dissipated power by ~70% (from 145mW to 40mW), and the ON dissipated power by ~80% (from 290mW to 56mW)... and that's just for the RED LED string/segment (as in not including the GRN/BLU string)! 

Next lets expand the simulation to include the GRN/BLU LED driver losses and see what the expected IC (just the one, not the 4 I need to drive all barrel zones) temperature rise above ambient is:

IC Type RθJA, [°C/W] IC losses average, [mW] IC losses maximum, [mW] Temp above ambient, [°C]
LP5009 Linear 54°C/W RED 145mW
GRN 120mW
BLU 120mW
RED 290mW
GRN 239mW
BLU 239mW
21°C to 42°C
LT3496 Switching 34°C/W RED 40mW
GRN 46mW
BLU 46mW
RED 56mW
GRN 69mW
BLU 69mW
5°C to 7°C

And with all that waffle out of the way... we can see that using a switching regulator is the way to go, as:

  1. It is more energy efficient, resulting in a cooler AR2 Barrel ;^)
  2. It can actually drive 4 or more RGB LEDs in series, while being powered from same 4S LiFePO₄ battery