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.

help with a digital counter

Status
Not open for further replies.

rodralph

New Member
I am not an electronic wiz by any means. I can follow basic schematics and stuff, but some times I get stuck. This is one of them. My 2 little boys love Halo and they asked me to build some weapons for them. I found a toy which looks like a Halo assault rifle. Purchased a few and painted them. After that I saw them playing the video game and noticed that the rifle in the game has an ammo counter that counts down and once it reaches 00, the character reloads. Pretty cool. I started looking on the net and found this site which had something similar to what I was looking for.

Laurier's Handy Dandy Little Circuits:Up/Down Counter

I got all the parts and built it on my bread board. Everything works except; The way the 4510 works, once the counter goes down to 0, it resets itself back to 99. I want the counter to stop when it reaches 00. That way they have to press the reload (preset on the schematic) and the counter will start again from the preset number of rounds. Using the DIP switches, the counter can be set to any number. Right now I have it set up to start at 32.

I thought about using a CMOS OR gate. I purchased a few CD4072 and connected the output pins from the 4510 to the input on the CD4072. When I connect my meter to the output on the 4072 I can see the voltage drop to 0v once the counter reaches 00. That is working fine as well.
Here is my problem; I thought that I could connect the "count" switch to the output on the 4072 instead of connecting it to the + side of the board or the battery. However, when I do that the counter does not work. With the meter connected to the output on the 4072 I can see that the voltage drops from 9v to 5v every time I press the count button.

Any ideas?
 

BrownOut

Banned
Seems to me like it should have worked, unless you screwed up the transistor debounce circuit somehow. Like if you used a wrong value of resistor or miswired the circuit.
 
Last edited:

Karkas

Member
Excuse me.
Would be there another problem besides the wrong value of resistor?
What is te capacitor doing there? isn't it not allowing abrupt changes of voltage in the base of the transistor?
If there was a problem with the capacitor, would the transistor be damaged?
 

BrownOut

Banned
I think the capacitor is filtering out bounces from the switch. If it were connected backwards, that could be a problem.
 
Last edited:

Karkas

Member
I'm sorry but I have to corroborate this, it filter bounces from the switch because of its characteristic of not allowing abrupt changes of voltages? or because it will be charged and if the switch bounces it will retain (or at least be discharging) the voltage? I have not a very good knowledge about the capacitors aplicattions an every time I see one I want to understand what it is doing and how.

By the way it doesn't have polarity, how would it be connected backwards?
 
Last edited:

BrownOut

Banned
I'm sorry but I have to corroborate this, it filter bounces from the switch because of its characteristic of not allowing abrupt changes of voltages? I have not a very good knowledge about the capacitors aplicattions an every time I see one I want to understand what it is doing and how.

By the way it doesn't have polarity, how would it be connected backwards?

You're correct, it filters the bounces. It's not a great circuit for debouncing. I would do it differently. The capacitor is indeed not polarized, I misread the schematic. However, if the builder used a large cap for more filtering, he might to go a polarized one.
 

Karkas

Member
Thank you, now I'm a little more clear about that, it should have worked.
 

AllVol

New Member
Thank you, now I'm a little more clear about that, it should have worked.

Since the count button, driving the transistor, serves as clock for the 4510, the display should not change but once for each press of the button. The way I read your post, you are indicating the counter is continuously counting either up or down by simply pressing the count button.

If this is so, and you are getting more than one count per button press, either the debounce is not working properly, or there is a mis-wiring somewhere in the circuit to pin 5 of the 4510.

Double check this portion of your circuit.
 

Karkas

Member
Since the count button, driving the transistor, serves as clock for the 4510, the display should not change but once for each press of the button. The way I read your post, you are indicating the counter is continuously counting either up or down by simply pressing the count button.

If this is so, and you are getting more than one count per button press, either the debounce is not working properly, or there is a mis-wiring somewhere in the circuit to pin 5 of the 4510.

Double check this portion of your circuit.

You quoted my post but I don't think you're talking about things that I have said, in case you were talking to me specificly, yer it is supposed to count only once every time the count button is pressed, the thread starter said that when he connects th CMOS or gates to the count button (instead of connecting it to Vcc) the voltage drops from 9V to 5V every tiem he peresses the count button, I can't see where somebody said that

you are getting more than one count per button press.
 
Last edited:

AllVol

New Member
You quoted my post but I don't think you're talking about things that I have said, in case you were talking to me specificly, yer it is supposed to count only once every time the count button is pressed, the thread starter said that when he connects th CMOS or gates to the count button (instead of connecting it to Vcc) the voltage drops from 9V to 5V every tiem he peresses the count button, I can't see where somebody said that

Oops. Sorry, I got the wrong guy. LOL.

I was trying to respond to the OP, who said "once the counter goes down to 0, it resets itself back to 99. I want the counter to stop when it reaches 00. That way they have to press the reload (preset on the schematic) and the counter will start again from the preset number of rounds."

I took that to mean he was having trouble with a continuing count instead of a one-time count.

Sorry for the confustion. Good to talk to you, anyway.
 

rodralph

New Member
Perhaps I didn't explain the problem very well. Sorry for the confusion. The schematic I posted on the original message works fine. After I built it and tested it, I added two 4072 CMOS OR gates. I connected pins 2, 6, 11 & 14 of both 4510 to one 4072. The two outputs of the first 4072 were connected to the second 4072. The other two inputs on the 4072were connected to ground to keep them low. What this does is keeps the output HIGH as long as there is a digit other that 0 being displayed by either IC. When I connect the meter to the output of the second 4072I get 9v. So far everything is fine. Now, I thought that I could use that output (the one with 9v) as my positive for the count switch. However, when I do that, when I connect one side of the switch to the output pin on the 4072 and the other to the transistor and press the button the counter does not work. If I look at the voltage on the output pin I get 9v while the button is not pressed, but when I press it the voltage drops to 5v.

Everything on the original circuit works fine. My problem is trying to add the 4072 to determine when the counter has reached 00.

Thanks everyone.
 
Last edited:

Karkas

Member
Oops. Sorry, I got the wrong guy. LOL.

I was trying to respond to the OP, who said "once the counter goes down to 0, it resets itself back to 99. I want the counter to stop when it reaches 00. That way they have to press the reload (preset on the schematic) and the counter will start again from the preset number of rounds."

I took that to mean he was having trouble with a continuing count instead of a one-time count.

Sorry for the confustion. Good to talk to you, anyway.

There's no problem AllVol, good to talk to you too.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top