Adrian Freed
Published on Adrian Freed (http://adrianfreed.com)

Home > Analog and Digital Sound Synthesis as Relaxation Oscillators

Analog and Digital Sound Synthesis as Relaxation Oscillators

In a recent workshop on e-textile sound for the 2018 e-Textile Spring Camp, I provided a unifying framework for analog and digital sound synthesis and capacitive sensing techniques under the rubric of relaxation oscillators.

The following pages provide context for the workshop and include links to contributions from my co-teacher, Martin De Bie. This includes pointers to various iterations of his 555 timer-based Textilo project.

This project will be expanded ongoingly with further relaxation oscillator schemes.

Introduction to Relaxation Oscillators

Here is a non-electronic relaxation oscillator:
See video [1]

Relaxation Oscillators Generally Speaking

Relaxation oscillators produce nearly periodic variations in a signal by accumulating energy until a certain threshold is reached at which point energy is released making room for subsequent energy accumulation.

This general definition allows us to organize relaxation oscillators we encounter according to the nature of the energy accumulated, the way the relaxation threshold is determined and how energy is released. For example:

Device Energy Where Threshold Link
Shishi Odoshi Water Level Bamboo Tube Balance Point https://en.wikipedia.org/wiki/Shishi-odoshi [2]
Old Faithful Guyser Steam Rock Tube Vapor point http://www.oldfaithfulgeyser.com/learn/geyser-info/ [3]
555 Astable Charge Capacitor Voltage Comparator https://en.wikipedia.org/wiki/555_timer_IC#Astable [4]
Neon Charge Capacitor Ionization https://en.wikipedia.org/wiki/Pearson–Anson_effect
Bowed String Tension String Friction http://newt.phys.unsw.edu.au/jw/Bows.html [5]
UJT Charge Capacitor PN Junction Potential http://www.circuitstoday.com/ujt-relaxation-oscillator [6]
Schmitt Trigger Charge Capacitor MOS Junction Potential https://en.wikipedia.org/wiki/Schmitt_trigger#Use_as_an_oscillator [7]
Opamp Charge Capacitor Voltage Comparator https://en.wikipedia.org/wiki/Relaxation_oscillator#Comparator–based_relaxation_oscillator
BJT Blocking Oscillator Flux Inductor Current Comparator https://en.wikipedia.org/wiki/Blocking_oscillator [8]
Phase Accumulator (Phasor) Charge Register Modulo operation https://en.wikipedia.org/wiki/Numerically_controlled_oscillator [9]
Run-up Time ADC Charge Capacitor MOS Junction Potential https://github.com/adrianfreed/FastTouch [10]

Textile 555 Oscillator ElectroSomatophone for circuit bending

When I saw Martin De Bie's Textilo [11] e-textile 555 oscillator I wondered if it could be extended to allow for body interactions with the pads using CMOS 555 timers in the spirit of the CrackleBox.textilo.jpg

I tested this CMOS 555 breadboard version.

555wearable.png

This informed suggested improvements to Textilo to Martin who came up with a textile layout which we used to teach during the audio workshop of e-textile Spring Break: http://youtube.com/HdMsk6c3WGw [12]

Alex blogged a great student perspective of this workshop [13].

I also brought along some PCB's which can be sewed to or pressed on Lego baseboards.

To address the need for more interaction room for the fingers I suggested to Martin to look at a radiating octagonal design. He prototyped this at the camp in copper:

sidebyside.jpg

Nicole Messier also picked up on this design pattern and made a 555 oscillator based FM Radio transmitter:

transmitter555.png

A walk through the schematic may be helpful.

  • We install a capacitor to ground (470pF) from pin 2.
  • Pin 6 is connected to Pin 2.
  • A 1Mohm pullup resistor is used on pin 4 (reset).
  • There is a decoupling capacitor for the speaker output (pin 3)
  • The diode (from battery to pin 8) is to help you not destroy the 555 timer if you install the battery backwards.

    Now what makes things productively confusing is the absence of resistors in the story. These are provided by your fingers or additional LDRs or piezoresistive fabrics. The layout is designed to give you room to put fingers in the useful places for the two popular ways of making the 555 timer oscillator [14]. One way creates square waves. The other makes controllable pulse waves. I capture these possibilities on the following schematic which has a special notation for where you add variable resistance:

    IMAG0578.jpg

    555 Timer resources

    History

    There are few inaccurate histories of the 555 timer invention on the web so a good source is from the designer himself, e.g., http://semiconductormuseum.com/Transistors/LectureHall/Camenzind/Camenzi... [15]

    He also wrote several interesting books. The history and detailed design considerations are covered in a book he kindly made available as a PDF file before his death in 2012: http://www.designinganalogchips.com/_count/designinganalogchips.pdf [16]

    Circuits

    This is a reasonable compendium of interesting circuits using the IC: http://www.555-timer-circuits.com [17]

    Some more:

    http://www.nutsvolts.com/magazine/article/using-the-555-timer-ic-in-spec... [18]

    Radio Circuits

    AM Receiver

    https://hackaday.com/2011/02/25/hear-that-its-a-555-timer-am-radio/ [19]

    AM transmitter

    http://www.circuitsgallery.com/2013/08/555-AM-transmitter-circuit.html [20]

    FM

    http://streampowers.blogspot.com/2013/07/using-555-as-fm-transmitter-cir... [21]

    Audio Circuits

    VCO

    High Performance VCO : http://www.electro-music.com/forum/topic-54623.html [22] DRAWDIO

    https://www.adafruit.com/product/124 [23]

    ATARI PUNK CONSOLE http://www.synthrotek.com/products/lo-fi-synthesizer-circuits/atari-punk... [24]

    Variations

    The CMOS versions of the 555 timer are interesting and lend themselves well to low voltage e-textile applications. My favorite variant is this one: https://www.jameco.com/z/CSS555-ID-Custom-Silicon-Solutions-CSS555-Micro... [25]

    Here is the largest variant I know of: https://shop.evilmadscientist.com/productsmenu/tinykitlist/652-555kit [26]

    and the smallest (a 1mm x 1mm) package:

    http://www.ti.com/product/LMC555/samplebuy [27] https://www.mouser.com/Semiconductors/Integrated-Circuits-ICs/Clock-Time... [28]

  • FastTouch Open Source Arduino Library for Fast, Portable, Low Fidelity Capacitive Sensing

    The fast touch algorithm reimplemented in the library available here [10] was developed for my FingerPhone Instrument [29]. The fast touch library senses touch on any digital I/O pin on many embedded controllers with the Arduino IDE. This includes Atmega 8-bit, SAMD21, and Teensy. This includes most pins on most micro-controllers. A few micro controllers have analog input pins that can't also do digital I/O . The library relies on the ability to enable a built-in pull-up resistor on the pin being sensed. Here is the algorithm:
  • set the pin to output a LOW value for 1uS or so.
  • set the pin to output a high via a built-in pulp resistor.
  • Read the pin regularly and evenly while it reads a low value.
  • The sensed value is reported as a function of the time it takes for the pull-up to bring the pin to a high value. This depends on whether the pin is touched.

    The example code provided with the library uses the Arduino Tone library to sound pitches according to which pins are touched.

    Notice that each call to the fast touch library implements a cycle of a relaxation oscillator.

    I am indebted to Alice Giordani for exemplifying use of the library so well in this dreamcatcher:

    See video [30]
  • Sound Making Technologies Ordered by Increasing Complexity/Cost/Size

    The entries in this table with an * were briefly reviewed in the 3 hour workshop the 2018 eTextile Spring camp. As the table shows, these are in the middle of the affordability/complexity/size axis and were selected for their potential in e-textile and wearable contexts. We had the good fortune to have Bela well represented in another workshop at the camp. Bela is transitioning to a new compact form factor which will make it easier to use with e-textiles.
    Approach Example Link
    non-electronic Lamello http://bid.berkeley.edu/papers/chi/lamello_passive_acoustic_sensi/ [31]
    *Analog relaxation oscillator Textilo http://www.martindebie.com/research_project/textilo/ [11]
    Analog harmonic oscillator self-resonating VCF http://electronotes.netfirms.com/EN215.pdf [32]
    *Digital relaxation oscillator Arduino Tone https://github.com/adrianfreed/FastTouch [10]
    *Digital relaxation oscillator Mozzi (LUT) https://github.com/sensorium/Mozzi/blob/master/examples/01.Basics/Sinewa... [33]
    *Digital Modulation Synthesis Mozzi (FM) https://github.com/sensorium/Mozzi/tree/master/examples/06.Synthesis/FMs... [34]
    *Digital Subtractive Synthesis Talkie (LPC Speech
    and singing)
    https://github.com/adrianfreed/Talkie [35]
    Unit Generator Library Teensy Audio Library https://www.pjrc.com/teensy/td_libs_Audio.html [36]
    Sampling "Synthesis" Tone.js (Tone.Player) https://tonejs.github.io [37]
    Dynamically Patched Unit Generators Bela (libpd) https://bela.io [38]
    Dynamically Patched Unit Generators
    with Image Synthesis
    Max/MSP/Jitter https://cycling74.com/products/max [39]
    Analog Patched Modular Modular https://en.wikipedia.org/wiki/Modular_synthesizer [40]

    CMOS Inverter Oscillator

    This alternative to the 555 timer for making audio oscillators is built from simpler building blocks (inverters) and has more versatility. You can find the schematics that correspond to the build video here: https://www.youtube.com/watch?v=CzO_ZKMSnAU [41]
    See video [42]
    Copyright 1960-2019. Adrian Freed. All Rights Reserved

    Source URL: http://adrianfreed.com/content/analog-and-digital-sound-synthesis-relaxation-oscillators-0

    Links:
    [1] http://www.youtube.com/watch?v=zBVHrm83lSI
    [2] https://en.wikipedia.org/wiki/Shishi-odoshi
    [3] http://www.oldfaithfulgeyser.com/learn/geyser-info/
    [4] https://en.wikipedia.org/wiki/555_timer_IC#Astable
    [5] http://newt.phys.unsw.edu.au/jw/Bows.html
    [6] http://www.circuitstoday.com/ujt-relaxation-oscillator
    [7] https://en.wikipedia.org/wiki/Schmitt_trigger#Use_as_an_oscillator
    [8] https://en.wikipedia.org/wiki/Blocking_oscillator
    [9] https://en.wikipedia.org/wiki/Numerically_controlled_oscillator
    [10] https://github.com/adrianfreed/FastTouch
    [11] http://www.martindebie.com/research_project/textilo/
    [12] http://youtube.com/HdMsk6c3WGw
    [13] https://blog.hackster.io/sound-synthesis-with-arduino-etextile-spring-break-45d4cc87e31e
    [14] http://www.555-timer-circuits.com/operating-modes.html
    [15] http://semiconductormuseum.com/Transistors/LectureHall/Camenzind/Camenzind_Index.htm
    [16] http://www.designinganalogchips.com/_count/designinganalogchips.pdf
    [17] http://www.555-timer-circuits.com
    [18] http://www.nutsvolts.com/magazine/article/using-the-555-timer-ic-in-special-or-unusual-circuits
    [19] https://hackaday.com/2011/02/25/hear-that-its-a-555-timer-am-radio/
    [20] http://www.circuitsgallery.com/2013/08/555-AM-transmitter-circuit.html
    [21] http://streampowers.blogspot.com/2013/07/using-555-as-fm-transmitter-circuit.html
    [22] http://www.electro-music.com/forum/topic-54623.html
    [23] https://www.adafruit.com/product/124
    [24] http://www.synthrotek.com/products/lo-fi-synthesizer-circuits/atari-punk-console/
    [25] https://www.jameco.com/z/CSS555-ID-Custom-Silicon-Solutions-CSS555-Micropower-Timer-DIP-8_2146433.html
    [26] https://shop.evilmadscientist.com/productsmenu/tinykitlist/652-555kit
    [27] http://www.ti.com/product/LMC555/samplebuy
    [28] https://www.mouser.com/Semiconductors/Integrated-Circuits-ICs/Clock-Timer-ICs/Timers-Support-Products/_/N-6j749?P=1z0yr2i
    [29] http://adrianfreed.com/content/fingerphone-sustainably-designed-paper-musical-instrument
    [30] http://www.youtube.com/watch?v=ZOcHMaCsNfE
    [31] http://bid.berkeley.edu/papers/chi/lamello_passive_acoustic_sensi/
    [32] http://electronotes.netfirms.com/EN215.pdf
    [33] https://github.com/sensorium/Mozzi/blob/master/examples/01.Basics/Sinewave/Sinewave.ino
    [34] https://github.com/sensorium/Mozzi/tree/master/examples/06.Synthesis/FMsynth
    [35] https://github.com/adrianfreed/Talkie
    [36] https://www.pjrc.com/teensy/td_libs_Audio.html
    [37] https://tonejs.github.io
    [38] https://bela.io
    [39] https://cycling74.com/products/max
    [40] https://en.wikipedia.org/wiki/Modular_synthesizer
    [41] https://www.youtube.com/watch?v=CzO_ZKMSnAU
    [42] http://www.youtube.com/watch?v=ot6KIGoI1Uk