Sensitive pulse detection in a low-voltage circuit

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
(This sort of follows on from the "Computer controlled pulse generator" topic, but it's a much narrower question that doesn't require all the previous information. The PIC quest is ongoing, but for the moment I'm taking another look at the audio idea.)


I'd like to use audio pulses to trigger a low-voltage digital circuit. (A supply voltage of 3V total, ideally.)

The original idea was an op-amp followed by some kind of transistor- and the problem was that I couldn't find anything with a low enough threshold voltage. (Even a rail-to-rail amplifier that can cope with +-1.5V doesn't quite do it. I identified a MOSFET with a 1V max threshold, but I couldn't find anywhere that sells it. And that would still be cutting it a little fine.)

(1) What would be good would be something like an op-amp that works on only one side of the zero line. I don't know what that would be called, if it exists. Single 3V supply; 0 to 3V input processable (negatives allowed and read as 0); and as near 0 to 3V output as possible (though 0.5V to 2.5V would work OK really). Is there such a thing? Or, is there some way to wire an op-amp so it'll do that?

(2) The other possibility is if there's some other kind of switch device with a threshold of less than 1V. (My brother just suggested an A/D converter chip with a parallel output, but those are pretty expensive and probably best avoided here.) Any ideas on a cheap component with that effect?
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
I'm afraid I don't understand how that helps. I'm already overdriving my amplifier; and what I've read so far suggests there would be a large overlap beween rail-to-rail amplifiers and class B. That's as much as I can figure out from that.



Anyway, it has come to my attention that the name of what I'm looking for in (1) is a "single supply" op-amp. (And it needs to be nearly rail-to-rail at 3V supply). I've not found anything quite suitable yet, but I think they exist.

I'm not sure how to wire them at this point, and how it's different, since they can all handle dual supply as well. And, the ones I've seen can all be damaged by inputs below -0.3V, so I'd need to find some way to protect it from that: my raw input can swing between +-1V in some circumstances, it's just that only the positive side is relevant.
 

n9352527

Joined Oct 14, 2005
1,198
Once, a long time ago, I used a low voltage 555 (from TI, if it is still available now) as a comparator with supply voltage of 1V. I think it should work for your application too, have a look...
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
Are you talking about using the audio pulses as trigger input? That's an interesting idea.

The 7555 has the same limitation as the op-amps I mentioned, that any input below -0.3V will cause latchup. It seems to be a symptom of these low-voltage devices in particular. (Many of the datasheets warn about connecting the inputs to things which do not share the same power supply.) This is a bigger problem than I expected- I've not left myself much room to move, with this 3V range.
 

Ron H

Joined Apr 14, 2005
7,063
Use an LMV331 (or LMV393) comparator, and add a series 10k resistor between your signal and the comparator input, with a shunt BAT54 Schottky diode from the input pin to GND, cathode to GND. The BAT54 has a max fwd voltage of 240mV at 100uA. The 10k resistor will limit the current to less than 100uA with a -1V input.
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
Thanks. That's pretty neat. So, that stops the input pin on my chip going below -240mV (provided the raw input does not go below 1V).


Edit 3 (got rid of some pointless rambling): What I really want to ask is what's the difference between comparators and op-amps, in terms of items one can buy.

I know it's possible to wire an op-amp as a comparator; and the comparator datasheets have some very op-amp like example circuits.
 

Ron H

Joined Apr 14, 2005
7,063
Originally posted by BladeSabre@Jun 3 2006, 08:20 PM
Thanks. That's pretty neat. So, that stops the input pin on my chip going below -240mV (provided the raw input does not go below 1V).
Edit 3 (got rid of some pointless rambling): What I really want to ask is what's the difference between comparators and op-amps, in terms of items one can buy.

I know it's possible to wire an op-amp as a comparator; and the comparator datasheets have some very op-amp like example circuits.
[post=17484]Quoted post[/post]​
You're not the first to ask that question. In fact, some just blaze blindly ahead and never realize there is a difference.
See this note from Analog Devices.
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
Ah, thanks. (It's funny, the shop I'm using sells quad comparators for 20% of the price of their single op-amps, so I assumed the comparator was the "cheap" one.)
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
I found some BAT754 Schottky diodes, and after much talking, I did manage to solder one. It does what I was expecting.

For a comparator I got the LM239 (TI) and it's been really weird, so I'd like some help on that. Firstly, I'm not sure if it's the right thing. And, should I be able to use it like an op-amp? I've been reading about single-supply op-amp setups, trying to breadboard some of the simpler examples, and the output voltages are all over the place. (I did get a second chip out, in case I'd broken the first one, but it's no better.)
 

Murod

Joined Dec 24, 2005
30
BladeSabre said:
(This sort of follows on from the "Computer controlled pulse generator" topic, but it's a much narrower question that doesn't require all the previous information. The PIC quest is ongoing, but for the moment I'm taking another look at the audio idea.)
(2) The other possibility is if there's some other kind of switch device with a threshold of less than 1V. (My brother just suggested an A/D converter chip with a parallel output, but those are pretty expensive and probably best avoided here.) Any ideas on a cheap component with that effect?
How about using one transistor + 2 resistors. Connect one resistor to the input and the base of the transistor, connect other resistor to the Vcc and the collector. Connect the emiter to ground. Pick the output from the junction of collector and resistor. Choose the resistors values so the transistor will be saturated as the input reach the treshold. Remember that the treshold always higher than the Vbe knee voltage, choosing germanium type for the transistor might help you.

Best Regard,

Hasan Murod
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
Are you saying I can get a threshold under 1V that way? Do you have a diagram or a link to a website that will explain this technique in more detail?

Even if I can do that, I still need to get my amplifier to behave. Maybe I should make a new topic about that, since it's a simple question hidden at the bottom of a more complicated topic where hardly anyone will see it. And I know I should really post diagrams and notes of exactly what happened. But for the moment I'd just like to know whether the LM239 can be used like this and if it has any surprises I should be aware of.
 

Thread Starter

BladeSabre

Joined Aug 11, 2005
105
I did some more reading and found out that comparators are not used with negative feedback. So while the linked page at Analog Devices explained why not to use an op-amp as a comparator, I didn't realise there were even bigger problems with trying to use a comparator as an op-amp.

Without the negative feedback, my pulse detection may be too sensitive.

Here's an example of what I'm looking at (1ms, 0.1V per div).

I want to detect the big pulses but not the small ones (noise). And to make things more difficult, this needs to work over a decent range of volume settings. (The noise is apparently not from the wires- it seems to be in proportion to the size of the signal. There's also a 33n capacitor in there removing the DC component of the audio signal, but the noise looks just as bad without it.)

With the old 12V circuit, I just used an op-amp with a gain of 50, and used the output to trigger a MOSFET. That seemed to be well-behaved for most volume levels. Even if the noise did get amplified to 1V at maximum volume, the next stage switched at 2V, so it was fine.

I came across quite a bit of info about using a comparator with positive feedback for something like this- but I don't understand it. From what I do understand, it might be possible to make use of those paired negative/positive pulses...
Though, I can't be sure whether the signal is guaranteed to be the same way up on all computers- maybe a different sound card would play that same signal as a positive followed by a negative pulse? (It "sounds" the same whichever way up it may be.)

Any ideas what to do with this?

--------

Ah, it's obvious! I just need to set the voltage on the other input to a suitable threshold above the noise. The first stage is now working fine for all volume levels in the top half of this computer's scale. I think this is better than the old op-amp solution.
 
Top