This is only a preview of the December 2021 issue of Silicon Chip. You can view 0 of the 112 pages in the full issue. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Hummingbird Audio Amplifier":
Items relevant to "SMD Trainer Board":
Articles in this series:
Items relevant to "Digital Lighting Controller Translator":
Items relevant to "Orrery (planetarium) using a Micromite LCD BackPack":
Items relevant to "Non-contact cloud-based temperature sensor with speech":
Items relevant to "USB Cable Tester – Part 2":
Purchase a printed copy of this issue for $11.50. |
Switching cells between parallel and series
Many Li-ion/LiPo charging modules
are designed to handle either a single cell or multiple cells in parallel.
That’s because they often run off 5V
(eg, from a USB port or charger), and
that’s ideal for linear charging of a single cell which ranges from about 3.3V
when flat to 4.2V when fully charged.
In many cases, you need two or
three cells in series to get a high
enough voltage to power a device.
While it’s possible to generate higher
voltages for charging multiple cells in
series from 5V, that requires a more
complex switch-mode boost converter, and they can generate EMI.
When charging cells in series, you
also need to consider how to keep
their voltages balanced (equal).
This circuit shows a much simpler solution. A single DPDT or 4PDT
switch can be used to switch two or
three cells between series and parallel connections, for powering a circuit and charging, respectively. When
connected in parallel for charging, the
cells are automatically balanced.
To avoid the need to manually
switch between charging mode and
usage mode, a DPDT or 4PDT relay
can be substituted for the switch, with
the coil powered from the charging
socket. A diode or similar can be used
to ensure the coil cannot be energised
by voltage back-fed from the battery.
This way, the cells are automatically
switched between the two modes. Use
the relay’s NC contacts for the parallel connections (marked P) and NO
contacts for the series connections
(marked S).
Benabadji Mohammed Salim,
Oran, Algeria ($80)
Editor’s note: while this should work
in theory, we do not recommend this
approach. That’s because any voltage
imbalance which builds up in the cells
as they discharge (due to differing cell
capacities etc) will cause very high
currents to flow as soon as the cells
are switched into the parallel configuration.
These currents could easily destroy
or weld the switch/relay contacts. If
you decide to use this configuration,
we strongly recommend inserting
PTC thermistors (or similar currentlimiting devices) into the connections
between cells in the parallel configuration, switched out when the cells
are connected in series. These can be
connected inline where the red asterisks are shown.
While adding such PTC thermistors will affect the rate at which the
different cells charge, they should not
affect the end-of-charge detection very
much, so all cells should still charge
fully (given enough time). The PTC
thermistors should be chosen to have
a ‘hold’ current rating that’s somewhat
above the maximum charge current
and a ‘trip’ current below the switch/
relay current rating for DC.
Connecting two pushbuttons to an input-only pin
Some PICs have a pin that can only
be used as an input, eg, GP3/RA3 on
the PIC10F200. In many cases, this is
because that pin has other functions
like MCLR. Sometimes you need to
connect more devices to a micro than
it has pins; many common techniques
for making a pin dual-purpose require
it to be switchable between being a
digital input and output, which is not
the case here.
Other tricks use an internal ADC
(analog-to-digital) converter with several external resistors connected as a
divider to measure a different voltage
generated by each pushbutton being
pressed. For more on these techniques,
see Microchip application note AN234
and Tips ‘n Tricks DS40040C.
This simple circuit shows how the
input-only GP3/RA3 can be used to
80
Silicon Chip
sense two different pushbuttons being
pressed, despite not being able to act as
an output or an analog input. This relies
on the pin having a selectable internal
pull-up current, as is the case in both
this chip and most of Microchip’s midrange family (the new XLP generation).
According to their datasheets, the
internal pull-up resistor has a typical
value of about 23kW when Vdd = 5V.
As GP3 is a TTL type input, we must
choose a value for the external resistor so that when the internal pull-up
is enabled, we have more than 2.4V as
the idle voltage at GP3, giving an idle
high-level state.
This allows us to sense when S1 is
pressed, as the pin will idle high but
will go low when S1 is pressed. To
sense a press of S2, the internal pull-up
is periodically disabled. When we
Australia’s electronics magazine
disable the pull-up, the input will be
pulled low by the 27-47kW resistor if
S2 is not pressed or will be held high
if it is pressed.
The 1kW resistor avoids a short circuit between Vdd and Vss if both buttons are pressed simultaneously.
Amine Houari,
Oran, Algeria. ($70)
siliconchip.com.au
|