trying to build a scoreboard using DMD

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
wazm
Posts: 3
Joined: Wed Jun 08, 2016 2:13 am

trying to build a scoreboard using DMD

Post by wazm » Wed Jun 08, 2016 2:32 am

Hi, Still learning with Arduino but getting there. My aim at the start was to build a scoreboard for our local junior AFL team. I had successfully built one using LED strips and using BCD switches and 4511 decoders but of cause that wasn't good enough and I decided to try and remote control the thing. I looked at the Arduino as it looked perfect and I achieved the remote controlled scoreboard using RF24 wireless modules. However it worked fine in the shed but wasn't bright enough in the sunlight.

Time to move to the DMD. The problems I have are not too big I am sure. The first one is that the RF24 seems to use the same pins as the DMD so I was wondering if the best way would be to use one Arduino to control the RF24 and assemble the string to be displayed and then send that string to another Arduino using serial and that Arduino just controls the DMD. Doing it this way I have the working radio code and I am hoping it will make things simpler.

The code I presently have has a number of variables for the goals and behinds and the score. My question is (I know finally), is this idea feasible and am I best to send the data as a string or create an array and send that then decode at the DMD controlling Arduino and create the text string for display? To start with I was going to just use 2 DMD panels and display just the score for each team and maybe move to 6 panels to display everything once I know it can be done. Any help or advice would be greatly appreciated. Thanks Warren

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Wed Jun 08, 2016 3:59 am

Hi wazm,

I'm actually some way into a very similar project. I'm making a proof of concept for our jAFL club, with a scoreboard which doubles for the cricket club. Work is currently consuming much time so this is only inching forward, but essentially there are several elements I've been working on including 3 custom PCBs which are now I think probably good enough to go.
  • Android app which controls the scoring, knows the game and quarter lengths, and whether the game should show a score on the scoreboard based on the JAFL rules, and has a cricket mode too
  • Timekeeper PCB which receives bluetooth from the Android device and retransmits across the park to the scoreboard using HopeRF69 radio
  • Scoreboard master PCB which receives HopeRF radio and breaks up the received info to each of the display modules, has an ambient light sensor and 2004 character LCD, and also controls the game siren. I have put the siren at this board rather the timekeeper as we have two fields, so can't have both sirens at the clubhouse ideally.
  • Scoreboard display PCB which drives 1-6 DMD panels, based on commands from the master
I've used MIT app inventor for the Android part, and the custom PCBs are ATmega328 based and programmed using Arduino IDE, and designed using KiCad. Comms between the scoreboard master and display modules is serial over simple stereo audio cables at this stage.

My focust to now has been on the app and the hardware, so I'm now creating a demo/test rig with 3 display modules - a 2x2 DMD array for score or game clock, a 1 wide x 2 tall for quarter number, and a 4 wide x 1 tall for team name or other text.

This will be open source entirely, but haven't published any of this on github just yet. More than happy to share what I've done and to collaborate if you think this could work for you. The project is tracked on Trello but mostly to show the club committee the progress.

Cheers!
Geoff

wazm
Posts: 3
Joined: Wed Jun 08, 2016 2:13 am

Re: trying to build a scoreboard using DMD

Post by wazm » Wed Jun 08, 2016 9:19 pm

Hi Geoff,

you are going way above than any of my plans :). I am guessing you may be in Victoria as here in NSW it is rather difficult to get any sort of funding for AFL and so I am doing the most minimal I can, especially I will be funding it myself. My idea was for something that can be moved easily as we can't leave it up as a permanent scoreboard. I have the remote built and working from the previous attempt so just need to incorporate that into the DMD version. Down the track however, I would be very interested in seeing how you go as yours is one I would love to do given the funding and opportunity so please keep me in the loop.

How are you sending the data from the master to the scoreboard display pcb?

Cheers,

warren

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Thu Jun 09, 2016 12:11 am

Hi Warren

Sunny Brisbane here mate. The club has had several quotes for a digital scoreboard ranging up over $20k. This will be actually quite affordable in contrast as the electronics and DMD panel cost is far less than the physical structure they will be housed in.

Serial comms from the master to the display boards is by stereo audio cable, and each display module has a DIP switch to set an address. The 3 cores of these cables carry Serial RX, Serial TX and GND between each board and the next in the chain. Only commands for the address of each module are interpreted, all other traffic is retransmitted to other display slaves downstream.
2016-03-27_17.23.16.jpg
Timekeeper station module. HC06 bluetooth module plugs in from left, commands retransmitted via HopeRF69 module.
2016-03-27_17.19.45.jpg
Master module for the scoreboard with ambient light sensing, HopeRF module, header for I2C character LCD display, screw terminals for solid state relay that runs siren, and serial comms via stereo 3.5mm socket
2016-03-27_17.25.13.jpg
Display (slave) modules that run the DMD arrays
Send me your email addy and I'll hook you up on Trello to see progress. I'm a long way off posting anything to github for this yet but more than happy to share with you where I am at in case there's something you can use.

Cheers!
Geoff

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Thu Jun 09, 2016 2:42 am

The other piece (and the brains of the operation) is the Android application.
Screenshot_2016-01-12-16-56-15.png
Android app at start of AFL game. Press Start Game and that button turns into the game clock. App controls siren at start and end of quarter.
Once you choose the game type, it enforces rules like not showing score for junior games, and having time-on in senior games. For cricket mode, the Goals/Behinds/Total changes to Overs/Wickets/Score and the 3 values are decoupled so score isn't calculated from the others anymore.

Team names are editable, and siren can be triggered manually (with a warning if attempted during an active AFL quarter though).

Still quite a bit of work to be done here, but it's to a stage where I can use it to test and develop the rest.

Geoff

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Thu Jun 09, 2016 2:51 am

I've started this test/demo rig which over the last rainy weekend finally got the 3rd slave module baked and assembled
2016-04-19_22.45.32.jpg
Test/demo rig with one master, 3 slaves
My intention is to mount and cable the master, and include 5V PSU to it beefy enough to run the lot.

Too many other commitments this month, but after this will be ready to get onto finalising the 3 firmwares.

Geoff

wazm
Posts: 3
Joined: Wed Jun 08, 2016 2:13 am

Re: trying to build a scoreboard using DMD

Post by wazm » Tue Jun 14, 2016 9:08 am

Hi Geoff,

I would love to see how you are doing all this. It is so far beyond me that I have no idea. I am grappling with trying to write a simple score to the DMD. I just about have it all the way I want it but after sending the scores to the scoreboard and doing some error checking etc, I am left with an int as a variable. For the life of me I can't work out how to convert that into a string so I can send it to the DMD. I have hScorenum as a number eg:45. I then want to send that to the DMD using something like

dmd.drawString( 1,0,hScorenum, 3, GRAPHICS_NORMAL ); fails but dmd.drawString( 1,0,"4", 3, GRAPHICS_NORMAL ); works.

I have been searching for days but am at a loss. There is something I am just not understanding. Any ideas (anyone)?

Cheers,

Warren

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Tue Jun 14, 2016 9:20 am

Hi Warren

If you're using the original DMD library, the dmd_clock_readout.ino example is very useful for sending a value of known length to the DMD by drawing each character based on modulo maths

Code: Select all

void ShowClockNumbers( unsigned int uiTime, byte bColonOn )
{
   dmd.clearScreen(true);
   dmd.drawChar(  1,  3,'0'+((uiTime%10000)/1000), GRAPHICS_NORMAL );   // thousands
   dmd.drawChar(  8,  3, '0'+((uiTime%1000) /100),  GRAPHICS_NORMAL );   // hundreds
   dmd.drawChar( 17,  3, '0'+((uiTime%100)  /10),   GRAPHICS_NORMAL );   // tens
   dmd.drawChar( 25,  3, '0'+ (uiTime%10),          GRAPHICS_NORMAL );   // units
}
If you're using the DMD2 beta library, the AllDrawingOperations.ino example uses the String type to output the integer n, as simply as this

Code: Select all

dmd.drawString(0,0,String(n));
Cheers!
Geoff

statbat
Posts: 44
Joined: Tue Dec 22, 2015 10:53 am

Re: trying to build a scoreboard using DMD

Post by statbat » Wed Jun 15, 2016 7:39 am

stryker wrote:
2016-03-27_17.25.13.jpg
Display (slave) modules that run the DMD arrays
What is this that controls DMD. I have always used arduino to control the DMD. It is something totally different.

User avatar
stryker
Posts: 268
Joined: Sat Jan 14, 2012 2:44 pm

Re: trying to build a scoreboard using DMD

Post by stryker » Wed Jun 15, 2016 8:06 am

statbat wrote:What is this that controls DMD. I have always used arduino to control the DMD. It is something totally different.
These are PCBs I've designed which combine the ATmega328 microcontroller used on the arduino with the other features needed including the header of the DMDCON for the ribbon cable that goes to the DMD array.

These and the other two custom boards are programmed using the Arduino IDE so are to all intents a custom arduino with all the components needed to do their jobs on the board.

Geoff

Post Reply