Gh-Gh-Gh-Ghost Voice!

From Hive13 Wiki
Jump to: navigation, search

Hive13 Project
Gh-Gh-Gh-Ghost Voice!

In-use circuit, wooo.jpg

Status: Active
Start Date: 09/01/2015
End Date: ?

It's a gh-gh-gh-ghooOOOOOOoooost! This project is a head-first dive into audio electronics with the end goal of making a sooper spoopy reverse-echo ghost voice! While most of the progress noted on this page is about the analog prototype, part way through the creation of that I finally knew enough to determine whether I could use external RAM with an Arduino. (The answer is Yes...) That discovery obviates this design pretty badly, assuming that it actually operates fast enough to use for audio. (The answer is most likely yes)

The first design makes use of 3x PT2399 guitar delay chips chained back to back due to their short maximum delay time of about 250 ms.

The second design I intend to make use of an Arduino Teensy, either 3.2 or LC, and an external RAM chip.

Log Book

Progress, in most-recent-first order.


I finally finished the mic-to-line-level amp after putting it off for nearly a month, meaning I could finally record a test recording to my computer!  Only had to turn it to about 14x, so I guess it wasn't that quiet, though that is also after turning the mic gain as high as my circuit would allow.


So the delay chips weren't always starting correctly. And when they didn't start correctly, they dew a stupid amount of current (somewhere around 120 mA a piece!) and heated up, whereas in normal operation they only draw about 10~12 mA a piece. After some thought, I remembered that I had read somewhere that, if the PT2399 didn't start up properly, shorting the digital ground to analog ground would make it work. (Ideally it would connect to the star ground.) When I checked the circuit I'd worked out, indeed the digital ground pin was not actually connected directly to circuit ground anywhere. Just as a test measure, since I wasn't too concerned about noise at this point, I shorted the digital ground to analog ground by wedging another jumper in and all three PT2399s now start consistently. Perhaps Circuit Salad just got a good batch of the things, or else they just unconsciously always connected to circuit ground.

However, at least on Halloween night, the circuit did actually perform when it was supposed to. Just, now it performs consistently. On the output, however, the voice isn't the most intelligible. The damped parts probably need to be damped more. Making the mixer an actual mixer (attenuators voltage split to ground rather than just being a variable resistor.) would allow greater attenuation at the expense of some loss of finesse.

One major problem is that high sibilants, such as S and T, are chopped off. They happen to occupy the 4kHz ~ 5kHz range, so something in the signal path is filtering that out. The MAX7401s are already set to around 4.8 kHz, which leaves the filter on the input, which itself is an MFB Low Pass. Using a random calculator I found on line, I determined the input filter is indeed set up for a cutoff at about 3.4 kHz. Changing the 2200 pF to a 1000 pF would raise the cutoff to 5.0 kHz while increasing the Q from 0.71 to 1.05. That's actually fine as I don't want much frequency content above 5 kHz. The MAX will take nuke anything above 5.0 kHz on the output anyway, because it's an 8th order filter.

I wanted to record the effect to my computer but, as Apple only supports the highest quality of equipment and signal processing, the only audio input present on their MBPs is a Line In, which means I need to boost from mic level up to about 1V. (2Vp-p) To that end I designed a quick and dirty amp with a coarse control (1x~50x) and fine control (1x~10x) for up to about 500x total gain maximum. A 10 mV signal could thus be boosted to 1 V (and more) easily. Having two stages also meant being able to stick with inverting amps. Lastly, I'll finally get to hear just how noisy the whole protocircuit is.  Whee!Mixer with Buffered Output and Pots r2
  • Adjusted the output Rs:
    • Made the input R 2.2k
    • Made the feedback pot 10k because that's the resistance of the thumbwheel pots.
  • Implementation: Turns out the screw holes on my perf board take up way more space than I thought, so I'm having to move the power terminals to the top rather than along side the sound inputs.

Mixer with Buffered Output and Pots r3

  • Shoved things over a bit, put TRS output on the bottom. Dang screw holes.

Mic to Line-Amp r1

  • Designed it with slots into which I could install arbitrary resistors in case I wanted to change amplification.


Completed the third delay! I tested quickly for shorts, and no pins are unexpectedly shorted to power or anything, so I installed the chips. I wired the powers and grounds to each other using hookup wire. Everything else will be hooked up with test leads for the initial pass, though.

Mixer with Buffered Output and Pots

  • Going to redo this a bit to give all the inputs 100k trim pots. This will let me nail down a good resistance value for each stage. The output buffer is still the same, really, just now more pots.
  • Added a cap on the first input juuuuust in case. The rest are delays and I definitely decoupled the delays.


Installed the chips in the second delay, soldered about 2/3s of the parts of the 3rd. Tomorrow I should be able to finish it, install chips, wire things up, and give it a go. I'll need to breadboard the mixer, but otherwise that's it.

I have enough 100kΩ pots that I might just set the mix values using those. This would allow me to more easily adjust the relative delay volumes, although the 3rd delay will probably always be at 10kΩ.


Delay Unit (Unbuffered, Capped) r3

  • I moved the VREF cap down a bit to squeeze things tighter horizontally by another pin width.


Finished a delay unit. Success! It delays my voice about a 1/4s, which is the intended amount. Amp use for the power regulator, mic, mic amp, and 1 delay unit is 40 mA total, about 20 mA without the delay. Total use is then estimated to be about 90~100 mA all together.

I was only able to get up to about 18 kΩ, so I may want to use a 20 kΩ pot instead of just a 10kΩ there. Either that or start with a higher base resistor. 18 kΩ seems to yield a decent enough delay time, though.

Where to go from here? I want to make another order, for a couple RAM chips (I already have an Arduino) but I think I'll go for the DIPs first, because I don't want to bother fiddling with SMD stuff until I actually know I can do this. But since I'd only be ordering a few RAM chips (3 or so tops) it's not really worth it trying to make another lone order. Hm.

In the mean time, each Delay unit takes about 5 hours to solder together. Wouldn't take nearly as long with a PCB :U Most of the time is taken up by mooshing the leads about to make the traces.


Mic Amp r2
  • Tested the mic amp. It works! However, the output is a bit low compared to line-out from a phone or computer headphone output.
  • Modified design to increase the the boost: RBIn increased to 22kΩ, RBf increased to 100kΩ.
    • This allows a gain of approx 0x to 4x. 0% is 0x, 50% is 2x, 100% is 4x.
    • Also, flipped the two input pins of the pot so that the turning it anticlockwise turns down volume, r1 was the other way around.
    • On the minus side, this is a bunch of extra R right at the mic stage. Not too much of a concern in this lo-fi set up, though.
  • I forgot to decouple the output in r1. The output is buffered, so a cap shouldn't be a problem, so I've put a 1µF cap on the output. Too bad I already soldered this together.

Delay Unit (Unbuffered, Capped) r1

  • In light of the current mic amp I've already made, I added a cap on the input. 1µF BP, though. We'll try this, see if that's high enough. I should have enough 1µF BPs, but... yeah. Looks like it's up to 2x 1µF BPs per delay unit.
  • On the original circuit, the filter output has 1 µF with the + towards the filter, then the feedback/output volume pots, then the two returns (one to mix with the input and one to mix with the output) each with a 1µF cap with the + towards the PT2399.
  • I noticed that Rin1 and Cin were in the wrong place from the original diagram, Cin before Rin1, which is not how an LPF works. Fixed!

Delay Unit (Unbuffered, Capped) r2

  • Rearranged board to be more vertical so I can stack it on to one big board since I've got a couple of those. This design is 35.7mm wide, or about 1.5".
  • Changed the output to 10 µF BP.
  • Also, squished things together a bit. Basically 36x74mm, or 1.5x3". That's actually pretty tiny, but not costume tiny. An Arduino Mini + some sort of SMD RAM chip will drastically improve things.
  • Also also, double checked the Typical Operating Circuit from Maxim, and the pin use seems correct. This matches the pin names on Circuit Salad's diagram, though the pin numbers are all off on theirs for some reason.


I didn't keep a design log book, so all I can really say is that since I couldn't yet evaluate the feasibility of using external RAM with an ATMega328, and actual information seemed to be sparse I had to approach this with what I currently knew, which was actually not a whole lot about electronics in general.

Much of this time was spent learning about one thing that seemed to be used quite a lot in audio circuits, the humble op amp. I went through the op amp pages on, actually taking notes so that I could understand enough to recognize what's occurring in other circuits. The inverting op amp, used as a summing node, seems particularly prevalent in audio circuits, likely due to the simplicity of adding the half-voltage reference through the non-inverting input. I also found the text Op Amps for Everyone a useful reference, particularly in how multiple-feedback filters are setup.

The examples and demo math work also helped cement the knowledge, allowing me a basic grasp of circuits, enough at least to kit bash other circuits together.

It took me a little while to settle on a program to draft circuits in, though I eventually found Fritzing to be quite friendly.

The PT2399 circuit I chose to use as a base is a very easy to understand circuit on this Circuit Salad blog. This along with other Circuit Salad articles related to that chip gave me a nice starting point.

Due to other parts of the circuit, I removed the input FET buffer and the delay-input FET switch, as well as the feedback path from the filter. I kept the MAX7401 filter because it's an 8th order filter that's way more compact than anything I could do discretely. This also would turn out to cut down on solder time, so yay. The extras might even be useful elsewhere.