Site Logo

eurorackDIY

Creating a Ramp Voltage for the Sawtooth Waveform of a DCO

The first step in making a sawtooth waveform is to create a ramp voltage.

A DCO with only a square wave is only so interesting from the standpoint of creating interesting sounds. Most classic synthesizer oscillators provide some combination of waveforms: square, variable pusle-width square, sawtooth, triangle, or sine. For my module I intend to provide all of these variations and will be deriving them from the square wave I programmed up in the last article.

A sawtooth waveform is a linear ramping up of voltage followed by an abrupt reset back to the starting voltage occurring at the frequency the oscillator is operating at. As such, the first step you need to do to create a sawtooth is to construct a circuit that can produce the ramp voltage. This circuit will eventually need to be able to produce ramps of different slopes as the frequency changes but we'll look at how exactly to do that later.

The classic way to create a ramp voltage is to mathematically integrate a step change in an input voltage. I'll be doing this with an op-amp integrator circuit looking something like this:

Integrator Schematic

The way to think about the circuit is starting at time zero if the capacitor is fully discharged (and thus has zero volts across it) and the input voltage is applied through the 400k resistor the capacitor acts as a short circuit. To satisfy summing the current to zero at the inverting input node of the op-amp a voltage will need to be generated by the op-amp output across the capacitor and this voltage will need to increase over time as the charge on the capacitor increases. The voltage increase will be linear over time and thus our ramp voltage at the op-amp output is also linear.

You can play with this circuit on the Falstad CircuitJS simulator. Clicking the switch to on shorts the capacitor and sets the output voltage back to zero. Opening the switch starts the ramp voltage on the output. The operation of the switch gives a clue as to what I'll need to do next to make this in to a true sawtooth oscillator.

Recent Posts

MODULE DESIGN

DCO Sawtooth: Keeping the Amplitude Constant as Frequency Changes

How to keep the amplitude of a sawtooth wave constant by controlling the input voltage of the ramp circuit.

MODULE DESIGN

DCO Sawtooth: Clocked Ramp Reset

Using a clock to reset the sawtooth's ramp

MODULE DESIGN

DCO Sawtooth: Ramp Reset

How to reset the sawtooth's ramp back to zero volts

MODULE DESIGN

Creating a Ramp Voltage for the Sawtooth Waveform of a DCO

The first step in making a sawtooth waveform is to create a ramp voltage.

MODULE DESIGN

Programming an STM32 Timer for a Synthesizer DCO

How to easily program an STM32 timer to produce a frequency-accurate square wave to use for the core of a digitally controlled oscillator.

MODULE DESIGN

Why Make a DCO Module?

An initial look at why making a Digitally Controlled Oscillator as a Eurorack module might be an interesting project.