Momentary Switch Delay

I'm handy with a soldering iron, but I don't really know a lot about circuits. I could rig up a switch to turn on an LED using a battery or something, but I want to create a little more involved a device.

If anyone's ever played Call of Duty, you'll be familiar with the Search & Destroy game mode. One team needs to plant a bomb and the other has to stop them. Arming the bomb takes a few seconds and defusing it takes a few seconds. Once it's armed it will detonate in x seconds (45 in the game). I wanted to create a simulated device like that to use in AirSoft skirmishes. It seems so simple in design, but I don't know electric circuits well enough..

I want to create a device with 2 buttons (Momentary Switches) and an LED display.

You would hold Button 1 down for a certain duration (i.e. 10 second) after ten seconds it would beep or make some noise and start a timer (the LED display) that was set to count down a preset time (i.e. 60 seconds). If the timer goes to zero it would then beep and that would be that. Though while it was counting down if you held down Button 2 for a certain duration (i.e. 10 seconds) it would make a noise and and kill power to that timer, so that you would have to use Button 1 to turn on the timer again. (Button 1 and Button 2 could be the same button, I just figured it'd be easier with two buttons, but I might be wrong)

It seems that it would be easy to use a toggle switch instead of the buttons, 1 to just open and close the power to this LED Count Down unit, but it's the 10 second holding that I'm not sure how to accomplish. Since they are momentary switches, they would only complete the circuit while they were down. I'm thinking there's probably a capacitor or two in there or something. This definitely not my are of expertise, but perhaps there's a simple schematic out there. Any help would be appreciated.

Here's a link to the LED Countdown unit I was looking at:

formatting link
Though I'm not sure if I can pre- program the timer (like with dip switches), it seems it needs to be programmed once it's powered up, but that's another issue.

Thanks, Slim

Reply to
Santa Ana Slim
Loading thread data ...

How are you at software? If I was doing something like that, I'd use one of the inexpensive microprocessors. A 10 second delay is just a spin loop. You can check the switches in there too.

If I counted right, you need 2 inputs (buttons), 1 output (LED) and pwr/gnd, so I think even the smallest will work for you. (They make some that are only 6 pins in transistor sized packages.)

Google for Basic Stamp AVR PIC 8051 There are probably lots more.

--
These are my opinions, not necessarily my employer\'s.  I hate spam.
Reply to
Hal Murray

Software I can handle. I will definitely look into that. Thanks for the info. I didn't even know where to start.

-Slim

Reply to
Santa Ana Slim

Microchip has a nice starter package. PIC Kit. $36 at Digikey

formatting link
It's several years old. It's got several LEDs. No pushbuttons, but you can easily wire soomething up.

There is a newer one called PICKit 2. I haven't used it. At a quick glance, I couldn't figure out if you needed something to go with it.

Atmel's STK500 is $79.

formatting link
It's got 8 pushbuttons and 8 LEDs. I'm not sure it will handle the lastest chips. Check the fine print or use an older chip.

There is a newer Dragon for $49

formatting link
I haven't used it. Digikey doesn't have any documentation so you'll have to get it from Atmel's web site.

Those are low level systems. Read the documentation. For any chip, the documentation may come in two parts. One document describes all the fine print about the IO for a chip/family. Another will describe the instructions for that family.

--
These are my opinions, not necessarily my employer\'s.  I hate spam.
Reply to
Hal Murray

snipped-for-privacy@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote in news:_K2dnd76Q4f5QpLXnZ2dnUVZ snipped-for-privacy@megapath.net:

I got one. Only used it to upgrade a firmware though. Cheap and decent copies can be had from China on eBay. Software is free from Microchip, but HUGE! By the time I'd installed W98 SE (Yes, you don't have to use WXP if you don't want to) and also IE v5 (required for cyptographic support to police the subsequent installs more than for anything else), then the huge Microchip install, I'd used a few hunderd megabytes! To install a few tens of kilobytes to a small IC! Got to wonder what the hell is wrong with that picture. Surely someone else thinks that is absurd, and has perhaps made software than can do this with a vast increase in ease and efficiency. If anyone knows of such, please post.

Reply to
Lostgallifreyan

Santa Ana Slim wrote in news:a55072e2-d287-4d2d- snipped-for-privacy@u9g2000pre.googlegroups.com:

One or two.. :) I think using a resistor and capacitor will do most of the timing you need, though if you're going to try hardware (meaning not programmable IC's) you might try a decade counter or other divider to run the main timer, and simple monostables to do the triggering and resetting.

IC's to look at are hex inverters (to build oscillators cheaply), and 'ripple counters' as cheap ways to get lots of binary subdivisions so you can get accurate control for the main timer, based on a faster oscillator. The oscillator can even be crystal controlled, an easy build if you base it on the hex inverter IC. CMOS IC's are probably best choice if you want wide range of operating voltage.

Reply to
Lostgallifreyan

snipped-for-privacy@radagast.org (Dave Platt) wrote in news: snipped-for-privacy@radagast.org:

Nice. I noticed that but by the time I'd seen the full install done I'd lost track and just followed through. I'll look into it. Any further advice welcome. (I'm on W98 SE as that best works for me, so Linux isn't a hot choice even though it's second favourite).

If I can program PICs with a text editor and a small program no bigger than a megabyte running on W98 it will be close to my ideal. Learning to code isn't the obstacle for me, it's wading through tens or hundreds of megabytes of stuff I can't control, and that threatens the stability of my system, if it runs, or even installs at all, that's the really big problem, one which shouldn't even exist when writing small programs for small machines.

Reply to
Lostgallifreyan

Lostgallifreyan wrote in news:Xns9C0EBD77E848Azoodlewurdle@216.196.109.145:

Ok,

formatting link
is s direct link to a 32 bit command line tool that runs on W98. (Wants a modest- sized DLL, MSVCR80.DLL, which was easy to find online). PICkit2 hardware installed easily with an INF file already local to the system when plugged in. I made a first test by looking for it with PK2CMD.EXE in a 'DOS box' and it found something it couldn't if I unplugged it. :) I also tried assigning a string to it as ID, it installed again from INF file and subsequent query found it naming it with the name I'd given.

Very nice, totally painless. If anyone knows any gotchas or guides to observe, please post, as this thing can set VDD for a device and no doubt do other potentially destructive things, I can use help to avoiding that while I blunder around.

Reply to
Lostgallifreyan

On Thu, 14 May 2009 23:39:33 -0500, snipped-for-privacy@ip-64-139-1-69.sjc.megapath.net (Hal Murray) put finger to keyboard and composed:

PICAXE can be programmed using BASIC:

formatting link

- Franc Zabkar

--
Please remove one \'i\' from my address when replying by email.
Reply to
Franc Zabkar

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.