Maker Pro
Maker Pro

help needed on first project, led counters with key reset

geppetto

Mar 14, 2017
5
Joined
Mar 14, 2017
Messages
5
Hi all,

As the title says this is my first project and first post on the forum.
I'm not exactly new to electronics, but in the past i have always been more of a fault find and replace person, rather than designing and producing.

I want make a display with 2 counters. the display needs to fairly big, so its easily visible from a distance,
one to count the total number of days, one to keep a record of the highest number of days achieved.
Then to have a key switch to reset the first counter, rather than a button, so it can only be reset by me.
the counter would need to tick up on its own once per day and update the record if its beaten, so a micro controller and programme would be needed (i think)
I also want it to be battery powered, with a back up battery to keep the count in memory for when the main battery is replaced.

I'm sure after reading some of the posts on here, this would be doable for someone experienced, so im looking for help to get started and advice on what components to buy and how it all fits together.

many thanks in advance for any help/advice you can provide.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
What you describe sounds more like one counter group that drives its own displays, plus it drives a latch group with its own displays. How many days max?

ak
 
Last edited:

geppetto

Mar 14, 2017
5
Joined
Mar 14, 2017
Messages
5
Thanks for helping,
Ideally the counters would go up to at least 999, but 9999 would be even better.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
While this certainly can be done with a PIC, AVR, Arduino, etc., it is not too large for an all discrete design. The displays and their drivers are a constant. That leaves 12 chips:
4 counters
4 latches
4 magnitude comparators

ak
 

geppetto

Mar 14, 2017
5
Joined
Mar 14, 2017
Messages
5
Thanks for helping, sounds good it can be done pretty simply.
Could you explain it in more detail for me please or point me towards somewhere to learn more about it.
This is my first project and I really need it spelled out and dumbed down for me.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You also need a crystal clock divided down to one tick per day.

And seven segment decoder / drivers.

You are talking about a handful of chips or one 28 or 40 pin micro and a few transistors or uln2004.

Bob
 

geppetto

Mar 14, 2017
5
Joined
Mar 14, 2017
Messages
5
thanks for helping out bob.
i've been doing some research around the web and i have got my head around the timer, decoder/driver and linking more together for the first 4 seven segments.
i also think i got the back up battery and key reset sorted.
the last part of the problem is the second set of seven segments that keep the record when the first set is reset.
i guess thats what the chips/mirco are for and the next thing to research. if i have to spend a few days learning how to put the code into it, that would be ok.

if you could steer me towards how to go about keeping the record while im looking around to see how the chip/micro fits in, that would be great.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
There are CMOS logic parts that combine a 4-bit counter and a display decoder in a single chip, but those won't work here. You need the counter and decoder to be separate parts so the BCD data between the two is available to use for the comparator.

The counter drives the decoder and the decoder drives the display. Each counter also drives the inputs to a 4-bit latch, and the latch drives its own decoder and display. In this way, whenever the latch is triggered, it's display holds the counter value at that time while the counter goes on to do other things. So, what triggers the latch?

This is where an all discrete design gets a bit complex. A 4-bit magnitude comparator, like a 7485, is a single chip with four A inputs, four B inputs, and three outputs. A and B are binary values from 0 to 15 (decimal). The three outputs are A<B, A=B, A>B. So if A comes from the counter and B comes from the output of the latch, then A>B will go high whenever the counter is greater than the latched value. This signal triggers the latch to store the updated value.

ak
 

geppetto

Mar 14, 2017
5
Joined
Mar 14, 2017
Messages
5
Thanks Bob and AK for guiding me along me along with this.
Your right AK and it does get a bit complex.
I sort of understand what your saying about a latch and comparator, but finding it hard to see examples online so i can actually work out how to connect them in.
Also, because i cant really understand it, im wondering if i was to get to lets say day "104" as my record and then reset. On the new day 5, would the record hold? or change to "105" as the 5 is now higher than the latched in 4.
like i said i dont fully understand, so not sure if its just looking and the binary output or if it knows how many times its been round the clock so to speak.
If so then maybe a micro is the way to go, i've took a brief look at some different programs and it sure looks hard haha.
 
Last edited:

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
The magnitude comparator chips string together to evaluate the entire multi-digit number. To update from 105, the counter has to produce 105.

ak
 
Top