Throughout this guide I will attempt to give you some insight into the circuit theory and scientific principles at play in the NovaDrone. That said I will be giving little more than an intro to each topic and strongly encourage you to do further reading on topics you find interesting.
- This is a beta version of the NovaDrone Technical Guide. I expect to make revisions over time and eagerly encourage readers to send me feedback, questions, suggestions and especially corrections. Comments should be addressed to email@example.com.
TABLE OF CONTENTS:
- 1.1 Frequency, amplitude & wave shape
- 1.2 Phase
- 2.1 The Circuit
- 2.2 Pulse Width Modulation
SECTION 1. OSCILLATOR PRIMER
◊ 1.1 Frequency, amplitude and wave shape◊
The heart of the NovaDrone is a bank of six independent oscillators.
An oscillation is simply a pattern which repeats indefinitely. This can be a pattern of light, movement, electricity, even life cycles of organisms. The wikipedia entry gives dozens of examples of different kinds of oscillation.Figure 1. triangle oscillator
- The red line in fig 1 represents a voltage which goes up and down over a period of time. This is an oscillator.
What we are most interested in is the oscillation (or modulating amplitude) of electricity. All of the electrically produced sound we hear is a repeating pattern of fluctuating electrical current.
When this is applied to a speaker, the current activates a coil in the speaker which pushes the cone of the speaker away from or towards a fixed magnet. This action vibrates the air in front of the speaker which in turn vibrates the air in front of that and so on until those vibrations hit our ear drums and are perceived as sound. The sounds we hear around us are all incredibly complex patterns of air pressure modulation.
There are three basic factors that make up all oscillators: frequency, amplitude and wave shape. In musical terms we would call these pitch, volume and timbre. I will also talk a fair amount about phase which is relevant when working with multiple oscillators and plays an important role in creating drones.
One complete sweep up and down is called a cycle. The number of cycles per second is your Frequency or Pitch.
Frequency is commonly measured in Hertz, which is the number of cycles per second.
Pitch is another term for frequency which is used only when referring to the frequency of an audio signal.
Figure 1 shows a triangle wave with a cycle length of .5 seconds. The frequency of this wave would be determined by seeing how many cycles will occur in 1 second. In this case there are 2 complete cycles in 1 second. That means the wave has a frequency of 2 Hertz. This is well below the hearing range. Humans can hear oscillators between 20Hz and 20,000 Hz.
Amplitude refers to the magnitude of voltage change across one cycle of an oscillation.
This in turn impacts the volume of the signal if it is sent to a speaker.
The image above shows a triangle wave with a positive peak of +5 volts and a negative peak of -5 volts. The amplitude is determined by figuring the absolute difference between these peaks. In this case that difference is 10 volts. This is commonly referred to as 10 Vpk-pk (10 volts peak to peak). There are many different ways to measure amplitude (pk-pk, RMS, Vp, etc…) but we’ll just be talking about Vpk-pk.
The wave shape is the pattern of amplitude modulation over the course of a cycle. The waveforms in fig 2 are Sine, ramp, triangle and square.Sine, triangle and square are symmetrical waves. That means the positive and negative portions of each cycle are of the same duration. Many musical synthesizers offer other wave forms which are asymmetrical versions of these common waves such as ramp, saw and pulse waves.
Figure 2. Waveshapes
The importance and impact of wave shape depends on its application. Many audio effects such as tremolo or phaser use low frequency oscillators (LFOs) to modulate certain parameters of the sound. It is commonly more desirable to use a sine or triangle wave for many of these effects such as the tremolo which
fades the volume in and out. Using a square wave for this would create dramatic shifts in volume which can be unpleasant.
Many natural sounds are synthesized using overlapping wave forms like those shown above. For instance a flute can be synthesized using several octaves of a sine wave. A horn on the other hand will use more square waves and maybe a triangle or saw wave. More advanced wave and synthesis theory sites the sine wave as the basis of all wave forms. It is shown how even square waves can be created by combining several sine waves.
The basic components of an oscillator are:
- Frequency. The number of oscillation cycles that occur in one second. Measured in Hz
- Amplitude. Magnitude of voltage sweep in one cycle of an oscillator. Measured in Volts or Vpk-pk (volts peak to peak)
- Wave shape. Sine, triangle, square
Phase is a bit more complicated than the other terms but plays an important role in audio circuitry and especially in making drones. Phase refers to a particular position in a single cycle of a wave (such as the positive or negative peak) and is measured in degrees. It is most commonly used to describe the relationship between multiple waves.
Figure 3. Phase
Fig. 3 shows two sine waves (red & blue) of identical amplitude and frequency. The green oscillator is the mix or average of the red and blue oscillators.
Phase is measured in degrees with 360 degrees being one complete cycle. 180 degrees is exactly ½ of a cycle.
In fig. 3 the phase of the blue oscillator is offset at 45 degree increments from the red oscillator from left to right. With each step you’ll notice that the waves get farther apart and that the amplitude of the green (average) oscillator decreases.
This may seem confusing at first but it’s really quite simple. The green oscillator is the average of the red and blue oscillators.
Let’s say the red and blue oscillators sweep from -5 to +5VDC (10Vp-p). Now look at the right most illustration of the 2 waves out of phase by 180 degrees. When the blue wave is at its positive peak (90 degrees) of +5 volts, the red wave is at it’s negative peak (270 degrees) of -5 volts.
What is the average of -5 and +5? Zero. They are always going to be the opposites of each other so the average will always be zero. Now look at the 90 degree image. When Blue is at +5 volts/90 degrees, red is at 0 volts/zero degrees. The average of +5 and zero is 2.5 volts which means the green wave sweeps from +2.5 to -2.5 and is 5 Vpk-pk.
The important thing to take away from the info above is that the amplitude of an oscillator created by mixing two similar oscillators is relative to the difference in phase of the two source waves.
In fig. 3 the oscillators have identical frequencies. This means that the phase relationship once established will remain the same and the resulting averaged amplitude of the two waves will also remain the same.
Q: What will happen if the frequencies of your two waves are NOT identical?
We established above that the amplitude of the averaged waveform is relative to the phase difference of the two wave forms, therefore as the phase difference of two waves increases and decreases so too will the averaged waveforms’ amplitude. What we have here is phase controlled amplitude modulation and the rate of phase modulation is controlled by the frequency difference between your two oscillators.
In fig. 4 the blue oscillator has a frequency of 10 Hz, the red is 11Hz. That means that it takes the red wave 1/10th of a second longer to complete a cycle than the blue wave. You can see that with each cycle the red wave lags a little bit further behind the blue wave which increases the phase difference between the two. As a result, the amplitude of the averaged wave (green) decreases as the phase offset approaches 180 degrees and then increases as it continues past 180 to 360 degrees.
SECTION 2. NOVADRONE OSCILLATORS
◊ 2.1 The circuit ◊
The NovaDrone contains 6 oscillators. Each oscillator outputs a square wave and a triangle wave.
The circuit which generates the oscillators are simple and robust. Each oscillator is built around 2 op amps. If you are interested in building synthesizers and don’t know where to start, read up on op amps. They are the key elements of most oscillators, filters, envelope generators, mixers and amps.
Each channel of the NovaDrone (Red, green and blue) has 2 oscillators. These are shown in fig. 5 and fig. 6.
They are very similar to one another but have been calibrated for different purposes.
Osc 1 is an audio frequency oscillator. It has a coarse and fine tune adjustment and only operates at audible frequencies.
Osc 2 is calibrated as a low frequency oscillator (LFO) with cycles as long as 2 minutes. It has a range switch and a single adjustment knob.
Oscillator 1 and 2 combine to make a square wave oscillator with a frequency controlled by oscillator 1 and pulse width modulation controlled by oscillator 2.
The oscillator circuit is a feedback loop between two op amps that are configured as a schmitt trigger and an inverting integrator.
Basically an integrator turns square waves into triangle waves.
A Schmitt trigger is a kind of comparator that turns modulating signals (like triangle waves) into square waves.
The key elements of the relationship between these two circuits is that they form a loop (Schmitt > integrator >Schmitt>integrator> etc…) and that the integrator is also an inverter. This creates a continuous cycle of modulation:
1) Schmitt output goes HI.
2) Integrator inverts Schmitt signal and outputs slope going down (LOW).
3) When slope is near zero volts, Schmitt trigger is thrown and its’ output goes LOW.
4) Integrator inverts and generates upward slope (HI).
5) When integrator slope reaches peak, Schmitt trigger is thrown and output goes HI.
This is an overly simplified explanation but enough for our purposes. Do more research on these valuable circuits once you are familiar with some of the basics of op-amps.
RC (resistor capacitor)time constant
In both oscillators (fig. 5 and 6) the primary element which defines frequency is the RC time constant. This relationship is a core component of most oscillators and is worth reading up on.
The RC time constant is a period of time defined by the relationship between a resistor and a capacitor.
The equation for this is simply t = R*C. In the case of the oscillators above it would be t=R1*C1.
Unfortunately calculating the frequency of an oscillator is more complicated than just calculating your RC constant.
In many oscillators (including this one) there is a schmitt trigger component which watches the rising or sinking voltage from the integrator. The Schmitt trigger activates when the slope reaches predefined upper and lower limits. In order to determine the frequency of an oscillator we need to know what our upper and lower limits are and then calculate how long it takes our wave (the output of the integrator) to travel from one limit to the other.
These limits are determined by the relationship of 2 resistors in the schmitt stage. In fig 5 and 6 these are R2 and R3.
The equation for determining the duration of one cycle is
In Oscillator 2 R1 is a 500k potentiometer in series with a 4.7k resistor between pins 8 and 13 of the two op amps. C1 is one of the three capacitors between pins 13 and 14 of the rightmost op amp. One of these caps is selected using a three way switch on the NovaDrone circuit board. This controls the frequency range of the LFO.
Let’s say the pot is all the way up (full resistance) and the middle cap has been selected. The equations for RC and subsequently the frequency is:
C1= .000022 Farads
R2 = 8,300 Ohms
R3 = 10,000 Ohms
Frequency in Hz = (1 / 4*R1C1) * (R3/R2)
How it works
Resistors limit the flow of current and capacitors store charge. Current flows through the resistor and is stored in the capacitor. The resistor controls how much current flows into the capacitor per second. Therefore the size of capacitor and the amount of resistance will determine how long it takes to fill the capacitor. A common analogy is to think about current flow as water, the resistor as a spigot
and the capacitor as a cup. The more you open the spigot (reduce resistance), the more water (electrical current) will flow and the faster the cup will fill (capacitor will charge). The oscillator circuit is configured in a special way which causes the capacitor to continuously charge and discharge. It is looking for two states from the cap, fully charged or fully discharged. When the cap reaches either of these states, the whole circuit reverses polarity and the capacitors charge status begins moving toward the opposite state. The amount of time it takes to charge and discharge is your cycle duration.
◊2.2 pulse width modulation (pwm)◊
PWM is exciting stuff….really! It is essentially a 1 bit binary representation of an analog wave form.
Digital wave forms only have 2 states, high and low. High is a voltage at or very close to the positive supply voltage. Low is a voltage at or very close to the negative supply voltage. It is basically just a square wave. Analog on the other hand is infinitely variable. Think about it like the difference between a light switch (digital) and a light dimmer (analog). PWM is a wave form that bridges the gap between these two formats. It can be used to make sound, control the brightness of an LED, control the speed of high torque motors and speak to microprocessors. It is also the language that a microprocessor will use to speak with the analog world.
Pulse Width (PW) refers to the relative durations of high and low voltage in a single cycle of a square wave.
Figure 7. Pulse width
Fig. 7 shows three square wave oscillators of the same amplitude and frequency but with differing pulse width. The red oscillator has a 10% pulse width. That means the wave goes high for 10 % of the duration of one cycle. The green wave is 50% and the purple wave is 90%. What is important to note is that pulse width has nothing to do with frequency and only refers to the relationship between the high and low swing of the wave.
The job of a comparator is simple. Two signals are fed into the “+” and “-“ inputs (labeled 10 and 9 in fig. 8 respectively). If the voltage at the “+” input is higher than the “-“ input the output of the comparator goes high.If the “+” input drops below the “-“ input the output goes low.
In the NovaDrone the triangle output of Osc 1 and Osc 2 combine through a simple comparator (fig. 8) to make a single square wave with a modulating pulse width. In this way, the comparator also functions as a pulse width modulation processor.
Fig. 9 below shows how two triangle waves are transformed through the comparator into a square wave with a modulating pulse width.
The blue triangle wave in fig. 9 is oscillator 1. The red triangle is osc 2. The green line is the combined PWM output.
Any time the blue line (osc 1) is above the red line (osc 2), the green line (pwm) goes high. As the red line rises the percentage of each cycle that the blue line is above the red line decreases. This changing percentage is what makes our modulating pulse width effect.
Section 3. SOUND & LIGHT
- Audio Mixer
The audio signals from each of the three channels of the NovaDrone are mixed using the circuit in fig. 10.
This mixer is nice and simple and uses just one op amp and a few other components. This circuit is configured as an inverting mixer with an amplitude controlled by the feedback resistor and input resistors. The amplitude is c
alculated as RF/RI. In this case RF = 10,000 and RI = 100,000. That means the output signal is 1/10th the amplitude of the input signal. The 47pF cap in parallel with the feedback resistor removes high frequency oscillations that occur.
(3) 2N3904 NPN transistors are used to make 3 LED drivers.
A driver is a simple but important circuit which isolates elements which use lots of current (like LEDs) from sensitive circuits (like the oscillators in the NovaDrone). Failure to use a driver can result in something called a loading effect which basically means that the device being driven will affect the behavior of the rest of the circuit in bad ways, like the pitch changing when the lights turn on. The LED in the NovaDrone uses a lot of current relative to the rest of the circuit (90mA vs around 30mA for the rest of the circuit) therefore a driver is necessary. The key component of a driver is the transistor. This is another topic worth reading a lot about