What is this circuit doing? - Page 1
Forum section: electronics / projects

author: james_s
author_rank: Super Contributor
timestamp: June 20, 2018, 05:09:40 pm
content: This is part of the sound circuitry on a late 70s arcade game, it generates a noise that sounds very much like a sonar ping. I'm trying to understand exactly how it works but I'm finding it a bit confusing. The left side is simple enough, noise from a LFSR (RNOISE) is gating the output of an envelope generator that produces the sharp attack followed by a smooth decay down to silence as C39 discharges. What I'm not sure about is the cluster of op-amps. It looks like a pair of cascaded low pass filters but for some reason they've chosen to run the whole thing from a single ended supply and bias the amps to a 5V reference, then AC couple the signal in and out to remove the DC offset despite the fact that the board receives AC voltage that could have easily been used to get a bipolar supply. Is that really just a filter? In most games of this era when they wanted a low pass filter they used a simple passive RC arrangement.

author: David Hess
author_rank: Super Contributor
timestamp: June 20, 2018, 06:00:03 pm
content: A sonar ping is about right. The three operational amplifiers are configured as astate variable filterwhich allows for a high Q bandpass response.

author: james_s
author_rank: Super Contributor
timestamp: June 20, 2018, 06:08:21 pm
content: Fascinating, thanks! I was not aware of that filter topology.Now to see if I can implement something comparable in VHDL.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 20, 2018, 07:09:42 pm
content: Curiously, it doesn't seem to have anything to do with C39. Unless the input is being strobed at the resonant frequency (in which case it's like a bandpass'd charge pump of sorts), which I guess could be.If you want to be very literal about it, you can instantiate each op-amp as an integrator, and just do the math (add/subtract inputs, accumulate outputs) with a few DSP blocks.DSP scares a lot of people, but it is literally exactly that simple!There are some gotchas, like needing a sample rate high enough that it doesn't go unstable (i.e., a few times the "ping" frequency), and enough bits that the integrator doesn't end up stuck on an LSB. That shouldn't be a problem, most DSP blocks have more than enough bits, I'd think 12-16 would be more than enough here even for an unoptimized implementation (and I want to say 18 bits is a more common size, at least in some product lines??).Tim

author: David Hess
author_rank: Super Contributor
timestamp: June 20, 2018, 07:21:41 pm
content: Quote from: T3sl4co1l on June 20, 2018, 07:09:42 pmI think that is what is going on. C39 is charged at the beginning of the ping and then the analog switch produces an exponentially decaying square wave at the ping frequency for the state variable bandpass filter to work with. The decay time constant for C39 is almost 0.1 seconds which is about right.I wonder why they did not use a simpler active filter. The state variable design would be the easiest to adjust however.

author: james_s
author_rank: Super Contributor
timestamp: June 20, 2018, 07:28:00 pm
content: The analog switch is controlled by pseudo-random noise, the SNR START signal goes high for about a second each time it is triggered. I'm not sure why they went with this design either, although these games were designed in a hurry, typically by young guys who were what would today be called the hacker/maker type of tinkerers. I suspect the process was largely a matter of breadboard a circuit and tinker around with component values until it sounded right. This is the only one I've seen with such a complex filter design, most were just simple RC passive low pass filters. Whatever the case the result of this particular circuit is pretty impressive.

author: David Hess
author_rank: Super Contributor
timestamp: June 20, 2018, 07:35:08 pm
content: Sounds pingy to me.

author: apblog
author_rank: Regular Contributor
timestamp: June 21, 2018, 04:59:10 am
content: Would you mind posting the rest of the circuit, or at the LFSR?I’d love to build it and play around with it.And yes, you are correct about the tinkering that went on back then.

author: james_s
author_rank: Super Contributor
timestamp: June 21, 2018, 05:03:22 am
content: Quote from: apblog on June 21, 2018, 04:59:10 amIt's in the manual for Atari Subs.https://www.arcade-museum.com/game_detail.php?game_id=9858I believe the LFSR may be drawn incorrectly in the manual though, configured as shown the launch and explosion sounds all sounded terrible, it wouldn't be the first schematic error I've found in one of these. I used the one from Sprint 2, Ultra Tank and others and that sounds correct, I'm only missing the sonar ping sound now.

author: apblog
author_rank: Regular Contributor
timestamp: June 21, 2018, 05:23:55 am
content: Quote from: james_s on June 21, 2018, 05:03:22 amGreat, thank you. I love discrete circuits that produce cool audio effects.

author: james_s
author_rank: Super Contributor
timestamp: June 21, 2018, 05:28:27 am
content: Just to clarify, I did clock it with 256H, I just used the LFSR configuration from Sprint2, but that game clocks it with the lower frequency 2V. These are signals from the video line counters.