Hi guys,I am doing a hobby project which is using the buzzer as my vibrate sensor.
As attached picture is my connection. I want it give me high (5V) while i blow wind on the buzzer.
But something seems like going wrong. The comparator circuit is not working.
If i replace the buzzer into a voltage divider, it is working!!
I know that buzzer only give voltage but not current. So any solution about that??
(such as edit the circuit or something)
You should connect your LM324 as a comparator, with a high gain and adjustable input level.
As it is shown in your schematic, I cannot see what is the "ground" for inputs and outputs. You can rather try a LM311, a comparator allowing to set the sensor (buzzer) between the + input and ground (battery negative) while the (-) input will be connected to a potentiometer across the battery, and via a 100 k resistor to output.
You should connect your LM324 as a comparator, with a high gain and adjustable input level.
As it is shown in your schematic, I cannot see what is the "ground" for inputs and outputs. You the sensor (buzzer) between the + input and ground (battery negative) while the (-) input will be connected to a potentiometer across the battery, and via a 100 k resistor to output.
I already connect in open loop, which mean very high gain and functioned as comparator. Noted that the "ground" of input is same with the output. by the way I no need a negative voltage since I only need high and low TTL logic voltage. I tried a lot of op amp that I have, not 311, the same things happened which is the output always have same voltage(20mv to 2v) with the noninverting input, instead of a high or low, 5 to 0V.
I already connect in open loop, which mean very high gain and functioned as comparator. Noted that the "ground" of input is same with the output. by the way I no need a negative voltage since I only need high and low TTL logic voltage. I tried a lot of op amp that I have, not 311, the same things happened which is the output always have same voltage(20mv to 2v) with the noninverting input, instead of a high or low, 5 to 0V.
You know, I used LM324 many times as an opamp but not as a comparator. LM324 is not the "rail-to-rail" type, so small voltage generated by your buzzer, close to the ground rail, would not drive the opamp in a reliable way.
I would rather make a two-resistor (3k &3k) voltage divider for the Vcc/2 "artificial ground" to make the input reference. Also, a good comparator should have the gain defined by a feedback resistor.
Your circuit has three poorly defined problems: 1. LM324 is not good for close-to-rail voltages, 2. its gain should not be left not defined -use e.g. a 100k...1 M feedback resistor, and 3. make the Vcc/2 reference for the inputs. 4 . I would advise to use a potentiometer across +5V/GND to adjust the comparator threshold.
Thanks for pointing out the weekness. After I post this, I tried on lm339 as well. I also put a voltage divider as threshold and controled to 5mV. I put 2 set 200k/200 Ohm as 1000gain deferential amplfier too. The result is the same! Vout = V+ , when V+ > V- .
Thats make me keep scratching my head and not make sense.
And I expect, Vout=Vsource+, WHEN V+>V- .
Noted that I have experience on circuit and surely connected correctly and tried a lot of times.
if I replace the buzzer to another voltage divider, then it works exactly fine! I suspect the problem occur at buzzer...
I am not sure if I understand that with LM339 your problem persists. I used both LM311 and 339 (339 should be four LM311s in one chip), usually with thermistors as temperature controllers, and with added buffer opamps to get a logic out for ~10 mV above GND from a RF detector. Always reliable, no problems. Try the pot to adjust the threshold.
Thermister is resistive which sourced by a Vcc and divided by another resistor to get the voltage. Typically will get few micro ampere current for input. But with a single buzzer, it only give potential different when receive pressure such as I blow wind on it. I used with phototransistor before and it is working fine. Just it functioning weird with the buzzer.
I tried to adjust the pot to 2mv and it give me always high, noted the buzzer gives 5mv in ambient.