0% found this document useful (0 votes)
25 views63 pages

Finalize Proj

Uploaded by

jayan d
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views63 pages

Finalize Proj

Uploaded by

jayan d
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

ARDUINO CONTROLLED MUSICAL FOUNTAIN

USING SOUND SENSOR

A Project report submitted to

Jawaharlal Nehru Technological University Kakinada, Kakinada

Bachelor of Technology
In
Electronics and Communication Engineering

Submitted By

G.SREENIVASULU (16X91A0424)
S. DEEPTHI REDDY (16X91A0446)
M.S.V SUSMITHA (16X91A0439)
V. SAI KUMAR (17X91A0405)

Under the esteemed guidance of


Mr.D. JAYANAIDU M.E., (Ph.D).,
Professor.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

SRI SATYANARAYANA ENGINEERING COLLEGE::ONGOLE


(An ISO 9001:2008 Certified Institution)
(Approved by AICTE, New Delhi & Affiliated to J.N.T.U.K, KAKINADA)
Ongole-523225,A.P.
2016-2020
SRI SATYANARAYANA ENGINEERING COLLEGE::ONGOLE
(An ISO 9001:2008 Certified Institution)
(Approved by AICTE, New Delhi & Affiliated to J.N.T.U.K, KAKINADA)
Ongole-523225,A.P.
2016-2020

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE

This is to certify that the main project report titled “ARDUINO CONTROLLED
MUSICAL FOUNTAIN USING SOUND SENSOR ” is the bonafied work carried
out by

G.SREENIVASULU (16X91A0424)
S. DEEPTHI REDDY (16X91A0446)
M.S.V SUSMITHA (16X91A0439)
V. SAI KUMAR (17X91A0405)

in partial fulfillment of the requirements for the award of Bachelor of


Technology in Electronics and Communication Engineering by
J.N.T.U.K, Kakinada during the academic year 2019-2020

Project Guide Project Co-ordinator H.O.D

Mr.D. JAYANAIDU Mr.R.KOTESWARARAO Mr.D.JAYANAIDU


M.E., (Ph.D)., M.Tech., M.E.,(PhD).,
PROFESSOR. ASSOCIATE PROFESSOR. PROFESSOR.

EXTERNAL EXAMINER
ACKNOWLEDGEMENT
We would like to express our profound sense of gratitude and indebtedness to our project
guide Mr.D. JAYANAIDU M.E., (Ph.D).,., professor of ECE department, SSN Engineering
College, Ongole for the valuable guidance and inspiration rendered by him during this project
work. Mere words would not be sufficient to place on record the erudite guidance, sustained
encouragement constructive comments and inspiring discussions with him during course of this
project work.

We honorably express our thanks to our project coordinator sri


R.KOTESWARARAO for providing us an atmost congenial atmosphere to carry
out our work peacefully.

We are highly grateful and indebted to Mr.D.JAYANAIDU M.E.,(Phd).,


professor and Head of the Department of ECE, SSN Engineering College, Ongole for
his support and valuable suggestions for completing this project.

We would like to express our deep sense of gratitude to all staff members of
Electronics and Communication Engineering Department, SSN Engineering College,
Ongole for their support in various aspects in completing this project.

We would like to place on record the valuable academic support given by our
principal Sri Dr.C.VEERESH NAYAK M.Tech., Phd. for completion of the course.

We express our sincere gratitude and thanks to our honorable Secretary and
Correspondent Sri. Y.RAMAKRISHNA REDDY garu, for providing us with good
faculty and infrastructure and for his moral support throughout the course.

We would like to convey gratitude to our parents whose prayers and blessings
are always with us.

In this regard we would like to thank my friends and others who helped us
directly or indirectly for successful completion of the seminar presentation.

G.SREENIVASULU (16X91A0424)
S. DEEPTHI REDDY (16X91A0446)
M.S.V SUSMITHA (16X91A0439)
V. SAI KUMAR (17X91A0405)
i
ABSTRACT
A musical water fountain, also known as a dancing fountain, is a type of animated fountain are
used to day to decorate city parks and squares ; to honor individuals or events that creates an aesthetic
design. The musical fountain combines moving jets of water, sound detector, colored lights and recorded
music, that controlled by a microcontroller or computer, for dramatic effects. In this paper a mini and low
cost musical fountain was designed using Arduino board. Arduino was used to control water valves and
create interesting effects in the fountain, like pulses of water that are timed to be in synchronization with
music. A transistor also used as switch to turn the fountain on and off according to the music and the
particular LED will light up synchronously.

ii
INDEX
CONTENTS PAGE NO:
CHAPTER-1
INTRODUCTION:
1.1:INTRODUCTION 1
1.2: LITERATURE SURVEY 3
1.3:ADVANTAGES 3
1.4:APPLICATIONS 3
1.5:OUTLINE OF THESIS 4

CHAPTER-2
EMBEDDED SYSTEM:
2.1:WHAT IS EMBEDDED SYSTEM 5
2.2:HISTORY 6
2.3:APPLICATION AREAS 7
2.4:CATAGORIES OF EMBEDDED SYSTEM 8
2.5:PERIPHERALS 10
2.6:TOOLS 11
2.6.1:SIMULATORS 11
2.6.2:MICROCONTROLLER STARTER KIT 12
2.6.3:EMULATORS 12

CHAPTER-3
DESCRIPTION OF BLOCK DIAGRAM:
3.1:BLOCK DIAGRAM 13
3.2:ARDUINO 13
3.2.1:ATMEGA 328P 18
3.3:SOUND SENSOR 24
3.4:LM393 COMPARATOR 27
3.5:RELAY MODULE 31
3.6:LED’S 36
3.7:12V DC PUMP 41
3.8:WORKING PRINCIPLE 44

CHAPTER-4
SOFTWARE USAGE:
4.1:ARDUINO IDE 45
4.2:WORKING 48

iii
CHAPTER-5
CIRCUIT DIAGRAM:
5.1:CIRCUIT DIAGRAM 49
5.2:PHYSICAL APPEARANCE 50

FUTURE SCOPE: 51

CONCLUSION: 52

REFFERENCE: 53

APPENDIX-A:
SOFTWARE CODING: 54

iv
LIST OF FIGURES

CHAPTER:1
1.1:DRY FOUNTAIN 2
1.2:DIGITAL WATER FOUNTAIN 2

CHAPTER:2
2.1:CLASSIFICATION OF EMBEDDE SYSTEM 8

CHAPTER:3
3.1:BLOCK DIAGRAM OF MUSICAL FOUNTAIN 13
3.2:ARDUIINO BOARD 15
3.3:PIN DIAGRAM OF ATMEGA 328P 19
3.4:SOUND SENSOR 24
3.5:PIN DIAGRAM OF SOUND SENSOR 25
3.6:CONNECTION OF SOUND SENSOR 26
3.7:PIN DIAGRAM OF LM393 COMPARATOR 29
3.8:INTERNAL DIAGRAM OF LM393 COMPARATOR 29
3.9:RELAY SPDT 31
3.10:WORKING PRINCIPLE OF SPDT RELAY 35
3.11:LED’S 36
3.12:DC PUMP 41

CHAPTER:4
4.1:ARDUINO 1.8.0. WINDOW 45
4.2:ARDUINO 1.8.0. UPLOADING BLINK WINDOW 47

CHAPTER:5
5.1:CIRCUIT DIAGRAM OF MUSICAL FOUNTAIN] 49
5.2: PHYSICAL APPEARANCE OF MUSICAL FOUNTAIN 50

v
LIST OF TABLES

CHAPTER:3

3.1:PIN DESCRIPTION OF ARDUINO 16


3.2:TECHNICAL SPECIFICATION OF ARDUINO BOARD 17
3.3:KEY PARAMETERS OF ATMEGA 328P 20
3.4:PIN DESCRIPTION OF ATMEGA 328P 24
3.5:MAXIMUM RATINGS FOR LM393 COMPARATOR 30

vi
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CHAPTER –I

INTRODUCTION
1.1OVERVIEW:

A water fountain or animated fountain is widely used these days to decorate city parks
and squares. It can either spray water into the air or create a waterfall effect.
Water fountains mainly need three parts to operate: water source, water pump and
delivery channel. All outdoor water fountains have a water source or reservoir from
which they draw their water and to which the water returns, creating a closed circuit. The
power to move the water is supplied by a pump. The pump is usually submerged in the
water reservoir. A spinning impellor in the pump draws water in and is spinning at such a
speed that the water is forced out of the pump by centrifugal force. The water forced from
the pump is delivered to the delivery channel or fountain head where it is sprayed into the
air through a fine nozzle or where it is allowed to flow down the outside of the structure
of the fountain, The water that is sprayed into the air will fall back into the fountain and
drain back into the reservoir.
Hero of Alexandria was perhaps the first designer of fountains with special effects. The
U-shaped served as the main part responsible for creation of special effects in his
fountains . Water fountain then become very interesting issue in the 12th, 16th, 17th and
20th centuries. Among all these years there were big developments in the design of
fountains .
Nowadays water fountains differ in shape, size and design. They can be very small that
decorate houses and gardens or it can be very large that decorate squares (such as Dubai
fountain ). Also fountains' design can be simple that use small number of water jets and
lights, or can be very complex that use hundreds of water jets and lights.
Fountains' style may also differ according to the place and purpose. For example a
mercury fountain is a fountain constructed for use with mercury rather than water. It
existed in some castles in Islamic Spain . A dry fountain is another example which is
usually built in public squares
and shopping centers to provide playful water displays in a minimum of space. The dry
nozzle fountain is installed underground, while the dry fountain is running; it is
allowed children to play with water columns in the fountain (see Figure 1).

S.S.N.ENGINEERING,COLLEGE 1
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.1.1: Dry fountain


Another special fountain is digital water curtain (also called waterfall graphic, curtain
images, and digital water curtains as shown in Figure 2). It can create any visual, logo,
word besides projecting any type of content in high quality with the water itself by
using the water writing technique[16].
In this paper, a small and low cost water fountain will be designed and built. This
musical water fountain will be controlled by music using Arduino programming
system. The basic concept of the project operation depends on taking an input (a
sound) from a sound detector sensor, then according to the sound volume (loud or
calm), the valves will be turned on\off (by Arduino) such that each different volume
of the sound will operate the fountaindifferently.

Fig.1.2: Digital water curtain

S.S.N.ENGINEERING,COLLEGE 2
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

1.2 LITERATURE SURVEY:

Beginning in ancient times, fountain designers relied on gravity, channeling


water from a higher source in a closed system to provide pressure.The aqueducts of
ancient Rome carried water down from the mountains to elevated cisterns to be
distributed through pipes for both drinking and ornamental purposes.Just a few feet of
elevation could provide enough water pressure for a satisfactory fountain spurt. Even
comparatively primitive societies enjoyed such fountains

1.3 ADVANTAGES:

 Relaxation

 Environmental Purification

 Entertainment

 Stress Relief

1.4 APPLICATIONS:

 Parks

 Holy places

 Events and functions

 Zoo’s

S.S.N.ENGINEERING,COLLEGE 3
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

1.5 OUTLINE OF THESIS:

We would like to give a brief report about " ARDUINOCONTROLLED MUSICAL


FOUNTAIN USING SOUND SENSOR”.

Chapter 1: Describes the introduction about our project. Here we explained about
introduction, advantages, and applications of this project.

Chapter 2: Deals with the introduction of Embedded Systems. Here we explained about
what is embedded systems, applications, peripherals and its categories.

Chapter 3: Describes the total description of the block diagram. In this chapter all the
blocks in the block diagram are explained.

Chapter 4: Describes the ARDUINO IDE software.

Chapter 5: Describes the circuit diagram and physical appearance of ARDUINO


CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

S.S.N.ENGINEERING,COLLEGE 4
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CHAPTER-2

EMBEDDED SYSTEM

2.1 WHAT IS EMBEDDED SYSTEM:

As its name suggests, Embedded means something that is attached to another


thing. An embedded system can be thought of as a computer hardware system
having software embedded in it. An embedded system can be an independent
system or it can be a part of a large system. An embedded system is a
microcontroller or microprocessor based system which is designed to perform a
specific task. For example, a fire alarm is an embedded system; it will sense only
smoke.

An embedded system has three components:

 It has hardware.

 It has application software.

 It has Real Time Operating system (RTOS) that supervises the application
software and provide mechanism to let the processor run a process as per
scheduling by following a plan to control the latencies. RTOS defines the
way the system works. It sets the rules during the execution of application
program. A small scale embedded system may not have RTOS.

So we can define an embedded system as a Microcontroller based, software


driven, reliable, real-time control system.

S.S.N.ENGINEERING,COLLEGE 5
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

2.2 HISTORY:

Here, are important milestones from the history of embedded system:

 In 1960, embedded system was first used for developing Apollo Guidance
System by Charles Stark Draper at MIT.
 In 1965, Autonetics, developed the D-17B, the computer used in the
Minuteman missile guidance system.
 In 1968, the first embedded system for a vehicle was released
 Texas Instruments developed the first microcontroller in1971.

 In 1987, the first embedded OS, Vx Works, was released by Wind River.

 Microsoft's Windows embedded CE in1996.

 By the late 1990s, the first embedded Linux system appeared.

 The embedded market reach $140 billion in2013.

 Analysts are projecting an Embedded market larger than $40 billion by2030.

S.S.N.ENGINEERING,COLLEGE 6
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

2.3 APPLICATION AREAS:

Nearly 99 percent of the processors manufactured end up in embedded


systems. The embedded system market is one of the highest growth areas as these
systems are used in very market segment consumer electronics, office automation,
industrialautomation,biomedicalengineering,wirelesscommunication,datacommuni
cation,telecommunications,transportation,military and so on.

Automation Systems:
In modern era, we are all aware of Automation systems. whether you are at
home or your office, if things are not automated then it can make your work quite
difficult. We don't need to go far, let's take the example of remote control. IT has
made our life so easy now we can turn things on or off by simply clicking buttons
on our remote control. Smart Home automation is a widely diverse application of
embedded systems..

Security Systems:

Now coming towards security systems, these are all the fruits of embedded
systems. These days we have sensors installed in our homes and even if you are
not at home you can still get complete visuals camera feeds on your mobile from
anywhere in the world. That became possible just because of Embedded systems.

APPLIANCES:

Most of our home appliances, like kitchen appliances which we normally


called electronic products are actually embedded products, micro Ovens, Toasters,
burners.

S.S.N.ENGINEERING,COLLEGE 7
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

2.4 CATEGORIES OF EMBEDDEDSYSTEM:

Fig 2.1. Classification of Embedded systems

Embedded system can be classified into 4 categories based on performance :

1. Real Time: It is defined as a system that gives a required o/p in a particular time.

These type of system follows deadline for completion of tasks. They are classified
as soft and hard real time systems.

2. Stand Alone: It doesn't require a host system like computer it works by itself. It

takes input from input port either analog or digital and processes, calculates and
converts data and gives result via connected devices.

3. Networked : These types of Embedded systems are related to a network to

access the resources. The connected network can be LAN, WAN or the internet.
The connection can be either wired or wireless. This type of embedded system is
the fastest growing area in all the embedded system application. The embedded
web server is a type of system wherein all the embedded devices are connected to a
web server and accessed and controlled by a web browser. Example for LAN
network embedded system is a home security system wherein all systems are
connected and run on the protocol TCP/IP.
S.S.N.ENGINEERING,COLLEGE 8
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

4. Mobile : They are used in portable embedded devices like cellphones, mobiles,

digital cameras MP3 players and personal digital assistants, etc. The basic
limitation of this device is the other resources and limitation of memory.

Embedded system can be classified into 3 categories based on performance of


Microcontroller:

1. Small Scale : Systems that are designed using 8~blt microcontrollers like 8051

or 16-bit microcontrollers like 80196 fall under this category of embedded systems
i.e. small scale embedded systems. The hardware and software complexities in
these systems is very low. The power consumption is also not an issue and they are
mostly battery operated. The coding can be done in simple embedded 'C'. Also the
memory may be small and hence care has to be taken that the software It not very
huge. An example of such a system could be a simple temperature measurement
embedded system, a robotic arm controller, etc.

2. Medium Scale : Systems that are designed using 16-bit to 32-bit


microcontrollers fall under this category. They may also have multiple such
microcontrollers or DSPs. The hardware as well as software complexity of such
systems is very high. They mostly have an operating system besides the
applications required. The RTOS (Real Time Operating System) is used in such
systems. These systems may also employ some ASSP processors to implement:
special task if any. Various examples of medium scale embedded systems are
routers for networking, ATM (is. Automated Teller Machine for bank transactional
machines etc.

S.S.N.ENGINEERING,COLLEGE 9
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

3. Sophisticated : These systems also have high end microcontrollers. The

hardware and software complexes are also very high. The design tools required are
also complicated and costly. The systems also use the RTOS and complicated time
bound applications. The time bounding on the computations is a big task in such
systems. These systems are used for cutting edge applications like smart phones,
multimedia systems etc.

2.5 PERIPHERALS:

Communication of an embedded system with an outside environment is done


by using different peripheral devices as a combination with microcontroller.

Let's see the different peripheral devices in embedded systemare:-

o Universal Serial Bus(USB)


o Networks like Ethernet, Local Area Network(LAN)etc
o Multi Media Cards (SD Cards, Flash memory, etc)
o Serial Communication Interface (SCI) like RS-232, RS-485, RS-422,etc
o Synchronous Serial Communication Interface like SPI, SSC and ESSI
o Digital to Analog/ Analog to Digital(DAC/ADC)
o General Purpose Input /Output (GPIO)
o Debugging like In System Programming (ISP), In Circuit Serial Programming
(ICSP), BDM Port, etc

S.S.N.ENGINEERING,COLLEGE 10
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

2.6TOOLS:

Debugging is a tool used for reducing the number of error or bugs inside a
computer program or an assembled electronic hardware.

Debugging of a compact subsystem is difficult because a small change in


one subsystem can create bugs in another system. The debugging used inside
embedded system differs in terms of their development time and debugging
features.

Let's see the different debugging tools used in embedded systemare:

2.6.1 Simulators:

Simulator is a tool used for simulation of an embedded system. Code tested


for microcontroller unit by simulating code on the host computer. Simulator is used
for model the behavior of the complete microcontroller in software.

Functions of simulators:

Let's see the functions performed by simulator are:

o It defines the processing or processor device family with various version of


target system.
o It monitors the detailed information of a source code and symbolic arguments
as the execution goes for each single step of operation.
o It simulates the ports of target system for each single step of execution.
o It provides the working status of RAM.
o It monitors the response of system and determines the throughput.
o It provides the complete meaning of the present command.

S.S.N.ENGINEERING,COLLEGE 11
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

o It monitors the detailed information of the simulator commands entered from


the keyboard or selected from the menu.
o It facilitates synchronization of internal peripherals and delays.
2.6.2 Microcontroller Starter Kit:

For developing an embedded system based project a complete microcontroller


starter kit is required. The major advantage of this kit over simulator is that they
work in real-time operating condition. Therefore it allows the easy input/output
functional verification. Consider a microcontroller starter kit consists of:-

o Hardware Printed Circuit Board(PCB)


o In-System Programmer(ISP)
o Some embedded system tools like compiler, assembler, linker, etc
o Sometimes, there is a requirement of an Integrated Development
Environment(IDE)

The above component available in microcontroller starter kit is completely enough


and the cheapest option available for developing simple microcontroller projects.

2.6.3 Emulators:

An emulator is a software program or a hardware kit which emulates the


functions of one computer system into another computer system. Emulators have
an ability to support closer connection to an authenticity of the digital object.

It can also be defined as the ability of a computer program in electronic


device to emulate another program or device. It focusing on recreating the original
computer environment and helps a user to work on any type of application or
operating system.

S.S.N.ENGINEERING,COLLEGE 12
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CHAPTER-III

DESCRIPTION OF BLOCK DIAGRAM

3.1 BLOCK DIAGRAM

Fig.3.1: Block diagram of musical fountain

3.2 ARDUINO

Arduino Uno is a microcontroller board based on 8-bit ATmega328P


microcontroller. Along with ATmega328P, it consists of other components such as
crystal oscillator, serial communication, voltage regulator, etc. to support the
microcontroller. Arduino Uno has 14 digital input/output pins (out of which 6 can
be used as PWM outputs), 6 analog input pins, a USB connection, A Power barrel

S.S.N.ENGINEERING,COLLEGE 13
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

jack, an ICSP header and a reset button. The 14 digital input/output pins can be
used as input or output pins by using pinMode() and digitalRead() and
digitalWrite() functions in the arduino to the programming. Each pin operate at 5V
and can provide or receive a maximum of 40mA current, and has an internal pull-
up resistor of 20-50 K Ohms which are disconnected by default. Out of these 14
pins, some pins have specific functions as listed below:
 Serial Pins 0 (Rx) and 1 (TX): Rx and Tx pins are used to receive and
transmit TTL serial data. They are connected with the corresponding
ATmega328P USB to TTL serial chip.
 External Interrupt Pins 2 and 3: These pins can be configured to trigger
an interrupt on a low value, a rising or falling edge, or a change in value.
 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by
using analog Write()function.
 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are
used for SPI communication.
 In-built LED Pin 13: This pin is connected with an built-in LED, when pin
13 is HIGH – LED is on and when pin 13 is LOW, it’s off.
Along with 14 Digital pins, there are 6 analog input pins, each of which
provides 10 bits of resolution, i.e. 1024 different values. They measure from 0 to 5
volts but this limit can be increased by using AREF pin with analog Reference ()
function.
Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using
Wire library.

S.S.N.ENGINEERING,COLLEGE 14
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.3.2: Arduino Board

Pin Description of Arduino:

Pin Pin Name Details


Category
Vin: Input voltage to Arduino when
using an external power source.
5V: Regulated power supply used to

Vin,3.3 power microcontroller and other


Power
V, 5V, components on the board.

GND 3.3V: 3.3V supply generated by on-


board voltage regulator. Maximum
current draw is 50mA.
GND: ground pins.
Reset Reset Resets the microcontroller.

S.S.N.ENGINEERING,COLLEGE 15
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Used to provide analog input in the


Analog Pins A0 – A5
range of 0-5V

Input/outp Digital
Can be used as input or output pins.
ut Pins Pin
s 0 –13
Used to receive and transmit TTL
Serial 0(Rx),1(Tx)
serial data.

External
2, 3 To trigger an interrupt.
Interrup
ts

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

10(SS),
11(MOSI),
SPI 12 (MIS Used for SPI communication.
O) and
13 (SCK)
Inbuilt LED 13 To turn on the inbuilt LED.

A4(SDA),
TWI Used for TWI communication.
A5 (SCA)

To provide reference voltage for input


AREF AREF
voltage.
TABLE 3.1:Pin description of ARDUINO

S.S.N.ENGINEERING,COLLEGE 16
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Arduino Uno has a couple of other pins as explained below:


 AREF: Used to provide reference voltage for analog inputs with analog

Reference () function.
 Reset Pin: Making this pin LOW, resets the microcontroller.

Arduino Uno Technical Specifications:

Microcontroller ATmega328p – 8 bit AVR family


microcontroller
Operating Voltage 5V

Recommended
7-12V
Inpu
t Voltage
Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)


DC Current on I/O Pins 40 Ma

DC Current on 3.3V Pin 50 mA


Flash Memory 32 KB (0.5 KB is used for Boot loader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock 16 MHz


Speed)

TABLE 3.2:Technical specification of ARDUINO

S.S.N.ENGINEERING,COLLEGE 17
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Arduino can be used to communicate with a computer, another arduino


board or other microcontrollers. The ATmega328P microcontroller provides
UART TTL (5V) serial communication which can be done using digital pin 0 (Rx)
and digital pin 1 (TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the
computer. The ATmega16U2 firmware uses the standard USB COM drivers, and
no external driver is needed. However, on Windows, a .info file is required. The
arduino software includes a serial monitor which allows simple textual data to be
sent to and from the arduino board. There are two RX and TX LEDs on the arduino
board which will flash when data is being transmitted via the USB-to-serial chip
and USB connection to the computer (not for serial communication on pins 0 and
1). A Software Serial library allows for serial communication on any of the Uno's
digital pins. The ATmega328P also supports I2C (TWI) and SPI communication.
The Arduino software includes a Wire library to simplify use of the I2C bus.
3.2.1 ATMEGA328p
The Atmega328 is a very popular microcontroller chip produced by Atmel.
It is an 8-bit microcontroller that has 32K of flash memory, 1K of EEPROM, and
2K of internal SRAM.
The Atmega328 is one of the microcontroller chips that are used with the
popular Arduino Due milanove boards. The Arduino Due milanove board comes
with either 1 of 2 microcontroller chips, the Atmega168 or the Atmega328. Of
these 2, the Atmega328 is the upgraded, more advanced chip. Unlike the
Atmega168 which has 16K of flash program memory and 512 bytes of internal
SRAM, the Atmega328 has 32K of flash program memory and 2K of Internal
SRAM.

S.S.N.ENGINEERING,COLLEGE 18
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

FIG.3.3: PIN DIAGRAM OF ATMEGA 328p

SPECIFICATIONS:
The Atmega328 has 28 pins. It has 14 digital I/O pins, of which 6 can be used
as PWM outputs and 6 analog input pins. These I/O pins account for 20 of the pins.

S.S.N.ENGINEERING,COLLEGE 19
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Parameter Value

CPU type 8-bit AVR

Performance 20 MIPS at 20 MHz

Flash memory 32 kB

SRAM 2 kB

EEPROM 1 kB

28 or 32 pin: PDIP-28, MLF-28,


Pin count TQFP-32

MLF-32

Maximum operating 20 MHz


frequency

Number of touch channels 16

Hardware Touch No
Acquisition

Maximum I/O pins 23

External interrupts 2

USB Interface No
Table 3.3: Key Parameters of Atmega328

S.S.N.ENGINEERING,COLLEGE 20
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

The ATmega328 is a single-chip microcontroller created that is


by Atmel in the mega AVR family (later Microchip Technology acquired Atmel in
2016). It has a modified Harvard architecture 8-bit RISC processor core.
The Atmel 8-bit AVR RISC-based microcontroller is used to
combines 32 kB ISP flash memory with the read-while-write capabilities,
and1 kB EEPROM, 2 kB SRAM, 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 and 10- bit A/D converter (8-channels in
TQFP and QFN/MLF packages), programmable watch dogtimer with internal
oscillator, and five software selectable power saving modes. The device operates
between 1.8-5.5 volts. The device achieves throughput approaching 1 MIPS per
MHz
As of 2013 the ATmega328 is commonly used in many projects and
autonomous systems where a simple, low-powered, low-cost micro-controller is
needed Perhaps the most common implementation of this chip is on the popular
Arduino development platform, namely to the Arduino Uno and Arduino
Nanomodel.
As stated before, 20 of the pins function as I/O ports. This means they can
function as an input to the circuit or as output. Whether they are input or output is
set in the software. 14 of the pins are digital pins, of which 6 can function to give
PWM output. 6 of the pins are for analog input/output.2 of the pins are for the
crystal oscillator. This is to provide a clock pulse for the Atmega chip. A clock
pulse is needed for synchronization so that communication can occur in synchrony
between the Atmega chip and a device.

S.S.N.ENGINEERING,COLLEGE 21
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

The chip needs power so 2 of the pins, VCC and GND, provide it power so
that it can operate. The Atmega328 is a low-power chip, so it only needs between
1.8-5.5V of power to operate.

The Atmega328 chip has an analog-to-digital converter (ADC) inside of it. This
must be or else the Atmega328 wouldn't be capable of interpreting analog signals.
Because there is an ADC, the chip can interpret analog input, which is why the
chip has 6 pins for analog input. The ADC has 3 pins set aside for it to function-
AVCC, AREF, and GND. AVCC is the power supply, positive voltage, that for the
ADC. The ADC needs its own power supply in order to work.GND is the power
supply ground. A REF is the reference voltage that the ADC uses to convert an
analog signal to its corresponding digital value. Analog voltages higher than the
reference voltage will be assigned to a digital value of 1, while analog voltages
below the reference voltage will be assigned the digital value of 0.

S.S.N.ENGINEERING,COLLEGE 22
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Pin Description Function


Number
1 PC6 Reset
2 PD0 Digital Pin (RX)
3 PD1 Digital Pin (TX)
4 PD2 Digital Pin
5 PD3 Digital Pin (PWM)
6 PD4 Digital Pin
7 VCC Positive Voltage (Power)
8 GND Ground
9 XTAL 1 Crystal Oscillator
10 XTAL 2 Crystal Oscillator
11 PD5 Digital Pin (PWM)
12 PD6 Digital Pin (PWM)
13 PD7 Digital Pin
14 PB0 Digital Pin
15 PB1 Digital Pin (PWM)
16 PB2 Digital Pin (PWM)
17 PB3 Digital Pin (PWM)
18 PB4 Digital Pin

19 PB5 Digital Pin


20 AVCC Positive voltage for ADC
(power)
21 AREF Reference Voltage

S.S.N.ENGINEERING,COLLEGE 23
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

22 GND Ground
23 PC0 Analog Input
24 PC1 Analog Input
25 PC2 Analog Input
26 PC3 Analog Input
27 PC4 Analog Input
28 PC5 Analog Input
Table 3.4: Pin Description of Atmega328p
Since the ADC for the Atmega328 is a 10-bit ADC, meaning it produces a
10-bit digital value, it converts an analog signal to its digital value, with the AREF
value being a reference for which digital values are high or low. Thus, a portrait of
an analog signal is shown by this digital value; thus, it is its digital correspondent
value. The last pin is the RESET pin. This allows a program to be rerun and start
over. And this sums up the pin out of an Atmega328 chip.

3.3 SOUND SENSOR

Fig.3.4.:sound sensor

S.S.N.ENGINEERING,COLLEGE 24
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Introduction

This is our updated version of the Analog Sound Sensor. Analog Sound Sensors are
typically used in detecting the ambient loudness in your enviroment. The Arduino can
collect its output signal by imitating the input interface. You may use it to make some fun
interactive projects such as a voice operated switch.
As one of our new version of breakout boards, we have improved the analog sound sensor
in the following ways:

 Wide voltage range from 3.3V to 5V


 Standard assembly structures (two 3mm holes with multiple of 5cm as interval)
 Easily recognised interfaces ("A" for analog and "D" for digital)
 Icons to simplly illustrate sensor function
 High quality connector
 Immersion gold surface

Specification

 Supply Voltage: 3.3V to 5V


 Detects sound intensity
 Interface: Analog
 Size: 22x30mm

PinOut

S.S.N.ENGINEERING,COLLEGE 25
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.3.5:Pin diagram of sound sensor

Blue:Analog signal output


Red:VCC
Black:GND

Connection Diagram :

Fig.3.6:Connection of sound sensor

Sound Sensor can detect the sound strength of the environment. The main component of
the module is a simple microphone, which is based on the LM358 amplifier and an
electrical microphone. OverviewThe library provides an example of publish and subscribe
messaging with a server that supports MQTT using Arduino run.

Features provided by the client library:


 Connect the device to any IP network using Ethernet, Wi-Fi, 4G/LTE.
 Publish any message to the MQTT server in standard JSON format on a
specific topic.
 Subscribe data from the server to the device on a specific topic.
 Unsubscribe the topic to no longer communicate to the device.
 Disconnect the device from any network connectivity.

S.S.N.ENGINEERING,COLLEGE 26
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

3.4LM 393 COMPARATOR:

Features:

 Internally Frequency Compensated for Unity Gain


 Large DC Voltage Gain: 100dB
 Wide Power Supply Range:
 LM358:
Singal supply:3V~32V
Or dual supply: ±1.5V~ 16V
 Input Common Mode Voltage Range Includes Ground
 Large Output Voltage Swing: 0V DC to Vcc -1.5V DC
 Power Drain Suitable for Battery Operation.
 Available in 8-Bump micro SMD chip sized package,
 Wide bandwidth (unity gain): 1 MHz (temperature compensated).
 Very low supply current drain (500 μA) essentially independent of
supply voltage.
 Low input offset voltage: 2 mV.

 Differential input voltage range equal to the power supply voltage.

Dual Operational Amplifiers:

These devices consist of two independent, high-gain, frequency-compensated


Operational Amplifiers designed to operate from a single supply over a wide range of
S.S.N.ENGINEERING,COLLEGE 27
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

voltages. Operation from split supplies also is possible if the difference between the two
supplies is 3 V to 32 V (3 V to 26 V for the LM2904 , and VCC is at least 1.5 V more
positive than the input common-mode voltage. The low supply-current drain is
independent of the magnitude of the supply voltage.
Applications include transducer Amplifiers dc amplification blocks, and all the
conventional Operational Amplifier circuits that now CAN be implemented more easily in
single-supply-voltage systems. For example, these devices CAN be operated directly from
the standard 5-V supply used in digital systems and easily provide the required Interface
electronics without additional 5-V supplies.
Complete LM358 datasheet specifications. The LM358 series consists of two
independent, high gain, internally frequency compensated operational amplifiers which
were designed specifically to operate from a single power supply over a wide range of
voltages. Operation from split power supplies is also possible and the low power supply
current drain is independent of the magnitude of the power supply voltage.

Description:

LM 358 consist of two independent, high gain, internally frequency compensated


operational amplifiers which were designed specifically to operate from a single power
supply over a wide range of voltage. Operation from split power supplies is also possible
and the low power supply current drain is independent of the magnitude of the power
supply voltage.

Application areas include transducer amplifier, DC gain blocks and all the conventional
OP-AMP circuits which now can be easily implemented in single power supply systems.

S.S.N.ENGINEERING,COLLEGE 28
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.3.7:Pin diagram of LM 393 comparator


INTERNAL DIAGRAM:

Fig.3.8:Internal diagram of LM 393 comparator

S.S.N.ENGINEERING,COLLEGE 29
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Table.3.5:Maximum ratings for LM 393 comparator

S.S.N.ENGINEERING,COLLEGE 30
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

3.5 RELAY MODULE:

Fig.3.9:Relay SPDT

Overview OF Relays
A relay is an electrically operated switch used to isolate one electrical circuit from
another. In its simplest form, a relay consists of a coil used as an electromagnet to open
and close switch contacts. Since the two circuits are isolated from one another, a lower
voltage circuit can be used to trip a relay, which will control a separate circuit that requires
a higher voltage or amperage. Relays can be found in early telephone exchange equipment,
in industrial control circuits, in car audio systems, in automobiles, on water pumps, in
high-power audio amplifiers and as protection devices.

Relay Switch Contacts


The switch contacts on a relay can be "normally open" (NO) or "normally closed"
(NC)--that is, when the coil is at rest and not energized (no current flowing through it), the
switch contacts are given the designation of being NO or NC. In an open circuit, no current
flows, such as a wall light switch in your home in a position that the light is off. In a closed
circuit, metal switch contacts touch each other to complete a circuit, and current flows,
similar to turning a light switch to the "on" position. In the accompanying schematic
diagram, points A and B connect to the coil. Points C and D connect to the

S.S.N.ENGINEERING,COLLEGE 31
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

switch. When you apply a voltage across the coil at points A and B, you create an
electromagnetic field, which attracts a lever in the switch, causing it to make or break
contact in the circuit at points C and D (depending if the design is NO or NC). The switch
contacts remain in this state until you remove the voltage to the coil. Relays come in
different switch configurations. The switches may have more than one "pole," or switch
contact. The diagram shows a "single pole single throw" configuration, referred to as
SPST. This is similar to a wall light switch in your home. With a single "throw" of the
switch, you close the circuit.

The Single Pole Double Throw Relay


A single pole double throw (SPDT) relay configuration switches one common pole
to two other poles, flipping between them. As shown in the schematic diagram, the
common point E completes a circuit with C when the relay coil is at rest, that is, no voltage
is applied to it.

This circuit is "closed." A gap between the contacts of point E and D creates an
"open" circuit. When you apply power to the coil, a metal level is pulled down, closing the
circuit between points E and D and opening the circuit between E and C. A single pole
double throw relay can be used to alternate which circuit a voltage or signal will be sent to.

SPDT Relay:
(Single Pole Double Throw Relay) an electromagnetic switch, consist of a coil
(terminals 85 & 86), 1 common terminal (30), 1 normally closed terminal (87a), and one
normally open terminal (87) (Figure 1).

When the coil of an SPDT relay (Figure 1) is at rest (not energized), the common terminal
(30) and the normally closed terminal (87a) have continuity. When the coil is energized,
S.S.N.ENGINEERING,COLLEGE 32
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

the common terminal (30) and the normally open terminal (87) have continuity.

The diagram below center (Figure 2) shows an SPDT relay at rest, with the coil not
energized. The diagram below right (Figure 3) shows the relay with the coil energized. As
you can see, the coil is an electromagnet that causes the arm that is always connected to
the common (30) to pivot when energized whereby contact is broken from the normally
closed terminal (87a) and made with the normally open terminal (87).

When energizing the coil of a relay, polarity of the coil does not matter unless there is a
diode across the coil. If a diode is not present, you may attach positive voltage to either
terminal of the coil and negative voltage to the other, otherwise you must connect positive
to the side of the coil that the cathode side (side with stripe) of the diode is connected and
negative to side of the coil that the anode side of the diode is connected.

S.S.N.ENGINEERING,COLLEGE 33
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Why do I want to use a relay and do I really need to?


Anytime you want to switch a device which draws more current than is provided by an
output of a switch or component you'll need to use a relay. The coil of an SPDT or an
SPST relay that we most commonly use draws very little current (less than 200 milliamps)
and the amount of current that you can pass through a relay's common, normally closed,
and normally open contacts will handle up to 30 or 40 amps. This allows you to switch
devices such as headlights, parking lights, horns, etc., with low amperage outputs such as
those found on keyless entry and alarm systems, and other components. In some cases you
may need to switch multiple things at the same time using one output. A single output
connected to multiple relays will allow you to open continuity and/or close continuity
simultaneously on multiple wires.
There are far too many applications to list that require the use of a relay, but we do show
many of the most popular applications in the pages that follow and many more in our
Relay Diagrams - Quick Reference application. If you are still unclear about what a relay
does or if you should use one after you browse through the rest of this section, please post
a question in the12volt's install bay. (We recommend Tyco (formerly Bosch) or Potter &
Brumfield relays for all of the SPDT and SPST relay applications shown on this site.)

S.S.N.ENGINEERING,COLLEGE 34
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.3.10:Working principle of SPDT Relay

S.S.N.ENGINEERING,COLLEGE 35
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

3.6 LED’S:

A light-emitting diode (LED) is a semiconductorlight source that emits light when


current flows through it. Electrons in the semiconductor recombine with electron holes,
releasing energy in the form of photons. The color of the light (corresponding to the
energy of the photons) is determined by the energy required for electrons to cross the band
gap of the semiconductor. White light is obtained by using multiple semiconductors or a
layer of light-emitting phosphor on the semiconductor device.

Appearing as practical electronic components in 1962, the earliest LEDs emitted


low-intensity infrared light. Infrared LEDs are used in remote control circuits, such as
those used with a wide variety of consumer electronics. The first visible-light LEDs were
of low intensity and limited to red. Modern LEDs are available across the visible,
ultraviolet, and infrared wavelengths, with high light output.

Fig.3.11:LED’S

S.S.N.ENGINEERING,COLLEGE 36
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Early LEDs were often used as indicator lamps, replacing small incandescent bulbs,
and in seven-segment displays. Recent developments have produced high-output white
light LEDs suitable for room and outdoor area lighting. LEDs have led to new displays and
sensors, while their high switching rates are useful in advanced communications
technology.
LEDs have many advantages over incandescent light sources, including lower
energy consumption, longer lifetime, improved physical robustness, smaller size, and
faster switching. LEDs are used in applications as diverse as aviation lighting, automotive
headlamps, advertising, general lighting, traffic signals, camera flashes, lighted wallpaper,
horticultural grow lights, and medical devices.[8]
Unlike a laser, the light emitted from an LED is neither spectrally coherent nor even
highly monochromatic. However, its spectrum is sufficiently narrow that it appears to the
human eye as a pure (saturated) color.[9][10] Also unlike most lasers, its radiation is not
spatially coherent, so it cannot approach the very high brightnesses characteristic of lasers.
By selection of different semiconductor materials, single-color LEDs can be made that
emit light in a narrow band of wavelengths from near-infrared through the visible
spectrum and into the ultraviolet range. As the wavelengths become shorter, because of the
larger band gap of these semiconductors, the operating voltage of the LED increases.

Blue and ultraviolet

S.S.N.ENGINEERING,COLLEGE 37
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Blue LEDs have an active region consisting of one or more InGaNquantum wells
sandwiched between thicker layers of GaN, called cladding layers. By varying the relative
In/Ga fraction in the InGaN quantum wells, the light emission can in theory be varied from
violet to amber .Aluminium gallium nitride (AlGaN) of varying Al/Ga fraction can be used
to manufacture the cladding and quantum well layers for ultraviolet LEDs, but these
devices have not yet reached the level of efficiency and technological maturity of
InGaN/GaN blue/green devices. If un-alloyed GaN is used in this case to form the active
quantum well layers, the device emits near-ultraviolet light with a peak wavelength
centred around 365 nm. Green LEDs manufactured from the InGaN/GaN system are far
more efficient and brighter than green LEDs produced with non-nitride material systems,
but practical devices still exhibit efficiency too low for high-brightness applications.

With AlGaN and AlGaInN, even shorter wavelengths are achievable. Near-UV
emitters at wavelengths around 360–395 nm are already cheap and often encountered, for
example, as black light lamp replacements for inspection of anti-counterfeiting UV
watermarks in documents and bank notes, and for UV curing. While substantially more
expensive, shorter-wavelength diodes are commercially available for wavelengths down to
240 nm.[88] As the photosensitivity of microorganisms approximately matches the
absorption spectrum of DNA, with a peak at about 260 nm, UV LED emitting at 250–
270 nm are expected in prospective disinfection and sterilization devices. Recent research
has shown that commercially available UVA LEDs (365 nm) are already effective
disinfection and sterilization devices. UV-C wavelengths were obtained in laboratories
using aluminium nitride (210 nm), boron nitride (215 nm) and diamond (235 nm).
White
There are two primary ways of producing white light-emitting diodes. One is to use
individual LEDs that emit three primary colors—red, green and blue—and then mix all the
colors to form white light. The other is to use a phosphor material to convert
monochromatic light from a blue or UV LED to broad-spectrum white light, similar to a
fluorescent lamp. The yellow phosphor is cerium-doped YAG crystals suspended in the
package or coated on the LED. This YAG phosphor causes white LEDs to look yellow
when off, and the space between the crystals allow some blue light to pass through.
Alternatively, white LEDs may use other phosphors like magnesium-doped potassium
fluorosilicate (PFS) or other engineered phosphors. PFS assists in red light generation, and
is used in conjunction with conventional Ce: YAG phosphor. In LEDs with PFS phosphor,
S.S.N.ENGINEERING,COLLEGE 38
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

some blue light passes through the phosphors, the Ce:YAG phosphor converts blue light to
green and red light, and the PFS phosphor converts blue light to red light. The color
temperature of the LED can be controlled by changing the concentration of the phosphors.
The 'whiteness' of the light produced is engineered to suit the human eye. Because
of metamerism, it is possible to have quite different spectra that appear white. However,
the appearance of objects illuminated by that light may vary as the spectrum varies. This is
the issue of color rendition, quite separate from color temperature. An orange or cyan
object could appear with the wrong color and much darker as the LED or phosphor does
not emit the wavelength it reflects. The best color rendition LEDs use a mix of phosphors,
resulting in less efficiency but better color rendering.
RGB systems

Combined spectral curves for blue, yellow-green, and high-brightness red solid-state
semiconductor LEDs. FWHM spectral bandwidth is approximately 24–27 nm for all three
colors.

RGB LED
Mixing red, green, and blue sources to produce white light needs electronic circuits
to control the blending of the colors. Since LEDs have slightly different emission patterns,
the color balance may change depending on the angle of view, even if the RGB sources are
in a single package, so RGB diodes are seldom used to produce white lighting.
Nonetheless, this method has many applications because of the flexibility of mixing

S.S.N.ENGINEERING,COLLEGE 39
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

different colors,[97] and in principle, this mechanism also has higher quantum efficiency in
producing white light.[98]
There are several types of multicolor white LEDs: di-, tri-, and tetrachromatic white
LEDs. Several key factors that play among these different methods include color stability,
color rendering capability, and luminous efficacy. Often, higher efficiency means lower
color rendering, presenting a trade-off between the luminous efficacy and color rendering.
For example, the dichromatic white LEDs have the best luminous efficacy (120 lm/W), but
the lowest color rendering capability. However, although tetrachromatic white LEDs have
excellent color rendering capability, they often have poor luminous efficacy. Trichromatic
white LEDs are in between, having both good luminous efficacy (>70 lm/W) and fair color
rendering capability.
One of the challenges is the development of more efficient green LEDs. The theoretical
maximum for green LEDs is 683 lumens per watt but as of 2010 few green LEDs exceed
even 100 lumens per watt. The blue and red LEDs approach their theoretical limits.

Multicolor LEDs also offer a new means to form light of different colors. Most
perceivable colors can be formed by mixing different amounts of three primary colors.
This allows precise dynamic color control. However, this type of LED's emission power
decays exponentially with rising temperature,[99] resulting in a substantial change in color
stability. Such problems inhibit industrial use. Multicolor LEDs without phosphors cannot
provide good color rendering because each LED is a narrowband source. LEDs without
phosphor, while a poorer solution for general lighting, are the best solution for displays,
either backlight of LCD, or direct LED based pixels.

Dimming a multicolor LED source to match the characteristics of incandescent


lamps is difficult because manufacturing variations, age, and temperature change the
actual color value output. To emulate the appearance of dimming incandescent lamps may
require a feedback system with color sensor to actively monitor and control the color.[100]

S.S.N.ENGINEERING,COLLEGE 40
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Applications

 Indicators and signs


 Lighting
 Data communication and other signalling
 Machine vision systems
 Biological detection
 Other applications

3.7 12V DC PUMP

DC powered pumps use direct current from motor, battery, or solar power to move
fluid in a variety of ways. Motorized pumps typically operate on 6, 12, 24, or 32 volts of
DC power.

Types

Fig.3.12:DC Pump

DC pumps come in many different design types, each with its own method of
operation, advantages, and preferred applications.

Specifications

As with most pumps, the primary specifications to consider when discerning DC


powered pump performance are flowrate, pump head, pressure, horsepower, and operating
S.S.N.ENGINEERING,COLLEGE 41
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

temperature. For an explanation of these specifications and pump performance curves,


visit the Pump Flow information page on Engineering360.

Features

DC powered pumps can also be distinguished based on the features they


provide, such as adjustable speed, run-dry capability, and corrosion resistance.

The benefits of DC water pump

Are you still hesitant to choose an AC or DC water pump for your system? If you
want to ask my opinion, absolutely I will vote for the DC water pump. DC water pumps
have become more and more popular over these years due to its unique advantages. Maybe
in some cases, AC pumps are a smart choice if you are only in temporary use. But for most
of the time, AC pumps have many fatal flaws. I will tell you the benefits of DC water
pump from the following four aspects.

1. Safety

If your application has safety requirements, the DC water pump has a unique
advantage. Such as indoor fountains, desktop crafts, even the aquarium tank and many
types of devices. We will never hope to be hurt by electric shock.

2. Flexible for Installation

You don’t have to use the electrical grid as the power supply for the DC water
pump. It could use the existing power source on your device. This makes the pump
installation very flexible, and the equipment manufacturer can install the pump wherever
they want to fit in their machine.

3. High-efficiency & Energy Saving

It is a fact that DC pumps are more expensive than AC pumps. But it also much
more efficient. If we focus on the system’s energy usage, when we use the pump for more
than 4 hours a day, the DC water pump can save you about one or two pumps a year

S.S.N.ENGINEERING,COLLEGE 42
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

4. Long Lifespan

The AC water pump often uses copper-clad aluminum coils to achieve a competitive
advantage at a low price. The DC water pump typically uses pure copper coils and more
advanced motor technology to guarantee a long lifespan.

SPECIFICATION:

 Input Voltage: 4.5-12V DC


 Power: 3W
 H.max.: 0.4-2.0M
 Q.max.: 200L/H
 Size: 38 * 34 * 27mm
 Wire Length: 140cm

Applications:

 Water Vending Machines


 Mini water Fountain

3.8 WORKING PRINCIPLE:

The basic idea of this musical fountain is to take an input from any external
sound source like mobile, ipad, pc etc., sample the sound and break it down to different
voltage ranges, then use the output to turn various ranges, then use the output to turn on
various realy.

We first used a condenser mic based sound sensor module to perform on the sound
source to split the sounds into different voltage ranges.

S.S.N.ENGINEERING,COLLEGE 43
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Then the voltage will be fed to op-amp to compare sound level with a particular
limit. The higher voltage range will corresponding to a relay switch ON which comprises
a musical water fountain operating to the beats and rhythms of the song.

S.S.N.ENGINEERING,COLLEGE 44
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CHAPTER-IV

SOFTWARE USUAGE

4.1 ARDUINO IDE:

The Arduino integrated development environment (IDE) then it is the a


cross- platform application (for Windows, macOS, Linux) that is written in the
programming language Java. It is used to write and upload programs to
Arduinoboard.The source code for the IDE is released under the GNU General
Public License, version

2. The Arduino IDE supports the languages C and C++ using special rules of
code structuring. The Arduino IDE supplies the a software library from the Wiring
project, which provides many common input and output procedures. User-written
code only requires two basic functions, for starting the sketch and the main
program loop, that are compiled and linked with a program stub main( ) into
anexecutable cyclic executive program with the GNU tool chain, also included
with the IDEdistribution

Fig.4.1: Arduino 1.8.0 window

S.S.N.ENGINEERING,COLLEGE 45
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

The Arduino IDE employs the program argued to convert the executable
code into a text file in hexadecimal encoding that is loaded into the Arduino board
by a loader program in the board's firmware.
This is the Arduino IDE once it’s been opened. It opens into a blank sketch
where you can start programming immediately. First, we should configure the
board and port settings to allow us to upload code. Connect your Arduino board to
the PC via the USBcable.
If you downloaded the Arduino IDE before plugging in your Arduino board,
when you plugged in the board, the USB drivers should have installed
automatically. The most recent Arduino IDE should recognize connected boards
and label them with which COM port they are using. Select the Tools pull down
menu and then Port.Here it should list all open COM ports, and if there is a
recognized Arduino Board, it will also give its name. Select the Arduino board that
you have connected to the PC. If the setup was successful, in the bottom right of
the Arduino IDE, you should see the board type and COM number of the board
you plan to program.
Note: the Arduino Uno occupies the next available COM port; it will not always be
COM3.

S.S.N.ENGINEERING,COLLEGE 46
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

Fig.4.2: Arduino 1.8.0 Uploading Blink window

One common procedure to test whether the board you are using is properly set
up is to upload the “Blink” sketch. This sketch is included with all Arduino IDE
releases and can be accessed by the Filepull-down menu and going to Examples,
01.Basics, and then select Blink. Standard Arduino Boards include a surface-
mounted LED labeled “L” or “LED” next to the “RX” and “TX” LEDs that is
connected to digital pin 13. This sketch will blink the LED at a regular interval,
and is an easy way to confirm if your board is set up properly and you were
successful in uploading code. Open the “Blink” sketch and press the “Upload”
button in the upper-left corner to upload “Blink” to the board.

S.S.N.ENGINEERING,COLLEGE 47
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

4.2 Working:

EXAMPLE:
We aim to create a new LDR-LED based simple technique to detect cracks in
rails that will be cheap enough, so that it can be put to mass usage. The
automatic crack detection system isconstructed using sensors; our scheme
consists of a railway line for looking cracks during night. When local railways
don’toperate.This crack detection system consists of a LED and LDR assembly
that functions as the rail crack detector. In our project design, the LED and LDR
sensors are placed at both sides of vehicles. If there are no cracks, the LED light
does not fall on the LDR and hence the LDR resistance is high. If there are no
crack s on the track the LED light falls on the LDR, the resistance of the LDR
gets reduced. This is detected by a microcontroller and the data will be
displayed on LCD then turns on buzzer.

S.S.N.ENGINEERING,COLLEGE 48
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CHAPTER-V

CIRCUIT DIAGRAM

5.1 CIRCUIT DIAGRAM:

Fig.5.1:Circuit diagram of musical fountain

S.S.N.ENGINEERING,COLLEGE 49
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

5.2 PHYSICAL APPERANCE:

Fig.5.2:Physical appearance of musical fountain

S.S.N.ENGINEERING,COLLEGE 50
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

FUTURE SCOPE

MUSICAL FOUNTAIN WITHOUT PUMP :

Simply put, a gravity-fed fountain uses gravity to draw water to its lowest
point while air pressure builds and pushes the water back up through a series of
tubing.

A continuous-flow water fountain moves water without a pump or mechanical


parts. A gravity water fountain moves water through multiple chambers by using a
combination of gravity and pressure science to tumble water into the air in a
dancing, fluid flow.

S.S.N.ENGINEERING,COLLEGE 51
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

CONCLUSION

In this project, a pro-type & effective musical fountain had designed.


With the simple components along with arduino used were to build the design. It
gaves the accurate result such that it worked with any type of music and LED’s
gave the project more beautiful effects. This project can be used to decorate
houses, events and parks with large number of valves with same principle.

S.S.N.ENGINEERING,COLLEGE 52
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

REFERENCES

1. "Fountain of Joy to spring back to life". The Times Of India. October 6, 2012.
Retrieved October 19, 2012.
2. "Fountain comeback by Puja". Yahoo News. Retrieved October 19, 2012.
3. http://www.thesouthkoreatravelguide.com/gangwon-do/gohan/high-one-
resort_attraction-review.html
4. "Roshen Fountain in Vinnitsa was opened! :: Confectionery Corporation
ROSHEN". roshen.com. Archived from the original on 2015-07-10.
Retrieved 2015-10-25

S.S.N.ENGINEERING,COLLEGE 53
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

APPENDIX-A

SOFTWARE CODING

int sound = A0;


int red = 8;
int green = 9;
int blue=10;
int motor = 4;

void setup()

{
pinMode(sound,INPUT);

pinMode(red,OUTPUT);

pinMode(blue,OUTPUT);

pinMode(green,OUTPUT);

pinMode(motor,OUTPUT);

Serial.begin(9600);
}

void loop()

int val = analogRead (sound);

Serial.println(val);

delay(100);

S.S.N.ENGINEERING,COLLEGE 54
ARDUINO CONTROLLED MUSICAL FOUNTAIN USING SOUND SENSOR

if (val>500)

{
digitalWrite(motor,HIGH);

digitalWrite(green,HIGH);

digitalWrite(red,HIGH);

digitalWrite(blue,HIGH);

delay(100);
}

Else

{
digitalWrite(motor,LOW);

digitalWrite(green,LOW);

digitalWrite(red,LOW);

digitalWrite(blue,LOW);

delay(50);

}
}

S.S.N.ENGINEERING,COLLEGE 55

You might also like