circuit to delay a 5v switch closure?

Jan 29, 2010 12 Replies

Anybody point me to a simple circuit that could be used to delay a very low-power switch closure? This is a switch in a solid state pinball machine, 5 volts dc circuitry, for sending score signals to the cpu only (not powering any bumpers or anything like that.) I want the closure of the switch to be delayed by around 1 or 2 seconds, timing precision not important. There are various power sources in the pinball machine I could use for the new circuit, like 5v, 12v, on up.



I'm guessing I would rewire the existing pinball switch to activate the timing circuit instead, which in turn would then close a new switch connected to the pinball switch wires. Would it necessarily use a relay containing the 'new' switch, or could the whole contraption be electronic? Thanks for any ideas/assistance! Marky


The most important part of a project is the specification. Is this something hardware controlled or by the user? that is, how much variability in the closure will be seen? Does the switch stay closed for the whole 2-seconds? Does the output have to stay "on" for as long as the switch is closed? longer? When does the switch open in relation to the next time you want the delay? What do you want the output to do when the switch is opened? Stays closed? Can the switch bounce? What about inductive spikes on the input/output/power supply?

Trivial in concept, but success or failure rests on the details.

Hard to say without more info, but 555 timers can be useful in these circumstances.

They do make time-delay relays. Maybe you can do it all with just one part? That might be the cleanest, simplest solution, but those relays cost more.

Another idea might be to use one of those pulse stretchers, like the ones used in burglar alarm systems for fast-acting sensors. It slows the signals down to the alarm panels can respond.

Like this one:

formatting link

I spent a whopping 10 seconds searching on Google. So, I'm sure you can beat this price! Just look around.

Or as others have said, a 555 should do the trick, and I'm sure there are lots of DIY 555 kits out there for hobbyists / students. No need to make circuit boards, and all that mess, etc...

Good luck.

-mpm

If the output is just pulling the pin of a micro low, an all electronic solution is easy to make work.

You need to define the action of the circuit a little more exactly.

1 Does the switch have to remain closed for the full time 2 What happens if it is pulsed closed for less than that

This would be an ideal project for a PIC.

The pulse input could be stored and replayed exactly at the delayed time.

A 6-pin PIC can will also be installed at the switch so no extra room would be required.

so, now the big question: Do you know how to program micro controllers ?

If not, stick to the simpler ideas listed above.

don

Yes, parts like the PIC10F200 are perfect for this application. A six pin part with NO external components, no resistors, no caps or other garbage. It would perform switch de-bounce, the delay timing function plus other functions like hold offs, dwell time, etc., plus provide a logic level output to the main processor. It's a cheap single chip solution. A 555 solution is a 1970's kludge by comparison.

That was my initial thought, but anybody with the skills and tools to do this would not have asked the question in the first place. Takes WAY more effort to set up to program the pic for the first time than the task warrants. This pic project would be trivial the SECOND time you do it.

A six pin

time.

?

True enough. Not knowing anything about the OP or his interest or level, I was just thinking about the best way to accomplish the delay in responding to Don above. Also, I don't know if this is a one time deal or some sort of production fix. If the OP is interested in electronics and in solving many problems over time or working on all kinds of projects in the future, maybe he should learn a little microprocessor art and some assembly programming. Of course he could always farm the project out to one of us who does processor work. Bob

garbage. It

Interesting. I'm curious. What would the the $quote for such a project with a programmed chip deliverable?

Do you want to shift the entire closure in time? Or, just the leading edge? I.e., must the width of the delayed switch closure be identical to the width of the original "nondelayed" closure? (more below)

Which switch is this? Is it from a playfield target? Flipper button? The "ball drain"? (this helps give me an understanding of how this delay will relate to the other things going on in the machine -- i.e., why you would want to do this)

I assume from your comments (and my familiarity with pin tables) that the switch is normally open.

You could use the switch closure to *power* a 555 or other monostable. When the switch closes, the circuit is powered (energized) and begins "timing". At the end of the timeout period, the output goes active (you have to decide what polarities are required). The output then stays active until power is removed.

The problem with this approach is what happens when the switch *opens* before the circuit "times out".

If, for example, you are trying to delay the signal sent to the CPU at the "ball drain", then the ball will still be sitting on the switch 2 seconds later (unless you forcefully lift the front legs to dislodge it!) so this is a non-problem.

OTOH, if this was a *target* that the ball struck, then the switch closure will be very brief and you can *guarantee* that the closure won't still be present when the timer expires.

(you would have to clarify your intended use. What exactly are you trying to bring about?)

Also, you have to worry about repeated contact closures. A diode "backwards" across the charging R will help with recovery/restarts.

get the PDF for the LM555 timer and look at the examples for a Time on Delay.

mike wrote:

Yup. ...and a picture is worth 1000 words. One of these that shows ALL rising and falling edges is useful:

formatting link

Noting that the OP is posting via Google Groups: DO NOT do it in Google's proportional font. Do it in a Courier font (NotePad) and paste that into your post.

To view it, at the top of Google's page use **Options** then **Fixed text**.

any

for

controllers

I

responding

of

many

maybe

programming.

I am not sure what it would cost. I'd probably do it for about $100 assuming that the documentation was minimal, a print out of the code and an inner-connection schematic. It would include one or two programmed parts.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required