Hi! what's up guys here is Sapin from
SapinTech and today I am gonna present
the power section part from the design
of the infrared automatic night lamp.
Automatic night lamp is an electronic project for educational purposes
conducted by SapinTech. For more
information, please check it out
at www.sapintech.com.
Here is the pcb board on my desk that
I'm gonna measure with the multimeter
and the oscilloscope
but before that let's take a closer look
to see what we
have on the board. As you can see I have
mounted and soldered
just the power section without the rest
of the circuit.
Here I have the battery holder soldered
directly on the pcb.
It is very nice, very firm and it has a
protection mechanism:
a small gap here in case that the
batteries are put
in the wrong way.
In that case, thanks to the gap the metal
lead of the battery holder does not
touch
the battery's terminal and therefore the
circuit is isolated from the batteries.
Then I have the on/off switch just
right here,
viewed from front and back side.
Here is a low leakage n-MOSFET
transistor for reverse voltage
protection.
It adds another protection to the
circuit in addition to the one provided
by the battery holder.
This one is the PPTC (polymeric positive temperature coefficient) resettable fuse for
short circuit protection.
Here are two bypass capacitor, one of
100 nano and the other one of one
microfarad.
On the right i have a 10 microfarad
Tantalum capacitor
that filters the very low frequency
noise and also
acts like a reservoir capacitor.
These two wires are to facilitate the
measurement: the
red one is for vcc and the black one is
for the ground.
And that is the power section of the
automatic night lamp, now let's see how
it works.
To understand how the power section
works, we have take a look
at the circuit diagram. As you can see on
the screen,
most of the power section are grouped
into the microcontroller circuit part.
The desired goal of the power section is
to get a clean,
safe and reliable voltage v-bat or vcc
if you prefer that term,
in order to power other parts of the
circuit
like the MCU, the leds
etc. The two AA batteries are in series
with the switch S1 at the high side.
At the low side the negative terminal is
connected to the ground
via an n-mosfet transistor.
Next to the switch we have the pptc
resettable fuse f1 and we get the
voltage
V_BAT (VCC) after the fuse. C1 and C2
are two decoupling capacitors as mentioned
before.
Note that on the schematic diagram,
actually
the reservoir capacitor c23 is
grouped into the leds control part
but its impact is huge to the power
section
so it is worthy to mention it here.
One more thing to pay attention is that
the gnd node
in the circuit diagram is not connected
to the true earth ground
and in fact it is floating as the whole
circuit
including the batteries. The normal
operation is as
following. Due to the emf of the
batteries
there is a voltage, let's say 3 volts
developed between P2 and N1
when switch s1 is closed the voltage is
developed
through s1 and reaches the fuse f1.
At the same time since the gate of the
n-mosfet
is connected to the power line the
positive voltage three volts
makes the n-mosfet conducting and that
makes a return path for the current
from gnd
to the negative terminal n1.
Now the three volts from the batteries
will become three volts between V_BAT
and gnd that is going to power the
rest of the circuit
for example charging c1 c2
and mostly the reservoir power capacitor c23.
Now let's see how that circuit provides
reverse voltage protection.
If in any case the batteries are put in
the wrong way,
this time we have minus three volts
between
p2 and n1 when s1 is closed
this time the negative voltage on the
gate
of the n-mosfet does not open the
drain-to-source channel:
the n-mosfet does not conduct and
there's no current return path
from gnd to the terminal n1.
The gnd node is isolated from the
battery's
terminal and thirst becomes floating.
Since there is no current there is no
power even though the voltage between V_BAT (VCC)
and GND may be different than zero.
And finally let's see how the short-
circuit protection works.
When short-circuit occurs the high
current will heat up
the pptc resettable fuse and
making it trip to high resistance state
that in turn will limit the current to a
smaller level.
Using a fixed limiting resistor is
simpler and cheaper
but the pptc is a little bit more
elegant
at least than from the design point of
view since its resistor is negligible
at normal condition
when there's no heat. And that's how the
power section works
now we'll dive into some measurement.
So I have zero volt when the switch is
off
now i turn it on
i should have a 3.2 volt from 2 AA
batteries
yeah a little bit more than 3.2 volts. It is
good
the switch is working. Now I turn it off
and check it again: actually the voltage
is decreasing.
Well, I guess it is because the capacitor
is
discharging slowly which we can see
here one more time.
In electronics the physics manifests
much more in the time domain
and the measured value is a function of
time. With an
oscilloscope we can see how the signal
evolves in time
and by analyzing it we can understand
better the
physical phenomenon and therefore the
behavior of the circuit.
So here we will re-measure the voltage
again but this time
with the oscilloscope. For that first
we have to get the right setup for the
instrument.
All right I am with the oscilloscope on
channel one.
In order to measure the transient
voltage when the switch is turned on
and off
the trigger setup is the first thing to
do and it is kind of important.
The trigger source is chosen to be the
channel 1 too,
meaning the signal we want to measure is
also the trigger signal.
How it works? well, when i turn the switch
on
the voltage switches from zero to three
point two volts
almost instantly so i will take that
voltage
rising edge as the trigger signal
and when i turn the switch off the
capacitor discharges
slowly and that is what i'm going to
measure. Simple,
right? DC coupling is a good choice in
this case
because we want to measure the transient
voltage generated by batteries.
Getting the right timing is important
because the signal to be measured is
quite slow.
So if i turn the switch on wait for a
second and turn it off
the whole thing will take several
seconds which is very long compared
to the typical setting in milliseconds
of the
oscilloscope. So here I change the time
scale to second
and as you can see the acquisition
becomes slower so
be patient with this measurement.
Next we are gonna move the waveform
position to the left
so that we can see the whole long
discharging curve.
The last thing to set up is the trigger
mode. In our case the signal is not
periodic.
The whole thing just happens once i turn
the switch
on and then off and that's it. So the
trigger mode should be single.
So I'm on a single mode now i'm ready I
turn it on
I wait one second and I turn it off
and now it becomes triggered as you can
see here it becomes triggered
and i just wait for the slow acquisition
to finish
to have the signal here it is here
is our signal. And because i'm on a
single mode
now the the measurement
is stopped so i can analyze the result
and save
the result. Let's analyze the discharging
curve
that we've measured with the
oscilloscope.
As expected the voltage goes high almost
instantly
from 0 to 3.2 volts after the
switch is turned on.
When the switch is off the voltage
decreases exponentially with a decay
time constant of about 11.5 seconds.
Thanks to the oscilloscope we got a
precise measurement in time domain.
There are a lot of benefits from
such characterization
for example we can determine the
equivalent resistance
that relates to the discharging
process.
The capacitor discharges through some
loss mechanism
and in a low power IoT product
like this it is very important to
characterize these parasitic losses and
compare them
to the true useful load.
That way we can make sure that the power
from batteries
is used efficiently and we do not waste
the power for some useless parasitic
losses.
Knowing the capacitor values from the
measured discharging time constant
11.5 seconds one can deduce
the equivalent resistance, in this case
one mega ohms. Note that
in this measurement i've used a probe
of one mega ohm impedance
now i change the probe to 10 mega ohm
impedance
and i got another discharging time
constant
112 seconds.
The equivalent resistance in that case
is
10 mega ohms. From those two measurements,
we conclude that the capacitors
discharge
mainly through the probe and parasitic
losses in the circuits
like the loss in capacitor the loss in
n-mosfet
etc is negligible because
their parallel equivalent resistance
would be more than
10 mega ohms.
As mentioned before the battery holder
has a gap that provides
a protection in case the a batteries are
put in the wrong direction.
From the design point of view i think
it is sufficient
and it can get the job done nicely
however here
just for the illustration purposes
i still want to show you how the n-mosfet
reverse voltage protection
works because not every battery holder
has
that nice protection feature. So here
as you can see i put the batteries in
the wrong direction
and insert copper tape in the gap so
that we can
have a reverse voltage of minus 3.2
volts.
So now i'm gonna measure the voltage on
the circuit with two AA batteries installed
in the reverse direction.
First at the batteries terminals i have
a minus 3.19 volts
on the circuit diagram this voltage is
also the voltage between gate and
drain.
So that is the input voltage imposed by
the batteries.
Now by using the n-mosfet we have the
protected output voltage
between the v-bat and the gnd nodes
and the voltage is measured at only
minus 0.02 volt.
I will check one more time here is a
ground and here is a vcc or V_BAT.
Okay almost the same thing roundly minus
0.02 volt. And
that's it: that is a reverse voltage
protection by the n-mosfet.
It protects the circuit at the output
voltage in case
the input voltage is in reverse
direction by error.
In the designing phrase i use the pptc
resettable fuse
for short circuit protection. The one
that i've chosen has a promising
specs: the initial resistance is only
less than than an ohm
for a hold current of 100 milliampere
and a trip current at 300 milliampere.
However its resistance in real life is a
different story :-)
Here is pptc before soldering.
Its resistance is measured at 2.5 ohm:
a little bit different than the data
sheet but
still not a big deal. When soldered on
the pcb
the resistance gets higher though
roughly
10 ohms for careful and fast soldering.
This one has been soldered and de-soldered
and resistance is even more, about 14
ohms.
Let's see how this pptc functions in the
circuit.
In order to measure the current, the
multimeter must be set
in the current measuring mode. Here is
equivalent
circuit of the whole setup. As you can
see the multimeter is in series
with the signal V_BAT and is
terminated by the ground.
The internal resistance of the
multimeter in this mode is nearly zero
thus when the switch s1 is closed
it is like we connect the signal V_BAT directly to the ground
and have a short circuit. You can notice
that
I have inserted a 10 ohm resistor in
series
because actually i did the measurement
without it once
and the n-mosfet has failed so here i
put the 10 ohm resistor to limit the
current
at some safer level. This 10 ohm resistor
adds to the about 12 ohms pptc
resistance to make the total
resistance of roughly 22 ohms and with
3.2 volts batteries i should have about 145
milliampere.
This current is smaller than the rating
current
of the atmosphere 170 mA
but it is higher than the maximum
current
that the pptc can hold.
So in this design we want to test if at
145 milliampere the pptc
changes its resistance to higher value
to protect the circuit.
Alright now i am measuring the current
when i turn the switch on
okay 143 milliampere and it is
decreasing but very slowly.
It has been several seconds now and i am
at 140
milliampere. The pptc does not trip
rapidly
to high resistance state but rather
increases very slowly its
resistance and that cannot protect
the components in case of short circuit.
In fact, as i've said before without
the
additional current limiting 10 ohm
resistor
i had a current of 260 milliampere and
that current
did damage the n-mosfet transistor.
At this point after the experiment I
conclude that the pptc looks interesting
on the paper but in practice
it is not a good choice for low power
low current project.
First its real resistance on the (PCB) board
is about 10
to 14 ohms after the soldering.
Second, at 140 milliampere or even
at 260 mA it does not trip
rapidly to high impedance state to protect the components.
Of course,
you can argue that
why not choose the pptc that has lower
trip current,
say, 150 mA? Well
the problem with the pptc with lower
trip current is that
its initial resistance is quite high
already
in the range of 20 to 40 ohms
so it loses all advantages compared to a
fixed resistor.
With this experimental results a fixed
resistor
of 30 ohm is a simpler and cheaper
solution
for short circuit protection. It limits
the current
to about 100 milliampere for 3.2 volt
batteries,
a sufficiently safe level to not damage
the circuit as the measurement has shown.
That's it guys! That is the power section
from the automatic night lamp.
We have started with a pcb board see how
it looks like
then we analyze the circuit diagram, see
how it works.
Finally we did several measurements with
the multimeter and oscilloscope
to validate the design. I hope that you
enjoy it :-)
Explaining electronic product and by a
video is not easy
since there are lots of details to
present
and to discuss. I've tried my best to
make it concise and useful
at the same time but 20 minutes is not a
short entertaining video!
Thank you for your patience and see you
next time
