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.

Friday, March 14, 2014

Lab Report 5

Experiment

Basically, the purpose of this experiment was to show how diodes affect AC signals. This was achieved by placing a diode within our audio circuit in a few different arrangements, and using oscilloscopes to visualize the signals. 

Here is the first circuit we made, which was simply running our audio signal through the diode, and the diode was input with it's bias facing the output jack. The oscilloscope was connected both before and after the signal went through the diode.

























Here's a picture of the oscilloscope results. The diode basically truncated the negative portion of the signal, and reduced the peak voltage a little bit. This was the test at 200 Hz, and at 1000 Hz and 10 kHz, the slope of the truncation was different. At 1000 Hz, the diode signal didn't follow the shape of the unaffected signal, and at 10 kHz, the voltage level the signal was cut off at seemed to be higher.

200 Hz


















10 kHz
























The next circuit we used was essentially the same circuit, but the diode's bias was reversed. The effects were very similar to the forward biased diode, the main difference being that the positive portion of the signal was truncated, instead of the negative side.

200 Hz
























10 kHz
























The next circuit we built connected the diode to ground, instead of having it run directly to the audio output. Here is a picture of this circuit. A resistor was also added to the circuit. 



















The oscilloscope showed that the signal was cutoff at a certain positive voltage, and the voltage it cut off at depended on the volume of the signal. There also seemed to be a threshold volume where the signal began to be cutoff, and any volume below this threshold showed no change in signal. The effect was basically the same at all frequencies I tested at. When I reversed the bias of the diode, it had the same effect, but the signal was cutoff at a negative voltage. Unfortunately, I forgot to take a picture of the reverse biased diode, but I think you can get a pretty accurate idea of what it looked like from the forward biased diode. 

Forward Biased Diode to Ground
























The last circuit we constructed was called a peak follower, which is a forward biased diode connected to a capacitor. The capacitor is then bypassed to ground.
























The peak follower did its job and output a signal that was relatively flat at the peak voltage of the input signal. As frequency increased, the peak follower line became straighter and more uniform. Also, when I took out the capacitance, the base line of the output voltage went back to 0, and was basically the same output as the forward biased diode circuit from earlier in the lab. I also tried a few different values of capacitance, and found that higher values of capacitance will make a straighter output line.

Capacitance: .1 microFarad
























Capacitance: 1 microFarad
























Questions

1. The peak follower could essentially act like a vocoder, because it will output the peak voltage of an input signal. The output signal could then be used to control the frequency, cutoff frequency, or amplitude of a VCO or VCF etc. There are a ton of musical applications for this sort of set up.

2. To isolate the bassiest frequencies of an input signal, you would need to run it through lowpass filter first, then connect the filter to the peak follower circuit. 

The values of the capacitors would probably be changed, and a variable resistor would work better because you would be able to pinpoint the corner frequency that isolates the bass drum.

Final Project

To be completely honest, I haven't been giving my final project a whole lot of thought recently. However, I'm fairly committed to this ResoDrum idea. I think a peak follower would be very useful actually, because I need to somehow convert the pressure on the bowl into some sort of control voltage. If I can use piezo disks to convert the amount of pressure on the bowl, I think this will be not too difficult to pull of. I'm mostly worried about figuring out the oscillator/filter set up I would need to make the drums actually interesting to use.

Friday, March 7, 2014

Lab Report 4

Experiment

Our class was tasked with creating a low pass filter and a high pass filter using a variable resistor and a capacitor. It turns out the solution was fairly simple, and you just needed to have either component bypassing the signal to ground to create the filter effect.

Here are some pictures of the circuits

Low Pass Filter (Resistor - Capacitor to Ground)




















I used a 1 microfarad capacitor. The range of the corner frequency when using a 1 microfarad capacitor and a 10 kOhm variable resistor starts at (1/[(2*pi)(1*10^-6)(10000)]), and ends at (1/[(2*pi)(1*10^-6)(1)]). Starts at 15.9 Hz, and ends at 15.9 kHz.

High Pass Filter ( Capacitor - Resistor to Ground)




















Since the resistance and capacitance values are the same as the first circuit, the range of corner frequencies is also the same, only the effect of the filter at these frequencies is reversed.
However, I didn't really hear that significant of an effect until the corner frequency was either very high or very low, so these ranges are probably more theoretical than practical.

Questions

1. Since we're using a variable resistor with a set range of resistance, the upper corner frequency depends entirely on the capacitance. So if the upper range of human hearing is 20 kHz, you would need a capacitor with a capacitance of {20000 = 1/[(2pi)*c*1]}, or 7.9 microfarads.

2. Once again, you would have to change the capacitance, but this time you need to find the capacitance that creates a lower limit of 20 Hz. {20 = 1/[(2pi)*c*10000]}, or .79 microfarads.

3. This is a little unfair because I heard the answer in class, but you would create another capacitor/resistor combination in series with the original combo. I'm actually not entirely sure why this would create a sharper cutoff, but I would assume the additional capacitance and reactance creates a higher overall voltage loss.

Final Project 

As my project stands right now, it's still digital because of the use of Max/MSP. I've been planning on substituting some sort of oscillator for the laptop though, and I'm going to have to improvise a way to emulate the EQ/Filter functions in the max patch. So, not really sure how to go about drawing a schematic right now because I haven't figured out what components make an EQ or how to have this information changing based on piezo electric signals.

Friday, February 28, 2014

Electronics Lab 3

Experiment

This lab was all about oscilloscopes, and learning how to calibrate them to get effective voltage readings. I found this process to be pretty intuitive, and it wasn't too difficult to figure out the Volt/Div and Rate values needed to get a clear signal. As for the actual results, my data really doesn't show anything definitive.

Here is a schematic for the circuit we used. I couldn't find an audio jack representation in Circuit Lab so I just used a voltage source and a speaker as substitutes.





Here is my data for the experiment. As you can see, the voltage drops created by running audio through the circuit were fairly negligible, and there isn't a definitive pattern apparent in these results. I know there is a drop in voltage occurring as the audio is passed through the circuit, just because of the resistance present, and this drop is shown in most of the frequencies. 


When I ran pink noise through the circuit, the signal was much quieter, and the low end was basically non-existent when compared to the unaltered signal. The same was true with white noise, though the higher frequencies were louder than pink noise, but that's due to the more evenly weighted nature of pink noise.

Final Project

I'm fairly certain I want to do something with the Reso-Drum, which seems fairly inexpensive to produce. The most expensive parts are the electromechanical transducers, which are about $20 each. However, since the tutorial I found uses a max patch as the sound source, I need to figure out some way to create a signal source that isn't so reliant on the computer. I might make my own max patch or something like that, but since this is analog electronics class, I assume I should try to make an oscillator type device as well. 



Thursday, February 20, 2014

Electronics Lab Report 2

Experiments

This is the first circuit we made in class

























It had 4 1kOhm resistors along its path, as well as 2 polarized capacitors. The audio signal was fairly clear and had a little bit of static. The volume on my phone was about 3/4 way up for the signal to be audible.
















This is the second circuit I built for the experiment. It only consisted of two wires running from one audio jack to the other. The audio signal was much stronger, and I only had to turn up the signal a tiny bit for it to become audible. The audio was also a bit clearer than the circuit above. The capacitors in the picture aren't part of the circuit.




















Sorry about the orientation of this photo. I couldn't figure out a way to make it horizontal. This is the circuit I built with 4 1 kOhm resistors in between the audio jacks and the wires. This significantly cut the volume of the signal. I had to turn the signal back to about 3/4 of the way up on my phone for it to be audible. Audio quality, when turned up, was about the same, but with perhaps a bit more static.
















This circuit is similar to the last circuit, but it uses a potentiometer instead of one of the regular resistors. With the volume all the way up on my phone, I had to turn the potentiometer to about 3/4 of it's full rotation to get an audible signal. Basicallly acted as a volume knob.




















This is the circuit with 4 1 kOhm resistors and two 1 microFarad capacitors. The difference in audio quality was definitely noticeable, as the lower frequencies were significantly quieter. I also tried the same circuit with 0.1 microFarad capacitors and 0.01 microFarad capacitors. As the capacitance decreased, the frequency at which the audio signal seemed to cut off increased. For instance, with 0.01 microFarad capacitors, only the higher frequencies reached the audio jack.



















This is the circuit with the signal wired both directly to the audio jack, and to a capacitor connected to ground. This had the opposite effect on the audio signal when compared to the capacitor connected to the audio jack. When 1 microFarad capacitors were used, only the very lowest frequencies were let through. When capacitance was decreased, the amount of frequencies being let through increased.
















This is the last circuit I built that is only the audio signal running through to diodes between the audio jacks. The audio was heavily distorted, and I'm not sure if this was the intended result. It was basically only static and distortion, and no frequencies were actually discernible.

Questions

1. In order to half the volume of an audio signal, the resistance would have to create a voltage drop equal to half of the source voltage before the current reaches the audio jack. Since V=IR, V/2 = I(R/2), the total resistance of the circuit would have to be (IV/2). (Not sure if this is the answer you were looking for).

2. As explained above, the capacitors would affect the range of frequencies being passed into the audio jack. The higher the capacitance, the higher the frequency cutoff would be. The inverse was true when the capacitor was bypassed to ground. The higher the capacitance, the greater the range of frequencies  let through.

3. The diodes heavily distorted the signal. Once again, not sure if they were used correctly. I placed them essentially in the formation that the resistors were placed in the first circuit. Look at the last photo to see exactly where they were placed.

Final Project Questions

1. If I were to produce something similar to the ResoDrum,
http://www.instructables.com/id/ResoDrum/
I would definitely try to add some knobs or sliders that allow you to adjust the quality of the sounds without using software. This would also mean that I would need to make some sort of oscillator or sound source to completely get rid of the need for a laptop. Perhaps some sort of reverb control would be cool too.

2. As I just mentioned, I would probably get rid of the need for a laptop by using an oscillator for the sound source. Also, I'm not sure exactly how difficult electromagnetic transducers are to produce, so I might need to find an alternative for that.



Friday, February 14, 2014

Lab Report 1

Experiment Recap

In class we were taught the basic layout of a breadboard, as well as the process of attaching a voltage source to start running current through different loads on the breadboard. The first circuit we assembled was a circuit that lights an LED that consisted of a voltage source, a resistor, and an LED. The positive terminal of the battery was connected to the red strip on the edge of the breadboard, and the negative terminal was connected to the blue "ground" strip. The resistor was connected from a point on the red strip to a point in the same row, and the LED was connected from another point in the same row to the ground strip, effectively completing the circuit. We also made a similar circuit that inserted a potentiometer in between the red strip and the resistor, which allowed us to adjust the resistance of the circuit, and therefore the amount of voltage reaching the LED. This class was my first introduction to working with physical circuits, and though I had some trouble keeping track of all of my parts, I found it not too difficult and fairly satisfying once I got it to work. Of course, these circuits were extremely simple, so I look forward to more complex and challenging circuits in the future.

Questions

What are the conductive paths on the bread board?
The red strip and the ground strips run up and down each edge and all points on these strips are connected to all other points on the same strip. All points on each row are connected as well, but the rows aren't connected with eachother.

What are some easy mistakes to make with breadboards?
From my limited experience, it seems that it can be difficult to remember the flow of current within the breadboard. I tried to connect the potentiometer all along the same row instead of across three different rows, and I also know you have to keep in mind the direction of an LED, as it only accepts electricity if it's input through a specific side.

How can you make a button or switch out of two wires connected to the breadboard?
You can make a button or switch by having one wire attached from the red strip to a row, and the other wire attached from a point in the same row to the ground. When you disconnect any end of either strip, it breaks the circuit, effectively acting as a button or switch. 

Why was the resistor connected before the LED?

LED's can only handle a certain amount of voltage before they are damaged. The resistor causes a voltage drop in the current before it reaches the LED to ensure a dangerous amount of voltage doesn't pass through it.

Final Project Progress

Favorites

Malakai
http://www.youtube.com/watch?v=0VqRxa1ohw4

Tom
http://www.youtube.com/watch?v=KpL-BDLvRVo

Jake C
http://www.youtube.com/watch?v=hc4eHqzw9Dg&list=UUwDh2OuqUb-n6f1cAxyC_wA

Other Ideas

Vintage Drum Machine Replica
http://www.youtube.com/watch?v=1871fozlMSk

ResoDrums
http://www.instructables.com/id/ResoDrum/

Electronic Sitar
http://nicksworldofsynthesizers.com/stringresonator.php