Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Design for a Timed-alarm

Status
Not open for further replies.

domvex

New Member
Hello. I am creating a timed touch-alarm. The idea is that if a person stands (or sits) on a specific area for too long, an alarm will sound and continue to sound as long as the person remains on the area.

I have a design for the circuit, and I have tested it on a breadboard with parts I already own (these were parts leftover from my days in digital electronics). What I would like is some feedback on the design; as well, suggestions to improve or to fix any major problems is greatly appreciated. In addition, I have some questions about the design of this device, included at the bottom of this message. If you an answer them in any way, I would greatly appreciate it.

(In addition, please feel free to ask me for any clarification necessary relating to any part of this message)

Operation: When someone steps on a certain area, the timer is activated. 20-25 minutes will pass, and then a buzzer will sound until the person steps off the area. If the person steps off the area before the buzzer sounds, the timer is reset to zero.

Non-essential requirements: It is preferred that the device is as inexpensive as possible and as physically small as possible. (

Circuit Overview: The circuit is made from Three ICs (a 555 timer, a counter, and a Quad 2-input NOR gate chip), a pushbutton, a buzzer, and a few resistors and capacitors. In testing, the circuit is powered by a 5V power supply; however, I would like the circuit to eventually be battery powered (please see my Questions, located very below, to read my concern in full).

Here is a basic schematic diagram of the circuit. It has been tested, and so far, it works as expected.

**broken link removed**

Here are the basic details for this device. The basic components are:
1) Timing: clock, counter
2) Alarm: Latch, buzzer

Clock
The 555 timer is configured to provide a clock output with the period equal to approximately 85 seconds.

Counter:
The 74193 counter is used to divide the count down to approximately 22.5 minutes. It is a Mod 16 up/down counter, configured to count UP. After 16 counts, the /CARRY output (normally high) switches to low for the duration of the clock pulse's LOW period; during this time, the alarm-component is activated.

(Normally when using a counter, you would connect each of the count outputs into an AND gate and connect the AND gate output to whatever device you would like to activate. In my design, the extra AND gate is not required.)

When powered up, the RESET input of the counter is active, and the count remains at zero. When the Pushbutton is pressed, the counter's reset is disabled, and it begins to count.


NOR Gate Latch
Two of four internal gates of a 74LS02 Quad 2-input NOR gate are configured as a NoR Latch. The SET input of the latch is the signal from /CARRY (which is inverted; see below). The CLEAR input of the latch is connected to the Pushbutton. When powered up, the output of the latch is LOW.

Inverter
One of the four gates of the 74LS02 is configured as an inverter. The /CARRY output from the counter is active low, but an active HIGH output is required for the SET input of the latch. For this reason, the /CARRY output is inverted, then used as the SET input for the latch.

Buzzer
The Q output of the Latch is connected to a buzzer. This buzzer will sound until the Pushbutton is no longer pressed.


* * * * *

In addition to asking for input on the design, I have some questions about the device:

- what sort of buzzer would work well with this circuit? I only had one old buzzer to test with - it worked, but I'd like to know what is good to use and what isn't. (The specs for the buzzer I have are found here: **broken link removed** -- although it works, it seems fairly large) My only hunch for buzzer-choice is that I'd need something which will run on less then the max output of the 74LS02 chip ...

- I would like the circuit to be battery powered, and am not sure what changes are necessary (1.5V, 6V and 9V batteries are all too common; unfortunately, I have never seen a 5V battery, and the TTL chips I am using require 5V supplies). How do I configue this circuit to run on common batteries (as opposed to the 5V power supply currently used)? What changes would be necessary? Is there a way to power TTL chips via common batteries?

- Again, what improvements (or dangerous, glaring errors) should I be aware of?



Thank you in advance for your help!
 
If you want it to be battery powered and operate on a voltage of say 3, 6 or 9 Volt, then I would throw out the 555 and the 74LS ICs and use the 4000 series.

A 14 stage counter 4060 (from memory as I'm using a neighbour's computer - mine is faulty) and an edge triggerd Flop Flop suçh as the 4027.

The 4060 would run continuously (it has its own internal oscillator) and the D input to the FF would be tied high. Connect the C of the FF to the last stage (Q14) of the 4060. When Q14 goes high, the FF is set and will ignore any further clock pulses until reset.

I may be wrong about the 4060, it may be the 4020 or 4040, but one of them has an internal osc.

If you used a FF with a negative trigger, you would obtain twice the delay for a given osc frequency. You could use a JK type and tie J high and K low (assuming both J & K are active low)

Len
 
What is the use of this forum if you guys solve the problem with hidden PM's? :( :(
 
audioguru said:
What is the use of this forum if you guys solve the problem with hidden PM's? :( :(

You are right, audio. But this forum is not meant to be some sort of competition, and we respect the circuit design of each others. Most so is what seems to be a bright idea would often ends up being a dumb one because of oversight. Doing it in PM at least can save me the embarrassment.

Rest assure that the design would be posted after it has been scrutinized.
 
For the original poster, here is the circuit.

You can combine the resistors R2 and R3 and use just one fixed value resistor if the timing inaccuracy can be tolerated.

The idea is to choose the buzzer operating voltage to match the battery voltage. The circuit works from +3V upto +9V with no change in component values. To save battery consumption furthur, you can even replace the 100K reset pull up resistor using 1M resistor without series problem.
 

Attachments

  • simpbuz.gif
    simpbuz.gif
    10.6 KB · Views: 977
Hi L. Chung,
I like your simple and very elegant solution! :lol:
 
That looks great! Len, I had no idea that a 14-stage counter /w Oscillator CMOS IC existed, and L.Chung, the diagram you posted seemingly could not be better suited for what I had in mind. Thanks!

Regarding the circuit posted, I am not sure about the following:
1) Is the purpose of the diode solely to prevent "clock" pulses from reaching the output pin, or is there something else to it?
2) One Spec. sheet for the 74HC4060 suggested using a tiny capacitor to connect Pin 11 and GND (stray capacitance) for RC oscillators - I was planning to use them, but is there any reason why I shouldn't?
 
1. the diode stops the oscillator when output Q14 goes high. Otherwise, the counter would continue counting and eventually Q14 would go low which may not be what you want. You said you wanted the output to stay high until you reset it manually.

2. There are 2 issues with the 74HC4060. Firstly, it can only operate on 5 Volt and secondly, it is faster than the 4060 and therefore you may have unwanted complications. I recommend the 4060 or the 4541 programmable counter.

Also, be sure to connect a 100nF ceramic capacitor between the Vss and Vss pins to reduce the supply impedance.

Note that you could use a 32.768 kHz crystal instead of the capacitor and resistor if you want more accuracy. But you would need another counter.

Len
 
You don't need the diode if the sound of the buzzer is irritating enough that someone would move away once the buzzer sounds. Barely anyone would stay with a buzzer sounding for 20 minutes if one has a choice.

It is also possible to wire the circuit up for zero power consumption when not in use.

In this case, the switch is actually the power switch. ie. power is only connected to the 4060 when switch closes.

For this to work, one would remove the switch, replace resistor R1 with a capacitor and connect a high value value resistor from 4060 reset pin12 to 0V. The purpose of the capacitor is to reset the chip upon power ON. A ceramic cap is needed across the power pins of 4060 as Len has suggested.

Its your choice.
 
I think the best thing you can do to your digital circuits is to use ALL pins of all your IC's.

Either connect the unused pins to +ve or -ve depending on whether you want to enable that feature.

Why do I say this? because sometimes, if everything isn't connected, you might get unexpected results, due to the internal pull-up or pull-down resistors (if any).
 
mstechca said:
I think the best thing you can do to your digital circuits is to use ALL pins of all your IC's.

Either connect the unused pins to +ve or -ve depending on whether you want to enable that feature.
The 4060 is a counter IC, so most of its pins are outputs. You don't want to connect outputs to +ve or -ve to avoid destroying the IC.

All Cmos CD40xx, CD45xx and 74HCxx ICs do not have pull-up nor pull-down resistors on their inputs. Therefore it is wise to connect their unused inputs to +ve or -ve of the IC to disable them.
 
mstechca said:
Either connect the unused input pins to +ve or -ve (gnd) depending on whether you want to enable that feature.

Why do I say this? because sometimes, if everything isn't connected, you might get unexpected results, due to the internal pull-up or pull-down resistors (if any). See 2 below
There are 2 reasons for connecting unused inputs to either Vdd or gnd.

1. Because CMOS has a very high (about 10 ^ 12 Ohm) input resistance, inputs left open will be at a potential that depends on the insulation resistance of the PCB and the neighbouring pins. If it happens to be around half Vdd, then a significant current will flow through the IC. This is undesirable particularily for battery powered devices.

2. Unwanted results may occur due to capacitive coupling from other tracks on the PCB.

Len
 
(Lots of individual replies are made here)

ljcox said:
1. the diode stops the oscillator when output Q14 goes high. Otherwise, the counter would continue counting and eventually Q14 would go low which may not be what you want. You said you wanted the output to stay high until you reset it manually.
This is what I want, and I understand why Q14 is connected to PI. However, it looks as if a simple piece of wire will also be able to connect Q14 to PI. My question is: why use a Diode as opposed to a simple connection? My initial guess for the diode's inclusion is to prevent clock pulses from reaching the output pin, but I may be wrong.

To L.Chung; I do not expect the PB to be lifted immediately after the buzzer sounds; still, what difference will the diode make?

Also, I like your idea to conserve battery power. I will likely implement it.


I recommend the 4060 or the 4541 programmable counter.
I will look into these chips. As well, the spec sheet I have for a 74HC4060 (from Fairchild Semiconductor) states that the operating voltage can be 2V to 6V; I will acquire a few chips this week and run some tests. Thanks for the suggestions!


mstechca - I agree. When using CMOS chips, you must connect all inputs to something, even if they are not used. Unconnected CMOS inputs can lead to damage from static charges and even noise. It is not the best thing I can do; it is the Only thing I will do.


Thank you for the feedback, further suggestions and general input!
 
domvex said:
This is what I want, and I understand why Q14 is connected to PI. However, it looks as if a simple piece of wire will also be able to connect Q14 to PI. My question is: why use a Diode as opposed to a simple connection?

The un-operate Q14 level is low, i.e. 0V. If you connect PI directly to Q14 using a wire, then the clock of 4060 would be permanently LOW which also stops 4060 from counting up.

So you are partly correct that the diode prevent clock being affect by Q14 when Q14 is LOW.

To L.Chung; I do not expect the PB to be lifted immediately after the buzzer sounds; still, what difference will the diode make?

Without the diode, the buzzer still will not stop immediately, it will sound for the same duration, i.e. 20 minutes, before it turns off again.

Oh how I love the english language. When something goes OFF, it actually turns ON.
 
eblc1388 said:
If you connect PI directly to Q14 using a wire, then the clock of 4060 would be permanently LOW which also stops 4060 from counting up.
I do not know how I missed that function of the diode. I believe this particular emoticon is appropriate: :oops:. That clears things up for me.

My next step is to choose the right 14-stage counter /w oscillator. For those curious, I will post here with updates as I see fit (with at least one update when I am completed).
 
domvex said:
Also, I like your idea to conserve battery power. I will likely implement it.

I recommend the 4060 or the 4541 programmable counter.
I will look into these chips. As well, the spec sheet I have for a 74HC4060 (from Fairchild Semiconductor) states that the operating voltage can be 2V to 6V; Yes, I did not check the data sheet. However, the higher speed issue it still relevant.mstechca - I agree. When using CMOS chips, you must connect all inputs to something, even if they are not used. Unconnected CMOS inputs can lead to damage from static charges and even noise. It is not the best thing I can do; it is the Only thing I will do. Unconnected inputs can also cause excessive supply current. Not good, especially if battery powered.
 
domvex said:
eblc1388 said:
If you connect PI directly to Q14 using a wire, then the clock of 4060 would be permanently LOW which also stops 4060 from counting up.
I do not know how I missed that function of the diode. I believe this particular emoticon is appropriate: :oops:. That clears things up for me.

You could leave the diode out (ie. no connection between Q14 and PI) since Q14 will be low for 20 minutes. I assume you would reset before the 20 minutes expires.

Len
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top