Download light organ

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Buck converter wikipedia , lookup

Tube sound wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Sound reinforcement system wikipedia , lookup

Amplifier wikipedia , lookup

Dynamic range compression wikipedia , lookup

Television standards conversion wikipedia , lookup

Oscilloscope types wikipedia , lookup

Public address system wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
EE331 – Microprocessor Hardware and Software
Design Project: Light Organ
Submitted to: Dr. K. Wahid
By:
Edward Reed
Geoffrey Matisho
EE 331 Design: Light Organ
Design Goal
The goal of this project is to design, build, and program a light organ. A light organ utilizes LED
lights to illuminate upon a changing analog input signal. In this case, the input will be from a
microphone, and the illumination of a bank of LED lights will change with the level of varying sound
waves.
Methodology
The light organ will respond to an analog input provided by a small microphone. This analog
input will be fed to an analog to digital converter that is built into a PIC16F886 microcontroller. The
resulting digital value from the A/D converter will determine which LEDs will be turned on. The LED bank
will be controlled by the MCU. Since the analog signal from the microphone will be very minute, it must
be stepped up through an amplifier. This amplified signal can be better used in programming since it
gives a better resolution from the A/D converter. The value of the binary number produced from the
conversion of the input signal will correspond to the number of illuminated LEDs. A block diagram of the
methodology is displayed below as Figure 1.
Figure 1: Block Diagram of Light Organ
Design Process and Technical Specifications
The first block to be setup is the input sound via the microphone. The microphone is powered by a +5V
supply on one terminal and grounded on the other. A 0.001uF capacitor on the powered side of the mic
separates the AC from DC and passes the signal to the amplifier. The amplifier consists of a TLC252CP
operational amplifier configured as an inverting amplifier with a gain of approximately 3000. The signal
is then filtered with a 100uF smoothing capacitor between the output and ground. The output of the
amplifier is attached to pin 7 of the PIC16F886, port AN4, which is set up as the input for the analog to
digital converter. The code is setup to convert the analog signal to digital, and then depending on the
value of the result, activate a number of LED’s connected to PORTC. The pins of PORTC are connected to
the gate of logic level MOSFETs. Each MOSFET acts as a switch for a row of four LEDs. As each bit of
PORTC goes high, it will activate the corresponding 4 LEDs. The circuit diagram is depicted below as
Figure 2.
Figure 2: Circuit Diagram for Light Organ
Microprocessor choice: PIC16F886
The light organ design utilizes the PIC16F886 MCU. This readily available, inexpensive MCU has a
frequency range of 32 kHz to 8MHz. It has many input/output channels that can be either digital or
analog. The MCU has comparators, a 10 bit, 11 channel Analog to Digital converter, and has two 8 bit as
well as one 16 bit timer. This MCU has everything required, with extra pins for trouble shooting and
design expansion. The high resolution analog to digital converter is the major reason this MCU is used.
Design Challenges
Through the course of the design, some major challenges should be expected to arise. One major
problem is getting a proper signal from the input microphone. The amplification circuit used is not able
to produce a large enough signal for talking or ambient noise, but only direct sound from a speaker. To
correct for this challenge the range of the signal will be lowered since the difference between low and
high sound is only in the range of millivolts instead of volts. Another major challenge is selecting a range
for the digital result so that the whole spectrum of lights would be used. Initially only the first and
second bank of LEDs would illuminate for sound. This was corrected by coding and lowering the interval
required for more LEDs to turn on.
Design Shortcomings and Possible Improvement
The range of the incoming analog signal is a short coming even though it has been corrected for with
software. This can possibly be properly fixed using better analog circuitry. Multistage amplification with
higher gain-bandwidth-product operational amplifiers can provide a higher voltage signal, and possibly
correct this problem. This will not be investigated, however, since the focus of the design is on the use
and integration of the MCU. One improvement that can possibly be made is to increase the range of the
light organ. This can be done by adding more banks of LEDs and adding more cases for sound values.
Member Roles
There were many key tasks involved in creating this project including component research, circuit design
and construction, programming, debugging, and testing. First, an overall plan and the circuit design
were completed together. Then, In order to efficiently complete the project, the smaller tasks were split
up as evenly as possible and completed by the individual group members. Component research and
programming was completed by Edward Reed. Circuit construction as well as debugging was completed
by Geoffrey Matisho. Once the final circuit and code was constructed, testing and verification was
performed by both members together.
Conclusion
Although the operation of a light organ is simple in theory, the design process requires comprehensive
knowledge of the microprocessor, as well as the analog circuitry. Through use of the PIC16F886 in the
design, a greater level of understanding of the microcontroller was achieved. The light organ required
the use of the analog to digital converter, output registers, and a wide range of programming
instructions. Successful creation of the light organ provided a solid introduction into the use and
operation of the microcontroller, which will be useful in future designs.