Momentary Switch Delay

S

Santa Ana Slim

Guest
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:
http://www.hobbytron.com/UK247.html 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
 
In article <a55072e2-d287-4d2d-b1f5-6c756cd25c11@u9g2000pre.googlegroups.com>,
Santa Ana Slim <SantaAnaSlim@gmail.com> writes:
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:
http://www.hobbytron.com/UK247.html 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
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.
 
On May 14, 9:39 pm, hal-use...@ip-64-139-1-69.sjc.megapath.net (Hal
Murray) wrote:
In article <a55072e2-d287-4d2d-b1f5-6c756cd25...@u9g2000pre.googlegroups.com>,
 Santa Ana Slim <SantaAnaS...@gmail.com> writes:



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:
http://www.hobbytron.com/UK247.htmlThough 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

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.
Software I can handle. I will definitely look into that. Thanks for
the info. I didn't even know where to start.

-Slim
 
Software I can handle. I will definitely look into that. Thanks for
the info. I didn't even know where to start.
Microchip has a nice starter package. PIC Kit.
$36 at Digikey
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=DV164101-ND
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.
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATSTK500-ND
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
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATAVRDRAGON-ND
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.
 
hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) wrote in
news:_K2dnd76Q4f5QpLXnZ2dnUVZ_tCdnZ2d@megapath.net:

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.
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.
 
Santa Ana Slim <SantaAnaSlim@gmail.com> wrote in news:a55072e2-d287-4d2d-
b1f5-6c756cd25c11@u9g2000pre.googlegroups.com:

I'm thinking there's
probably a capacitor or two in there or something.
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.
 
In article <Xns9C0E7BA64AAA1zoodlewurdle@216.196.109.145>,
Lostgallifreyan <no-one@nowhere.net> wrote:

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.
There's plenty of software available for chip programming with the
PicKit 2 and clones, which is a lot smaller than the full MPELab
environment. The PicKit 2 apparently connects as a HID-type USB
device, with a documented protocol, and people have written simple
command-line utilities to program using it.

Microchip has even open-sourced some utility software, which has been
ported to Linux (which is where I use the PicKit 2).

See:

http://mcuee.blogspot.com/2007/06/pickit-2-under-linux-mini-howto.html

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1960

--
Dave Platt <dplatt@radagast.org> AE6EO
Friends of Jade Warrior home page: http://www.radagast.org/jade-warrior
I do _not_ wish to receive unsolicited commercial email, and I will
boycott any company which has the gall to send me such ads!
 
dplatt@radagast.org (Dave Platt) wrote in news:vdt5e6-n0d.ln1@radagast.org:

The PicKit 2 apparently connects as a HID-type USB
device, with a documented protocol, and people have written simple
command-line utilities to program using it.
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.
 
Lostgallifreyan <no-one@nowhere.net> wrote in
news:Xns9C0EBD77E848Azoodlewurdle@216.196.109.145:

dplatt@radagast.org (Dave Platt) wrote in
news:vdt5e6-n0d.ln1@radagast.org:

The PicKit 2 apparently connects as a HID-type USB
device, with a documented protocol, and people have written simple
command-line utilities to program using it.


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.
Ok, http://ww1.microchip.com/downloads/en/DeviceDoc/PK2CMDv1-20.zip 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.
 
On Thu, 14 May 2009 23:39:33 -0500,
hal-usenet@ip-64-139-1-69.sjc.megapath.net (Hal Murray) put finger to
keyboard and composed:

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.
PICAXE can be programmed using BASIC:
http://www.rev-ed.co.uk/picaxe/

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

Welcome to EDABoard.com

Sponsor

Back
Top