Reverse a NO switch to use a 555

MisterBill2

Joined Jan 23, 2018
27,587
Did you consider MrBill2 suggestion in post #59?

You wouldn't need a 555. Setup the a NAND as a "gated" oscillator so it can be enabled or disabled. The duty cycle will be near 50%.
Use a CD4093B Quad Nand gate, it can also be used for debouncing the switch and can run at 9v. Use a mosfet to drive the piezo.
OR, use a CD4049 and get a lot more volume and not need a mosfet . and have symetrical drive for the piezo sounder. And it can run on 5, 9, 12, 0r even 15 volts. Also, that IC is cheap and sourced by many different makers so it is always available. And it can be held in the low current standby mode with the switch closed. If it needs to be pulsed thrn you will need to add the 4093 quad nand. Still cheaper and simpler than any 555 circuit.
 

ericgibbs

Joined Jan 29, 2010
21,448
That will give 50:50 with an idealized 555 (or a CMOS 555) with output equal to the supply.
It is only a nominal 4kHz 50:50, used simply to drive a piezo, it is good enough for the TS's application.
 

MisterBill2

Joined Jan 23, 2018
27,587
The frequency of the simple CMOS oscillator is limited by the response time of the gate used as the active element and the stray leakage of the components. So on the slow side, several seconds per cycle, and on the fast side, quite a few megahertz. Thus a bit of experimenting with values will be needed.
 

Bordodynov

Joined May 20, 2015
3,431
And why not just put a reed in the power cord? You can only turn off the timer, but the most economical way is to turn off the stabilizer. In this case, when the magnet is far away, there is no current consumption at all.
 

MisterBill2

Joined Jan 23, 2018
27,587
And why not just put a reed in the power cord? You can only turn off the timer, but the most economical way is to turn off the stabilizer. In this case, when the magnet is far away, there is no current consumption at all.
Battery operated devices usually lack a power cord. And looking back at post #1 the TS asked for a setup that stayed quiet when the reed switch was closed, and made noise when it opened.
 

Thread Starter

Goxeman

Joined Feb 28, 2017
176
hi G,
Look at this option for 50:50.
E
So it is possible not to connect R2? And leave pin 7 floating?

The minimum value for R1 is about 1kΩ, it can't be zero.
Why? I am just curious

That will give 50:50 with an idealized 555 (or a CMOS 555) with output equal to the supply.
A real 555 will have an output about a diode drop below the supply, and thus the duty-cycle will be slightly off from 50:50.
Use the 555-1 model, if you have it.
I tried to find that model but I cant find it. Could give me a part number from any maker? Just by 555-1 I couldnt find anything

Did you consider MrBill2 suggestion in post #59?

You wouldn't need a 555. Setup the a NAND as a "gated" oscillator so it can be enabled or disabled. The duty cycle will be near 50%.
Use a CD4093B Quad Nand gate, it can also be used for debouncing the switch and can run at 9v. Use a mosfet to drive the piezo.
I am truly lost with this option. At least I was familiar with the 555. Could you help me understand it? In post #59 MrBill2 wrote everything but I read about I was just staring at it without understanding why or how hahahaha
 

Thread Starter

Goxeman

Joined Feb 28, 2017
176
hi G,
Lets know which of the options you want to build, we can then finalise a design.
E
I am sorry E but I am lost with this post of yours. The difference between the possibilities are C2 and C4? But none of the options supply a 1/2 square or 4khz signal
 

ericgibbs

Joined Jan 29, 2010
21,448
hi G,
You are obviously not understanding post #67 circuit simulation.
It gives you a nominal 4kHz 50:50 square wave, which is perfectly good enough to drive your piezo.
The 4kHz is chopped into a nominal 1 Sec On and 1 Sec Off sound periods.

Which part do you not follow.?
E

Update:
Added the asc file.
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
38,529
Why? I am just curious
R1 can't be zero, since that point goes to the 555 pin 7, which is the discharge pin for the capacitor. Connecting it directly to Vcc applies a short to that pin, which will likely zap the 555.
Just because you can set that resistor value zero in that calculator doesn't mean you can do that in the real circuit.
You really should learn how the 555 works..
I tried to find that model but I cant find it. Could give me a part number from any maker? Just by 555-1 I couldnt find anything
That's a model in LTspice, not a real device.
 

eetech00

Joined Jun 8, 2013
4,705
So it is possible not to connect R2? And leave pin 7 floating?



Why? I am just curious



I tried to find that model but I cant find it. Could give me a part number from any maker? Just by 555-1 I couldnt find anything



I am truly lost with this option. At least I was familiar with the 555. Could you help me understand it? In post #59 MrBill2 wrote everything but I read about I was just staring at it without understanding why or how hahahaha
Here's what I came up with based on MrBill2 post #59.
I haven't tested on bench (i don't have the CD4049UB).

There are three functional blocks:
1), U1A debounces the NO switch contact.
2), U1C and U1E form an square wave oscillator with a 2 sec period. This is the "rate" or "on/off" timer.
3), U1B and U1D form a second square wave oscillator to generate a 4Khz signal and drive the buzzer.
The CD4049 has enough output capacity to drive the buzzer directly.
Each block is cascaded to the next to enable or disable the following block.
The blocks are cascaded like this: input debounce/enable-->on/off timer-->4khz driver-->buzzer.

There is an assumption that contact is a toggle type contact and NOT a momentary contact.
If the switch is a momentary type contact, this circuit won't work.

When first powered on, the buzzer will sound at a "1 sec on/1 sec off" rate until the switch contact is closed. Then the buzzer will stop. The buzzer will start again if the switch contact is opened again.

1600298958164.png
 

MisterBill2

Joined Jan 23, 2018
27,587
It should work to have a single inverter oscillator, but it may need to be one of those with a schmidt-trigger type, like a CD40106, I think. And you get much louder sound if there are inverters driving both side of the piezo out of phase. That was the concept on my originally described circuit, which did not have the off/on pulsing. I it has 2 inverters driving each side, able to sink 24 mA if it runs on a higher voltage like 9 volts.
The circuit in post #71 works but it uses a lot more parts, and it is not as loud.
 

eetech00

Joined Jun 8, 2013
4,705
It should work to have a single inverter oscillator, but it may need to be one of those with a schmidt-trigger type, like a CD40106, I think. And you get much louder sound if there are inverters driving both side of the piezo out of phase. That was the concept on my originally described circuit, which did not have the off/on pulsing. I it has 2 inverters driving each side, able to sink 24 mA if it runs on a higher voltage like 9 volts.
The circuit in post #71 works but it uses a lot more parts, and it is not as loud.
I was going to use single CD40106B inverter oscillators but they cannot handle the oscillation period we need. And if I use two inverters per oscillator, I can use smaller Caps. I think i'd recommend a different piezo.
 

MisterBill2

Joined Jan 23, 2018
27,587
I was going to use single CD40106B inverter oscillators but they cannot handle the oscillation period we need. And if I use two inverters per oscillator, I can use smaller Caps. I think i'd recommend a different piezo.
Please try the CD4049 hex inverter in the simulation and see how that one works out. The frequency will be different and probably more temperature dependent but this is not a precision circuit and so it should not matter.
It seems that we have not yet had an explanation of just what the application really is. I am guessing some sort of anti-theft warning device although it would also work to warn that somebody was wandering off.
 

ericgibbs

Joined Jan 29, 2010
21,448
hi MB2,

From what I can glean from the TS's posts, is that a reed switch will be mounted as part of key lock assembly.

Mounted on the actual Key will be a miniature magnet.

When the Key is inserted in the Lock the magnet will operate the reed switch, which will power/enable the piezo sounder.

He also requested a 1Sec On/Off period for his 4kHz piezo, initially using a 555 timer.

@Goxeman

Please correct or confirm the above 'specification'

E
 

eetech00

Joined Jun 8, 2013
4,705
Please try the CD4049 hex inverter in the simulation and see how that one works out. The frequency will be different and probably more temperature dependent but this is not a precision circuit and so it should not matter.
It seems that we have not yet had an explanation of just what the application really is. I am guessing some sort of anti-theft warning device although it would also work to warn that somebody was wandering off.
The CD4049UB is the only type available (from mouser).
 

Thread Starter

Goxeman

Joined Feb 28, 2017
176
hi G,
Lets know which of the options you want to build, we can then finalise a design.
E
I can see it now, output of U2 is reset of U1. I didnt pay attention to that

R1 can't be zero, since that point goes to the 555 pin 7, which is the discharge pin for the capacitor. Connecting it directly to Vcc applies a short to that pin, which will likely zap the 555.
Just because you can set that resistor value zero in that calculator doesn't mean you can do that in the real circuit.
You really should learn how the 555 works..
That's a model in LTspice, not a real device.
Ok thank you, noted cruschow :)
hi MB2,

From what I can glean from the TS's posts, is that a reed switch will be mounted as part of key lock assembly.

Mounted on the actual Key will be a miniature magnet.

When the Key is inserted in the Lock the magnet will operate the reed switch, which will power/enable the piezo sounder.

He also requested a 1Sec On/Off period for his 4kHz piezo, initially using a 555 timer.

@Goxeman

Please correct or confirm the above 'specification'

E
Yes that is correct.

I think that I will order the parts I dont have and start the real tests. I will connect the piezo buzzer directly to the output of 555 as it can source up to 200mA

First I will try just with one 555 and after everything works, I will add the second timer to time 1sec ON and 1sec OFF
 

ericgibbs

Joined Jan 29, 2010
21,448
hi G,
Thanks for the update.
Consider a 9V battery supply, it should be loud enough even down at 7.4v over that short range.
E
 

Thread Starter

Goxeman

Joined Feb 28, 2017
176
hi G,
Thanks for the update.
Consider a 9V battery supply, it should be loud enough even down at 7.4v over that short range.
E
Yes, I will be using L7809 voltage regulator because at the end I dont know what will I use to power it

Thanks for your advices, I will keep you posted
 

Thread Starter

Goxeman

Joined Feb 28, 2017
176
Ive seen around this kind of shcematic. I dont have more details about the speaker, buzzer, piezo o whatever it is. Why is this schematic?
- Is the resistor just to limit the current? But if the buzzer doesnt sink more than 80mA it wouldnt be neccesary?
- But what is the use of the series capacitor? To block AC-DC current? To amplify?Captura.PNG
 
Top