Piezo Audio Trigger
Entire Circuit |
H11F1 PhotoFET Optocoupler |
Piezo disk and LM358 Op Amp |
LM555 Timer Square Wave Oscillator |
Description/Explanation
My project is a piezoelectric audio trigger that allows the
user to trigger bits of sound from either a square-wave oscillator or an audio
input. Basically, when you connect the battery, the oscillator puts out a
continuous tone. You can turn the attached knob to change the frequency of the
oscillator, or the perceived pitch of the tone. If you tap or press the
piezoelectric disk taped to the breadboard, the circuit will let out a tone at
the set pitch. The length of the tone corresponds to how long you apply
pressure to the disk. There is also a switch that changes which audio source
the piezo disk is affecting. When switched to the right, you can input any
audio source you choose using an 1/8th inch cable, and the piezo
disk basically has the same effect. The audio output is initially silent, and
when you press the piezo disk, the audio signal is let through. This can
function as a very musical stuttering effect, or a fun performance synth when
using the oscillator.
The signal
flow of the circuit is actually quite simple. When connected to power, the
LM555 oscillator outputs a square wave, with the square wave frequency set by
the voltage into Pin 5. This voltage lies somewhere between 9V and ground, with
a 10kΩ
potentio-meter connected between power, ground, and Pin 5 determining the
amount of voltage going into Pin 5. Simultaneously, there is an 1/8th
inch audio input jack that allows you to pass audio from another signal source
into the circuit. Both the ring and tip inputs of the jack are routed to a switch
that is also connected to the output of the oscillator. If the switch is set to
the right, the oscillator is the signal that routes to the rest of the circuit.
If the switch is set to the left, the audio input from the 1/8th
inch jack is the signal that routes to the rest of the circuit. I have just
described the audio production portion of the circuit, and now I’m going to
explain the control voltage portion. The piezo, with one wire connected to
ground and the other attached to the breadboard, outputs a voltage when
pressed. However, this output voltage is fairly low, so I needed to use an LM
358 Operational Amplifier to boost its signal. The signal from the piezo is
bypassed to ground, and then goes into the positive input of the op amp. Since
it’s configured as a non-inverting amplifier, there is a resistor to ground
from the negative input pin, and a resistor between the negative input pin and
the output pin. The signal from the output pin is then routed to a peak
follower, or a forward biased diode and a capacitor bypassed to ground. This ensures
that the piezo signal is constant and predictable. Finally, the signal from the
peak follower is output into the anode pin of the H11F1 Optocoupler, and the
cathode pin is output to ground. Basically, this acts as a type of variable
resistor, and when a signal is input into the cathode, the resistance decreases
from about 300 MΩ to about 100 Ω. The signal from either the oscillator
or audio jack is input into one of the terminal pins on the optocoupler, with
the output from the other terminal pin routed to the audio out. Normally, the
audio signal sees the resistance of 300 MΩ, but when the optocoupler
receives control voltage from the piezo, the resistance decreases to around 100Ω,
allowing the signal to pass through. This is what creates the basic trigger
effect of my circuit.
I ran into
more than a few issues while working on this project. Before my instructor
showed me the H11F1, I was trying to use JFET transistors to act as a
voltage-controlled amplifier (piezo acts as control voltage to audio signal),
but at the most, I could only get a tiny bit of distortion to come through. The
H11F1 proved to be a much more straightforward solution. Also, once I had the
H11F1 integrated into the circuit, everything was working fine except the piezo
trigger had the exact opposite effect on the audio signal from what I intended.
Instead of being initially silent, and audio being output only when the piezo
is pressed, the audio would initially be playing, and pressing the piezo would
cause a dip in amplitude. After trying a few different connections, the
solution to this ended up being quite simple. I just needed to place a large
resistor to ground after the piezo input, so the initial state of the piezo
output voltage would be at 0V. A few issues still remain. When using the
oscillator, especially at higher frequencies, there is a very noticeable hum
going to the output, even when the piezo is untouched. I tried to put a large
capacitor between power and ground, but this had basically no effect. Also,
when I took my circuit out of its box and hooked it up to record the video, the
output signal was extremely distorted all of a sudden. I saw that the wire to
ground at the peak follower had broken off, but when I replaced it, the signal
was still extremely distorted. Oddly enough, I found that when I pressed my
finger to the output of the diode, the distortion went away, and the signal was
actually cleaner than before. I have absolutely no idea why this is, and I’m
perplexed as to why the signal started becoming distorted in the first place.
Recording
Original Song: After That by Foliage (Torin Geller)
I start by holding down the piezo, then begin the stuttering effect about 10 seconds in. At about 55 seconds I switch to the oscillator. Unfortunately you can hear there's a slight hum from the oscillator when the trigger isn't pressed. I tried using some huge capacitors between power and ground but they had basically no effect.
https://soundcloud.com/k-e-n-z-o/final-project-recording/s-N5wu6
Video
No comments:
Post a Comment