Vocoder With Larson Scanner - the Sound of the Cylons
by emdee401 in Circuits > Microcontrollers
185 Views, 2 Favorites, 0 Comments
Vocoder With Larson Scanner - the Sound of the Cylons


I'm a big fan of the TV series Battlestar Galactica ( BSG) and I love the robots called Cylons. The original design ( and also in the remake) included a moving red eye that later became the soul of KITT from the Knight Rider Series.
The Cylons talked with a very unique sound that was produces using Vocoder technology. Maybe today, vocoders are not that special anymore because you can emulate those by using software plugin. Back in the day however, a vocoder was something special and mysterious
A vocoder was build using transistors, opamp and filters as digital advancement was not yet achieved. Although today vocoders can be build using digital technology, the principle of how they work remains the same.
Vocoders and how they work
Welcome in the world of vocoding. With vocoding we take peak data from each sample and transform it back into an audio signal.
You can device a vocoder into two main sections. The first one is nothing more than an audio spectrum analyzer. It is used to determine the strength of each frequency band, present in the input signal. The peak data of each frequency band ( the strength signal) is used as an amount of amplification for band filters that are working on the same frequencies as the analyzer.
These band filters are fed by a signal source. This signal can be a tone from a generator, noise or it can be a signal from a complicated source like a synthesiser.. The stronger a analyzer signal from the first section is present, the higher the amplitude will be coming from the bandfilters in the second section. All the signals coming from the second section will be mixed together as the output of the vocoder.
This is however, a brief explanation of how vocoders work, for more info and details, you can look at Wikipedia and other sources
Modern Digital Vocoder
The vocoder I build uses a Teensy Microcontroller and a external audio chip. Using some very well crafted coding ( the Teensy Audi library) I was able to emulate a vocoder that delivers. Not only can it make your voice sound like a Cylon, it als included the larson scanner ( the moving eye) it even emulates the mechanical sound of the moving eye,,,,WHOOS...WHOOS...
Time to get started with this awesome build!
LETS BUILD OUR OWN CYCLON VOCODER, PERFECT FOR COSPLAY
Supplies


I will include the schematics and the gerber files so that you can rebuild this project the way you like. However, A pre assembled PCB ( partly) is available and Assuming you will buy that PCB, you only need to add the missing components listed below. Pay attention, if you're not using my pre-assembled pcb, take a look at the BOM list so you know what's missing from the list below
- Teensy microcontroller board 4.0
- Display I2S SSD1306
- Potentiometers, I used ALPS RV09 10K to 100K will work
- Fuse 1A
- Molex headers of simular (optional)
- Battery clip for 9V Battery
- 9V battery
- Housing (optional)
- Wires
- Jackplugs to connect the audio.
- Wires
For those of you who want to build this without my PCB--> it is possible, I build my prototype using a teensy 4.0 and a Audio Shield.
Downloads
The Schematic

How it works
On the left side of the schematic you'll see user interface inputs: Potmeters, pushbuttons. Also the power in connector (Top) and the connectors for two optional pixelleds strips ( WS2812) ( bottom) are on the left.
In the middle there is the power supply. D1 will protect the circuit against reversed polarity, in case you mix up the + and - of the battery. In that Case, D2 will draw so much current that the fuse FH1 will blow out. There is an onboard regulator the make 5V. At the bottom in the middle you'll find the I2S display. In that regards, R1 and R2 ( near the audio chip) are very important. The I2s bus will not function without those pull-up resistors.
That brings us the the top right where you can find the audio chip. The audio circuit is a stripped copy of the original Teensy Audio board. I removed all I don't need and I made a few changes. In this version, the line in, line out and the mic in can be connected using a stereo jackplug. In the next update, The headset out will be included as well and I will add a jackplug for one pixelledstrip.
If you want to solder the audio chip on a pcb you created yourself let me give you a fair warning, the audio chip is extremely hard to solder as it is very small. You will need tools for SMD soldering and a microscope to work with. This is the reason why i sell pre-soldered versions.
The PCB

.png)
.png)

You can order a pre assembled pcb. All the small components are already assembled. All you need to add is a display, the Teensy controller, potentionmeters and maybe a few headers/sockers.
If you are using the schematic and gerbers to have a pcb produced elsewhere, you will have to add the rest of the components as well. See the pcb bom list.
Downloads
3D Printed Housing






I designed a nice housing that also has room for a battery. The housing is already designed to fit the next version of the pcb that has extra Jack connectors.
You can print your own housing. Files are included.
The Graphical Interface



A vocoder emulator
The actual vocoder was created using the Teensy Audio Tool
It's a graphic enviroment, a playground, that you can use to create various audio things. You can then export the code and paste it into your Arduino Sketch.
Teensy Audio System Design Tool
You can click import and import the content of the Vocoder.h file to recreate the graphic layout of the vocoder
The Arduino Sketch and Setup






Installing the Teensy Framework
Before you can compile the sketch successfully, you will need to install the Teensy plugin and some libraries
I used Arduino IDE with Teesyduino:
- Arduino IDE 2.3.4
- Teensyduino, Version 1.59.0
You can download ARduino here: ARduino IDE Download
Click here for a tutorial about installing Arduino
Make sure you use the Arduino IDE and not the windows app ( incompatible with the Teensyduino )
You can download Teensyduino here: Download TeensyDuino
Click here for a tutorial about installing TeensyDuino
Installing the Libraries
The following libraries are included in the Teensy Framework and don't need installing
Using library Audio at version 1.3
Using library SPI at version 1.0
Using library SD at version 2.0.0
Using library SdFat at version 2.1.2
Using library SerialFlash at version 0.5
Using library Wire at version 1.0
The following libraries need to be installed
Using library EasyButton at version 2.0.1
Using library Adafruit GFX Library at version 1.10.4
Using library Adafruit SSD1306 at version 2.5.7
Using library FastLED at version 3.9.2
Using library Adafruit BusIO at version 1.7.1
Opening the sketch
The actual Sketch for the vocoder is devided into 3 files. Make sure all 3 files are in a folder named CylonVocoder2
If you open the sketch from within a different folder, Arduino IDE will move the file to a new folder with that name, however, the 2 extra files will not be included and you will have to copu those manually!!
- CylonVocoder2.ino
- Soundfile.h
- Vocoder.h
The main program is in the CylonVocoder2.ino
Soundfile.h contains the binairy data for the Cylon sound.
Vocoder.h contains the code for the actual vocoder,
Although, the first release is included in the instructable, please check out my github to see if there is an update available:
Demo


I made a small video of what this vocoder can do. In this demo, I tuned it to sound like a Cylon. It's easy to change Pitch of the mix of Wet and Dry sound as well as volume. Th volume of the Larson Scanner ( the red moving light) can be changed also.