This is only a preview of the October 2022 issue of Silicon Chip. You can view 44 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "30V 2A Bench Supply, Part 1":
Items relevant to "PIC & AVR Breakout Boards":
Items relevant to "Buck/Boost Battery Charging":
Items relevant to "Multi-Stage Buck/Boost Charger":
Items relevant to "Automatic Train Controller":
Items relevant to "WiFi Programmable DC Load, Part 2":
Purchase a printed copy of this issue for $11.50. |
Using the
Buck-Boost
LED Driver
By Tim Blythman
as a Charger or Voltage Converter
The High-Power Buck/Boost LED Driver design (June 2022; siliconchip.au/
Article/15340) is a versatile module for driving large LED panels, but it can do
much more. This article examines some of its other uses and applications,
including charging batteries and converting between different DC voltages.
T
he High-Power Buck-Boost LED
Driver was designed to provide
a current-limited output from a
voltage that might be above or below
the available input voltage.
That makes it ideal for driving
constant-
c urrent devices such as
bright white LEDs. But it isn’t just a
one-trick pony; far from it.
It’s a switchmode design that can
operate in both boost (increasing
voltage) and buck (decreasing voltage) modes with a smooth transition
blending between the two. Dedicated
circuitry reduces the output voltage
when the load current rises above a
set threshold.
The target design specification was
for it to deliver at least 6.5A at the
nominal 12V of the LED panels that
we had procured. But the LM5118
chip that controls the Driver can operate over a much wider voltage range,
as can the other main components,
such as the Mosfets that perform the
switching.
The PCB and other components
limit it to handling an input current
of 10A and about 8A at the output.
Since it can regulate both voltage
and current over a wide range, the
Driver can be used for many other purposes rather than just driving LEDs. In
the same vein that a laboratory PSU is
often pressed into service as a battery
charger, you can also use the Driver
as such.
Adding a beefy mains-powered DC
Applications for the Buck/Boost LED Driver
∎ Driving high-brightness LEDs/LED arrays
∎ Charging/maintaining a ‘house battery’ in a caravan or boat
∎ Making a portable charger with an internal SLA or Li-ion battery
∎ Powering 12V accessories from a 24V battery or a laptop charger
∎ Powering 24V accessories from a 12V battery
∎ Powering/charging a laptop from a 12V battery (eg, in a car)
∎ Providing a regulated 12V DC supply from a 12V battery
∎ Recharging a backup power battery from a car during a blackout
∎ As a high-current USB power source (eg, to run multiple devices at once) from
a 12V battery
∎ Providing a high-current, low-voltage rail within a device that has a higher
voltage rail
∎ Powering 12/24V DC equipment directly from a solar panel
54
Silicon Chip
Australia's electronics magazine
supply to the Driver’s input will allow
that, with a few provisos, which we’ll
discuss shortly.
The beauty of the Driver is its wide
input voltage range, meaning that
many types of supply can be used.
Common laptop power supplies produce around 19V and would be ideal
for feeding the Driver, especially as
this means a lower current demand on
the supply for a ~12V output.
This article will also look at options
such as solar panels and other battery
voltages. We will present some charts
based on measurements we made to
guide you in setting up the Driver for
these sorts of applications. In particular, we’ll look at typical settings and
what they mean across the Driver’s
operating range, including efficiency.
We’ve reproduced the entire Driver
circuit in Fig.1 to assist you in following our reasoning and explanation.
We’ll also mention a few of the subtler
points that may need to be addressed
along the way, such as extra parts that
may need to be added.
Fig.2 shows the most basic way of
connecting a battery to the board for
charging, with a supply at CON1 and
a battery directly connected to CON2.
However, we strongly suggest some of
the improved alternatives discussed
later.
We’ve also included digital oscilloscope grabs Scope 1 to 3 to demonstrate
siliconchip.com.au
Fig.1: the circuit of the Buck/Boost LED Driver, reproduced to aid in how to use it. It’s based around an LM5118 buck/
boost controller chip and uses a bridge of Mosfets, schottky diodes and inductors to perform voltage conversion.
the operation of the Driver in its three
main modes (buck, buck/boost and
boost).
Soft current limiting
One important point to consider
when using the Driver is that it does
not have a ‘brick wall’ current-limiting
response. Our very early prototypes
considered this option, but suffered
from instability and oscillation when
the current limiting was active.
The final design has a softer
response, leading to the sort of curves
seen in Fig.3. We plotted that with the
Driver’s current limit trimpot (VR2) set
to three arbitrary positions across its
scale, including its minimum. As mentioned in the original article, 1.8A is
the minimum current limit threshold.
The output voltage has been set to
14V, in the typical charging range for
a 12V lead-acid battery. This setup is
a good starting point for charging such
batteries. This graph was produced by
connecting our Arduino Load (also
from the June issue; siliconchip.au/
Article/15341) to the Driver and stepping through its 16 load levels.
siliconchip.com.au
As described in the panel at the end
of this article, we achieved higher load
currents by connecting a second Load
to the first. The result is a variation
across what would be the operating
range of the battery, with more current flowing initially upon charging
a flat battery.
We ran the tests used to plot Fig.3
with both 12V and 15V at the input but
the results were indistinguishable. It
is reassuring that the behaviour will
be consistent when powered from the
typical range of a 12V battery. This
means that you can use a range of
different power sources for charging,
including another 12V battery!
As shown in Fig.3, the current delivery increases as the voltage drops further below 10V. But any healthy 12V
battery should have a terminal voltage
of at least 10.5V at rest, and probably
higher; if your battery is measuring
10V or less, you will want to do something about that before you go about
charging it.
For charging batteries, we suggest
that the output fuse of the Driver (F2)
be sized not much larger than the set
current limit, to prevent damage to
Fig.2: these are the most basic connections for using the
Buck/Boost LED Driver to charge a battery. But they are
only really suitable for when you are actively monitoring the battery. A few
additions need to be made to turn it into a proper battery charger.
Australia's electronics magazine
October 2022 55
both the battery and Driver in case of
a battery fault.
Battery charge leakage
Scope 1: this scope grab shows buck-only operation, delivering an 8V DC output
from a 17V DC input. The blue trace is the output voltage, red the gate of Q1,
green the gate of Q2 and yellow/brown Q2’s drain. In this case, only Q1 is being
driven as no boost action is required. Note how Q1’s gate ‘floats’ during the
off-time, but it never gets high enough (>17V) for Q1 to conduct. Q2’s drain also
floats after the inductors’ magnetic fields have fully discharged.
Scope 2: this is similar to Scope 1 but with a 13V DC output, close enough to the
17V input that it is now in buck/boost mode. Both gates (Q1, red and Q2, green)
are now switching on, with Q2 switching on for a fraction of the time that Q1 is
on. The inductor magnetic fields don’t discharge as quickly as in Scope 1, but it
is still operating in ‘discontinuous mode’ as the load is relatively light.
Scope 3: with the output voltage set to 20V, the unit is now operating in pure
boost mode, where both Q1 and Q2 are switched on simultaneously and for the
same period. As soon as they switch off, energy stored in the inductors pegs Q2’s
drain voltage one schottky diode drop above the output voltage as the inductors
feed energy into the output. The output filter capacitors sustain the load current
between these pulses.
Fig.3: these three curves
demonstrate the ‘soft’ current
limiting characteristics of
the Buck/Boost LED Driver.
They show its behaviour at
three different current limit
settings. The voltage drops off
quickly once the current limit is
exceeded, but it’s hardly a ‘brick
wall’.
56
Silicon Chip
Australia's electronics magazine
Depending on how you configure
the Driver, it may be that the charged
battery (at CON2) remains connected
while no power is available at the
Driver input (CON1). Our tests show
that such a state will not damage the
Driver or the battery. Most of the circuit is isolated from the downstream
battery by diodes D1 and D2.
However, in this condition, there is
a constant load on the battery at CON2
of around 5.6mA due to the voltage
sense divider formed from the 1kW
resistor, 5kW trimpot and 220W resistor. 5.6mA is consistent with 1.23V
being present across the 220W resistor,
which is expected when the Driver is
operating normally.
IC2, the current shunt monitor, has
high impedance inputs when its supply is absent, so it does not present
any further load. The only other possible load is via the 1kW resistor back
into IC1’s FB pin (pin 8), and we did
not detect any current from this in
our tests.
While the 5.6mA load would take a
long time to discharge a large battery,
it is not ideal. We have two suggested
approaches to eliminate it. The simplest is to fit a suitably rated schottky
diode between CON2 and the charged
battery; this will naturally drop some
voltage between the Driver output and
battery, but you can compensate by
increasing the output voltage a little.
This arrangement is shown in Fig.4.
Even at the minimum current setting, such a diode will typically dissipate 1W or more. So you will need
to use a chunky diode. You might be
tempted to use several in parallel, but
it’s hard to guarantee current sharing
with such an arrangement. A TO-220
schottky diode with a small heatsink
would be a better solution (eg, Altronics Z0065 or Jaycar ZR1029).
A better solution, if slightly more
complicated, is to add a 10A automotive relay to only connect the charged
battery if a suitable supply voltage is
present. This is shown in Fig.5.
The relay coil is connected in parallel with the Driver’s supply at CON1.
Be sure to check the polarity in case
the relay is the type that has an integral
diode. The normally-open contact is
connected between CON2’s ‘+’ terminal and the charged battery’s positive.
siliconchip.com.au
For the terminal numbers shown on
typical automotive relays, the 85 pin
should connect to the Driver’s ground
and the 86 pin to the CON1’s + terminal. The common 30 pin should connect to CON2’s + terminal, with the
87 pin going to the charged battery
positive.
The disadvantage of the relay
approach is that the power consumed
by its coil will reduce overall efficiency, but possibly not as much as
the schottky diode approach, depending on the coil power. Automotive
relays typically have a coil power
on the order of 2W, so the relay is a
more attractive option at higher current levels.
The diode approach is probably
more efficient for lower currents, but
remember that its forward voltage will
make setting the correct charge voltage harder.
Fig.4: a high-current schottky diode should be added to
prevent the battery from being drained by the parasitic load
of the Driver when the input supply is cut off. This is not necessary if you will
always disconnect the battery after charging, though.
Charging stages
The bare Driver module is essentially stateless; what it does is based
only on the prevailing conditions.
Because it has voltage and current limits, it can provide float or bulk/absorption charging, but it will charge continuously as long as it has power. So
unless you only want float charging,
some thought is required to ensure it
will not damage the battery.
You can bulk charge a battery using
the Driver by setting its output to the
appropriate bulk charge voltage (eg,
around 14-14.4V for a 12V lead-acid
battery). But you need to limit the
charging time somehow, as batteries
can be damaged by charging at this
voltage for extended periods. Check
your battery’s manufacturer data for
its limits.
Because we think the Driver will be
handy for charging batteries, we have
developed a low-cost add-on board
described starting on page 60 of this
issue. This board’s primary job is to
reduce the Driver’s output voltage
after the bulk and absorption charging
phases have finished so that it switches
to float charging for the remainder of
the time it is powered.
It does this by monitoring the output current and voltages. It determines
that the bulk charging stage has ended
once the voltage has stopped rising and
the charge current starts to drop off.
The absorption phase ends (and float
charging begins) once the charge current has reduced to about 10% of the
siliconchip.com.au
Fig.5: a relay can disconnect the battery when the input power is off instead of a
schottky diode. This is more efficient at higher charging currents, although it is
more costly and involves extra wiring. It also limits the input voltage range.
current at the end of the bulk stage.
It also includes a timer to terminate
absorption if it takes too long. As it
can draw a little power from the battery, this timer is not reset if the input
power is briefly lost (eg, if the vehicle
engine/alternator is switched off, then
restarted).
This add-on board only has a couple
dozen components, fits right on top of
the Driver and provides a convenient
charge display, plus some extra adjustments. We strongly recommend using
it if you want to use the Driver for
unattended fast battery charging. See
that article for more details on how it
works, how to build it and the adjustments and indications it provides.
Charging setup
If you’re using the add-on board
mentioned above, see that article for
instructions on setting it up as a charger. Otherwise, the rest of this section
applies.
To set up the Driver for battery
charging, set the voltage to the required
charge voltage of the battery; around
13-13.8V is typical for float charging
a standard lead-acid type battery, or
14-14.6V for bulk charging.
The current limit you choose may
depend on your battery (especially
for a smaller type), power source and
Australia's electronics magazine
wiring. In any case, remember that
the actual current delivered may vary
slightly, especially if the battery is flat
and the Driver is providing a much
lower than nominal voltage.
Allow 10% to 20% extra current
when charging a flat battery. One way
to handle this is to set the current
while the battery is close to flat.
Also remember to change fuse F2
to have a trip current just above this
setpoint. The next nominal value just
above the maximum charging rate
(when flat) is a good starting point.
This will help avoid runaway conditions if the battery is excessively discharged. Remember to add a diode or
relay as described earlier if you don’t
want the battery to self-discharge back
through the Driver.
Efficiency
The Driver itself is a source of some
inefficiency. The data sheet for the
LM5118 (IC1 in Fig.1) has a graph
that shows efficiencies between 80%
and 95%, varying with input current
and voltage.
With a 12V supply and 14V output
setpoint, we measured a no-load supply current of about 35mA. At 1.8A,
this amounts to about 2% of the supply power being dissipated, limiting
maximum efficiency to 98%.
October 2022 57
Aside from this quiescent current,
the main offenders regarding losses are
the diodes and inductors; in practice,
these are the components that heat
up the most during operation. We ran
some simple load tests to determine
the overall efficiency for some likely
configurations.
The first test used a 12V input and
12V output, followed by a 24V input
and 12V output and a 12V input
feeding a 24V output. The results are
shown in Fig.6. These cover the most
common operating regimes of the
Driver: with the input and output voltages similar (hybrid mode), with the
input much higher than output (buck
mode) and the input lower than output (boost mode).
What isn’t obvious from the graphs
is that the quiescent current is lower
for higher input voltages and higher
for higher output voltages. The highest we saw was 47mA at 12V for a 24V
output (564mW), compared to 34mA
at 12V for 12V output (408mW) and
12mA with a 24V input for a 12V output (288mW).
As is typical, the Driver is more
efficient when reducing the voltage.
Unsurprisingly, the hybrid mode that
occurs when the input and output
voltages are similar has an efficiency
between that of the buck and boost
modes.
Our measurements show that the
efficiency ranges quoted in the data
sheet are correct, at least for meaningful current outputs. The buck mode
doesn’t suffer from the drop in efficiency at higher currents of the other
modes, so having a higher input voltage is beneficial.
Solar power
You might think that the Driver’s wide input range would be well
We used a laptop power supply like this Jaycar
MP3346 for our tests. The Driver adds a
fully adjustable voltage output with
current limiting. The Driver
can also run from power
sources like batteries
and car accessory
sockets, to
name a few.
suited to taking power from a solar
panel. For example, a nominally 12V
solar panel can vary up to 22V under
no-load conditions and will typically
have its maximum power point (MPP)
at around 17V. It might even deliver
less than 12V under low-light or heavy
load conditions.
We did a few brief tests to test
this theory using a 40W solar panel
charging a 12V battery with a 1.8A
current limit. The basic outcome is
that it will work, but it is probably
not the best way to do it. It certainly
won’t work as well as a good MPPT
solar charge regulator.
All solar panels vary their output
voltage depending on load, and the
first thing we found was that the Driver
would rapidly oscillate as it would
switch on and draw current, causing
the solar panel voltage to drop. This
triggered the UVLO (under-
voltage
lockout), decreasing the load and
causing the solar panel voltage to rise,
repeating the cycle.
Overcoming this was straightforward; we simply connected a 1000μF
electrolytic capacitor across the input
at the Driver’s CON1. If doing this,
Fig.6: efficiency plots for three
different common voltage
conversion scenarios. The
Driver is most efficient when
the output voltage is below the
input voltage and least efficient
when the output voltage is
higher. However, it’s above 80%
efficient in virtually all cases.
ensure that such a capacitor is rated
to handle the open-circuit solar panel
voltage, which might be near double
nominal voltage.
We also tried a 4700μF capacitor.
It worked well too, and larger values
should also.
But this is not the main limitation.
Since the Driver primarily strives to
deliver the target voltage, it does not
fare well under lower light conditions.
Any time the outgoing power demand
exceeds the available incoming power
(minus losses), the input voltage sags,
the UVLO activates and no power is
delivered to the battery.
This is in contrast to a purposely-
designed solar charge regulator, which
modulates its output to provide at
least some current based on the power
available.
In practice, using the Driver this
way worked well in full sunlight, but
as soon as some cloud cover appeared,
the output current dropped to nothing, with brief bursts of activity as the
capacitor charged up.
Low-light conditions (such as first
thing in the morning) will typically be
when the demand for charging current
is the highest, so there is a definite mismatch in needs against capabilities.
On the other hand, if you want to
use the Driver to directly power equipment from a solar panel, this behaviour
is probably preferred. The device will
operate at its rated voltage and current,
or not at all.
Charging a battery from a solar panel
Fig.7: the pinout
for a Type-A USB
socket.
58
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
via the Driver will definitely need a
diode between CON2 and the battery
(as described earlier), as a solar panel
will spend most of its time (overnight,
at least) not providing any charge at all.
A relay will not work in this situation as there will be long periods when
the solar voltage will be high enough
to trigger (or at least hold in) the relay
while not having enough power to
allow charging.
So, in brief, the Driver can work as
a solar charge regulator in a pinch, but
it won’t be very good at it. That is not
surprising, as it wasn’t designed with
that in mind.
As a USB 5V power source
While not envisaged in the original
design, the Driver could deliver a regulated 5V for powering USB devices
with a minor change. The default
divider chain gives a nominal output
voltage range of 7V to 34V. To achieve
lower output voltages, the 1kW resistor
at the top of the divider chain (in green
at lower right in the schematic, Fig.1,
and in Figs.2, 4 & 5) can be replaced
with a 0W jumper.
We have not tested this configuration, but expect it will be a stable modification as it does not unduly change
the impedance seen by the FB pin.
Also note that this will reduce the maximum output voltage to around 29V.
You would then need to wire up
the Driver’s output to one or more
USB sockets (probably several if you
intend to pull multiple amps). The
pinout of a Type-A socket is shown in
Fig.7; the D+ and D- pins can be left
disconnected. Test it with something
you don’t care about first (such as an
old USB drive), as reversed polarity
could easily damage a device.
Final notes
In the original Driver article, we
mentioned that it makes sense to
change the UVLO divider if you are
using a 24V battery to the values mentioned. This is to shut off the Driver if
the battery gets too flat.
If you want another threshold, keep
the lower resistor around 10kW and
modify the upper resistor to put 1.23V
at the divider at the threshold voltage.
Also remember that JP1 is available to
control the Driver too.
So far, we haven’t had any of our
prototypes fail, so we’re happy that
it’s a robust design. But the oscillating behaviour we have seen when the
siliconchip.com.au
Modifying the Arduino Programmable Load to monitor external loads
The Arduino Programmable Load project from June was invaluable in developing and
testing the Driver. We also used it extensively to collect the data presented in this article.
But you might note that we were testing with currents and voltages much higher
than a single Arduino Load can handle. The higher-voltage tests (up to 24V) were made
possible by connecting a 70W LED panel in series between the Driver’s output and the
Load’s input, to drop around 12V at up to 6A safely.
We found that this worked well, with both the LED panels and Arduino Load operating
within their respective limits. But handling higher currents was a bit trickier.
We made a very simple modification to the Arduino Load that allowed us to connect further loads downstream of the 47W resistors built into the Arduino Load. This
change allows the current sunk by the external load to be measured and reported by
the Arduino Load. Some of our tests used the LED panels, but we also used a second
Load downstream of the first.
This allowed us to test the Driver at much higher currents than the Arduino Load could
otherwise handle. Of course, we made sure the wiring used could handle the necessary
currents. A downstream load can simply connect between the VPS and GND rails, meaning that current from a power source connected to CON1 flows through the 15mW shunt
and through the secondary load via the VPS rail to GND.
Since it passes through the shunt, any
current it sinks is also measured by the
Load. To do this, we simply soldered a set
of screw terminals to the PCB using component lead off-cuts. Refer to our photos
and diagram to see the change. Note the
terminal polarity; the negative terminals
are the two that are closest together.
Keep in mind that the Arduino Load
still has a 6.67A measuring limit, and the
screw terminals themselves should not
carry more than 10A.
This modification also means that the
Arduino Load can be used as a load monitor if none of the 47W loads are active.
The output of the serial terminal will sim- By adding another two-way
terminal to the Arduino Load, as
ply be the prevailing current due to any shown here, you can connect two
downstream loads and the voltage level in parallel to handle double the
as measured at CON1.
current. It’s also possible to connect
We have also revised the Arduino Load a high-power LED array in series
PCB with provision for this extra terminal, with the load to increase its voltagehandling capability.
available in our Online Shop.
supply voltage is near the UVLO voltage might not be good for connected
devices.
So if your setup does have the possibility of operating near the UVLO
voltage, make sure that the supply wiring has low resistance and check that
connected devices will be unaffected
by UVLO dropouts.
Conclusion
The Driver’s wide input range
allows it to be a versatile battery charger, especially if you build the Charge
Controller add-on board described on
the next page of this issue.
It is not the best choice as a solar
charge controller, but it might come
in handy if a regulator is needed to
Australia's electronics magazine
power some equipment directly from
a solar panel.
It’s particularly suited to working
and converting between different voltages and is most efficient when stepping the voltage down. However, it can
seamlessly work with widely varying
input voltages.
As the Driver is more efficient when
the input voltage is higher than the output, common laptop power supplies
that deliver 19V are a good choice for
powering a 12V system via the Driver.
If you want to power the Driver from
a vehicle supply, see the DC Filter article in the November 2022 issue, which
will protect the Driver from the damaging voltage spikes that are common
in automotive supplies.
SC
October 2022 59
|