Need help building a Digital Cricket Scoreboard from scratch

John P

Joined Oct 14, 2008
1,992
The LEDs that you showed the link to are connected in a strip form, in groups of 3 or 5. What you want is either a 7-segment arrangement, or a 5x7 matrix. Also, they're designed to operate on a 12V power supply, which microcontrollers will need extra electronics to drive. And then the question of power--presumably this thing has to operate outdoors. What's going to power it, and how large can the battery be? At least, you have to worry about a battery unless you believe you'll always have electricity from a building or a vehicle. Sorry that it's becoming so awkward, but there are always practical issues involved in every project.
 

Ian0

Joined Aug 7, 2020
6,724
In case you missed post #19
I'm planning on using 12V 10amp Power supply unit.
10 displays = 10 digits, 70 modules means that they are 7-segment displays, which one could have inferred from the drawing in post #17. Looks easy enough to me to arrange the strips to make 7-segment displays.

Average 50-over match lasts 7 hours including lunch. Average power is about 50W (5 segments in each digit lit), so a 12V VRLA battery of about 40Ah would deal with it nicely.
 
Last edited:

Thread Starter

jasrodz

Joined Oct 20, 2020
19
Here’s a bit of a circuit. Each section works the same.
I’ve included a “down” button for those occasions when it looks like a 6 but actually landed inside the rope, and the scorer got a bit ahead of himself.
Do overs count up or down? If “down” then I’ve included an easy way to preset the counter, by clocking the tens. The overs count up in 1,2,3,4 as such to maximum of 10 overs that's what we usually play
The logic can run off 12V, or 5V, it doesn’t matter.
A battery backup could be added in case someone unplugs it at tea in order to put the kettle on.
Do you play 2-innings matches? If not, then “target” can be made much simpler (drawing on lower right) as it only has to copy the “total” into a latch at the end of the first Innings. Each team play 1 Innings only. So after the first innings the target score to be updated
Thanks a lot @Ian0 I'll let you know if I run into any issues.
 

John P

Joined Oct 14, 2008
1,992
I have to admit I didn't read all of the postings, and now I do see that short LED strips are a reasonable way to do this project. That's if Jasrodz is willing to wire up all those 70 segments!
 

dl324

Joined Mar 30, 2015
15,474
I have made a quick diagram based on your sketch.
Your schematic will be easier to read if you used connection dots instead of humps, and no one really likes color coded schematics. You need to debounce the switches.

When I draw schematics for counters, I usually ignore the normal right to left and top to bottom flow because it makes more sense.

Which microcontroller do you have ? I'm planning on using Arduino
If you're planning to use an Arduino, why are you bothering with counter chips?
 

Ian0

Joined Aug 7, 2020
6,724
@Ian0 I have made a quick diagram based on your sketch. Can you check if this is correct ? I'm guessing this has to be done for Runs, Overs, Wickets & Target with each of it having its own up/down reset ??
Yes. Don't leave out the debounce on the up/down switches, although reset doesn't need them.
If you produce "Target" by copying "Total" at the end of the first innings, then there's a simpler way - see my diagram bottom right.
 

Thread Starter

jasrodz

Joined Oct 20, 2020
19
I have to admit I didn't read all of the postings, and now I do see that short LED strips are a reasonable way to do this project. That's if Jasrodz is willing to wire up all those 70 segments!
Yes @John P I'm going with those smaller LED modules. It is a big task to wire those 70 up though
 

dl324

Joined Mar 30, 2015
15,474
I was planning on using. But don't know how it works or how to write a code for it. I couldn't get any schematic on that either.
Have you tried searching for Arduino examples similar to your project? Do you know how to code in C or C++?

All you need are some code to maintain counts, read three switches, and debounce the switches. You can use some multiplex logic to reduce the number of outputs you need.

EDIT: Here's a suggestion:
clipimage.jpg
  1. Treat the display as 9 multiplexed common cathode digits.
  2. Use D8-11 to output the BCD value for each digit. I chose 4 contiguous outputs so they're easily written as a nibble.
  3. Increment the CD4017 to reflect the digit being displayed.
  4. When the program is started, you send a reset pulse on D13.
  5. D12 is a counter clock select the digit being displayed.
  6. In the display box above are 7 P channel MOSFETs to drive each segment.
  7. I chose to operate the CMOS logic at 5V to simplify interface to the Arduino inputs/outputs.
  8. I didn't show the 3 switch inputs.
You can use transistors instead of MOSFETs, but drive current from the logic chips needs to be considered.

As for the program. It reads the switches, increments/decrements counters. Counters can be a 9 byte array (or 9 nibbles if you prefer) or 4 variables that you manipulate to extract the digits. Write an Interrupt Service Routine (ISR) to take care of putting the correct data on D8-11 and control the CD4017.

There may some interrupt issues to deal with because ISRs disable interrupts and the switch inputs will be interrupts.
 
Last edited:

Thread Starter

jasrodz

Joined Oct 20, 2020
19
@Ian0 Sorry I couldn't follow that denounce on your schematic very well. I will update my sketch and can you let me know if its correct
@Ian0 can you please tell me if my switch debounce is correct ?

Also what is below circled in Red for ? and where do I use 2N7000 (circled yellow) in my diagram above.
 

Attachments

Thread Starter

jasrodz

Joined Oct 20, 2020
19
EDIT: Here's a suggestion:
clipimage.jpg

  1. Treat the display as 9 multiplexed common cathode digits.
  2. Use D8-11 to output the BCD value for each digit. I chose 4 contiguous outputs so they're easily written as a nibble.
  3. Increment the CD4017 to reflect the digit being displayed.
  4. When the program is started, you send a reset pulse on D13.
  5. D12 is a counter clock select the digit being displayed.
  6. In the display box above are 7 P channel MOSFETs to drive each segment.
  7. I chose to operate the CMOS logic at 5V to simplify interface to the Arduino inputs/outputs.
  8. I didn't show the 3 switch inputs.
You can use transistors instead of MOSFETs, but drive current from the logic chips needs to be considered.

As for the program. It reads the switches, increments/decrements counters. Counters can be a 9 byte array (or 9 nibbles if you prefer) or 4 variables that you manipulate to extract the digits. Write an Interrupt Service Routine (ISR) to take care of putting the correct data on D8-11 and control the CD4017.

There may some interrupt issues to deal with because ISRs disable interrupts and the switch inputs will be interrupts.
@dl324 I appreciate your patience and suggestion given here. To be honest, I couldn't follow the above as I'm not really an electronics wiz. I can follow to schematics to a certain extent.
 

Ian0

Joined Aug 7, 2020
6,724
@Ian0 can you please tell me if my switch debounce is correct ?

Also what is below circled in Red for ? and where do I use 2N7000 (circled yellow) in my diagram above.
The 2n7000 (or any small MOSFET) drives the segments. The 40110 can't manage it on its own!

Debounce is 1k to ground, then 10k/100nF as a filter. Values not critical - the second resistor is about 10 times the first. The first can be anywhere from 1k to 10k

Circuit in red circle would advance the tens - might have been handy if your OVERS counted down and started at 50. If your overs count up, then not much use!
 

Ian0

Joined Aug 7, 2020
6,724
Have you tried searching for Arduino examples similar to your project? Do you know how to code in C or C++?

All you need are some code to maintain counts, read three switches, and debounce the switches. You can use some multiplex logic to reduce the number of outputs you need.

EDIT: Here's a suggestion:
View attachment 220887
  1. Treat the display as 9 multiplexed common cathode digits.
  2. Use D8-11 to output the BCD value for each digit. I chose 4 contiguous outputs so they're easily written as a nibble.
  3. Increment the CD4017 to reflect the digit being displayed.
  4. When the program is started, you send a reset pulse on D13.
  5. D12 is a counter clock select the digit being displayed.
  6. In the display box above are 7 P channel MOSFETs to drive each segment.
  7. I chose to operate the CMOS logic at 5V to simplify interface to the Arduino inputs/outputs.
  8. I didn't show the 3 switch inputs.
You can use transistors instead of MOSFETs, but drive current from the logic chips needs to be considered.

As for the program. It reads the switches, increments/decrements counters. Counters can be a 9 byte array (or 9 nibbles if you prefer) or 4 variables that you manipulate to extract the digits. Write an Interrupt Service Routine (ISR) to take care of putting the correct data on D8-11 and control the CD4017.

There may some interrupt issues to deal with because ISRs disable interrupts and the switch inputs will be interrupts.
Don't multiplex it - you'd never see it! Cricket is played outside when the sun is shining, and you're suggesting that the brightness is reduced to a ninth of it normal value - you'd not see the scoreboard unless it was "bad light stopped play"!
 

Ian0

Joined Aug 7, 2020
6,724
This is a very interesting project when it comes to the choice between microprocessor and logic. With 70 outputs, the output drivers require a lot of hardware. Any microprocessor would require some I/o expansion, so the extra hardware required to perform the task in logic is minimal.
As the logic function (a up-counter with reset) is trivial, my view is that it favours a hardware solution over software.
 

Thread Starter

jasrodz

Joined Oct 20, 2020
19
The 2n7000 (or any small MOSFET) drives the segments. The 40110 can't manage it on its own!
Thanks @Ian0 if you look at my sketch. where do I end using the 2N7000? Not sure where I would connect them. Are you able to mark up my sketch. Thanks very much
 
Top