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.

4017 Tally

Status
Not open for further replies.

dabnis

New Member
I posted earlier about an oscillator for a laser tag circuit I'm working on. I have the circuit working, using a 555 timer in astable mode, with the appropriate capacitors and resistors to yield 40khz frequency. This is being driven by a 555 circuit in monostable/one-shot, providing both a pulse duration (approx 1/4 second) and acting as a bounceless switch.

On the receiving end (taggers worn on hats), I have a 40khz demod w/ capacitor and resistor, connected to a piezo buzzer. This simply "beeps" now, but I intend to feed the signal to the gun and have a 4017 count hits, deactivating the gun after a certain amount of hits.

That's a bit of background info. The question is this:

I want to also use a 4017 for ammo count. I've read over several circuits that show how to light multiple LEDs in sequence, one at a time - no problem. However, I would like to have multiple LEDs lit up at once, decreasing by one (ie. one LED goes out) each time the trigger is pulled, until no LEDs are lit up, indicating out of ammo, and a button has to be pushed to reload.

Seems like the reload switch would have to be tied between the last number in sequence and the reset on the 4017, but I'm not totally sure about all that.

Any help would be much appreciated!
 
Last edited:
I posted earlier about an oscillator for a laser tag circuit I'm working on. I have the circuit working, using a 555 timer in astable mode, with the appropriate capacitors and resistors to yield 40khz frequency. This is being driven by a 555 circuit in monostable/one-shot, providing both a pulse duration (approx 1/4 second) and acting as a bounceless switch.

On the receiving end (taggers worn on hats), I have a 40khz demod w/ capacitor and resistor, connected to a piezo buzzer. This simply "beeps" now, but I intend to feed the signal to the gun and have a 4017 count hits, deactivating the gun after a certain amount of hits.

That's a bit of background info. The question is this:

I want to also use a 4017 for ammo count. I've read over several circuits that show how to light multiple LEDs in sequence, one at a time - no problem. However, I would like to have multiple LEDs lit up at once, decreasing by one (ie. one LED goes out) each time the trigger is pulled, until no LEDs are lit up, indicating out of ammo, and a button has to be pushed to reload.

Seems like the reload switch would have to be tied between the last number in sequence and the reset on the 4017, but I'm not totally sure about all that.

Any help would be much appreciated!

hi,
A HEF4035 4 bit Shift Register would do that.

Use the parallel load and set all the outputs to high, then clock in a data '0' for each clock pulse.

The LED's would go out one by one.

Do you follow OK.?
 
Last edited:
It sounds like you need to use a microcontroller.

The microcontroller can do the timing of the 40 kHz, the pulse counting, driving the LEDs etc. etc.

You are going to have to have several of these to make a meaningful game, and you are sure to get something wrong, somewhere in your design, or decide on some new feature that would be nice.

If you make it with 555s, 4017s or 4035s each feature needs extra wires soldered in, more ICs so upgrades are a real pain.

With a microcontroller on each one the hardware is simpler, and the firmware (the program) can be changed without taking it all apart.

I speak from experience, and spending far too much time on a circuit that should have been done with a microcontroller.
 
Thanks, Eric! I'll look into the HEF4035.


Diver300: I did try the microcontroller route. Ordered a small handful of PIC16F684s and an Olimex PIC-PG2, planning to go with the MilesTag circuits.

Wasn't the most positive experience. Here's some documentation:
**broken link removed**
I tried LOTS of things to get that working. I know it was supposed to be easy but it sure wasn't. I figured I could likely purchase a different programmer and try to get it working but that was more $$$ and more time. The whole experience was a tad frustrating.

Did some research and there were at least two other guys that kinda went off and did their own thing as well. This is with the MicroMT circuit. The full-fledged MilesTag circuit may be a different story, but it is still kinda pricey by the time you get all the parts required, it involves ISD sounds (and thus another chip to program), yada yada... that can escalate to a lot of parts as well and really all I want to do is keep up with ammo and hitpoints.

I am willing to perhaps give it another shot (after all, I do have enough parts to make a few MicroMT taggers). Can you recommend an inexpensive PIC programmer compatible with the PIC16F684? (LaserForums.com isn't the most helpful place in the world, as I found out... I asked the same question there.)
 
Last edited:
This looks like something I should have tried before:
**broken link removed**

But I was going with instructions specific to MilesTag, and the guy who wrote the tutorial suggested the PIC-PG2.

Still trying to convince myself it can be done with basic parts but really... I see PIC is the way to go. Just frustrating as all get-out to pick up yet another "thing" to spend money on (you need this part, and this programmer, and this software, and this book, and these tutorials, etc.)... and TIME.

Arrrghhhhh
 
Hi dabnis,

to slightly detour the microprocessor (and all the programming, programmer and learning how to program) you could use discrete devices, such as programmable up/down counters with their respective decoders and 7-segment displays for the available rounds of ammo.

I personally prefer 74LS192 counters and 74LS48 (74LS47) for decoders. LS192s are easy to cascade. The number value to load into the counter might be loaded by a switch activated by the gun's ammo magazine. Since the initial number of rounds will be fixed (due to the ammo limitation) the count value can be preset by wiring. (omitting jumpers or BCD-coded switches).

Using batteries you might disconnect the current consuming display using a switch while the rest of the circuit will be energized to "remember" the present count status.

You might build up to four or five complete counter circuits for the money it takes to purchase just a programmer.

Boncuk
 
Still trying to convince myself it can be done with basic parts but really... I see PIC is the way to go. Just frustrating as all get-out to pick up yet another "thing" to spend money on (you need this part, and this programmer, and this software, and this book, and these tutorials, etc.)... and TIME.
Arrrghhhhh
Dont forget the +5Vreg.

hi,
A quick solution is to use discrete ic's, for two or three 'clip down counters'.
Any CMOS parallel load shift register with individual outputs would be OK.

A longer term plan would be to study Basic programming for PIC,s, build your own prommer.
If you are 'into' building electronic gizzmo's that the way to go.:)
 
Last edited:
Boncuk: Thanks! If I'm not mistaken, the 74LS192 is referenced in one of the Forrest Mims books I have. I think it's a BCD circuit, but it should give me some good ideas anyhow.

ericgibbs: Got a few +5V regs in my last Mouser order. :) Good advice in the PIC stuff. I don't know where to begin on schematics for a programmer. ...and there's the different types like JDM, etc, right?
 
ericgibbs: Got a few +5V regs in my last Mouser order. :) Good advice in the PIC stuff. I don't know where to begin on schematics for a programmer. ...and there's the different types like JDM, etc, right?

hi,
Look here for a PIC parallel prommer, Nigel's
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top