Figure.5. The Audible Alarm Circuit
The buzzer requires about 40 mA of current to activate. The current gain of the transistor is about 100. The value of the bas e current
limiting resistor can be calculated as follows:
Collector current = IC = 40 mA
The base current I
B
of the transistor TR2 can be calculated using the equation:
IC
= h
FE I
B
I
B
= I
C
/ hFE
I
B = 40 mA / 100 = 0.4 mA
The voltage drop across R9 can be calculated as follows:
V(R9) = 5 V - VBE
V(R9) = 5 V – 0.7 V = 4.3 V
The resistance of R9 can be calculated as follows:
R9 = V(R9) / IB
= 4.3 V / 4 mA ≈ 10kΩ
The current I
C
is enough to drive the buzzer. Therefore the current is passing from the + 5 V supply to the ground through the buzzer
and collector and emitter junction of the transistor TR2. Thus the audible alarm is activated when the battery is fully charg ed.
The flow chart of the charge controller is shown in Fig. 4.9. At the start of the program, the I/O port directions of the microcontr oller
are set. The full charge voltage of the battery is assigned and stored in the memory of the microcontroller as V
bf.