sparkfun SEN-12642 Скачать руководство пользователя страница 5

if(Vin > 0)  
    Vout = 0; 
else 
    Vout = Vin * -2.2 

The opamp inverts and amplifies the signal. When it’s output swings high, D2 turns on, and charges C1. When the
opamp output is high or not swinging, D2 is turned off, and C1 discharges through R9. Thus, C1 tracks the peaks
of the input signal.

IC1G4 is a buffer amplifier, so external loads on the envelope pin won’t change the C1’s charge/discharge
behavior.

This results in a signal that tracks the peak amplitude of the input signal. A louder sound will result in a higher
voltage on the Envelope pin. As with the audio pin, the envelope can be connected to the ADC of a
microcontroller.

Third Stage

The final stage implements a thresholded switch on the envelope signal.

Schmitt Trigger

The Schmitt trigger watches the envelope signal, and toggles the output when the threshold is exceeded. A
Schmitt trigger is a comparator that adjusts it’s threshold voltage when the output switches, requiring a higher
voltage to switch on than to switch off. This allows it to ignore some ripple in the input signal, like the ripple present
in the output of the envelope follower stage.

The output of the Schmitt trigger is found on the Gate pin. You can connect it to a digital input. We’ll use it to
trigger interrupts in the software example.

Outputs

Each of the three output signals is present on the .1" header at the edge of the board. They are active
simultaneously. If you aren’t using one in your particular application, simply leave that pin disconnected.

Configuration

Care and Feeding Of The Capsule

The heart of the Sound Detector is the electret microphone capsule – without it, we couldn’t convert acoustic
energy into electrical energy. These capsules have a couple of quirks that we need to understand in order to apply
them successfully.

Inside the capsule is the diaphragm, which is actually one plate of a small capacitor. That capacitor forms a
voltage divider with the external bias resistor. The diaphragm moves in response to sound, and the capacitance
changes as the plates get closer together or farther apart, causing the divider to change. Since capacitors are

Содержание SEN-12642

Страница 1: ...tector is a small board that combines a microphone and some processing circuitry It provides not only an audio output but also a binary indication of the presence of sound and an analog representation...

Страница 2: ...it Suggested Reading How to Use a Breadboard Analog vs Digital The Wikipedia article on sound Quick Start To get started with the Sound Detector simply connect it to a power supply Sound Detector Powe...

Страница 3: ...ow the sound detector responds to a series of sound pulses Sample Sound Detector Output This shows the output voltages over time The dark green trace is the audio output of the sound detector The audi...

Страница 4: ...ding a DC offset of approximately the supply voltage The output from the capsule is an extremely small voltage so the signal from the capsule is amplified by IC1G1 an operational amplifier stage By de...

Страница 5: ...switch on than to switch off This allows it to ignore some ripple in the input signal like the ripple present in the output of the envelope follower stage The output of the Schmitt trigger is found on...

Страница 6: ...pply is by checking it with an oscilloscope or volt meter set to the AC Volts or if provided the AC millivolts range A truly clean supply will show 0 000 VAC Based on the supplies used in testing ripp...

Страница 7: ...g or undesirable To disable it simply use a solder sucker or wick to remove the solder blob from the jumper near the LED Physical Considerations The electret capsule on the Sound Detector is also sens...

Страница 8: ...ht Angle PRT 00553 A row of right angle male headers break to fit 40 pins that can be cut to any size Used with custom PCBs or gen Jumper Wires Premium 12 M F Pack of 10 PRT 09385 This is a SparkFun e...

Страница 9: ...e to rises to indicate the amplitude of the sound is sampled in the loop and it prints an indication of the level to the serial terminal For more details about the Sound Detector please check the hook...

Страница 10: ...o interrupt pinMode PIN_GATE_IN INPUT attachInterrupt IRQ_GATE_IN soundISR CHANGE Display status Serial println Initialized void loop int value Check the envelope input value analogRead PIN_ANALOG_IN...

Страница 11: ...LM3916 VU Taper COM 12695 This is the LM3916 Dot Bar display analog controlled LED driver that uses a more logarithmic VU scale which mak 2 Electrolytic Decoupling Capacitors 10uF 25V COM 00523 Low p...

Страница 12: ...5V for the Sound Detector The 5V is connected to the rail at the top of the breadboard It is used to power the Sound Detector and as the anode supply for the LEDs The 13V is on the lower rail and is t...

Страница 13: ...are being picked up If the audio output is distorted the gain may need to be reduced If the audio output is really quiet the gain may need to be increased If there is a constant tone on the audio out...

Отзывы: