Another Arduino Scoreboard Project

So, I want to make a timer/scoreboard for bike polo matches.

I’ve done some searching and found some good info on CrossRoads’ fencing scoreboard and some other related posts. I think I’ve got a good starting point for my own scoreboard but I do have a few questions.

First, here’s what I would like. I want an arbitrary 4 digit timer that will default to 10:00 minutes.
I need two score displays, each only one digit. I need a buzzer to signal the start of the match and the end of the timer. I would like a + & - button for each score, a start/stop/reset button for the timer and a +/- button for the timer. I may also need one more button for moving the active timer digit when setting the time to something other than the default. (I think that’s 8 buttons total).

I figure i can just use USB power for prototyping.

I will probably get 6 small (~1”) 7 segment LED’s for testing/prototyping and then probably get some larger (~3”) LED’s when it’s time to build it all up.

I'll worry about the buzzer details once I've got everything else worked out.

So, here are my initial questions.

I am thinking I should start with the Arduino Uno since it already had USB and power connectors on the board. In the long run I may be connecting this to a NiMH or LiPO. I will probably prototype on a breadboard and solder the final design onto a protoboard. Does the Uno seem like a good starting place?

Because of all of my input buttons I may be limited in the number of outputs I can supply. I was initially thinking I could use a shift register for each 7 segment LED, but the CrossRoads’ design uses a MAX7219 to drive all of the digits (I think). This seems like a desirable solution. Does this seem reasonable and are there any good references on how to use the MAX7219? Do I still need current limiting resistors for the LED’s with the MAX7219? Also, the post that I found that references the MAX7219 mentions SPI...Is SPI some sort of package or library?

I think I’ll need the following items to get me started on the prototyping...

Arduino Uno
Jumper wire
current limiting resistors (220 ohm?)
Breadboard
Small 7 segment LED’s
Small buzzer for testing
Buttons

Am I missing anything obvious?

I need a buzzer to signal the start of the match and the end of the timer

You will need to amplify that sound if you want to be heard in a large and noisy space.

Alright...so I've started to answer a few of my questions...

First, based on the data sheet, the MAX7221 will drive up to 8 digits of a seven segment (common cathode) LED. It also only requires one resistor to set the segment current for all LED's.

florinc:

I need a buzzer to signal the start of the match and the end of the timer

You will need to amplify that sound if you want to be heard in a large and noisy space.

Agreed. I am pretty sure CrossRoads has a post around here dealing with a speaker for his fencing scoreboard. I am probably going to deal with the real speaker as one of the final steps. I figure getting the timing and scoring code going is a little higher priority.

Yep, the sound is just a simple MOSFET driver into a speaker in my boxes.

Remote control is nice too.
MAX 7221 is a nice DIP part to work with. I drive 8 digits (4 time, 2 each for left/right scores up to 99), and AND/OR in the decimal points to use them as flags for other stuff. You have warnings/penalties to display for example?
UNO is overkill, get a promini and FDTI Basic to program it with, will be less than an UNO and you'll have an FDTI Basic for programming your next embedded board. www.gracitech.us for good pricing.
I use a 16 button Velleman keypad on my remote with www.laipac.com type RF units (RLP434A, TLP434A). Remote runs from a 3.7V LiPo battery supplying a 8 MHz Promini. You can also get a 20 button keypad at www.surplussales.com for $1 search for switches, scroll down 1/2 the page.

So you have 7 pins tied up for 12-button keypad (4x3) (assuming you don't need much past 8),
(or 6 if you can find/wire up a 3x3),
4 pins tied up with SPI, easy to use, I can post some examples.
1 for the buzzer,
Still have 3 pins left.
Two LiPos in series driving 5V switching regulator and you'll be all set.
Make the LiPos connectorized so you can flip a switch and charge them individually with MAX1811 or sparkfun equivalent LiPo charging board.
Get a 5V/4A wallwart from mpja.com for $7 and 5.5/2.1mm panelmount jack to plug it into.

Staples/OfficeMax carry Really Useful Boxes, the Ream of Paper size is nice to work and will have plenty of room to add your parts.

Thanks for the info. I've had some time to digest this and I have a few questions.

Speaker Driver & Power

Is there another MOSFET I can use to build that speaker driver. I am ordering parts from Sparkfun and Futurlec and would like to keep it down to two orders. If there are specific specs I should be looking for, that would be helpful...I'm not necessarily asking you to find a particular part for me.

Another consideration is that it looks like you need 12V to power the speaker driver... I have to think a little more about the power setup for this thing. I guess I could use a 12v LiPo and scavenge a switch mode power supply like this guy did. Does that seem reasonable?

LED
So, I am going to use these 2.3" 7 segment LED's from Futurlec which require ~8v. Fortunately, the 7221 datasheet (Page 12) has a sample schematic for driving 2.3" displays using the MAX394 CMOS Switch. Cross, I am assuming you didn't have to deal with this for your LED's because of the way you built your display.

I used 12V because I had it handy. Power = VV/R, so 1212/8 = 18W, while 5*5/8 = 3W, or 6W with 4 ohm speaker
How loud did you want it? You have to take current capability of the power supply into account also.
Current needed is ~1.5A at 12V, 8 Ohm, (12V/8ohm = 1.5A) for full volume. I have mix of 34 ohm, 68 ohm, 136 ohm in series in different configurations to control the volume - wife says they are all too loud in our 40'x40' fencing center 8)

Sparkfun carries a Logic Level MOSFET, that is what you are after. I happened to have purchased 10 of that MOSFET so I used it.

Yep, I built my displays to be directly compatible with the 7221's output. 3 LEDs in parallel so only needed 5V source, with current limited by the 7221 current control resistor.
The MAX394 adds more current draw , but doesn't solve the issue of needing more voltage to turn on all the LEDs.
I would put transistors between +9V and the 7+DP segments, which the MAX7221 would drive, and then another MOSFET between cathodes & ground which the MAX7221 would control. Then the segments could get higher voltage needed and the MAX7221 would not be impacted by it.
This maxim application note covers the voltage handling needed in detail.

Oops, left the note out...

Awesome, I'll do a little more reading and come back with updates/questions. Thanks.

I also used a pololu.com 5V to 12V boost regulator for the 12V supply.
Pololu Adjustable Boost Regulator 4-25V
Good for 2A, I am drawing less, about 1/3A for the speaker, and other current for the blocks of LEDs, about 160mA tops.

Ok, so if I use 9v as you suggest to drive the LED's I can use this circuit from the Ap Note (for the digit drivers):

Correct?

My next question is regarding the segment drive. The last part of the Ap Note addresses this by providing a circuit for driving a segment current higher than 40mA, but it looks like the absolute maximum current for the LED I am using is 25mA (Single Hi-Red 2.3 inch CA 7-Seg LED Display Data). Does this mean I don't need the segment driver and I can just drive the segments directly from pins 14-18, 20-23?

If so, do I still need to use Common Anode LED's because of the Digit Driver circuit? (I am thinking yes)

You need the transistor circuit for the anode segments and the common cathodes because you are running at higher than 5V.
The current drive of the 7221 is not relevant.
The 7221 cannot drive high enough voltage to light the series LEDs. When the segments are off, the cathode will sit at thethe anode voltage (LEDs are off because the voltage is the same at anode & cathode, so no current flow).

So use common cathode LEDs & drive per the app note because that is what the 7221 is expecting to drive.
Or, use common anode LEDs and do some figuring out to drive the anodes high when the common cathode (digit drive) goes low, and drive the parallel segment lines low when the 7221 drives the Segments lines high.

Maybe I need to do some more reading on LED's but I don't completely understand. Please forgive if these are noobish questions.

You need the transistor circuit for the anode segments and the common cathodes because you are running at higher than 5V.

My understanding is that the 8V is only going to the anode of the LED and the cathodes go to ground. But based on this...

The 7221 cannot drive high enough voltage to light the series LEDs. When the segments are off, the cathode will sit at thethe anode voltage (LEDs are off because the voltage is the same at anode & cathode, so no current flow).

So, when the LED's are at the "same voltage" are they both at ground or are they both at Vcc?

The current drive of the 7221 is not relevant.

But I will need to take the amount of current going to the LED's into account, yes? So I don't burn them out?

So use common cathode LEDs & drive per the app note because that is what the 7221 is expecting to drive.

I will politely disagree here because according to the app note...

Note that the display must be the common anode (CA) type to interface the drivers described here; the MAX7219/7221 directly drive common cathode (CC) displays, but these external drivers invert the digit/segment drive polarity.

Thanks again for your help...

Working backwards thru your list, sort of:

  1. Okay, common anode then. Point is still made that transistors are needed top & bottom. Circuit could also be made so that high on the segment drive line would drive the anode high, and low on the cathode drive line would bring the common cathode low.

  2. The MAX7219/7221 usually controls the current going thru each LED segment. In this case, R1 sets the current in each cathode driver, see Figure 4.

  3. The way to turn LEDs off is to have both anode & cathode hi, or both low. If the anodes had 8V applied and the cathode were not pulled low, the cathode would have 8V on it. The MAX7221 can't have 8V on its pins, you will damage it. The transistors buffer the 7221 from the 8V.

CrossRoads:
3. The way to turn LEDs off is to have both anode & cathode hi, or both low. If the anodes had 8V applied and the cathode were not pulled low, the cathode would have 8V on it. The MAX7221 can't have 8V on its pins, you will damage it. The transistors buffer the 7221 from the 8V.

That totally makes sense. It's starting to click now.

Thanks again.

Alright, I've got most of the design worked out. I'll probably prototype it on some smaller 7 segment LED's so I don't have to worry about the high voltage circuits and I'll be able to tell if the code actually works without the compounded issue of wiring up the larger LED's.

Also...I am seriously reconsidering my plan for the LED's. It seems that your (CrossRoad) display is a lot more straightforward.

Quick questions CrossRoads...

  1. How large are your digits?
  2. How far away can you see them?
  3. Also, it looks like your segments are only 3 LED's...do you keep it down to 3 so you can drive them with the Arduino power supply?
  1. Digits are 3" x 1.5", layed out to look nice on a roughly 3" x 4" piece of perfboard (velleman ecs1/2, 3.9" x 3.1", 80x100m)
    http://www.omnikits.com/phpstore/index.php?action=item&id=783&prevaction=category&previd=10&prevstart=0
    This place has best price, but not cheap shipping

  2. They can be seen quite a ways away - I used LEDs from superbrightleds.com, had to tone the current way down because 10,000mCD was too bright!
    It is installed on wall on the other side of a 40' room and is easily seen.
    The 3rd shot below is all the way across the length of my house, about 35' away.
    Easy enough to change 1 resistor to brighten it up a mA or 2 if we ever decide it's not bright enough. Has worked great as is since February.

  3. I used 3 LEDs becuase that seemed to make nice looking segments on the boards and in the box ("really useful box" from Staples, ream of paper size). The LEDs are each individually soldered in place, then wirewrapped together, and brought to the 8-pin connector. My wife dia that for me over a couple of nights.
    The whole thing is driven by a 5V 4A supply (mpja.com), with boost regulator to 12V (pololu.com) for the speaker and the large blocks of LEDs and for 2 sets of remote lights (that have large blocks also).
    The segments are connected in parallel, so 4 or 4 would have worked - it was kind of trial and error - what looked good, what fit in the box. 3 in parallel with
    lower current draw could be driven by the 7221 directly.
    Decimal points were also wired, but sprinkled around the box for other purposes as 2 LEDs in parallel.

SPI to the 7221 to 8 headers out to the digits with pololu.com terminated wires & crimp connector housings, slid onto wirewrap pins, worked great.




It's been a while, but I've made some decent progress on the scoreboard. I've taken it from small breadboard prototype to what will be full size for this project.

You can increase or decrease the score for each team, it will count up to 19 points, the timer can be set from 3:00 to 30:00 minutes.

Here are some pics of the first prototype and the current state. I had the sound working but I managed to blow the speaker so I've got to order another one (or two). Once I've got the sound completely figured out, I'll either need to find a box to put it in or build one. I've also got some sweet arcade buttons to connect up to this, but that will get worked out when I figure out the case.





Here's a quick video showing the scoreboard in operation.