Getting a glissando out of a stepped tone generator - Page 1
Forum section: electronics / projects

author: socratidion
author_rank: Contributor
timestamp: May 27, 2015, 11:12:43 pm
content: Here's a question quite long in the asking because it concerns something so specific. The schematic attached shows an audio circuit based on Mims' Stepped tone generator (or Atari Punk Console, if you like), a familiar enough circuit that I hope don't need to explain the basic idea. I'll refer to the astable part of the circuit as the 'oscillator', triggering the monostable part of the circuit, the frequency divider, which I'll refer to as the 'stepper'.Among the differences from Mims' original schematic, there's an R6 that affects the pitch of the oscillator, and R4 affects the amount of resistance required to go to the next step (i.e. it changes the sensitivity of R3). I've included these in the schematic because I generally include them, but to keep things simple, I'll assume that they are set not to change the default thresholds of the chip.The audio output doesn't come out of the official output pin (9), but is read from the capacitor C2, producing a kind of curvy saw wave: slow capacitor charge up, and quick discharge.The part I'm concerned with is the switch between capacitors at pin 2. The idea I had was to switch between standard 'stepper' pitches and 'slider' pitches at the push of a button. With the switch set to C1 the circuit behaves as a stepper, setting a fundamental frequency of about 2kHz, out of which the stepper can make 1kHz, 666Hz, 500Hz, etc. Then with the switch set to C3 the fundamental shoots up over 200kHz, at which frequency the stepper produces steps so small that sweeping up and down R3 sounds more like a glissando.The higher the frequency of the oscillator, the more like a glissando the stepper sounds. The reasoning is that if the triggers come fast enough, as soon as the stepper pulse finishes there is always immediately another trigger to set it off again: in which case the stepper frequency tends to the inverse of the monostable pulse length, i.e. approximately 1/(ln(3) x C2 x R3. If R3 changes smoothly, so will the pitch output.So that's the set-up. The idea does work, but depending on the values I choose for the various components, it can sometimes produce undesirable results. The issue seems to be that capacitor C2 doesn't discharge instantaneously (it presumably encounters some ohms of resistance through the discharge pin), and if the oscillator trigger pulses come faster than the time it takes C2 to discharge, then C2 is interrupted and starts charging up again before it reaches ground. At best, C2's output voltage floats on a bed of DC, and I get a much higher frequency than I want (e.g. if it only discharges half way, I get a pitch an octave too high). At worst, C2 discharges to a different voltage at each cycle, so each cycle is a different length, and there is no consistent frequency.I have tried to address the problem by ensuring that the oscillator pulses are longer than C2's discharge time (which I can estimate from the oscilloscope, something between 10 and 20 microseconds), i.e. by increasing R1 and/or C3. This usually solves the problem of getting the wrong frequency out, and I then can see C2 discharging all the way. But even then I sometimes get the no-consistent-frequency output. In a way it seems quite reasonable that C2's discharge would be interrupted at different points, and when I think about it that way I wonder that the idea works at all: and yet it does, under some circumstances. The question then: under what circumstances should it work, and under what circumstances should it fail?