# Simple Counter Help

Discussion in 'General Electronics Discussion' started by michael_schmid, Oct 3, 2013.

1. ### michael_schmid

4
0
Oct 3, 2013
Hello,
I would like to say that I know the basics of electronics which I don't but I need help with a project.
I am trying to make a counter which can add together several variables and displays it on a display. My variables would be 1,2,5,10,20,50,100,200.
Any help is appreciated
Thanks
Michael Schmid

2. ### BobK

7,682
1,688
Jan 5, 2010
Your variables look a lot like constants to me.

Please try to explain in more detail what you are trying to do. Where are these "variables" coming from and how are they encoded? How many of them. What kind of display?

Bob

3. ### Harald KappModeratorModerator

11,316
2,593
Nov 17, 2011
Bob is right, you need to provide more detail.
Also: what is the maximum count expected? By the way, what you describe is an adder, not a counter. Probably a microcontroller will be a suitable solution. Have you considered using a commercially available platform like e.g. arduino?

4. ### michael_schmid

4
0
Oct 3, 2013
so there are 8 buttons that each add a different amount of points (1,2,5,10,20,50,100,200) to a total which is displayed by the display.

Michael Schmid

5. ### shrtrnd

3,808
511
Jan 15, 2010
ha, ha, ....
To electronics people like us, a 'counter', is a specific device for ascertaining frequency.
Like Harald noticed, you want a circuit that adds-up different numerical values with
the depression of each switch for each value.
So we now know what kind of a 'counter' you were talking about.
Just a humorous footnote, from me.
I think you'll get the info you need now from someone here, ....

6. ### BobK

7,682
1,688
Jan 5, 2010
This is easily done with a microcontroller, not so with discrete logic. If you want to build this, you have a lot to learn.

Bob

7. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
OK, so I suspect you want to press "1" three times, then "5", then "200" and have the display show "208".

Yes, a microcontroller (what I would recommend depends on your background).

You might want to look at this thread: https://www.electronicspoint.com/ar...g-led-power-supply-control-panel-t255905.html (The microcontroller specific stuff starts on page 4, but if you skim through some of the earlier posts you'll get the gist of what is happening).

You would also need to look at button presses, so the discussion (in the thread mentioned above)of debouncing of switches is important. In your case the processing is easier, but the driving of the outputs is somewhat more difficult.

For your output you might consider something like this, or this.

In all cases, you break your program up into several parts, the major ones being:

1) initialisation
2) get inputs
3) update status
4) display status
(and then you loop back to 2, and keep going...)

8. ### michael_schmid

4
0
Oct 3, 2013
...

So the Arduino Micro would have enough outputs for me I would just like to know what kind of display I should buy? I am currently think of a 7 segment display.

Michael Schmid

9. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
The displays I pointed you to require few enough connections to your microcontroller that you would not have to go to additional effort.

But you would be best advised to practice using them a little so you know how to write data to them.

10. ### michael_schmid

4
0
Oct 3, 2013
Which would be?

25,482
2,830
Jan 21, 2010
As I said...