Simpler timer circuit

Status
Not open for further replies.

Moonbat

New Member
Hi,

I'm completely new to electronics and I have a few questions with regards to a small project i'm trying to build.

I have a simple switch that is closed most of the time and occasionally opens then closes again. I would like a setup whereby whenever the switch opens and stays open for more than 15 ms a light comes on for a second or so.

I want the circuit to be battery powered and as small and light as possible, ideally not much larger or heavier than a AA battery.

I looked up various tutorials and tried to summon up the electronics course i took 14 years ago at school. And have managed to design a circuit that does what i want albeit with ground inputs. You can see my circuit if you go to

Circuit Simulator Applet

and then Import the 1st code segment at the bottom of this post.

What i've done is to take two 555 timer chips that are triggered together when my switch opens. They are timed for 15 ms and 16 ms respectively, the outputs feed into an xor gate. So that after 15 ms the outputs are different and the xor gate outputs a +1 which lasts for 1 ms before the outputs become equivalent and the xor gate drops back to 0.

I feed this pulse into an and gate with a second input that comes directly from the switch, so the and gate only outputs a +1 if the switch is open and the pulse is active. This then triggers a third 555 timer chip which will switch on an led for a second.

I was thinking of using a TLC556 chip and a TLC555 chip for the timers and a 3.3 1/2 AA battery as power supply.

My questions are:

Is this overall design a stupid way of doing it? I.e. is there an obvious solution that is simpler, less power hungry, etc.

I use a dspt switch but it feels somewhat clumsy can anyone see a better of way handling it that wouldn't require a second switch?

Will it be ok to replace all the grounds bar the one in the top left with lines back to the battery? (see second circuit) and will it be ok to replace the ground in the top left with a line that connects to the ground pins of the 555 chip and then also feeds back to the back of the battery? (I can't do this in the simulation because it doesn't give you the ground inputs on the 555s). Ultimately i can't have any grounds because it's not mains powered but i'm not sure what you're supposed do with pins on chips like the 555 that ask to be connected to a ground!

Thanks you so much for you time.

Cheers

Moonbat


 
Please just attach your schematic. Most ppl here don't have the time to run applets, import code, etc. Without looking at your schematic, I think your design is a little over-complicated. Just use a 556, configure both timers as one-shots, the first for the delay and the second for the "on" time. Just take the output from the second.

There is an excellent online turtorial, but I can't seem to find it. I know someone else has the link. It's been referenced many times on here.
 
Sure thing.

Here's the 1st circuit:
**broken link removed**

and here's the 2nd:
**broken link removed**


If I only have two timers then how will I stop the light activating if the switch opens then shuts before 15 ms have passed?
 
Last edited:
The 1st timer can be designed to hold off for 15 mS. Use the RC time constant to hold the trigger high until 15 mS has passed. An invertor will be needed between the 1st and 2nd timer to get the trigger at the correct level. A transistor can be used.
 
Last edited:
If I understand you correctly (which i probably don't) then wouldn't the light go out as soon as my switch closes? I.e. if the switch closed after 16 ms the light would only go on for 1 ms?

I want the light to go on for about 2 seconds if it's triggered at all regardless of whether the switch closes after 16 ms or after 2 seconds.

Edit: maybe not - hmm will go away and try and design the circuit as you suggest then report back. Cheers.
 
Last edited:
I think this is along the lines of your suggestion:

**broken link removed**

It seems to work though i confess i'm not entirely sure why.
Is there an obvious way of avoiding the use of the dpst switch or is this now a reasonable solution (assuming i can deal with the grounds by conecting them up to the battery).

(Edit still some work for me to do as apparently vast currents are passing through the output of the first 555 chip)
 
Last edited:
Ok how about this:

**broken link removed**

Is it ok to use these analogue switch things or is better to use something else? (Transistors? But current has to flow in both directions forward to charge the capacitor and back to trigger the timer)
 
If I understand your objective correctly, and that's a BIG if, here is my solution. Sorry, but I couldn't understand your approach, so I just made my own. I include simulation data here. You can see, the first timer holds off until the pulse is a few hundred mS, and then triggers the second timer, which is active for a couple seconds.
 

Attachments

  • delayAndShot.JPG
    123.9 KB · Views: 166
  • delayAndShot.asc
    1.9 KB · Views: 125
Thanks! I've just downloaded LT spice and have been trying to understand your circuit.

I think I understand what's happening. Please correct me if i'm wrong.

The left circle with the plus and the minus in it represents my switch and in the initial settings it is connected for 0.5 seconds, after 0.5 seconds of simulation time have passed.

After about 250 ms the capacator has charged up enough that the voltage on the trigger has risen to 6 2/3 Volts which in turn drops the output from the first timer to 0 activating the second timer which is set to last a few seconds.

If the switch is set to connect for less than 0.5 seconds then the capacator never charges up enough to get to the point where the trigger deactivates chip 1.

So other than the fact that i want pulses of 15 ms and above to trigger the final output of a couple of a seconds rather than 0.5 seconds that sounds good. The only thing is that my switch is the other way round in that when it's depressed the circuit is broken not made. So i would need to put an inverter into your circuit.

Does that make sense?

I'm going to try and build it in the simulator app that i'd used before to better understand what's going on.

Cheers for the help man.

Moonbat
 
It makes sense. R2 and C1 control the 15mS delay you want. Just use RXC to figure out the values. Make R1 = R2. You don't need an inverter. Just connect your switch to the right side of R2, and ground. Connect the other side of R2 to your voltage rail.
 
Last edited:
Oh yes one other thing. This ground business - what do you do about ground if it's battery powered?
 
Last edited:
Ground is the "-" terminal on the battery ( or any wire connected to it ). Same as the "-" connection to the voltage source in the circuit -- right side of the drawing.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…