Author Topic: 3-bit folding flash ADC uses only 3 comparators  (Read 29075 times)

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #20 on: June 24, 2011, 09:14:59 AM »
I wanted to work on my PCB skillz so I made this in Eagle.  It's unverified and I'm sure I'll be making some revisions now that I've had a chance to look at it after a good night's sleep.  So take with a grain of salt, but here's a preliminary layout for an ADC/DAC "fuzz" with a volume control.

Schematic:


Layout:

Hides-His-Eyes

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #21 on: June 25, 2011, 01:54:03 PM »
I'd use bigger pads than that, especially if those are the GM defaults

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #22 on: June 25, 2011, 02:18:54 PM »
Good call.

oskar

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #23 on: July 09, 2011, 10:52:50 PM »
Alex. This is just soo clever...   :o

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #24 on: July 11, 2011, 03:01:40 PM »
Thanks Oskar!

I simulated a 4-bit version using just resistive dividers (no buffers). It does the job in the sim, albeit with some glitches.

Link

Hides-His-Eyes

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #25 on: July 11, 2011, 07:30:01 PM »
4 bits with a quad?

brrrrilliant!

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #26 on: July 11, 2011, 07:58:29 PM »
Adding a cap seems to tame some of the glitches.  Link

Taylor

  • Poster2
  • **
  • Posts: 4116
  • Total likes: 62
  • The clean energy source of the future.
Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #27 on: July 12, 2011, 12:02:41 AM »
Did it occur to anybody before that you can get multiple octaves up with this kind of thing? Maybe I'm looking at this wrong, but if you take the output of, I guess it would be the least significant bit, it has 16 cycles per input cycle, so 3 octaves up. The next LSB would be 2 octaves up, and the second-to-MSB would be an octave up.

If so, you could do the multi-octave drawbar kind of thing, without a PLL for the up octaves, which is responsible for a lot of the glitching in something like the Harmony Generator circuit.

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #28 on: July 12, 2011, 08:28:36 AM »
 ;D

Still a bit of work to get it to sound like a harmony note, though.  The bit transitions are level-sensitive, so you'd want to compress the input to be able to use all the bits.  But then you run into a problem, because a compressed or hard-limited input signal has steeper slopes, which means it can be represented with fewer bits, so you lose the frequency "multiplication" effect as the input becomes more square. 

Hides-His-Eyes

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #29 on: July 12, 2011, 08:52:15 AM »
You could do it with a VCA to always get the same peak level though right?

Taylor

  • Poster2
  • **
  • Posts: 4116
  • Total likes: 62
  • The clean energy source of the future.
Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #30 on: July 12, 2011, 02:49:28 PM »
Also, by adding a switch for each bit, you can get some fun wave shaping stuff happening. Turning off the MSB gives you an octave up sawtooth wave that flips its phase every couple of cycles. That plus the next MSB gives 2 octaves up sawtooth that flips phase every 4 cycles or so.

As you say it will be tricky to get this to work with a real guitar signal. My approach would be more in just amplifying the signal enough before the ADC to get it to light up all the stages, but I'm a bit of a caveperson. It won't act the same with soft notes as loud, but that's true of most forms of harmonic processing.

I've got to build this! I went the "brute force" path, making a bit crusher/sample rate reducer with the FV1 chip, but your way is light-years more clever.

Have you built this in real life yet, ETA?

oskar

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #31 on: July 12, 2011, 05:17:01 PM »
Quote
Also, by adding a switch for each bit, you can get some fun wave shaping stuff happening.
Well, once you've got it in the digital domain there is no end to the fun... Gating with a Quad And or ringmodulating with Xor's.
Hard to tell tell what that would sound like...  But it's gonna be noisy!
I'm thinking envelopes la Blue Box.

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #32 on: July 12, 2011, 08:28:25 PM »
Have you built this in real life yet, ETA?
I'm sorry to say I haven't.  Most of the rooms in my place, including the door to my "workshop" (a coat closet, lol) have been taped shut for the past two weeks while serious renovations have been going on in my apartment.  Mold growth due to landlord negligence, moving the bare necessities to a temporary apartment, etc.
The plus side is I've been getting more familiar with Eagle, and Falstad's circuit simulator.

I like the ideas everyone is suggesting.  I have no idea how to implement some of them, but they sound cool!  :)

toneman

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #33 on: July 13, 2011, 04:55:02 PM »
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

earthtonesaudio

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #34 on: July 13, 2011, 09:53:16 PM »
Wow, very interesting.  Simonton's approach makes so much sense, I doubt I would have tried to reinvent the wheel if I had seen it before now.  Thanks for the link!

PRR

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #35 on: July 14, 2011, 06:18:18 PM »
> the least significant bit, it has 16 cycles per input cycle

ONLY if the input is Full Scale.

As a note fades, there will be fewer transistions per input cycle.

What you have discovered/observed is digitizing distortion, not a a harmonic system. In fact the non-harmonic nature is why digital converters sound nasty all out of proportion to they THD numbers.

> Simonton's approach makes so much sense

Sorry, I assumed you were familiar with basic ADCs because your approach is so elegant. Simonton's ADC is ancient, textbook, except he gives specific values and parts which wil work for PAiA-quality audio. (Alternative FLASH converters can be VERY much faster, deeper, more precise... and costly.)

Taylor

  • Poster2
  • **
  • Posts: 4116
  • Total likes: 62
  • The clean energy source of the future.
Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #36 on: July 14, 2011, 10:21:39 PM »
Alex, I think I can build this soon - was wondering if the values in the sim, especially resistors on the comparator outputs, are legitimate for a real life build? I can usually substitute successfully, but since the resistor values in this seem to make up a complex interactive "eco-system" I'm not sure about changing anything.

toneman

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #37 on: July 14, 2011, 10:24:38 PM »
Glad U found the link interesting.

The complete article was in Polyphony LabNotes long time ago.

As far as "range", I believe the EK7 was for a 0-5V signal uses for preset saving on the Paia Proteus.
The knobs/pots on the proteus were grouped into banks and one 8bit word was created with
TWO EK7 circuits.  btw, I have and original Proteus.

U could easilly "re-range" the input to be 0-2.5V by adding a x2 amplifier in front.
Or, 0-1.25V range by adding a x4 amplifier in front.
Then, U could always "fold" the bits by feeding some bits back thru XOR, OR and/or(pun) other gates.
It's all gonna come out square waves just by the digital nature of the signal.
Run the squares thru lowpassfilters (LPFs) to squeeze out the sines  :icon_smile:

Keep breadboarding....
 8)
TONE to the BONE says:  If youTHINK you got a GOOD deal:  you DID!

Taylor

  • Poster2
  • **
  • Posts: 4116
  • Total likes: 62
  • The clean energy source of the future.
Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #38 on: July 15, 2011, 01:04:23 AM »
> the least significant bit, it has 16 cycles per input cycle

ONLY if the input is Full Scale.

As a note fades, there will be fewer transistions per input cycle.

What you have discovered/observed is digitizing distortion, not a a harmonic system. In fact the non-harmonic nature is why digital converters sound nasty all out of proportion to they THD numbers.

Right, we discussed that above. I'm familiar with this kind of aliasing - I designed a commercial DSP bit crusher and sample rate reducer. But even without compressing the input, I think plenty of fun can be had with an effect that creates a multi-octave-up square wave, whose number of octaves up is envelope-controlled.

I played with volume in the sim and got some weird results - might just have been an error but at some input volumes I was getting 9 output cycles per input cycle...  ??? :o

Quackzed

Re: 3-bit folding flash ADC uses only 3 comparators
« Reply #39 on: July 15, 2011, 12:55:06 PM »
Quote
Adding a cap seems to tame some of the glitches.  Link
upping the 10n cap at the end to 1uf (heavy handed lpf-ing) cleans it up nicely... (i know:obviously :P)
probably a trade off for high frequency signals, but seems to do the job.
granted at 80hz the output is @9v, at 4khz it's @ 800mv... so some post amp/hp filtering would be in order. (again probably obvious)
still i had to try it...
-btw really brilliant! it takes a few large cognative leaps to get here. bravo (dignified golf clap) ;D
nothing says forever like a solid block of liquid nails!!!