Analog preprocessing circuit (anti-alias/pre-amp) for driving ADC128S102 in Wings


fons

Recommended Posts

Note: this is crossposted from stackexchage , I hope this doesn't go against the forum netiquette (feel free to erase it otherwise)

Background

 

Similarly to what Jeri Ellsworth did in her C64 Bass Guitar hack I am working on an audio-to-midi converter for my bass guitar.

I am also planning to use piezo discs as sensors placed under each string, connected to a Papilio One, using the ADC of the Logic Start MegaWing (an ADC128S102). The ADC reference voltage is hardwired to 3.3. volts.

My problem is that my analog electronics knowledge is pretty bad and I don't have any practical experience (I have given a try to the relevant chapter of the The Data Conversion Handbook but it's a bit too advanced for me).

 

Question

 

What circuit should I use to drive the ADC? The circuit should

  1. Implement an anti-aliasing filter. The frequency ranges (excluding harmonics) typically found in each string of a 4-string bass are:

    • E string: E1 (41.20 Hz) to E3 (164.81 Hz)
    • A string: A1 (55.00 Hz) to A3 (220.00 Hz)
    • D string: D2 (73.42 Hz) to D4 (293.66 Hz)
    • G string: G2 (98.00 Hz) to G4 (392.00 Hz)
  2. Ensure that the input signal voltage matches the expected range of the ADC (0V to 3.3V as I understand it).

I would appreciate as much practical information as possible (e.g. specific circuits and specific parts to use) since, as I have said, I am pretty unexperienced on this. Pointers to books/articles suitable for a newbie like me would also be appreciated.

Link to comment
Share on other sites

This is a low pass filter from http://www.electronics-tutorials.ws/filter/filter_5.html.

 

 

 

fil26.gif

It has a -3db cutoff filter at 159 Hz, give or take. (note - the power connections for the OpAmp are not shown!)

 

Were the C value reduced, the cutoff frequency would rise - a 33nF cap would give you about 472 Hz (about what I guess you may want), If you were to sample the resulting signal at about 5kHz, you should have no problem with aliases.

 

However, I don't know the output impedance of a piezo disk pickup, it might be far higher than this circuit needs. If things don't work well you might need a JFET buffer to match the two together.

 

buff11.gif

(from http://www.muzique.com/lab/splitter.htm)

Link to comment
Share on other sites

Hi hamster,

 

First, thanks for your answer (and for your book, it's a really great introduction). 

 

Now, getting to the topic itself. Will this low pass filter also ensure that the Vout is always within the expected voltage range of the ADC input? Otherwise, how can this be done?

Also, what specific component should I use for the op amp? (maybe this is a stupid question but as I said, I am total newbie when it comes to analog electronics).

Link to comment
Share on other sites

The ADC is 0-5v IIRC so if you use a rail to rail op-amp powered by 5v then there is no way that it could exceed the input range.

One thing I just thought of is that the low pass filter is drawn to use a. Opamp with a +/- ?V supply, not 5v / 0V. I will sketch something up later tonight

Link to comment
Share on other sites

The ADC is 0-5v IIRC so if you use a rail to rail op-amp powered by 5v then there is no way that it could exceed the input range.

 

It is? That's what I initially understood from the schematic on the Megawing  spec page but then your book states that Vref is 3.3V . Now I'm confused :S

 

One thing I just thought of is that the low pass filter is drawn to use a. Opamp with a +/- ?V supply, not 5v / 0V. I will sketch something up later tonight

 

Thanks! Looking forward to it!

 

However, I don't know the output impedance of a piezo disk pickup, it might be far higher than this circuit needs.

 

How could measure it to know for sure? 

Link to comment
Share on other sites

I've been thinking about this while mowing the lawns. The output of the piezo will have really high impedance, as is the ADC's input impedance. You might just get away with this (ignore the part names, ADC inputs are on the right):

 

post-29512-0-98945400-1419154379.png

 

The Rs should be around quite high value - maybe 1M or above, and the diodes are to clamp the input just in case the input goes outside of the power supply range.

 

Just try it without the low-pass filter cap first, and then experiment to find a suitable value - it should be around 0.47n or so to get a -3db filter of around 600Hz or so, assuming you use 1M ohm and the piezo output impedance is higher than than.

 

Oh, and because of the high impedance, using an oscilloscope to watch what is going on will not give accurate readings.

 

EDIT: The ADC's AC input impedance is about 100 ohms, so maybe some sort of buffer will be needed, esp for high sample rates.

Link to comment
Share on other sites

Hi,

 

I think I will go for the op amp solution (the link you provided is really good, thanks again). I still have a few questions though:

 

  1. Is the ADC range 0 to 5 V or 0 to 3.3 V?
  2. What specific op amps would you recommend? I have read that JFET op amps are better suited for high impedance sensors like the Piezos due to their high impedance inputs.
  3. The Piezo output signal is bipolar whilst the ADC is unipolar, how can this be solved?
  4. For (3) I am considering to replace the ADC by a bipolar one (and while I am at it, I am also considering a Delta Sigma one which should be better suited at this problem). Do you know any pin compatible replacements so that I can simply replace it in the Logic Start Megawing?
  5. Do you think it would be possible to use the Papilio/Megawing as power source? What PIN should I use? Would it require the external adapter or would USB be enough?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.