When I posted the original prototype of the Clock with Tics, Arduino Forum member mowcius commented that all the wiring and matrix driving could be greatly simplified with the LED matrices from Sure Electronics. While I was aware of the Nanjing-based company, I had not bought anything from them, nor had I seen them in the several electronics supermarkets that I had stumbled upon when I last visited the city.
Long story short: I bought a yellow LED 0832 module on ebay from Sure: they are remarkably cheap, about $9 each. Four of them can be strung together to make a respectable scrolling-message sign. Single units can be easily driven by an Arduino Duemilanove, but you can also buy a driver board that handles the higher current requirements if you need to string several together.
When I received it, I was busy with other matters and I put it aside. When I had a few hours here and there, I pulled it out and tried making the connection with an Arduino. I was not successful in getting past the self-test mode.
Last weekend, while waiting for replacement parts to arrive (also from Sure Electronics, by the way) for my ‘Shy Dildo’ project, I thought I’d attack the problem one last time. I had earlier unsuccessfully scoured the net for references to the 0832 module, but this time, I looked for “HT-1632”, which is the Holtek driver chip that’s used in the Sure module. Bingo!
I found several Arduino libraries that purport to work with HT1632 units. The first one that I successfully connected was from MakeHackVoid; it demonstrated the pin connections between the 0832 and the Arduino, and linked to libraries that enabled the 0832 to do the ‘crawling words’ scrolling thing. I spent most of the weekend playing with the code and re-working the somewhat erratic-looking font that came supplied with it. I could not, however, simply write a static string to the 0832.
Then I found Miles Burton’s library. This library has good documentation, and made it possible for me, a dopey artist, to figure out how to adapt the ‘Clock with Tics’ code from the presentation prototype to the Sure 0832 matrix. The process of getting to this point was complicated by several factors:
- A bad connection in a breadboard hookup wire
- Difficulties in sorting out the five different libraries that I had experimented with during the course of three days.
- A poor understanding (on my part) of the nature of chars and strings. I was unable to get my head around these concepts, and why the C language makes translation between chars and strings (and among other formats) so complicated. The Arduino String Library has limited documentation, and there doesn’t seem to be much in the way of helpful information elsewhere online. I don’t have any formal training in computer programming, and until Arduino I had avoided C.
The circuit for the new model should fit comfortably on one 6x9cm circuit board. I estimate that it is about 90% simpler to assemble. It has an added feature of a CDS (light cell) that allows the display to fade or brighten depending on the ambient light.
Clock with Tics for SURE Source Code (Github)
Clock with Tics for SURE Schematic (PDF)
Clock with Tics by Michael B LeBlanc is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.
Contact the writer for permissions beyond the scope of this license.
Hi,Michael,
I think this project is great so I try to run this with a Sure 0832 display. After studied the code, I found that the name of library: MatrixDisplay.h and the DisplayToolbox.h are not the standard library of Arduino. So I downloaded the libraries on two links : MakeHackVoid and Gaurav Manek as you quoted on web. Both names of libraries are HT1632.h but not the same as MatrixDisplay.h. I have tried to rename it to program used, but failed. Kindly if you can help me to solve this.
Thanks a lot.
Eddie from Hong Kong
Dear Sir,
The library in program is “MatrixDisplay.h and “DisplayToolboox.hk. They are not a standard library in Arduino.
Where can I find them?
I have download the library from the link which you quoted. But the name are not the same as inside program (i.e.: HT1632.h) Is it required to modify it for the program use.
Eddie from Hong Kong
Hi Eddie,
Sorry to take so long to reply: I’ve been working hard on another project and I’m only now getting to your comment. When I was developing this project I was confused by the fact that there are several libraries that claim to do the same thing.
However, if you download the code from the link at the bottom of the posting you will see that I am using the HT1632.h library in my code; in order to make it compile, you have to find the HT1632.h library (click here to go to it) and drop it into your Arduino libraries directory. I do not use the MatrixDisplay.h or DisplayToolbox.h libraries in this project. Good luck with it!
Hi,Michael
Sorry to bother you again. I downloaded the code from the link at the bottom of the posting. “clock_with_tics_4sure.zip” contain only the pde file without any library. Below is the beginning of the code:
==========================
/*
Clock With Tics 4Sure Version 007
uses 0832 LED Matrix Display from Sure Electronics
June 2011
by Michael B. LeBlanc
NSCAD University
MatrixDisplay and DisplayToolbox from Gaurav Manek
https://github.com/gauravmm/HT1632-for-Arduino
*/
#include “TimedAction.h”
// ***** Timedaction stuff *****
TimedAction blinkAction = TimedAction(1000,blink);
#define ledPin 13
boolean ledState = false;
// ***** SURE 0832 stuff *****
#include “MatrixDisplay.h”
#include “DisplayToolbox.h”
#include “font.h”
…………………….
====================================
Refer to the link above, it only got “ht1632.h” not the “MatrixDisplay.h”.
Kindly if you can teach me how to correct this discrepancy.
Thanks for your patient.
Hi Eddie,
I apologize… I was looking at the code for the Media Circus project which also uses the 0832, but different libraries. I will correct the code that I’ve posted, but in the meantime, the MatrixDisplay and DisplayToolbox libraries are here:
https://github.com/solexious/MatrixDisplay
I hope this helps!
-Michael
Hi, Michael,
By setting up the connection as follow:
sure Arduino MEGA8P
—- ——- ——
#3(CS1) D4 #6
#5(WR) D11 #17
#7(DATA) D10 #16
I regret to inform you that my 0832 LED is still not working, although I downloaded the “MatrixDisplay.h” from the link.
Also, I have tried the example in the library and get the same result.
However, I really thanks for your generous sharing for such a great project.
If, I say if possible, please amend the program by using HT1632 library as your another brilliant project: Media Circus.
On the other hand, would you mind to tell me how to control the text scrolling speed? Thanks.
Eddie from Hong Kong
Hi Eddie,
I’ve just rebuilt a clock “from scratch” and can confirm that the schematic and the code is working, at least for me, using a Seeeduino using an ATMEGA168.
You have the correct connections between the ATMEGA and the SURE 0832 unit.
I can tell you that the MatrixDisplay library at the Miles Burton site is identical to the one that I use.
Can you tell me what exactly is not working? For example, can you get the display to light up at all? Does it compile and load onto the ATMEGA chip?
Unfortunately, the library that I use for Media Circus scrolls the text, and it is not possible to force the text to remain static using that library.
-Michael
Dear Sir,
The library in program is “MatrixDisplay.h and “DisplayToolboox.hk. They are not a standard library in Arduino.
Where can I find them?
I have download the library from the link which you quoted. But the name are not the same as inside program (i.e.: HT1632.h) Is it required to modify it for the program use.
Jack from Hong Kong
Hi Jack,
I apologize for not replying sooner. I think that the correct library is here: https://github.com/solexious/MatrixDisplay. I was doing this a long time ago and I may have gotten my libraries confused with another library for another project. I hope this helps. By the way, I see that your email belongs to an LED manufacturer in Shenzhen. Last year I visited a large and very impressive new complex of many LED companies in northwest Foshan called “Bright City”– have you been there?