Arduino WordClock

I must have been very lucky the first (and only) thing I tried worked for me.
Are you using MAX7219 chips or multiplexing with shift registers and are the LED's 5mm? I used 5mm high brightness white LED's and a couple of MAX7219 chips to keep the brightness up as multiplexing tends to dim the LED's.

I'm using 2 MAX7221 chips, they work great. Apart from that also 5mm high brightness leds, but just using 2 MAX7221s, they don't dim that much... just have to figure out a better solution...

Hiya

where did you get the big stripboard plates ?

Beta1977:
where did you get the big stripboard plates ?

It was hard to find a suitable large stripboard but I got it from here http://uk.farnell.com/vero/01-0042/veroboard-179-07x454-66mm/dp/1536942?Ntt=stripboard enough to make 2x clock (that I did)

The led looks a bit focused. Did you get the diffuse LEDs or not? Diffuse leds can be viewed from a large range of angles. Their plastic housings look rougher than a smooth plastic surface.

liudr:
The led looks a bit focused. Did you get the diffuse LEDs or not? Diffuse leds can be viewed from a large range of angles. Their plastic housings look rougher than a smooth plastic surface.

If this question is directed at me then no I did not use diffused LED's. I used these http://uk.mouser.com/ProductDetail/Cree-Inc/C535A-WJN-CS0V0151/?qs=%2Fha2pyFadugYYN%2FkEaGd5KoOjGvMC7QxGs05ryBegjRuYV232%2FuYlWKl%252b6XNvG2l to get the desired light cone diameter 1.6mm-2mm above the lens.

Sorry, it was for Stijn. I can see small light spots in the middle of each text so a diffuse LED may help illuminate larger portion of the text stencil and make reading it easier.

Hello again Riva,

I'm having a little trouble understanding some parts of the schematic, I added some notes for the questions that I have. http://cncorpmisc.weebly.com/ It's probably obvious and I don't realize it. the one caption is supposed to read "how does this connect"
Klawd

Attached is an image that should make the connections clear.

Great project with really nice outcome! Congrats!!
=)

Hello Riva and everyone,

After almost a year, I finally got some "extra" time to start to build my word clock.
I was revieweing the code to fit my purposes and when I started to search for the MAX 7219 library that is included in your sketch <MAX7219.h>, I found that there are more than one libraries to work with this IC.
There are libraries that support cascading when others don't...
There are libraries with names like LedControl that are also supposed to work with this IC

Can you (or anyone that knows) please give me the link to the MAX7219 library that I should use in this project?

Thank you for any help.

saturno:
Can you (or anyone that knows) please give me the link to the MAX7219 library that I should use in this project?

The libraries I used for this project are in a file called 'WordClock Libraries.zip' attached to post #4
Good luck with the build, both my clocks are still working nicely. The one with the DS3231 is a lot more accurate than the DS1307 version but with code tweaking I have managed to get it within 2 minutes per year time drift.

Hi Riva!

I did missed that link. Thanks for pointing me out.
Actually, the RTC I have available right now for this project is the DS1307 which from your experience is not the best one for this kind of project. I'll change it...

Another thing that I will have to work is the Font. I need to add some "special" characters like ç, é, í, etc...
From my understanding, I need to add their "design" to the Fonts you already included, in the first place. After this, is there anything else that I need to change to be able to use them in a scrolling message?

Still regarding the Fonts, can you explain to me what's the meaning of the last digit/couple of digits defined after each character?
e.g.:

    B11001100, B00000000,	//"
    B11001100, B00000000,
    B11001100, B00000000,
    B00000000, B00000000,
    B00000000, B00000000,
    B00000000, B00000000,
    B00000000, B00000000,
    8,

    B00110011, B00000000,	//#
    B00110011, B00000000,
    B11111111, B11000000,
    B00110011, B00000000,
    B11111111, B11000000,
    B00110011, B00000000,
    B00110011, B00000000,
    12,

I am referring, in this example to the 8 and 12 in the last line of each character. Other characters have different codes.

Once more, thank you for all your help.
When I get something that worth to show, I'll post some pictures.

saturno:
Actually, the RTC I have available right now for this project is the DS1307 which from your experience is not the best one for this kind of project. I'll change it...
You can get reasonably accurate with a DS1307 given a little time. For me the DS1307 was loosing about 8.5 seconds per day (It take several days to get a good average) so I just put in a bit of code to add 8.5 seconds at midnight each day.

Another thing that I will have to work is the Font. I need to add some "special" characters like ç, é, í, etc...
From my understanding, I need to add their "design" to the Fonts you already included, in the first place. After this, is there anything else that I need to change to be able to use them in a scrolling message?
If you want to add the characters into the correct position to match the extended ASCII table then you will need to define all the characters prior to the last one you need or at least put spaces in the chars you don't define else the loadBufferLong code won't work properly (It will also need altering to accept a larger font tabe as it's current upper limit is 0x7F). You could also define the extra characters to replace un-used characters in the current font (things like {}[]|<>).

Still regarding the Fonts, can you explain to me what's the meaning of the last digit/couple of digits defined after each character?
The last number is used for kerning the font character. It is normally the bit number of the right most bit (start counting from the left of the two bytes) + 2 and defines how wide the character is. I have highlighted the right most bits in both examples and you will see the number is the bit position of the widest point (starting with left byte/bit) plus 2 bits.
e.g.:

B11001100, B00000000, //" Bit position 6 (counting from left) highlighted in red
B11001100, B00000000,
B11001100, B00000000,
B00000000, B00000000,
B00000000, B00000000,
B00000000, B00000000,
B00000000, B00000000,
8, // 6+2

B00110011, B00000000, //#
B00110011, B00000000,
B11111111, B11000000, // Bit position 10 (counting from left) highlighted in red
B00110011, B00000000,
B11111111, B11000000,
B00110011, B00000000,
B00110011, B00000000,
12, // 10+2

I am referring, in this example to the 8 and 12 in the last line of each character. Other characters have different codes.

Once more, thank you for all your help.
When I get something that worth to show, I'll post some pictures.
Will be nice to see someone else's work

Superb explanation!

As for the space reserved for the loadBufferLong, I understand that it needs to be increased to allow loading more characters.
Since there are only few characters that I need to add, maybe I'll take your suggestion to replace some of the unused to the ones that I need to add.

Thank you.

Hello Riva,

After several hours around the build of the matrix (mine is 475 x 475 mm), I've just managed to see the result of half of the matrix (just one MAX completely connected by now).
The result is not what I was expecting. Without thinking or questioning, I used the diagram presented in the file "Clock7.pdf" to wire the first max to the arduino and as I can now see, my assumption was not correct.

Here is what I have done:
Since we usually read from left to right, I supposed that since you placed the IC1 at the right side of IC2, the schematic was drawn as seen from the back, i.e. when you see the watch from the front, the IC1 becomes the left and the IC2 on the right; and I wired my matrix exactly as in the schematic. At the moment, only the IC1 that, seen from the back of the watch, it is on the right side (right half) and when we turn around to see the "lights", it is on the left side.

Well the problem is that I missed something and now I have the initial string appearing from the left to the right (wrong) and, even worse all the characters are backwords (like mirrored). To see the characters correctly, I would need to turn around and see the watch from it's back...
(I hope my explanation make sense).

So, the question is: Can I "fix" my matrix without the need of rewiring everything?
What is the correct way to build the matrix?
(I can upload a little video to show you the problem)

Thank you for any help.

saturno:
After several hours around the build of the matrix (mine is 475 x 475 mm), I've just managed to see the result of half of the matrix (just one MAX completely connected by now).
The result is not what I was expecting. Without thinking or questioning, I used the diagram presented in the file "Clock7.pdf" to wire the first max to the arduino and as I can now see, my assumption was not correct.
The schematic was the one I used to build both clocks so should work. It is based on this article. What you may have done (I did it first time) is forget that when your wiring the back of the board the SegX are reversed.
Here is what I have done:
Since we usually read from left to right, I supposed that since you placed the IC1 at the right side of IC2, the schematic was drawn as seen from the back, i.e. when you see the watch from the front, the IC1 becomes the left and the IC2 on the right; and I wired my matrix exactly as in the schematic. At the moment, only the IC1 that, seen from the back of the watch, it is on the right side (right half) and when we turn around to see the "lights", it is on the left side.
I'm not sure what the effect would be with only one chip as the matrix information is cascaded through one MAX into the next from right to left when LED's viewed from the front.

Well the problem is that I missed something and now I have the initial string appearing from the left to the right (wrong) and, even worse all the characters are backwords (like mirrored). To see the characters correctly, I would need to turn around and see the watch from it's back...
All you need to do is reverse the order of the 8/16 SegX pins and it should come good.

That must be my mistake also. I will reverse the SegX wiring.

After some rest, I did a quick test viewing from the back, and everything showed correctly.

Just a quick question: When looking to the watch (front face after ready) what is the side of each IC?
I suppose that IC2 controls the left side of the matrix and the IC1 the right side, correct?

Thank you.

saturno:
Just a quick question: When looking to the watch (front face after ready) what is the side of each IC?
I suppose that IC2 controls the left side of the matrix and the IC1 the right side, correct?

Correct. Looking at the front (clock face) IC1 is on the right and IC2 on the left.

Hi Riva,

After some early matrix wiring "orientation problems", here is a quick video to show you my wordclock matrix.

The base is MDF, CNC machined 20 mm front / 5 mm back holes and since it is 475 x 475 mm I made the electronics independent: i.e.: 1 stripboard for the arduino, 2 stripboards for the MAX7219, 1 stripboard for the rotary encoder and the LDR is directly connected with a three wire cable (I need to see where I am going to place it at the final)
Right now, everything is just wired together and suspended. When I figure how to fix everything to the clock's back, I'll post some pictures.

I had to uncomment the setBrightness function to be able to make the auto-adjustable brightness work. Is there any reason for the function to be disabled in the code? It seems that it is working correctly without any further adjustment...

Working on the translation to see some "meaningful words", I noticed that there are two ways to light up a led:

lc.setRow (0, 0, B01111000)
lc.Setled (0, 1, 2, true)

After some changes I am experiencing some slight flickering when some (already translated) words light up.
When translation, I always used the function: lc.setRow (0, 0, B01111000) as it seemed easier to do the match between the clock face and the code.

Can you explain to me why and when should I use each of these functions?

Thank you

saturno:
After some early matrix wiring "orientation problems", here is a quick video to show you my wordclock matrix.

wordclock PT v0.1 - YouTube
The face looks good. Having access to CNC machine and creating the light wells is a good idea and should make the thing less susceptible to light bleeding from one cell to the next. Hence me having to use bits of black plastic straws.

The base is MDF, CNC machined 20 mm front / 5 mm back holes and since it is 475 x 475 mm I made the electronics independent: i.e.: 1 stripboard for the arduino, 2 stripboards for the MAX7219, 1 stripboard for the rotary encoder and the LDR is directly connected with a three wire cable (I need to see where I am going to place it at the final)
Right now, everything is just wired together and suspended. When I figure how to fix everything to the clock's back, I'll post some pictures.
Will be nice to see some finished pictures. You could probably have mounted all the electronics on one piece of stripboard to reduce the complexity. I don't envy the wiring looms you must have :slight_smile:

I had to uncomment the setBrightness function to be able to make the auto-adjustable brightness work. Is there any reason for the function to be disabled in the code? It seems that it is working correctly without any further adjustment...
setBrightness is still active but I moved it to the doTime routine so it only adjusts every minute as the clock face is changing. I found you could get into a brightness hunting condition sometimes where it originally was. The brightness would adjust every second between two brightness levels and as the MAX chips only have 16 levels you really noticed it.

After some changes I am experiencing some slight flickering when some (already translated) words light up.
When translation, I always used the function: lc.setRow (0, 0, B01111000) as it seemed easier to do the match between the clock face and the code.

Can you explain to me why and when should I use each of these functions?
I would use setRow if no other letters from potential previously illuminated words are in that row else I would use setLed to finish filling the row and then setRow or setLed for the next row if the word spread across more than one row. Your likely getting flickering because your setting a led/filling a row and then another word is using setrow on the same row at a later point and wiping the previous led settings.