Author Topic: What is this circuit doing?  (Read 1404 times)

0 Members and 1 Guest are viewing this topic.

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
What is this circuit doing?
« on: June 20, 2018, 05:09:40 pm »
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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: What is this circuit doing?
« Reply #1 on: June 20, 2018, 06:00:03 pm »
A sonar ping is about right.  The three operational amplifiers are configured as a state variable filter which allows for a high Q bandpass response.
 
The following users thanked this post: james_s

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: What is this circuit doing?
« Reply #2 on: June 20, 2018, 06:08:21 pm »
Fascinating, thanks! I was not aware of that filter topology.

Now to see if I can implement something comparable in VHDL.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: What is this circuit doing?
« Reply #3 on: June 20, 2018, 07:09:42 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: What is this circuit doing?
« Reply #4 on: June 20, 2018, 07:21:41 pm »
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.

I 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.
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: What is this circuit doing?
« Reply #5 on: June 20, 2018, 07:28:00 pm »
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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: What is this circuit doing?
« Reply #6 on: June 20, 2018, 07:35:08 pm »
Sounds pingy to me.
 

Offline apblog

  • Regular Contributor
  • *
  • Posts: 108
  • Country: us
Re: What is this circuit doing?
« Reply #7 on: June 21, 2018, 04:59:10 am »
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.



 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: What is this circuit doing?
« Reply #8 on: June 21, 2018, 05:03:22 am »
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.

It's in the manual for Atari Subs.
https://www.arcade-museum.com/game_detail.php?game_id=9858


I 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.
 

Offline apblog

  • Regular Contributor
  • *
  • Posts: 108
  • Country: us
Re: What is this circuit doing?
« Reply #9 on: June 21, 2018, 05:23:55 am »

It's in the manual for Atari Subs.
https://www.arcade-museum.com/game_detail.php?game_id=9858


I 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.


Great, thank you. I love discrete circuits that produce cool audio effects.
 

Offline james_sTopic starter

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: What is this circuit doing?
« Reply #10 on: June 21, 2018, 05:28:27 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf