You are on page 1of 62

TECHNICAL UNIVERSITY OF MOMBASA

SCHOOL OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF ELECTRICAL AND ELECTTONIC ENGINEERING

BACHELOR OF TECHNOLOGY IN ELECTRICAL AND ELECTRONIC ENGINEERING

YEAR 4 SEMESTER 2

TEE 4405

60% Project presentation submitted in partial fulfilment requirements for the degree in Bachelor of
Technology in Electrical and Electronic Engineering

ACOUSTICS-BASED MICROPHONE BATTERY CHARGER (ABMBC)

BY

OLOO SAMUEL OTIENO

BTEE/071J/2017

MOBILE NO.: 0705604216

SUPERVISOR: MR. NABONGO STEPHEN

DATE PRESENTED: 13TH OCTOBER, 2021.


DECLARATION
I, Samuel Otieno Oloo, being of sound mind and body, affirm that this project proposal is my own work and has
not been submitted to any institution of higher learning or any other academic program for any reason whatsoever.
Furthermore, the views herein presented are my own and not of Technical University of Mombasa and where
knowledge was borrowed they have been acknowledged.

Signature:……………… Date:…………………..

Page | i
ABSTRACT
Noise pollution has since the industrial age remained an untamed menace, coupled with the widespread usage of
public address (PA) systems on almost every event for the purpose of addressing multitudes of people, is even
more pernicious to the environment. Entertainment and concert halls, churches and mosques, sporting events and
such like places are a current source of noise when in use. This noise is an enormous energy source whose potential
has not yet been realized. This also raises an alarm at a critical point when investment on renewable energy
sources is in its apex due to the rise in greenhouse emissions (Carbon (IV) Oxide) and the currently projected
extinction of the fossil fuels. It’s thus high time to capitalize on this clean, readily available, affordable and
sustainable, yet a nuisance energy source to suit our current and future needs, productively. This project will
harness this readily available energy source for use in charging microphone batteries present in these places. This
will equally reduce the burden of over-reliance on the costly electrical sources from the outlet supply companies
it being affordable. Thus, it will manage two birds with a single stone! To this end, sufficient literature review
has been conducted on the Acoustics-based microphone battery charger, from which the circuit block diagram
was adopted. The possible methodologies of realizing the project goal have equally been evaluated which then
enabled the various circuit designs to be constructed. The overall circuit has finally been designed and simulated,
and the hardware components are equally at hand. The successful simulation is beacon light of hope towards the
project full construction and actualization.

Page | ii
DEDICATION
To my family, hope you will find it relevant someday. Also to any student in the field of electrical engineering
who will find it useful in future research.

Page | iii
ACKNOWLEDGEMENT
I recognize the following without which this project would not have been possible:

1. The Almighty God for the knowledge, wisdom and hope in its actualization.
2. My parents Domnick and Grace Oloo, and big brother Collins Oloo for the motivation and consistency
and promise in the financial prop in the course of this research and actualization.
3. My supervisor, Mr. Nabongo Stephen, for the consistent professional advice and corrections on how to
present this information excellently.
4. Eng. Patrice Awelo’s solicit and counsel for the success of it.
God bless you all.

Page | iv
TABLE OF CONTENTS
DECLARATION ..................................................................................................................................................................... i
ABSTRACT ............................................................................................................................................................................ ii
DEDICATION ....................................................................................................................................................................... iii
ACKNOWLEDGEMENT ..................................................................................................................................................... iv
LIST OF FIGURES .............................................................................................................................................................. vii
LIST OF TABLES ............................................................................................................................................................... viii
GLOSSARY .......................................................................................................................................................................... ix
CHAPTER ONE ..................................................................................................................................................................... 1
1.1 Introduction ............................................................................................................................................................. 1
1.2 Problem statement ................................................................................................................................................... 2
1.3 Objectives ............................................................................................................................................................... 2
1.3.1 Overall objective ............................................................................................................................................. 2
1.3.2 Specific objectives .......................................................................................................................................... 2
1.4 Project scope ........................................................................................................................................................... 2
1.4.1 Assumptions .................................................................................................................................................... 2
1.4.2 Limitations ...................................................................................................................................................... 2
1.5 Justification of the project ....................................................................................................................................... 3
CHAPTER TWO .................................................................................................................................................................... 4
2 Introduction ..................................................................................................................................................................... 4
2.1 Literature Review.................................................................................................................................................... 4
2.1.1 Existing sound conversion systems ................................................................................................................. 4
2.1.2 Sound harvesting sensors ................................................................................................................................ 8
2.1.3 Signal processing systems ............................................................................................................................. 12
2.1.4 Battery charging systems .............................................................................................................................. 18
2.1.5 Voltage sensing systems ............................................................................................................................... 21
2.1.6 Microcontrollers ............................................................................................................................................ 23
2.1.7 Display Units................................................................................................................................................. 26
2.1.8 Simulation Software ...................................................................................................................................... 28
2.2 Summary ............................................................................................................................................................... 29
CHAPTER THREE .............................................................................................................................................................. 31
3 METHODOLOGY........................................................................................................................................................ 31
3.0 Introduction ................................................................................................................................................................. 31
3.1 Design ................................................................................................................................................................... 31
3.1.1 Introduction ................................................................................................................................................... 31
3.1.2 Circuit Design Functions .............................................................................................................................. 31
3.1.3 Circuit block diagram.................................................................................................................................... 31

Page | v
3.1.4 Sound harvesting circuit................................................................................................................................ 31
3.1.5 Signal processing circuits.............................................................................................................................. 32
3.1.6 Battery charging and monitoring system ...................................................................................................... 34
3.1.7 Voltage sensing circuit .................................................................................................................................. 35
3.1.8 Microcontroller ............................................................................................................................................. 36
3.1.9 Display Unit .................................................................................................................................................. 37
3.2 Construction .......................................................................................................................................................... 38
3.2.1 Results ........................................................................................................................................................... 38
3.3 Project costing ....................................................................................................................................................... 39
3.4 Project time managemement ................................................................................................................................. 40
4 CHALLENGES, CONCLUSION AND RECOMMENDATIONS .............................................................................. 41
4.1 Challenges ............................................................................................................................................................. 41
4.2 Recommendations ................................................................................................................................................. 41
4.3 Conclusion ............................................................................................................................................................ 41
5 REFERENCES ............................................................................................................................................................. 42
6 APPENDIX ................................................................................................................................................................... 44
6.1 LM386 Amplifier .................................................................................................................................................. 44
6.2 Atmega 328p datasheet ......................................................................................................................................... 44
6.3 Project Code .......................................................................................................................................................... 46

Page | vi
LIST OF FIGURES
Figure 2. 1 Block diagram of piezoelectric sound conversion method ................................................................................... 4
Figure 2. 2 Piezoelectric harvesting circuit in multisim ......................................................................................................... 5
Figure 2. 3 PZT 5A bimorph cantilever harvesting ................................................................................................................ 6
Figure 2. 4 General microphone operating principle .............................................................................................................. 6
Figure 2. 5 Block diagram of the sound chargeable power bank ............................................................................................ 6
Figure 2. 6 Block diagram of the sound conversion process .................................................................................................. 7
Figure 2. 7 Sound energy conversion block diagram .............................................................................................................. 8
Figure 2. 8 Operation of piezoelectric materials ..................................................................................................................... 9
Figure 2. 9 Operation of a dynamic microphone .................................................................................................................. 11
Figure 2. 10 Electret Condenser microphone operation........................................................................................................ 12
Figure 2. 11 Common electret condenser microphone module mounting ............................................................................ 12
Figure 2. 12 Op-amp symbol and equivalent circuit ............................................................................................................. 13
Figure 2. 13 LM741 Op-amp IC and pin-outs ...................................................................................................................... 14
Figure 2. 14 Inverting Op-amp circuit .................................................................................................................................. 14
Figure 2. 15 Non-inverting op-amp circuit ........................................................................................................................... 15
Figure 2. 16 Bridge rectifier circuit ...................................................................................................................................... 16
Figure 2. 17 Positive and negative half cycles of the bride rectifier ..................................................................................... 17
Figure 2. 18 Full wave rectifier operation and waveforms ................................................................................................... 17
Figure 2. 19 Simple 12V battery charger circuit ................................................................................................................... 19
Figure 2. 20 Smart Automatic Battery charger ..................................................................................................................... 20
Figure 2. 21 Voltage sensor types and circuitry .................................................................................................................... 21
Figure 2. 22 Voltage sensor circuit and module ................................................................................................................... 22
Figure 2. 23 Arduino Uno hardware ..................................................................................................................................... 24
Figure 2. 24 Atmega 328p chip............................................................................................................................................. 24
Figure 2. 25 Arduino Uno pin-outs ....................................................................................................................................... 25
Figure 2. 26 16 ×2 and 20 × 4 LCD displays ........................................................................................................................ 27
Figure 2. 27 LED Display array ............................................................................................................................................ 28

Figure 3. 1 Acoustics-based microphone battery charger Block diagram ............................................................................ 31


Figure 3. 2 Electret condenser microphone circuit operation ............................................................................................... 32
Figure 3. 3 Sound signal rectifier circuit and simulation ...................................................................................................... 33
Figure 3. 4 LM358 Signal amplifier Circuit ......................................................................................................................... 34
Figure 3. 5 Battery charging unit (auto cut-off) .................................................................................................................... 35
Figure 3. 6 Resistor voltage sensor circuit ............................................................................................................................ 36
Figure 3. 7 Arduino Uno description with Atmega 328p AVR microcontroller .................................................................. 37
Figure 3. 8 20×4 LCD –Arduino interface circuit................................................................................................................. 37
Figure 3. 9 Overall circuit diagram of the ABMBC under simulation ................................................................................. 38

Page | vii
LIST OF TABLES
Table 3. 1 Project Costing ..................................................................................................................................... 39
Table 3. 2 Project timeline .................................................................................................................................... 40

Page | viii
GLOSSARY
ABMBC – Acoustics-Based Microphone Battery charger

FET – Field Effect Transistor

MIC – Microphone

PA – Public Address system

dB – Decibel

SPL – Sound Pressure Level

ICSP – In Circuit Serial Programming

USB – Universal Serial Bus

SPI – Serial Peripheral Interface (synchronous serial communication interface specification for short distance
communication).

SDA – Serial Data Line

SCL – Serial Clock Line

USARTS – Universal Synchronous /Asynchronous Receiver/Transmitter

ROM – Read Only Memory

RAM – Random Access Memory

LCD –Liquid Crystal Display

PCB – Printed Circuit Board

NIMH - Nickel Metal Hydride battery

Page | ix
CHAPTER ONE
1.1 Introduction
Renewable energy sources thus far well renowned are water, wind, solar, thermal, geo-thermal, tidal and biomass.
Of little attention though is the potential of sound energy which is readily available in our environment, especially
in the form of noise. Basically, sound is a mechanical wave which is an oscillation of pressure transmitted through
some medium (e.g. air and water), composed of frequencies within the range of hearing. Noise is an undesirable
sound. This noise, by the first law of thermodynamics stating, “Energy can neither be created nor destroyed but
converted from one form to another,” makes it possible to convert this wasteful mechanical energy into its useful
electrical form and thus lessen its impact to the environment or otherwise, utilized.

Noise has contributed over the decades to environmental pollution especially in the cities where traffic is a
menace, from concert and entertainment halls, sporting arenas, mosques, churches among others, due to the use
of loud speakers and microphones. If though its production cannot be utterly curtailed, how best can it be
capitalized on so we gain the advantage of it? This thus is the endeavor of this paper, on how a device can be
devised to recycle this enormous energy (now going to waste) in platforms of entertainment, concert halls,
churches, sporting arenas, studios and basically any place making use of wireless microphones alongside
loudspeakers or public address (PA) system.

At present, the intensive literature review conducted has delivered sufficient information leading to fine
adjustments in the project, adoption of the suitable circuit designs, components considerations, the overall circuit
design and simulation and finally the relevant components acquisition. Progressively, the circuit hardware will
be assembled and the Acoustics-based microphone battery charger will be ripe for use in the alleviation of the
menace of noise pollution in churches, concert halls, crusade grounds etc. as they’ll be recycling their own sound
to charge the microphone batteries.

Page | 1
1.2 Problem statement
The enormous potential of sound energy in the entertainment and concert halls, religious crusades, sporting arenas
among others have thus far been bogged down and summed to nothing but noise. This has since caused
environmental pollution, a nuisance to comfort and danger to the health of others. This is because it has since
been rendered unproductive. There is therefore a need to harness this enormous energy now going to waste and
utilize it appropriately. Thus, though its production may not be utterly curtailed, it can be utilized in propriety.
This project if implemented, will fulfill this vision as these arena will be recycling the noise they produce for
deliberate use to recharge the drained microphone rechargeable batteries they use.

1.3 Objectives
1.3.1 Overall objective
To design, construct and test an acoustic-based microphone battery charger.

1.3.2 Specific objectives


In order to realize this project, below areas will have to be attended to in particular:

1. To undertake a literature review on acoustic energy and its advancement.


2. To design the acoustics-based microphone battery charger circuitry and architecture.
3. To construct the acoustics-based microphone battery charger.
4. To test the acoustics-based microphone battery charger at various sound levels.

1.4 Project scope


1.4.1 Assumptions
 The microphones in these arena use rechargeable batteries.
 The environment of application will be in operation throughout the entire period.
 The environment will make use of loudspeakers and/or loud musical instruments.

1.4.2 Limitations
1. This battery charger will only be useful in active crusade grounds, churches, concert halls and other
entertainment arena.
2. The circuit will charge utmost two microphone batteries at a time.

Page | 2
1.5 Justification of the project
The actualization of this project will be a big boon in and to the following:

1. Non-renewable energy sources such as coal and oil: sound is a natural and clean, promising and
sustainable energy source, with zero greenhouse emissions.
2. Pulpit ministers, crusade preachers, public speakers, DJs and Sports commentators: they’ll find it easier,
innovative and safer to charge their microphone batteries free of charge and at a rapid frequency, even in
areas without electricity penetration.

Page | 3
CHAPTER TWO

2 Introduction
This section reviews the recent researches on the potential of sound energy as tested in various platforms alongside
the various methodologies that have thus far been implemented successfully in the chart towards embracing sound
energy.

2.1 Literature Review


2.1.1 Existing sound conversion systems
A. Piezoelectric sound converters

(Chaithanya D J et al., 2021) developed a prototype in which a piezoelectric quartz material was directly
connected to a speaker (due to the small size and hence low sensitivity) to convert the mechanical strain into
electrical output voltage. The sensors were connected in series and springs paced in between them to create more
pressure. Due to the low level output voltage, the sensor outputs were connected to LM2596S DC to DC buck
power converter which uses various steps to boost the input signal, adjusted to the required level to charge the
battery. A rectifier was equally introduced into the system with alongside a filter. The battery used was a 12V
lead acid type due to low cost efficiency. The output was successfully tested on a 12V DC motor and later an
inverter was incorporated to convert the 12V to 220 A.C. voltage used to power a 9W LED lamp.
The system block diagram is as featured in the Figure 2.1

Figure 2. 1 Block diagram of piezoelectric sound conversion method


The effect of distance and frequency were investigated and observations were that maximum voltage generated
by the piezoelectric generator occurs when its resonant frequency is operating near the frequency of sound. Two
modes were established. The results showed that the maximum output voltage of 26.7 mVrms was obtained with
the sound intensity of 78.6 dB at resonant frequency of 62 Hz at 1 cm distance in the first mode. In the second
mode, the maximum output voltage of 91 mVrms was obtained with the sound intensity of 102.6 dB at resonant
frequency of 374 Hz at 1cm distance which is larger than first mode. However, for both modes, voltage decreases
as distance increases. Experimental set-up of piezoelectric energy harvesting.

Page | 4
(Rosman and Ahzan, 2019) in a study to investigate the sound vibration present in the environment, Aluminium
cantilever with a lead Zirconate Titanate (PZT-5A) piezoelectric generator and full-bridge rectifying circuit
(020117-2) was designed and built to extract sound energy from the roads. The device was used to transform
sound waves in the range from 85 dB to 140 dB to electricity. The design and determination of the piezoelectric
was conducted and simulated using COMSOL Multiphysics 5.3 software whilst simulation of the harvesting
circuit of the full-bridge rectifier was done using Multisim. The analysis from the result proved the capability of
using piezoelectric materials to extract sound energy from the road passing vehicles. Figure 2.2 shows the
piezoelectric harvesting circuit in Multisim.

Figure 2. 2 Piezoelectric harvesting circuit in multisim


Sound pressure value of 0.356 Pa and 200 Pa, equivalent to 85 dB and 140 dB acted as a source of stress in the
COMSOL Multiphysics replacing the input of sound load. For simulation in Multisim, maximum voltage obtained
from the COMSOL Multiphysics simulations were utilized and acted as AC input source to the circuit. The full
bridge rectifier coverts the AC voltage from the piezo transducer to DC voltage. The resistor acted as a smoother
while the capacitor stored electric charge resulting to an ideal output voltage generation. The exponential increase
in the simulated output voltage was due to the capacitor charging effect as it takes time to fully charge. The
capacitor played a significant role in increasing the exponential output voltage. Thus, choosing suitable capacitor
capacity is a key towards the realization of good piezoelectric energy harvester device.

(Hassan et al., 2014) conducted an experiment on sound energy harvesting in which piezoelectric material type
PZT 5A bimorph cantilever was used as the sound-to electrical energy converter. The cantilever was placed under
the speaker to harvest the sound energy. The function generator was used to generate the sound frequency and its
amplitude from the speaker. The vibration of the loudspeaker diaphragm applied sound pressure wave to the
piezoelectric cantilever. Sufficient energy generated caused the deformation of the piezoelectric cantilever
producing electricity. The output voltage signal was measured using an oscilloscope.

Page | 5
The schematic experimental set-up is as shown in Figure 2.3

Figure 2. 3 PZT 5A bimorph cantilever harvesting


B. Diaphragm sound conversion systems

These are devices used to convert acoustical into electrical energy using a diaphragm or a moving surface. The
diaphragm or moving surface is excited by the acoustical wave acting as the input and producing an electrical
output.

Figure 2. 4 General microphone operating principle


(Joseph L. et al. 2020) implemented a Sound chargeable power bank. The project endeavored a device that could
make use of noise and convert it to electricity. The circuit implemented consisted of a microphone as the sound
transducer, a rectifier for conversion of the alternating current from the microphone to direct current, a capacitor
for temporary storage of the generated voltage then to the battery. A USB cable was used to charge the external
batteries from the bank itself.

Generated Micropho Bridge USB Chargin


Capacitor Battery
noise ne rectifier port g device

Figure 2. 5 Block diagram of the sound chargeable power bank

The efficiency of the device charging of the power bank using noise proved effective. The rate of charging was
found to be faster in places with high levels of noise. A comparison was then made with the commercial power

Page | 6
banks and the noise pollution based power bank was deduced to be more effective and efficient. Despite the
efficiency in the performance, this device was never automated to include other features such as voltage
monitoring of the battery which places it in the cap of failure in the long run.

In a project to research and implement a solution to noise pollution, a loudspeaker was used as a transducer to
work in the reverse mode of converting sound wave into electrical energy, super-capacitor for temporary charge
storage and to give maximum current output continuously when fully charged. DC charging circuit consisting of
a rectifier circuit, power circuit, ripple monitoring, control circuit, regulator circuit, and fault detection circuit.
There are two charging modes: fast charging mode for new or unused batteries and float charging mode for
compensation of the lost charge by the battery in service. Battery for charge storage and conversion of chemical
to electrical power. An inverter for DC to AC conversion into the required frequency and voltage using
appropriate transformers, switches and control circuits. The speaker was used to receive the wasted sound waves
which vibrated on its diaphragm, producing oscillations. Since a coil of copper was attached to the diaphragm,
the coil oscillated moving back and forth. This thus produced and electric field due to the permanent magnet near
the coil, giving an electrical output. (Shendre et al., 2020).

Figure 2. 6 Block diagram of the sound conversion process

(Viknesh et al., 2018) in generation of electricity from sound energy, constructed a circuit that harnessed sound
from the environment via a sound sensor which employs a capacitive electret microphone for sound sensing. The
output signal was DC-DC converted by the use of the SCEPIC (The single-ended primary-inductance converter)
boost converter. The output of the converter was fed into the battery for storage. From the battery, the DC voltage
was fed to the relay and PIC microcontroller. An inverter was incorporated from the battery to power 10W AC
lamp. A voltage sensor was equally employed. The supply of the microcontroller and sound sensor were purely
from the outlet utility. This device proved functional and thus, integrating a microcontroller with such a system
is viable.

Page | 7
This circuit was only implemented on AC loads. The block diagram of such a system is Figure 2.7.

Figure 2. 7 Sound energy conversion block diagram

(Hany et al., n.d.) Constructed a circuit with primary investigation on the present use of sound waves that come
out from the factories’ machines and converting it into electricity. The produced electricity was to be recycled to
the machine and so in turn operate it without an external source. The experiment was done using a power
amplifier, capacitors, electric condenser microphone, potentiometer, and ohms. The function signal generator was
acted as the sound source, placed at the input to generate different electrical waveforms over a wide range of
frequencies. Condenser microphones at the input contain capacitors that store the charges caused by the incoming
sound vibrations on one of the parallel plates. The varying capacitance is used to convert the vibrations into
electrical signal. The power amplifier (LM 741) is used to convert the signal level to higher levels. The Voltage
Amplifier Stage (VAS) is the core of the power amplifier and works in class A mode. A Power supply to change
the electrical current from a source to the accurate voltage, frequency, and current to supply the load. It consumes
less current and thus less power loss. An oscilloscope to monitor the waveforms at the device’s output. A
multimeter was use at the output and measured 16V and 0.03 miliamperes. The prototype met the design
requirements with an efficiency of 15%, the input power (sound) being 0.32 watt and with an output of 4.8*10^-
4 watt.

2.1.2 Sound harvesting sensors


A. Piezoelectric sensor

Piezoelectricity or pressure electricity describes the coupling between a material’s electrical and mechanical
behaviors. Piezoelectric materials generate voltage upon subjection to an external pressure (piezoelectric effect)
and, conversely, deform whenever an electric field is applied across it (inverse/reverse piezoelectric effect).
Figure 2.8 shows the direct and reverse piezoelectric material operation.
Mostly used piezoelectric materials are Polyvinylidene Difluoride (PVDF), Barium Titanate (BaTiO3), and Lead
Zirconate Titanate (PZT).
Lead Zirconate Titanate (PZT) finds most application for commercial use due to its high efficiency in electricity
generation.
Page | 8
An increase in pressure (stress, strain or vibration) on the piezoelectric material increases the output voltage. The
piezoelectric charge co-efficient, d31, affects the magnitude of voltage conversion efficiency because the achieved
electromechanical coupling is proportional to it.

Figure 2. 8 Operation of piezoelectric materials


Advantages of piezoelectric materials

 Does not need an external voltage source


 Good scalability
 Piezoelectric materials can be meshed into hybrid materials to produce a broad range of voltages
 Piezoelectric transducers have versatile shapes
 Piezoelectric transducers can be easily incorporated in energy harvesting structures
 Many piezoelectric materials have a high Curie temperature (the temperature above which the materials
lose piezoelectricity).
 Ease of application.
 It can be fabricated at both macro- and micro-scales.

Limitations of piezoelectric materials

 The power harvested is low compared with other harvesting techniques (e.g., Thermoelectric Generator -
TEG devices generate up to 125 W).
 The harvesters require rectification, maximum power extraction, and output voltage regulation.
 Due to their high generated voltage and low output current, piezoelectric energy harvesters are not always
suitable to be used with low voltage CMOS process.

B. Microphones

A microphone is a transducer that converts mechanical wave energy (sound waves) into electrical energy
(mic/audio signals). Microphones have the same operating principles and classified depending on how the
diaphragm transmits sound or their mode of picking-up the sound. Based on the diaphragm they can be carbon,

Page | 9
dynamic, ribbon, condenser and crystal. They can be made to pick up sounds from various directions. There
are omnidirectional, bidirectional, cardioid, hyper-cardioid, super-cardioid and parabolic microphones.

Cardioid microphones are microphones that pick up sounds with high gain from the front and sides but poorly
from the rear.

For particular applications, these properties of microphones are considered:

 Linearity: frequency linearity is the ability of a microphone to give an electrical output proportional to the
mechanical input over the entire frequency range.
 Sensitivity: a more sensitive microphone picks up small sound signals and projects them into louder signals
while less sensitive ones need a higher gain to project loudly quieter sounds. . Sensitive microphones are
more efficient.
 Directionality: The directionality of a microphone is the direction(s) from which a microphone can pick
up incoming sound. Omnidirectional mics give equal output or sensitivity at all angles, all directions. Not
ideal for loud performances and sound as feedback will always occur. Bidirectional mics provide
maximum sensitivity at 0⁰ (front) and 180⁰ (back) but not sides. This polar pattern picks up sound from
two opposing sources. Choice for podcasting, broadcasting or recording a duet recording. Unidirectional
mics provide maximum sensitivity at 0⁰ (on-axis). Pick up sound from exactly in front of the microphone
at a distance. Great for public speaking or lecturing.
 Frequency response: this is the range of frequencies the microphone pick up. The wider and flatter the
frequency response the better the overall performance and sound quality. Condenser microphones have a
wider frequency response than dynamic.
 Electrical impedance: this refers to the voltage and power output by the microphone. Low impedance is
600 ohms or less while high-impedance is 10, 000 ohms or higher. Higher impedance results in a stronger
while lower results to a weaker signal.
 Maximum Sound pressure level (SPL): this is the maximum volume a microphone can handle. Condenser
microphones have lower maximum SPLs due to small diaphragms.
 Dynamic range: is the ability of the microphone to handle loud and soft sounds. A larger range means it
can handle soft and loud range better. To find out the range, the difference between SPL and noise is
taken.
 Noise: this is how much noise the microphone causes as it operates, called white noise. Lower noise gives
better dynamic range.

Page | 10
a) Dynamic microphones

Also called moving coil microphones. The sound waves impinge on the diaphragm which in response vibrates,
the coil attached with the diaphragm moves along with it. Being in a magnetic field, the motion of the voice coil
generates an electrical signal. Figure 2.9 illustrates Operation of dynamic microphones in sound conversion.

Figure 2. 9 Operation of a dynamic microphone


Characteristics

 They are simple in construction, and economical.


 They are rugged and require no batteries for power supply.
 Can handle extremely high sound levels.
 Cheaper than condenser microphones
 Have decreased sensitivity because of their ability to handle louder sound levels.
b) Condenser microphone

Also called capacitor or electret condenser microphones. Constructed with light-weight diaphragm (moving plate)
suspended by a fixed plate (back-plate). When the sound waves strike the diaphragm, the diaphragm vibrates in
response, thus changing the space between itself and the metal-coated ceramic back-plate, this in turn affects the
capacitance. Thus, voltage is produced in response to the sound intensity picked up. Figure 2.10 shows the
pictorial view of the operation of a condenser microphone its internal circuitry.

While they do not need a power supply to provide polarizing voltage, a FET impedance matching circuit inside
the microphone does require some power. This may be supplied by a small low-voltage internal battery or by
an external “phantom” supply.

Characteristics

 Higher sensitivity due to the light-weight diaphragm.


 Less sturdy compared to dynamic types
 Can be affected by extreme temperatures and humidity.
 Do not work well with louder sound levels
Page | 11
 They need power source

Figure 2. 10 Electret Condenser microphone operation

The various mounting configurations are depicted on Figure 2.11

Figure 2. 11 Common electret condenser microphone module mounting

2.1.3 Signal processing systems


These are circuits such as amplifies and rectifiers used to condition the voltage signal to the permissible amplitude
suit for use.

An amplifier is an electronic device that increases the power of a signal (time-varying voltage or current) applied
at its input terminals. It’s a two-port electronic circuit that uses an electric power from a power supply to increase
the amplitude of signals applied to its input terminals producing an output proportionally greater at its output. The
amount of amplification is measured by its gain: output power, current or voltage to input.

A. Operational amplifier

Operational amplifiers are linear devices that have all the properties required for nearly ideal DC amplification
and are therefore used extensively in signal conditioning, filtering or to perform mathematical operations such as
addition, subtraction, integration and differentiation. Its basic role is to amplify and output the voltage difference
between the two input pins.

It’s a three-terminal device which consists of two high impedance inputs. One of the inputs is called the Inverting
Input, marked with a negative or “minus” sign, (–). The other input is called the Non-inverting Input, marked
Page | 12
with a positive or “plus” sign (+). A third terminal represents the operational amplifiers output port which can
both sink and source either a voltage or a current. In a linear operational amplifier, the output signal is the
amplification factor, known as the amplifiers gain (A) multiplied by the value of the input signal. Op-amp symbol
and equivalent circuit are pictured in Figure 2.13

Its internal circuit consists of many transistors, FETs and resistors. An ideal op-amp must have the following
characteristics: an infinite input impedance, an output impedance equal to zero, an infinite open loop gain, an
infinite part of the common mode rejection ratio, and an infinite bandwidth.

Figure 2. 12 Op-amp symbol and equivalent circuit


Op-amp Parameters and idealized characteristics

i. Open Loop Gain, (Avo): is the gain of the op-amp without positive or negative feedback and for such an
amplifier the gain will be infinite but typical real values range from about 20,000 to 200,000.
ii. Input Impedance (Zin): is the ratio of input voltage to input current and is assumed to be infinite to prevent
any current flowing from the source supply into the amplifiers input circuitry (IIN = 0). Real op-amps have
input leakage currents from a few pico-amps to a few milli-amps.
iii. Output Impedance (Zout): The output impedance of the ideal operational amplifier is assumed to be zero
acting as a perfect internal voltage source with no internal resistance so that it can supply as much current
as necessary to the load. This internal resistance is effectively in series with the load thereby reducing the
output voltage available to the load. Real op-amps have output impedances in the 100-20kΩ range.
iv. Bandwidth (BW): An ideal op-amp has an infinite frequency response and can amplify any frequency
signal from DC to the highest AC frequencies so it is therefore assumed to have an infinite bandwidth.
With real op-amps, the bandwidth is limited by the Gain-Bandwidth product (GB), which is equal to the
frequency where the amplifiers gain becomes unity.
v. Offset voltage (Vio): The amplifiers output will be zero when the voltage difference between the inverting
and the non-inverting inputs is zero, the same or when both inputs are grounded. Real op-amps have some
amount of output offset voltage.

Page | 13
Operational amplifiers are available in IC packages of either single, dual or quad op-amps within one single
device.

Figure 2. 13 LM741 Op-amp IC and pin-outs


Applications of op-amp

i. Inverting Amplifier

An inverting amplifier takes the input through its inverting terminal through a resistor R1R1, and produces its
amplified version as the output. The operational amplifier is connected with feedback to produce a closed loop
operation. This amplifier not only amplifies the input but also inverts it (changes its sign).

In these amplifiers:

 No current flows into the input terminals; and,

 The differential input voltage is zero as V1 = V2 = 0 (Virtual Earth).

This is because the junction of the input and feedback signal (X) is at the same potential as the positive (+) input
which is at zero volts or ground then, the junction is a “Virtual Earth”. Because of this virtual earth node the
input resistance of the amplifier is equal to the value of the input resistor, Rin and the closed loop gain of the
inverting amplifier can be set by the ratio of the two external resistors.

Figure 2. 14 Inverting Op-amp circuit


The ratio of the output voltage Vout and the input voltage Vin is the voltage-gain or gain of the amplifier. Therefore,
the gain of inverting amplifier;
Page | 14
𝑉𝑜𝑢𝑡 𝑅𝑓
𝐺𝑎𝑖𝑛 (𝐴𝑣) = = − 𝑅𝑖𝑛 (1)
𝑉𝑖𝑛

ii. Non-inverting amplifier

In this configuration, the input voltage signal, (VIN) is applied directly to the non-inverting (+) input terminal
which means that the output gain of the amplifier becomes “Positive” in value. This results to an output signal
“in-phase” with the input. Feedback control is achieved by applying a small part of the output voltage signal back
to the inverting (–) input terminal via Rƒ – R2 voltage divider network, again producing negative feedback. This
closed-loop configuration produces a non-inverting amplifier circuit with very good stability, a very high input
impedance, Rin approaching infinity, as no current flows into the positive input terminal, (ideal conditions) and a
low output impedance, Rout as shown below.

Figure 2. 15 Non-inverting op-amp circuit


The gain is given by,

𝑅𝑓
𝐴𝑣 = 1 + 𝑅2 (2)

We can see from the equation above that the overall closed-loop gain of a non-inverting amplifier will always be
greater but never less than one (unity), it is positive in nature and is determined by the ratio of the values
of Rƒ and R2. Generally Rƒ is chosen to be greater than the R2.

Advantages of op-amps

 The packages do not take up much physical space, and this is a great advantage in a world in which
technology increasingly demands more performance but with a smaller size (in terms of gadgets).
 Encapsulated ones are very cheap. No sense buying all the components to create an Operational Amplifier
when in reality what we need is the chip that is already manufactured or custom designed.
 They make very good stable DC amplifiers that are not affected so much with changes in temperature or
aging unlike single ended transistor amps.
 High input impedance: the input circuit behavior is not changed by the op amp.

Page | 15
 Low output impedance: the op amp behaves substantially the same regardless of the circuit accepting the
output.
 High bandwidth: able to handle quickly changing signals.

Limitations of op-amps

 Cannot be used for high frequencies since they do not respond in the same way as they would at low
frequencies.
 Operational Amplifiers are not suitable for working with medium and high powers.
 Its necessity of a symmetrical power supply, that is, a positive voltage and the other negative, but both of
equal value.

B. Bridge rectifier

The current from the microphone and amplifier stage being alternating in nature, is be rectified (converted to
direct current) using a bridge rectifier for use by the electronic components. This method utilizes four individually
rectifying diodes connected in a “bridge” configuration to give the output desired. The current flowing through
the load is unidirectional.

The single secondary winding of the bridge rectifier is connected to one side of the diode bridge network and the
other side connected to the load. This is shown in Figure 2.16 illustrates the bridge rectifier circuitry.

Figure 2. 16 Bridge rectifier circuit


The four diodes are arranged in series pairs D1 to D4 with two conducting each half cycle.

During the positive half-cycle, D1 and D2 conduct in series while D3 and D4 are reverse biased. During the negative
half cycle of the supply, diodes D3 and D4 conduct in series while D1 and D2 switch “OFF” as they are reverse

Page | 16
biased. Current flows in the same direction as before, thus the voltage developed across the load is in the same
direction. The cycles are illustrated in Figure 2.17.

Figure 2. 17 Positive and negative half cycles of the bride rectifier

Figure 2. 18 Full wave rectifier operation and waveforms


Efficiency of the bridge rectifier

This shows the optimum perfomance of the rectifier. It’s the ratio of output power to the A.C. input power. It has
an efficiency of 81.2%.

Advantages

 It doesn’t require a centre tapped transformer, making it advantageous in terms of size and cost.
 Has higher efficiency than half-wave rectifier
 Provides a smooth output compared to half-wave rectifier.
 There is no loss in the input signal as the output has fully rectified.
 Ripple factor value in the bridge rectifier is less because the circuit is more efficient.
 Allows both positive and negative half cycles of the A.C signal for processing

Disadvantages

 Uses four diodes as opposes to two diodes used by the centre-tapped half wave rectifier.
 Higher voltage drop and a more complex circuit compared with the half wave rectifier.
Page | 17
2.1.4 Battery charging systems
A battery charger circuit is a device that can automatically recharge a phone’s battery when the power in it gets
low. A basic battery charger consists of a rectifier circuit, power circuit, ripple monitoring, control circuit,
regulator circuit, and fault detection circuit.

Battery chargers are of these types: simple, trickle, timer-based, intelligent, universal battery charger-analyzers,
fast, pulse, inductive, USB based, solar chargers, and motion powered chargers.

Charging methods are of two categories: fast charge and slow charge methods.

 Fast charge method: system used to recharge a battery in about two hours or less than this.
 Slow charge method: system used to recharge a battery throughout the night i.e. maximum time.

Charging protocol depends on the battery size and type. The various factors that affect battery charging speed are:

 Charger’s output current: Different chargers have different output currents. A higher current from the
charging device can speed up the battery charging process e.g. most smartphones require at least 5V, 1A
supply.
 Battery temperature: Heat is the worst enemy of batteries. High battery temperature may slow down
charging or reduce lifetime of the battery. Most batteries can be charged in the temperatures range of 5°C
to 45°C.

Battery capacity: is specified as the number of amp-hours that the battery will deliver at a specific discharge rate
and temperature. It’s not a constant value but decreases with increasing discharge rate.

C-rate is a measure of the rate at which a battery is charged or discharged relative to its capacity. The C-rate is
defined as the charge or discharge current divided by the battery's capacity to store an electrical charge.

State of Charge is the amount of deliverable low-rate electrical energy stored in a battery at a given time expressed
as a percentage of the energy when fully charged and measured under the same discharge conditions.

A. Simple charger

Works by supplying a constant DC or pulsed DC power source to a battery being charged. A simple charger
typically does not alter its output based on charging time or the charge on the battery. These circuits is do not
have reverse polarity protection or over current protection.

Page | 18
Figure 2. 19 Simple 12V battery charger circuit

Circuit Operation

The step down transformer (0-14V AC / 3 Amps) used is for the 12V battery. Bridge rectifier module (BR1010)
for AC to DC rectification which gives High efficient DC supply with high Current rating. C1 and C2 capacitors
are performing as filter in this circuit then LED indicates the presence of DC power supply at the output. Target
battery can be connected to the output.

B. Fast charger

These make use of control circuitry to rapidly charge the batteries without damaging any of the cells in the battery.
The control circuitry can be built into the battery (generally for each cell) or in the external charging unit, or split
between both. They mostly have a cooling fans to help keep the temperature of the cells at safe levels.

Page | 19
Circuit Operation

Input voltage is obtained from a >15-0-15 volt 5 Ampere secondary transformer with rectifying diodes D1 and
D2. Capacitor C1 makes the DC ripples free and around 16 volt DC enters into the Vin input of the regulator.
VR1 can be used to set the output voltage from 2 volts to 25 volts. A digital panel meter is used for measuring
the output voltage. So by adjusting VR1, it is easy to see the output voltage in the meter. If the output voltage
reduces due to line voltage drop, it can be easily detected through the panel meter. The panel meter also can be
used to measure the terminal voltage of the battery. If the power supply is switched off, meter shows the terminal
voltage. If the voltage remains steady, it indicates that the battery is fully charged and holding charge.

C. Smart charger

These respond to the condition of a battery and modify its charging parameters accordingly. Such chargers are
often labeled as a ΔV, "delta-V," or sometimes "delta peak" charger, an indication that they monitor voltage
change. For Ni-Cd and NiMH batteries, the voltage of the battery increases slowly during the charging process,
until the battery is fully charged. The voltage then decreases, which indicates to an intelligent charger that the
battery is fully charged. This can cause even an intelligent charger not to sense that the batteries are already fully
charged, and continue charging. Overcharging of the batteries may result. Many intelligent chargers employ a
variety of cut-off systems to prevent overcharging.

A typical smart charger fast-charges a battery up to about 85% of its maximum capacity in less than an hour, then
switches to trickle charging, which takes several hours to top off the battery to its full capacity.

Figure 2. 20 Smart Automatic Battery charger

Page | 20
Circuit Operation

The two variable resistors VR1 and VR2 are used in the circuit to set start and stop the charging process on the
desired voltage of the battery. Tuning or adjusting the circuit for the desired battery requires an adjustable power
supply. For example, for a 6V lead acid battery, the fully charge voltage of a 6V lead acid battery is 7.3V while
charging after charging is stopped its voltage will slowly come to 6.3V. The voltage is set to 7.3V in the adjustable
power supply and VR2 adjusted until LED1 becomes activated. Next, the power supply voltage is set to 5.9V and
VR2 adjusted until the LED3 goes OFF.

The relay switch connected to mains plug of the power supply switches ON the whole charger circuit from the
mains when the battery requires charging and switch it OFF when the battery is fully charged. The LEDs used in
the circuit shows different indications. When fully charged, LED1 will become activated. LED4 shows the battery
under charge.

The circuit is fully automatic therefore can be leaved with a battery to start charging automatically when the
battery voltage falls.

2.1.5 Voltage sensing systems


A voltage sensor is a sensor used to calculate and monitor the amount of voltage in an object. They can determine
the AC voltage or DC voltage level. The input of this sensor is the voltage, whereas the output is the switches,
analog voltage signal, a current signal, an audible signal, frequency, or even frequency modulated outputs.

The measurement is based on a voltage divider. Two main types of voltage sensors are available: capacitive and
resistive type voltage sensor.

Figure 2. 21 Voltage sensor types and circuitry


The calculations for the output voltages are as below:

𝐶₁
Vout = 𝐶₁+𝐶₂ × 𝑉𝑖𝑛 for the capacitor and;

Page | 21
𝑅₂
Vout = 𝑅₁+𝑅₂ × 𝑉𝑖𝑛 for the resistor divider circuit.

For the capacitive type, if voltage is applied across the capacitor voltage divider circuit, high voltage develops
across the component with high impedance since capacitance (C) and impedance (capacitive reactance, Xc) are
inversely proportional.

1
XC=2𝜋𝑓𝐶 (3)

And the voltage-capacitance relations is as below:

𝑉 = 𝑄/𝐶 (4)

Where; Q is the charge in Coulomb, C is the capacitance in (Farad), Xc the capacitive reactance (Ω) and f the
frequency (Hertz).

Thus, from the above, the highest voltage will accumulate on the smallest capacitor. The sensor’s tip is the
smallest capacitor coupled with the live voltage. Therefore, voltage develops across the sensing circuit, which
can detect voltage and activate an LED indicator.

Voltage sensor module

Voltage Detection Sensor Module is a simple and very useful module that uses a potential divider to reduce any
input voltage by a factor of 5. Thus, it permits the use of Analog input pin of a microcontroller to monitor voltages
higher than it capable of sensing. For example, with a 0V - 5V Analog input range, you are able to measure a
voltage up to 25V. This module also includes convenient screw terminals for easy and secure connections of a
wire. The voltage circuit consists of a voltage divider circuit of two resistors in which R1 is 30K and R2 is 7.5K,
that is, a 5 to 1 voltage divider

Figure 2. 22 Voltage sensor circuit and module


Voltage Detection Sensor Module Features & Specifications

 Input Voltage: 0 to 25V

Page | 22
 Voltage Detection Range: 0.02445 to 25
 Analog Voltage Resolution: 0.00489V
 Needs no external components
 Easy to use with Microcontrollers
 Small, cheap and easily available
 Dimensions: 4 × 3 × 2 cm

2.1.6 Microcontrollers
The system proposed will engage automations in monitoring and data transmission between the components and
the environment of use. Automated systems require intelligent chips such as microcontrollers in order to monitor
and control the circuit components. The charging status of the microphone battery alongside the in-built battery
condition, fault detection and sound level into the system are a few of many other tasks to engage the
microcontroller following the respective befitting codes.

Types of microcontrollers

1. AVR (not an acronym): Developed by Atmel service provider. Is a family of microcontrollers developed
by Atmel since 1996 but later acquired by Microchip Technology in 2016. These are modified Harvard
architecture 8-bit RISC (Reduced Instruction Set Computer) single-chip microcontrollers.
2. PIC (now Programmable Interface Computer): Is a Microcontroller developed by Microchip Technology.
This types supports programming in C, Assembly and BASIC C. Also of Harvard architecture and is based
on RISC architecture. The memory space provided by this is 8K Χ 14 (ROM) bits that can store 13-bit
instruction or program and holds 368 bytes of RAM which is divided into banks. The PIC16 series has 5
I/O ports.
3. Hitachi: belongs to the H8 family of the controller. Developed by Renesas technology and founded in
early 1990s within Hitachi semiconductors. H8 is a name of a large family of 8-bit, 16-bit and 32-bit made
by Renesas Technology. Applicable in digital cameras, printer controllers etc.
4. Motorola: it’s a highly integrated microcontroller used for high performance data manipulation operation.
Uses a System integration Module, Time Processing Unit (TPU) and Queued Serial Module (QSM).

Arduino Uno hardware

This is an Atmega 328p IC microcontroller-based board. It’s made up of components such as a crystal oscillator,
serial communication, and voltage-regulator among other hardware components. It has 14 digital input/output
pins in which 6 can be used as Pulse-Width Modulation (PWM) output, 6 analog inputs, a 16MHz ceramic

Page | 23
resonator, a USB connection, a power jack, an ICSP header and reset button. Can be powered by simply
connecting to the computer via a USB cable or A.C-D.C adapter or even a battery

Figure 2. 23 Arduino Uno hardware


Arduino Uno specifications

The ATmega328P is an 8 bit AVR-RISC based family microcontroller. Operating voltage is 5V while
recommended input voltage range is 7-12V and input voltage limits are 6-20V. Digital I/O Pins is 40 mA while

DC current on 3.3V Pin is 50 mA. Has a flash memory of 32 KB (in which 0.5 KB is used for Bootloader), SRAM
(Static Random Access Memory) of 2KB, 1 KB EEPROM. The device has 23 general purpose I/O lines, 32
general purpose working registers, three flexible timer/counters with compare modes, internal and external
interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit
A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal
oscillator, and five software selectable power saving modes. The device operates between 1.8-5.5 volts. The
device operates at a frequency clock speed of 16MHz.

Figure 2. 24 Atmega 328p chip


Powering Arduino UNO hardware
There are varied ways, the 1st and easy way is by the use of the Type-B USB Connector. The next way is to
provide an unregulated supply in the range of 6V to 20V to VIN pin of the UNO (Pin number 26). Lastly, an
unregulated supply can be made through the 2.1mm DC Jack, in which case, the supplied voltage is accessed via
the VIN Pin.

Page | 24
Arduino I/O pin configuration
There are 32 pins available on the UNO board, out of which 22 pins are associated with input and output. Of
these, 14 pins (D0 to D13) are true digital I/O pins, which can be configured as per the programmer’s application
using pinMode(), digitalWrite() and digitalRead() functions. All these Digital I/O pins are capable of sourcing or
sinking 20mA of current (a maximum of 40mA is permissible). An additional feature of the Digital I/O pins is
the availability of internal pull-up resistor (which is not connected by default). Its value is in the range of 20KΩ
to 50KΩ.
There are also 6 Analog Input Pins (A0 to A5). All the analog input pins provide a 10-bit resolution ADC feature,
which can be read using analogRead() function. An important point about Analog Input pins is that they can be
configured as Digital I/O pins, if required. Digital I/O pins 3, 5, 6, 9, 10 and 11 are capable of producing 8-bit
PWM Signals, analogWrite() function can be used for this.

Communication Interfaces on Arduino UNO

Arduino UNO supports three different types of communication interfaces viz. Serial, I2C or I2C (Inter-Integrated
Circuit bus) and SPI. The most common communication interface in the Arduino world is serial communication.
Digital IO pins 0 and 1 are used as Serial RX and TX pins to receive and transmit serial data. These pins are
connected to the serial pins of the on-board USB to Serial Converter IC.
Analog Input Pins A4 and A5 have alternative functions. They can be configured as Serial data line, SDA (A4)
and Serial clock line, SCL (A5) to support I2C or I2C or Two Wire Interface (TWI) communication. The final
communication interface is the, Serial peripheral interface (SPI). Digital I/O Pins 10, 11 12 and 13 can be

Figure 2. 25 Arduino Uno pin-outs


configured as SPI pins slave select (SS), Master Out Slave In (MOSI), Master In Slave Out (MISO) and Serial
clock (SCK) respectively.

Page | 25
2.1.7 Display Units
A. Liquid Crystal Display

A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical device that uses
the light-modulating properties of liquid crystals combined with polarizers. The liquid crystals use
a backlight or reflector to produce images in color or monochrome i.e. they do not emit light directly. LCDs
consume much less power than LED and gas-display displays because they work on the principle of blocking
light rather than emitting it. Whereas an LED emits light, the liquid crystals in an LCD produces an image using
a backlight.

The advantage of low power consumption has made it compatible with MOS integrated logic circuit. Others are
that they are inexpensive, simply programmable, long lasting, no limitations for displaying custom characters,
special and even animations and they good contrast. Its main drawbacks are additional requirement of light source,
a limited temperature range of operation (between 0 and 60° C), poor visibility in low ambient lighting and slow
speed.

Working of an LCD

The main principle behind liquid crystal molecules is that when an electric current is applied to them, they tend
to untwist. This causes a change in the light angle passing through them, causing a change in the angle of the top
polarizing filter with respect to it. Therefore, little light is allowed to pass through that particular area of LCD. It
thus becomes darker comparing to others (Kumar et. al, 2018).

LCD pin description

Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND terminal of the microcontroller
unit or power source. Pin2 (VCC/Source Pin) is the voltage supply pin of the display, used to connect the supply
pin of the power source. Pin3 (V0/VEE/Control Pin) regulates the difference of the display, used to connect a
changeable POT that can supply 0 to 5V. Pin4 (Register Select/Control Pin) toggles between command or data
register, connects to a microcontroller unit pin and obtains either 0 or 1(0 = data mode, and 1 = command mode).

Pin5 (Read/Write/Control Pin) toggles the display among the read or writes operation, and is connected to a
microcontroller unit pin to get either 0 or 1 (0 = Write Operation, and 1 = Read Operation). Pin 6 (Enable/Control
Pin) should be held high to execute Read/Write process, and it is connected to the microcontroller unit, constantly
held high. Pins 7-14 (Data Pins) used to send data to the display. They connected in two-wire modes, that is, 4-
wire and 8-wire modes. In 4-wire mode, only four pins are connected to the microcontroller unit like 0 to 3,

Page | 26
whereas in 8-wire mode, 8-pins are connected to microcontroller unit like 0 to 7. Pin15 (+ve pin of the LED) is
connected to +5V and, lastly, Pin 16 (-ve pin of the LED) is connected to GND.

Figure 2. 26 16 ×2 and 20 × 4 LCD displays


Advantages
 They have excellent contrast,
 Have lower power consumption and produce little heat.
 Have no radiation emission from the screen
 The images appear with greater resolution, and the colors of images look more realistic.
 Wider brightness range: They produce very bright images due to high peak intensity.
 They have sharp resolution and imagery.
Disadvantages
 They have less picture quality when viewed on the side or at an angle.
 They are not appropriate for use in dimly lit and dark conditions.
 LCDs are more fragile: touching an LCD screen with your fingers hard can leave pressure marks that
forever mar the display.
 They have limited viewing angle: the Brightness, contrast, gamma and color mixtures vary with the
viewing angle, they can lead to contrast and color reversal at large angles, they need to be viewed as close
to straight ahead as possible.

B. LED Displays

An LED emits light as a result of electric luminescence. An LED consists of solid materials without movable
parts and is often molded into transparent plastic for high durability. When an LED is on, it emits almost zero
heat. This reduces the problem of cooling the electronic parts. An LED display consists of many closely-spaced
LEDs. By varying the brightness of each LED, the diodes jointly form an image on the display.

Page | 27
A simple LED panel contains several LEDs, and a LED display contains several LED panels. An LED display
consists of red, green and blue LEDs mounted in a fixed pattern. These three colours combine to form a pixel. By
adjusting the intensity of the diodes, billions of colours can be formed. Looking at the LED screen from a certain
distance, the array of coloured pixels are seen as an image. LED displays are also used in posters and store signs.

Figure 2. 27 LED Display array


Advantages of LED

 Longer lifespan and less environmental impact


 Lower Power Consumption
 Brighter and sharper Images
 Better Color

 They have a long lifespan in comparison to the LCD’s

 These LEDs monitor produces flicker free image which reduces eye fatigue, eye strains and headaches

 The wavelength range of lights used are such that to give high quality.

Disadvantages

 LEDs are more expensive than conventional lighting technologies.


 LEDs can shift color due to age and temperature.

 They largely depend on the correct engineering otherwise a lot of deterioration and defects can develop
in the products.

2.1.8 Simulation Software


According to (Banks, 2001), Simulation is the process of imitation of the operation of a real-world process or
system over time. They require the use of models; the model is a representative of the key characteristics or

Page | 28
behaviors of the selected system or process, whereas the simulation represents the evolution of the model over
time. Quite often, computers with the appropriate software are used to execute the simulations.

Types of circuit simulators

Today there are innumerable circuit modeling and simulation software of which a few are described below:

I. Proteus: It’s described as a Virtual System Modeling and circuit simulation application. It combines mixed
mode SPICE circuit simulation application, animated components and microprocessor models to facilitate
co-simulation of complete microcontroller based designs. Proteus has the ability to simulate the interaction
between software running on microcontroller and any analog or digital electronics connected to it, it
simulates Input/Output ports, interrupts, timers, USARTs and all other peripherals present on each
supported processor (Proteus).
Advanced one supports a range of useful functions and features like graph based analysis which includes
frequency, noise, distortion, Fourier parameters etc. The software runs on the Windows operating system.

II. CircuitLogix: this is a student version electronics simulation software that enables performing analog,
digital and mixed mode circuit analysis and simulation. It’s a SPICE simulation software that provides
4000 devices on its student version which is 1/3 of the pro version. This circuit building software give
access to switches, linear IC and digital IC, FET, Transistors, relays, displays, signal generators, SCR’s,
opto-isolators, photo diodes, semiconductors, motors etc. it also works on Windows system.
III. TINA Design Suite: it’s a circuit simulator, circuit designer and PCB design software package for
analyzing, designing, and real time testing of analog, digital, IBIS, HDL, MCU, and mixed electronic
circuits and their PCB layouts. It also analyzes SMPS, RF and communication and optoelectronic circuits;
generates and debugs MCU code using the integrated flowchart tool; and test microcontroller applications
in a mixed circuit environment
2.2 Summary
From the above review, it is evident that significant efforts have indeed been made with the same ambition of
utilizing this readily available sound in the form of noise pollution by harnessing using manifold methodologies
for application on different environments. It’s also illustrious of the feasibility of sound as a source of electrical
energy and the same time an indication of the possibility of implementation of this proposed system.

It’s equally evident that no attempts have thus far been made to utilize the enormous sound energy in church
auditoria, entertainment arena, concert halls, festivals etc. despite their promising potential. The application of
sound energy also for the purpose of recharging the batteries in these environment have equally not been tasted

Page | 29
despite the promising data. This thus makes this project a need of the hour on how utilize these auditoria to
produce and recycle the noise specific to recharging microphone batteries in these arena.

Page | 30
CHAPTER THREE

3 METHODOLOGY
3.0 Introduction
In this section, circuit design, construction and testing shall be discussed.

3.1 Design
3.1.1 Introduction
The design of the circuit blocks and the exploration of diverse circuit components; their specifications and
operation or performance to determine ones that befits and is most viable for the project design and optimal
operation.
3.1.2 Circuit Design Functions
1. Harnessing of sound energy: Sound energy, present in the form of noise shall be harvested from the
environment of usage using the appropriate transducer.
2. Signal conditioning: a rectifier circuit is used to the convert the continuous electrical signal to D.C.
compatible with the electronics used in this circuit. Amplifying circuit enhances the voltage signal to a
level desirable for usage in battery charging.
3. Monitoring and display: the monitoring circuit secures the microphone battery under charge from
overcharging and undercharging. It shall employ an auto cut-off mechanism for efficiency. The battery
state of charge shall be displayed by the LCD and LEDs.

3.1.3 Circuit block diagram

Micro Signal Battery Microp Voltage LCD Display


Microcontr
phone conditi charger hone sensor oller
oning battery
circuit ATMEGA
328p Battery Level
indication LEDs

Figure 3. 1 Acoustics-based microphone battery charger Block diagram

3.1.4 Sound harvesting circuit


From the literature review on the various ways of harnessing sound energy, pin-type electret condenser
microphone shall be employed the following reasons:

 Low and wide range of operating voltage, that is 2V to 10V (2V recommended)
 Low current consumption: 0.5mA (max)

Page | 31
 High sensitivity (-46dB)

Figure 3. 2 Electret condenser microphone circuit operation

Circuit Operation

The sound waves in the form of noise impinges on the diaphragm of the electret condenser microphone. The to
and fro movement of the diaphragm causes the capacitance between it and the capsule (back plate) to change
synchronously. This induces an A.C. voltage on the back plate collected at the output.

The electret MIC requires a biasing voltage between 1 to 5V to power the inbuilt FET buffer which is present in
the MIC.

3.1.5 Signal processing circuits


A. Signal rectification

1N4007 diode shall be used to design the bridge rectifier circuit.


Reason for selection
1N4007 shall be employed for the following reasons:
 Absolute maximum ratings: 1000V peak repetitive reverse voltage (VRPM), 1A average rectified output
current IF (AV), 30A non-repetitive peak forward surge current, junction capacitance of 8pf and RMS
reverse voltage of 700V.
 Low leakage current
 Low cost and easily accessible

Page | 32
Figure 3. 3 Sound signal rectifier circuit and simulation
Circuit Operation

For unidirectional signal from the source, the input from the condenser microphone passes through the bridge
rectifier circuit, that is, diodes D10 and D12 in the 1st half cycle full wave rectification and the other two diodes
for the 2nd half cycle.

From the oscilloscope, the input is A.C. (yellow waveform) while the output (blue line) is unidirectional. The
220μF capacitor C1 smoothens the voltage ripples for a smooth D.C. voltage for further synthesis.

B. signal Amplification

LM358 operational amplifier (Op-Amp) shall be used in the non-inverting mode for signal amplification due to
the following reasons:

 Wide power supply Range (3V to 32V) with low supply current (700uA)

 Single supply of 3V to 32V

 The low power drain makes the LM358 a good choice for battery operation.

 Relatively inexpensive
 Easily accessible

Page | 33
Figure 3. 4 LM358 Signal amplifier Circuit

Circuit Operation

The low signal from the rectifier is received via the 1μF electrolytic capacitor C2 on the non-inverting (+ve) input
of the amplifier. R1 (100K) is a feedback resistor while RV2 (10K potentiometer) adjusts the amplifier gain. The
voltage source (9V) is used to power the op-amp. The output coupling capacitor C4, 220μF is for output noise
clipping.

3.1.6 Battery charging and monitoring system


This shall employ the use of capacitors, resistors, transistors and diodes for the purpose of voltage regulation,
power switching and signal smoothening.

Circuit operation

The 4.3V zener diode (IN4731A) is used for constant voltage regulation. The transistor Q1 (BC547) is here used
as a switch to control the charging voltage of the MIC battery, it obtains the signal from the Atmega 328p
microcontroller. Current limiting resistors R1 and R9 are also used.

The Yellow LED D9 will light as long as the battery is being charged, that is, in the ON-state of transistor Q1.
When fully charged, the transistor Q1 will be in the Cut-off state and thus prevent further supply to the battery.

Page | 34
This prevents battery overcharging. The 220μF electrolytic capacitor C3 is used to give stability to the output
current.

The diode (1N4007) permits unidirectional current flow and thus prevents backward flow from the battery when
fully charged.

Figure 3. 5 Battery charging unit (auto cut-off)


Setting the output voltage

A fully charged 12 volt battery will have a terminal voltage of 13.5 volts and that of a 6 volt battery 6.5 volts. An
example of a microphone cell is a 1.2V (nominal voltage), 2000mAh AA NiMH battery, which requires a charging
voltage range of 1.8-2.8V. The battery when fully charged, is at 1.4V and drains to 1.1V or 1.1V at what point
requires charging.

3.1.7 Voltage sensing circuit


Reasons for circuit selection

 Can measure a wide range of input voltages i.e. 0 to 25V


 Wide voltage detection range: 0.02445 to 25
 Easy to use with Microcontrollers
 The resistor circuit is easy to implement

Page | 35
Figure 3. 6 Resistor voltage sensor circuit
Circuit operation

The two resistors acting as a voltage divider gives the signal on the battery state of charge and in coordination
with the microcontroller controls the cell or battery being charged.

3.1.8 Microcontroller
Due to reduced instruction set, AVR will be considered suitable for this project. Atmega328p from the AVR set
has been selected.

Reasons for selection of AVR

 Inexpensive compared to other microcontroller platforms


 Cross-platform: IDE (the Arduino software) can run on the operating systems of windows, Macintosh
OSX, Linux. Most microcontrollers though are limited to windows.
 Simple, clear programming environment: it’s easy to use for beginners and flexible to the advanced users
 Open source and extensible hardware: relatively inexperienced users can
 Can be used for projects requiring multiple I/O interfaces and communications.
 User friendly language and easy to learn

Page | 36
Figure 3. 7 Arduino Uno description with Atmega 328p AVR microcontroller
3.1.9 Display Unit
Reason for selection of the LCD
 The ability to display numbers, characters, and graphics. This is in contrast to LEDs, which are limited to
numbers and a few characters.
 The ability to display multiple data simultaneously on the same screen

Figure 3. 8 20×4 LCD –Arduino interface circuit

Circuit operation
The LCD display unit is interfaced with the Arduino Uno board in the above circuit configuration. The data form
the voltage sensor on the state of charge and microphone on SPL are thus transferred through wires to the LCD
for display.

Page | 37
3.2 Construction
From the individual circuit operations and components descriptions, a complete circuit was thus constructed on
the Proteus software and simulated for operation.

Reasons for Proteus Software

 Intelligent principle layout


 Availability of the required principal circuit components
 Hybrid circuit simulation and accurate analysis
 PCB automatic layout and wiring.
 Simple to use

The design and simulation of the Acoustics-based Microphone battery charger is as pictured below.

Figure 3. 9 Overall circuit diagram of the ABMBC under simulation

3.2.1 Results
A snapshot of the simulation is as pictured below.

From the LCD display, the following have been captured:

 VoltageMic (microphone battery voltage) = 1.40V equivalent to 100% full charge.


 VoltageDev (device voltage state of charge) = 9.00V equivalent to 100% capacity, still useful.

The SPL from the microphone equivalent produced 100.54dB. The two green LEDs from the microcontroller
indicates the microphone battery fully charged and the device battery is still useful.
Page | 38
3.3 Project costing
Table 3. 1 Project Costing

Description Cost (Ksh.)


Arduino board 850
Bread board 150
Resistors-1/4W (2-100K, 2-10K, 3-470R, 150
4.7K, 3.3K, 1M, 20K, 2-7.5K, 2-30K, 10-1K,
3-10K)
Potentiometer (2-10K), (1-50K) 100
LEDs (2-red, 2-yellow, 2-green) 60
Capacitors (3-220μF 4V, 180μF 6.3V, 2-1μF 160
6.3V , 2-10pF 25V ceramic)
Transistor (2-BC547) 40
Toggle switches (2pcs) 150
Liquid crystal display, 20×4 (LCD) 600

Electret condenser microphone, wire mount 220


(10pcs)
Glass fuses (3-1A) 150
LM358 IC (2pcs) 140

Battery (Lithium ion 9V, 650 mAh) 600


Diodes (8-1N4007, 5.6V 58mA Zener) 100
Strip board 150
Soldering wire 330
Housing 500
Connecting wires and jumpers 150
IC holder (2pcs) 120
Printing and binding 1000
Miscellaneous 1000
TOTAL 6,720

Page | 39
3.4 Project time managemement
This section outlines the steps in the full realization of the project, the time frame.

Table 3. 2 Project timeline

Duration in Months

Activities April May June July August September October November


Concept paper
Writing
Abstract &
proposal
structure
Writing
Research
&Writing
literature review
Populating
proposal paper
Proposal
Printing &
presentation
Corrections &
detailed
Research
Project
Design
Simulation

Consultations

60% Project
editing, printing
& presentation

Page | 40
4 CHALLENGES, CONCLUSION AND RECOMMENDATIONS
4.1 Challenges
Thus far, in an effort to implement the ABMBC, these are among the challenges:

 Unavailability of certain circuit components in the Proteus software e.g. microphone. These required a
license for acquisition.
 Simulation hard-knocks: inadequate understanding on trouble-shooting of errors in the circuit at design
stage in the Proteus software.
 Real time battery status monitoring: the program code and battery circuit had to be altered time and again
to confirm the accurate circuit operation.

4.2 Recommendations
Thus far, the following are recommended:

1. Equivalent circuits of the require components should be employed in the absence of the exact circuits for
illustration of the exact concept or operation. This prevents stalling of the project.
2. Students should have adequate knowledge of the design and simulation software for smooth trouble-
shooting.

4.3 Conclusion
Thus far, the folowing conclusions can be made:

 Sufficient literature review has been achieved and appreciated.


 The design of the Acoustics based microphone abttery charger has been made and simulated.
 The success of circuit construction and simulation at this stage is promising of its full implementation at
ground zero level.

Page | 41
5 REFERENCES
J.M. Munyoki and G. B. Olesen, East Africa EASE-Cimate Action Project 2019-22, 20-Aug-2020. [Online].
Available: http://www.inrosrse.org/africa/EASE.htm. [Accessed: 15-Jun-2021].

Reliable, affordable, and environmentally sound energy for America's future: report of the National Energy
Policy Department Group. Washington, D.C.: National Energy Policy Development Group, 2001.
S. E. L. C. U. K. BILGEN, K. A. M. I. L. KAYGUSUZ, and A. H. M. E. T. SARI, “Renewable Energy for a
Clean and Sustainable Future,” Energy Sources, vol. 26, no. 12, pp. 1119–1129, 2004.
N. L. Panwar, S. C. Kaushik, and S. Kothari, “Role of renewable energy sources in environmental protection: A
review,” Renewable and Sustainable Energy Reviews, vol. 15, no. 3, pp. 1513–1524, 2011.
M. Basner, W. Babisch, A. Davis, M. Brink, C. Clark, S. Janssen, and S. Stansfeld, “Auditory and non-auditory
effects of noise on health,” The Lancet, vol. 383, no. 9925, pp. 1325–1332, 2014.
M. Ibekwe, “Tinnitus; an Index of Noise Pollution among Church Worshippers in Port Harcourt Metropolis,”
Global Journal of Otolaryngology, vol. 18, no. 4, 2018.
K. Kalawapudi, T. Singh, R. Vijay, N. Goyal, and R. Kumar, “Effects of COVID-19 pandemic on festival
celebrations and noise pollution levels,” Noise Mapping, vol. 8, no. 1, pp. 89–93, 2021.
J .Abeber, M. Godze, S. Kuhn, T.ClouB, and H. Lukasehevish, “A Distribution Sensor Network For Monitoring
Noise Level And Noise Sources in Urban Environments,” 2018 IEEE 6th International Conference on Future
Internet of Things and Cloud (FiCloud), 2018.
S. Ikibe and O. S. Adekogbe, “Exposure to Excessive Sound Volume: A Major Challenge in the South-Western
Nigeria Church Auditoria,” Advances in Research, pp. 54–65, 2020.
V. Spiridonov and M. Ćurić, “Atmospheric Thermodynamics,” Fundamentals of Meteorology, pp. 59–71, 2020.
https://doi.org/10.1007/978-3-030-52655-9_6
J.M.K.C. Donev et al. (2020). Energy Education – Law of conservation of energy. [Online] Available:
https://energyeducation.ca/Law_of_conseration_of_enenrgy. [Accessed: June 9, 2021].

Eman Anwar, Haneen Ahmed, Tasneem Yousif, Mariam Mohamed. Electric Energy from Sound Energy. Obour
Stem High School; Greater Cairo, Egypt.

Dhananjay Shendre, Ishwar Mohan, Snehal Shingade, Kruitika Thakare: Power generation using noise pollution.

Dr. Nalini Joseph .L, Isaac Jebakumar .S, Calvin Chezhian, Ganesh .S: Sound Chargeable Power Bank.

Donia Hany, Sfana Emad, Martha Atta et al., “Converting wasted sound energy to electricity by using condenser
microphone and power amplifier.” (n.d.).

M. Viknesh, M. Maheswaran, P. Sivasakthy: Generation of Electrical Energy From Sound Energy, 2018.
Page | 42
APC International. Piezoelectric Ceramics: Principles and Applications; APC International: Mackeyville, PA,
USA, 2002

F. P. Torgal, S. N. Amirkhanian, H. Wang, and E. Schlangen, Eco-efficient pavement construction materials.


Duxford, United Kingdom: Woodhead Publishing, 2020. ISBN: 978-0-12-818981-8.

“Arduino Uno Pin Diagram, Specifications, Pin Configuration & Programming,” Components101. [Online].
Available: https://components101.com/microcontrollers/arduino-uno. [Accessed: 15-Jun-2021].

V. O. 13, K. kumar sharma S. 14, A. D. 22, S. S. F. 22, A. K. N. 30, M. J. 7, and T. ferdoz .S. J. 27, “Transistor
as an amplifier - working & explanation,” Circuit Globe, 26-Apr-2017. [Online]. Available:
https://circuitglobe.com/transistor-as-an-amplifier.html. [Accessed: 06-Aug-2021].

R. Kumar, Madhesh, vitre cassée iphone 4 paris, A. Mohan, P. D. Sinh, T. Dermody, F. kelakam, A. Soitkar, A.
Godwin, Soumya, Shabeeb.KP, Anbarasu, Amitha, K. Bhardwaj, Tushi, Gamer, G. Thrippathy, Hargun,
Saveetha, Vickievik, Kiri, S. Lalu, Chinnachari, Kannan, Sanjay, Rikkita, D. Net, P. Kaur, M. Awasthi, Vani, M.
Bhandare, Sathyamoorthy, Nandan, Nadeem, Kashi, A. Nutini, and karthick B, “Working of lcd (liquid crystal
display) with diagram and principle,” Electronic Circuits and Diagrams-Electronic Projects and Design, 14-Aug-
2018. [Online]. Available: https://www.circuitstoday.com/liquid-crystal-displays-lcd-working. [Accessed: 11-
Aug-2021].

J. Banks, Discrete-event system simulation. Upper Saddle River, NJ: Prentice Hall, 2001, p. 3. ISBN 978-0-13-
088702-3.

“Proteus,” Free Download. [Online]. Available: https://proteus.soft112.com/. [Accessed: 13-Aug-2021].

Page | 43
6 APPENDIX
6.1 LM386 Amplifier
Utilizing the circuit designs perfected for recently introduced Quad Operational Amplifiers, these dual operational
amplifiers feature 1) low power drain, 2) a common mode input voltage range extending to ground/VEE, 3) single
supply or split supply operation and 4) pinouts compatible with the popular MC1558 dual operational amplifier.
The LM158 series is equivalent to one–half of an LM124. These amplifiers have several distinct advantages over
standard operational amplifier types in single supply applications. They can operate at supply voltages as low as
3.0 V or as high as 32 V, with quiescent currents about one–fifth of those associated with the MC1741 (on a per
amplifier basis). The common mode input range includes the negative supply, thereby eliminating the necessity
for external biasing components in many applications. The output voltage range also includes the negative power
supply voltage.

 Short Circuit Protected Outputs.


 True Differential Input Stage
 Single Supply Operation: 3.0 V to 32 V
 Low Input Bias Currents
 Internally Compensated
 Common Mode Range Extends to Negative Supply
 Single and Split Supply Operation
 Similar Performance to the Popular MC1558
 ESD Clamps on the Inputs Increase Ruggedness of the Device without Affecting Operation.

6.2 Atmega 328p datasheet


8-bit Microcontroller with 4/8/16/32K Bytes In-System Programmable Flash

Features
 High Performance, Low Power AVR
 8-Bit Microcontroller
 Advanced RISC Architecture
– 131 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20 MHz
– On-chip 2-cycle Multiplier
 High Endurance Non-volatile Memory Segments

Page | 44
– 4/8/16/32K Bytes of In-System Self-Programmable Flash progam memory (ATmega48P/88P/168P/328P)
– 256/512/512/1K Bytes EEPROM (ATmega48P/88P/168P/328P)
– 512/1K/1K/2K Bytes Internal SRAM (ATmega48P/88P/168P/328P)
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C
– Optional Boot Code Section with Independent Lock Bits
 In-System Programming by On-chip Boot Program. True Read-While-Write Operation
– Programming Lock for Software Security
 Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
– Real Time Counter with
 Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF package Temperature Measurement
– 6-channel 10-bit ADC in PDIP Package
 Temperature Measurement
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Byte-oriented 2-wire Serial Interface (Philips IC compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
 Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and Extended Standby
 I/O and Packages
– 23 Programmable I/O Lines
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
 Operating Voltage:
– 1.8 - 5.5V for ATmega48P/88P/168PV

Page | 45
– 2.7 - 5.5V for ATmega48P/88P/168P
– 1.8 - 5.5V for ATmega328P
 Temperature Range: 40°C to 85°C
 Speed Grade:
– ATmega48P/88P/168PV: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V
– ATmega48P/88P/168P: 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
– ATmega328P: 0 - 4 MHz @ 1.8 - 5.5V, 0 - 10 MHz @ 2.7 - 5.5V, 0 - 20 MHz @ 4.5 - 5.5V
 Low Power Consumption at 1 MHz, 1.8V, 25°C for ATmega48P/88P/168P:
– Active Mode: 0.3 mA
– Power-down Mode: 0.1 μA
– Power-save Mode: 0.8 μA (Including 32 kHz RTC)
6.3 Project Code
#include <LiquidCrystal.h>
#define Sensorpin1 A0
#define Sensorpin2 A1
#define Soundsensorpin A2
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

int MicBatpc = 0; //variable to hold microphone battery percentage


int DevBatpc = 0; //variable to hold device battery pecentage
const int transistorQ1 =9;// pin attached to microphone battery transistor
const int ledPinG1 = 7;//green LED pin for device baterry full and usabe indication
const int ledPinG2 = 6;//green LED pin for microphone battery full charge indication
const int ledPinY =10;//pin for moderate device battery level indication
const int ledPinR = 8;//pin for low device battery voltage indication
void setup()
{
lcd.begin(20, 4);//start LCD with 20 columns, 4 rows
lcd.clear(); //clear any garbage from the screen
pinMode (A0,INPUT);//analog pin to read microphone battery voltage
pinMode (A1,INPUT); //analog input to read device battery voltage

Page | 46
pinMode (A2, INPUT); //analog input to read the sound pressure level
pinMode (transistorQ1, OUTPUT); //switch for microphone battery charge control
pinMode(ledPinR, OUTPUT); //device battery low and need recharging
pinMode (ledPinY, OUTPUT); //device battery moderate
pinMode (ledPinG1, OUTPUT); //microphone battery fully charged status indication
pinMode(ledPinG2, OUTPUT); //device battery charge still available and usable
Serial.begin(9600);
}
void loop()
{
int valueMic = analogRead (Sensorpin1); //value on pin A0 (0-1023) for the
microphone battery
int valueDev = analogRead (Sensorpin2); //value on pin A1 for the device battery
double voltageMic = map (valueMic, 0, 1024, 0, 141); // Convert the analog reading
(which goes from 0 - 1023) to a voltage (0 - 1.6V)
voltageMic/=100;
double voltageDev = map (valueDev, 0, 1024, 0, 900); // Convert the analog reading
(which goes from 0 - 1023) to a voltage (0 - 9V)
voltageDev/=100;
int adc = analogRead(Soundsensorpin); //Read the ADC value from microphone, sound
sensor
double dB =(adc + 83.2073)/11.003; //Convert ADC value to dB using Regression values
//code to print the title of the LCD
lcd.setCursor (4, 0);
lcd.print ("Circuit Details :");
Serial.println ("Circuit Details");
//logic to set the microphone battery state of charge
values
if (voltageMic < 1.10) // microphone battery is less than 2.75V, at cut-off
{
MicBatpc=0;
digitalWrite (transistorQ1, HIGH);
}

Page | 47
if (voltageMic > 1.10 && voltageMic <1.15)
{
MicBatpc = 10;
digitalWrite (transistorQ1, HIGH);
}
if (voltageMic > 1.15 && voltageMic < 1.18)
{
MicBatpc = 20;
digitalWrite (transistorQ1, HIGH);
}
if (voltageMic > 1.18 && voltageMic < 1.20)
{
MicBatpc = 30;
digitalWrite (transistorQ1, HIGH);
}
if (voltageMic > 1.20 && voltageMic < 1.22)
{
MicBatpc = 40;
digitalWrite (transistorQ1, HIGH);
}
if (voltageMic > 1.22 && voltageMic < 1.25)
{
MicBatpc = 50;
digitalWrite (transistorQ1, HIGH);
}
if (voltageMic > 1.25 && voltageMic < 1.29)
{
MicBatpc = 60;
digitalWrite(transistorQ1, HIGH);
}
if (voltageMic > 1.29 && voltageMic < 1.32)

Page | 48
{
MicBatpc = 70;
digitalWrite (transistorQ1, HIGH);
}
if (valueMic > 1.32 && voltageMic < 1.35)
{
MicBatpc = 80;
digitalWrite(transistorQ1, HIGH);
}
if (voltageMic> 1.35 && voltageMic < 1.38)
{
MicBatpc = 90;
digitalWrite(transistorQ1, HIGH);
}
if (voltageMic == 1.40)
{
MicBatpc = 100;
digitalWrite (transistorQ1, LOW);
digitalWrite (ledPinG1, HIGH);
}
//send values to the LCD
lcd.setCursor (0, 1);
lcd.print("VoltMic:");
lcd.print (voltageMic);
lcd.print ("V");
lcd.print (" %:");
lcd.print (MicBatpc);
Serial.print ("VoltMic:");
Serial.print (voltageMic);
Serial.print ("V");
Serial.print (" %:");

Page | 49
Serial.println (MicBatpc);
delay (1000); //wait for a second to stabilize
//logic to set the device battery state of charge values
if (voltageDev < 5.50)
{
DevBatpc = 0;
digitalWrite (ledPinR, HIGH);
}
if (voltageDev > 5.50 && voltageDev <6.10)
{
DevBatpc = 10;
digitalWrite (ledPinR, HIGH);
}
if (voltageDev > 6.1 && voltageDev < 5.7)
{
DevBatpc = 20;
digitalWrite (ledPinR, HIGH);
}
if (voltageDev > 5.7 && voltageDev < 6.3)
{
DevBatpc = 30;
digitalWrite (ledPinR, HIGH);
}
if (voltageDev > 6.3 && voltageDev < 6.9)
{
DevBatpc = 40;
digitalWrite (ledPinR, HIGH);
}
if (voltageDev > 6.9 && voltageDev < 7.3)
{
DevBatpc = 50;

Page | 50
digitalWrite(ledPinY, HIGH);
}
if (voltageDev > 7.3 && voltageDev < 7.6)
{
DevBatpc = 60;
digitalWrite (ledPinY, HIGH);
}
if (voltageDev > 7.6 && voltageDev < 7.9)
{
DevBatpc = 70;
digitalWrite(ledPinG2, HIGH);
}
if (voltageDev > 7.9 && voltageDev < 8.3)
{
DevBatpc = 80;
digitalWrite (ledPinG2, HIGH);
}
if (voltageDev > 8.3 && voltageDev < 9.0)
{
DevBatpc = 90;
digitalWrite (ledPinG2, HIGH);
}
if (voltageDev == 9.0)
{
DevBatpc = 100;
DigitalWrite(ledPinG2, HIGH);
}
lcd.setCursor (0, 2);
lcd.print("VoltDev:");
lcd.print (voltageDev);
lcd.print ("V");

Page | 51
lcd.print (" %:");
lcd.print (DevBatpc);
Serial.print ("VoltDev:");
Serial.print (voltageDev);
Serial.print ("V");
Serial.print (" %:");
Serial.println (DevBatpc);
delay (1000); //wait for a second to stabilize
//setting the SPL monitor
{
lcd.setCursor (0, 4);
lcd.print ("SPL :");
lcd.print(dB);
lcd.print("dB");
Serial.print("SPL:");
Serial.print(dB);
Serial.println("dB");
delay (1000);
}
}

Page | 52

You might also like