Buzzer vodoo

Thread Starter

Chillum

Joined Nov 13, 2014
546
Mr Chips suggestion was to change the circuit's operation mode from one that is voltage-actuated to current-actuated. Doing this change would not be too much work. But then again, this is not a life-and-death issue, so you still have the luxury of experimenting with what you have, and live with the consequences as @MrChips so ominously stated ;)... Anyway... I don't have the experience to answer that last important question of yours, about how long the battery will last... hope someone here answers it for us.
Ok, but if we have the circuit board as a carbon copy, exact replica, of the breadboard, (that still hasn't misfired), and we keep the wire short, there should be no reason for the project not to work, except it's not an airtight container, but it closes snugly enough to *hopefully* keep rain at bay... but I'll climb that mountain when winter comes, just redo in an airtight container if this one doesn't measure up to rain's standard.
 

cmartinez

Joined Jan 17, 2007
8,762
Ok, but if we have the circuit board as a carbon copy, exact replica, of the breadboard, (that still hasn't misfired), and we keep the wire short, there should be no reason for the project not to work, except it's not an airtight container, but it closes snugly enough to *hopefully* keep rain at bay... but I'll climb that mountain when winter comes, just redo in an airtight container if this one doesn't measure up to rain's standard.
Sure... try it, and see what happens. But if things get spooky again, I suggest you remember MrChips' advice
 

cmartinez

Joined Jan 17, 2007
8,762
Me too, I just whish he didn't leave so soon, think I scared him away, wanted to argue the cap polarity with him, to me the polarity seems right...
He'll be back, I'm sure... But he wasn't arguing about the polarity, but about the placement of the part and its value.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
Sorry for being late to the party.

So if I can see it, your voodoo problem is caused by 25+10m of cable.
To mitigate the EMI problem you have to switch from a voltage signal to a current signal. That is, you have make the impedance of the switch, cable and resistor much lower and hence increase the current through the wire.

Change the pull-up resistor to the switch to about 220-470Ω.
At the trigger input of the circuit the capacitor is connected between the input pin and GND.
Make the electrolytic capacitor much larger, even as high as 10-100μF, with the negative lead to GND.
Wire a 0.1μF non-polarized ceramic capacitor across the electrolytic cap for high frequency filtering.

Please show your current circuit schematic so we can comment.
I don't quite follow, which capacitor is incorrectly configured, the one over Vin and GND?
buzzer8.3.pdf shows my values that I used
 

Attachments

MrChips

Joined Oct 2, 2009
34,810
Sorry, I've had some errands to do.

If you want to minimize the current draw from the 9V battery, replace the LM555 with CMOS 555 such as LMC555 or TLC555.

I will assume that the piezo speaker is a buzzer that emits an audible tone when connect to a DC source such as a 9V battery.
Hence your 555 circuit is configured as a 6-sec monostable multivibrator. The trigger input on pin-2 is normally raised to Vcc. So the first thing you need is a pull-up resistor on pin-2. Anything from 1k-10kΩ would do.

The monostable is triggered on a negative going pulse. The purpose of the input capacitor is to create a short negative pulse when the gate is opened or closed.

So here is the catch. Which is more important? Should the alarm buzz when the gate is opened or when it is closed? You can design a circuit which will give an alarm on both situations but that calls for a different circuit.

Is the reed switch normally open? That is, the switch is open when no magnet is close to the switch.
This will determine whether you put the switch on the high side with a 220-1000Ω pull-down resistor
or the switch on the low side with a 220-1000Ω pull-up resistor.

For lowest current draw, you want the switch to be in the open position in whatever the gate is normally in, which I would assume would be a closed gate.

Let's summarize what I have written.
Assume the gate is normally closed with the magnet against the reed switch. Hence you want a switch that is normally closed (with no magnet). This is unusual but I suppose such a switch exists.

When the gate opens, the reed switch closes. Hence you need the switch wired on the low side with a pull-up resistor.

If you have a normally open switch, then you need a logic inverter and you have to live with a higher current draw when the gate is closed.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
Sorry, I've had some errands to do.

If you want to minimize the current draw from the 9V battery, replace the LM555 with CMOS 555 such as LMC555 or TLC555.

I will assume that the piezo speaker is a buzzer that emits an audible tone when connect to a DC source such as a 9V battery.
Hence your 555 circuit is configured as a 6-sec monostable multivibrator. The trigger input on pin-2 is normally raised to Vcc. So the first thing you need is a pull-up resistor on pin-2. Anything from 1k-10kΩ would do.

The monostable is triggered on a negative going pulse. The purpose of the input capacitor is to create a short negative pulse when the gate is opened or closed.

So here is the catch. Which is more important? Should the alarm buzz when the gate is opened or when it is closed? You can design a circuit which will give an alarm on both situations but that calls for a different circuit.

Is the reed switch normally open? That is, the switch is open when no magnet is close to the switch.
This will determine whether you put the switch on the high side with a 220-1000Ω pull-down resistor
or the switch on the low side with a 220-1000Ω pull-up resistor.

For lowest current draw, you want the switch to be in the open position in whatever the gate is normally in, which I would assume would be a closed gate.

Let's summarize what I have written.
Assume the gate is normally closed with the magnet against the reed switch. Hence you want a switch that is normally closed (with no magnet). This is unusual but I suppose such a switch exists.

When the gate opens, the reed switch closes. Hence you need the switch wired on the low side with a pull-up resistor.

If you have a normally open switch, then you need a logic inverter and you have to live with a higher current draw when the gate is closed.
Switch normally closed, so its open when gate is closed
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
and it does sound when both gate is opened and closed, but that is switch bounce, I know because if the gate isn't properly closed it rings forever
 

MrChips

Joined Oct 2, 2009
34,810
Give me some time to think about this. I will come up with a circuit that responds to both opening and closing with the lowest possible current draw.
 

MrChips

Joined Oct 2, 2009
34,810
That is the wrong approach. If you're suffering from switch bounce then you will suffer from EMI.
You need to filter out both switch bounce and EMI.

If you can settle for alarm on gate opening only that will simplify the solution.
 

cmartinez

Joined Jan 17, 2007
8,762
What MrChip's told you so far is very important, and most important is his observation about designing a circuit with minimum current draw, since that is what will determine how long your battery will last. Give him a little time, and I bet he will come with a far better solution than the one we've managed so far, and possibly even simpler.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
I'm very glad he came to the party ;-) signing off for the night, its going to take me round 20s to fall asleep, continue tomorrow! :)
 
Top