Thursday, May 8, 2014

Final Project Report

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.

Schematic





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





Friday, May 2, 2014

Final Project Report

Success! After encountering more than a few issues, I finally got the basic function of my circuit to work. Before, I had the piezo affecting the signal of the oscillator, but instead of the oscillator's gain being controlled by the piezo, it would create a dip in the amplitude of the signal when I tapped its surface. It turns out that I just needed to put a large resistor to ground after the piezo output to get it working. After figuring this out (with Steven's help), I added an audio input and a switch so you could use the piezo as a trigger for bursts of input audio. I actually think this sounds a lot cooler than my oscillator, and it's a pretty interesting sounding effect. Unfortunately, at higher frequencies, it seems like a small portion of the oscillator signal comes through, which is kind of annoying. Also, I tried adding simple high pass and low pass filters after the output from the H1F11, but for some reason this made H1F11 stop working, and the piezo no longer had any effect on the signal.

Here's a video of my project working

Friday, April 25, 2014

Final Project Progress

I've been waiting on a bunch of parts still, so I have yet to tackle the white noise generator, but I'm very close to getting my oscillators working. However, I just can't get pressure on the piezo to translate into any change in volume of the oscillator. I think I need to solder some leads to the piezos or something because they might not be connecting into the breadboard correctly. I also need to start thinking about how I want to enclose my project. The bowls and knobs need to be visible, so I'm just going to have to spend some time figuring out that whole set up.

Here's a picture of my oscillator as is. I was planning on putting a high and low pass filter on each of these oscillators, but the priority right now is getting the piezos to work.


Friday, April 18, 2014

Final Project Report

I'm still waiting on a bunch of pretty crucial parts, so I haven't been able to build a whole lot over the past week. I did, however, draw out the entire schematic. Not sure if I need a volume slider/op amp circuit after all of the filters, but that's definitely a possibility.

https://www.circuitlab.com/circuit/4fxce8/finalproject/

The schematic is just wayyyyy too big to fit here, so here's a link to circuitlab.

Friday, April 11, 2014

Lab Report 8


Experiment

This week, we were tasked with building two transistor based circuits. One acted as a simple switch to turn on an LED, and the other acted as a VU meter, changing the brightness of an LED based on the input voltage.

Here is a picture of the switch circuit we built. It was fairly simple, and the potentiometer controlled the amount of voltage being sent to the LED.




















Here is a picture of the VU meter we built. It was definitely more complex, but it actually has some useful applications.



Final Project

I just made a simple square wave oscillator as a component of my final project. I'm going to have two oscillators hooked up to voltage controlled oscillators, with the voltage from the piezo pick ups acting as the control voltage.

I basically used the same schematic as the oscillator we built a few weeks ago.



Basically, the user will use the potentiometer to control the frequency of the drum, and the voltage from the contact microphone will determine the envelope of the sound through a VCA. The oscillator will be running continuously.
Here's a photo of the oscillator.


























I'm sure you already know what this sounds like, so I feel like a recording is kind of unnecessary.

Friday, April 4, 2014

Lab Report 7

Experiment

Our experiment today was to build an Operational Amplifier that lets us amplify audio or other AC signals with a positive power supply. We didn't really figure out exactly how this is possible, but I do know that it somehow allows us to also amplify the negative half of the waveform. Here is the completed circuit. The potentiometer dictates the gain of the signal.
















In the schematic we were told that for this circuit, V Out = Vin * (-R(f)/Rin). In this case, Rin = 2.2 kOhms, and R(f) ranges from 1 Ohm to 10 kOhm. If we talk about gain in decibels and use the ratio of V Out and Vin, then the maximum gain would be 20log(-2.2kOhms/1Ohm) or 66 decibels, and the minimum gain would be 20log(-2.2kOhms/10kOhms) or -13 decibels. (Something seems off here, the calculator wouldn't let me use a negative value for the R(f)).

Final Project

Here is a diagram of my user interface. It's going to be pretty simple, with just a few pads and knobs.






































Here is a flowchart for my controller



Materials List

2 Bowls, preferably wooden ($10)
Drum Pad surface, probably just colored tape. ($5)
Box, with some way to suspend bowls, might need to rig some crazy rubber band deal. ($10?)
4 Piezo Diaphragms ($15)
3 555 Timers (If I use these for noise) ($5)
3 LM58 Op Amps ($10)



Thursday, March 27, 2014

Lab Report 6

Experiment

Our experiment for this week was to build a voltage controlled square wave oscillator using a schematic given to us in class. Most of us didn't have much experience working with schematics, so the main challenge for us was figuring out how the circuit should actually look on our breadboards. I finally figured it out after a very frustrating half-hour, and here is the final result. The variable resistor controls the frequency of the oscillator.

























The next step was to add a switch in between the output of the 555 timer and the audio output. This made it so the signal only went to the output when the button was pressed.



















We also made circuits where the button bypassed the signal to ground. This made it so the signal was cut when the button was pressed. I forgot to take a picture of this, but it was basically the same circuit as above, just with a wire running from the button to ground.

Lastly, we added another potentiometer, but this time it was affecting the pan of the signal. The signal was routed into the middle connection on the potentiometer, and the left and right outputs were routed to their corresponding sides. This created a pretty solid panning effect.



















Questions

1. For me at least, the most difficult aspect of working with the schematic was keep track of the wire paths. There were a few connections that were also connected to power, but since the power source symbol was in the corner of the diagram, it was easy to miss. It's just a matter of visualizing what the connections actually have to look like, since we are basically told what the wires need to be connecting, but not how to concretely achieve those connections.

2. You would use a peak follower, which we made in the last lab, then output that voltage to the 4th input on the timer (I think), and you would get rid of the variable resistor and use a set resistance. I'm not entirely sure, but you would have to use the output voltage of a peak follower to change the oscillator frequency, and it seems like the 4th and 5th inputs on the timer dictate the frequency.

3. I think you would have the incoming signals wired to the left and right terminals of the potentiometer, then have the center terminal connected to the audio output. This would be affecting the resistance for each audio input.

Final Project

1. Drum controller. Uses multiple piezo disks and pressure sensors to detect pressure and location of finger on control surface and then outputs voltage to an oscillator and filter.

2. Piezo and pressure sensors, speaker, voltage controlled oscillator (maybe 2 or 3 depending on how many control surfaces I want to have), voltage controlled filter (possible multiple), control surface (I was thinking a wooden bowl).

3. I will probably have to buy materials to make multiple oscillators and filters, the control surface (which I haven't fully figured out yet), and some sort of speaker set-up.