warcher1 wrote:I'm using 1n4004's now. Those should provide better negative voltage clamping right?
I'd say about the same. Both are "normal" silicon diodes and so when conducting drop somewhere between 0.6 and 0.7 V. I'd have to check the specs to see if there's any appreciable speed difference but I suspect that's really a non-issue for your usage.
warcher1 wrote:That circuit doesn't look to much more complicated than the envelope detector. I see you have detector 1 and detector 2 joined together on a single piezo. I assume that's an artifact of your testing of the model right?
Look at the tags with fine eye and you'll see that detector #1 is connected to piezo #1, which produces the voltage you saw above. Detector #2 is connected to the tag piezo #2 which is an inactive piezo; it's modeled just by the output resistance. I have my doubts as to whether that's wholly accurate but it's enough to keep detector #2 off. I'll try and drop by Radio Shack (gack) tomorrow and pick up a LM339 and a cheapo piezo buzzer to play with. I'm thinking that circuit is pretty close to what I need so some playtime is warranted to figure out any bugs.
And yes it's pretty simple, especially if you can use the 3.3V present to set the reference voltage for the comparators. And at $0.50 per IC not all that more $$s to do. You need 24 channels, that's 6 ICs and so an extra $3. The real PITA is having to re-wire stuff.
You're correct in saying (earlier) that having the output be a high when un-hit isn't a big advantage in your case. Your detectors are all on a board right next to the MUX and Arduino. It's unlikely that there will be a connection problem there. I'm pondering on how to make it detect an open from the piezo to the detector, basically make the open circuit trigger a hit condition. It might be just an extra resistor (1+M) tied from the piezo to Vcc. If that works out, would that be worth it to you ?**
**EDIT : If you wish, take your DMM and put it on the ohms function. Disconnect the + lead of a piezo (if you don't have another sitting around) and measure the DC resistance from + to - of the piezo. Reverse the probe leads and measure it from - to + as well (I doubt it'll be any different). Also if your DMM has a diode or "beep" setting for the ohms function, repeat those 2 measurements with that setting. The diode setting uses a higher current to measure the resistance (enough to bias a diode to be "on"). This will give me a good DC model for the piezo and let me know if adding something like a 5M pull-up will result in the open circuit detection scheme mentioned.
FYI - Here's a good basic page on comparator circuits.
http://home.cogeco.ca/~rpaisley4/Comparators.html