Life Clock

Schematics can be found here:
Imgur

You can also find a few more photos of the project in the same photo set.

I should mention that the LED matrix I used is UVP2788, or GMA4688C. These are not pin-to-pin compatible with the RG 8x8 matrix sold by sparkfun. By looking at the photos posted by Mr. BroHogan I can tell that the matrix I used is not compatible with the one he used (pins on mine's are shifted by one).

The matrix/display board/shield is being manufactured by seeedstudio. They may offer it for sale on their site. I did not receive mine yet, so I don't know if it will be final or needs adjustments.

The clock (DS1307) is on another protoshield (not yet built). In my prototype I used a small DS1307 evaluation kit bought from wulfden (you can see the wires for the clock in one of the photos).

With all the current functionality, the code takes the whole flash memory of the atmega168 (I actually had to move things around when I realized that some weird behaviour was caused by memory being (almost) full).

The next steps would be:

  • h/w:
  1. get the displayed text messages through wi-fi (I just acquired a cheap fonera box);
  2. tengu (need to use an audio amplifier, probably on the same protoshield as the clock);
  • s/w:
  1. sleep function for the display (woke up by command from remote);
  2. 8 channel audio spectrum VU meter (use the same circuitry from tengu (mic, amp), but may need some more h/w (filter ICs));

For the above features, I plan to switch to atmega 328 (already ordered from adafruit).

florinc,

Very nice! I like that you did it with 74HC595's instead of the MAX.

Just a thought regarding the memory issue, if you haven't considered it. For $2 and a few wires you can add an I2C 256K EEPROM to store your fonts, messages, reminders, tengu faces etc. I found that it's quite fast enough to pull this stuff out of EEPROM realtime.

I was also looking into adding a mic driven VU meter / tengu - sensitive to 3 frequency bands. (Did you bug my basement?) I was experimenting with Sparkfun's LM4970 breakout (http://www.sparkfun.com/commerce/product_info.php?products_id=8247) with inverters and filters to get the PWM that represented the 3 frequency bands back to the Arduino via an I2C ADC. I got very close, but all that analog stuff was frustrating.

I wonder if anyone knows of a nice chip that splits audio into 3 bands and outputs them as analog voltages?

Anyway, you now have a nice I/O platform (viewable at a distance) that you can do all sorts of things with. Enjoy :slight_smile:

FWIMW - http://farm4.static.flickr.com/3114/2628485492_85b7963e37.jpg and http://farm4.static.flickr.com/3103/2628485440_ca0a7db0fd.jpg

Mr. BroHogan,
Thank you for your nice comments.
You must have put quite a bit of work (and skill) in that beautiful cherry wood case. I myself used an empty box of Ferrero-Roche chocolates. Another case I am thinking of using is a glass dome, usually used for displaying pocket watches (I bought one from ebay, did not receive it yet).

The good thing about using 74HC595 is the price. The bad thing is that most of the digital outputs are used, there is no room for other add-ins like an ethernet card (for wi-fi I am going to use the serial communication pins).

I have to do the I2C memory, indeed. And I can load it with a book of quotations (256K would cover aprox 128 book pages), for example.

As for the VU meter, check out this chip, MAX7400 (see http://datasheets.maxim-ic.com/en/ds/MAX7400-MAX7407.pdf) that filters audio frequencies based on the clock signal. I did not test it yet myself (I just ordered a sample from maxim). According to specs, filtering should be handled through software.

I am thinking of a novel solution for the power supply. Even though the whole rig takes an average of 15-20 mA, the set of 4 AA batteries dies out rather quickly, in about 20 hours. If I want to add the wireless, they will last much shorter. I am thinking of hanging the whole box from the bulb socket in the ceiling, and eventually make it to rotate (with the remote, of course) for the best reading.

Nice brainstorming session you started here. Thanks. You really stimulated some ideas. I will keep you posted.

PS Wow! If I get it hooked to the bulb socket, then I can also have some X10-based functionality available.

Mr. BroHogan,
A question for you: in your implementation of Conway's game, how do you know when the game ended, so you can switch to displaying the time?

florinc,

Thanks for the tip on the chip! Although a "8th-order low-pass elliptic switched capacitor filter" sounds a little scary, it's definitely worth looking at. :slight_smile:

Re stopping the game, I didn't do a complete job, but I did 3 things:

  • had a max generation count that always stopped after 50 or so generations.
  • checked each generation for >0 leds to light to stop if the colony died.
  • set a flag in "BirthDeath()" that indicates that cells are still being born or dieing. If the flag is not set after leaving the function it's assumed the colony is static.
    Note the above does not catch an alternating static patern. That would be nice, but I got lazy. (The max gen will eventually stop it, but it would be nice not to have a max gen.)

Re: X10, I also added that. (You sure you didn't bug my basement? :slight_smile: ) You can do it wirelessly using this: Arduino Playground - CM17A.
(Take it out of the case, remove the DB9's and use a large shrink tube or tape to make it even smaller.) You can use the IR remote or your clock to turn on lights.

Re: power, I also use a USB wall wart besides batteries. Is your idea like a screw in light fixture that powers a power adapter?

Finally, thanks for your comments on the case. I also enjoy woodworking which fits in nicely with this hobby.

John

Thanks for the X10 link. Total news to me. (I already have an X10 receiver that I use, so I am half way there already :slight_smile:

That's right, a screw-in light fixture, like a light bulb. I think the glass dome I mentioned earlier will fit well in here, but used upside down (with the wooden base part on top, and a light bulb screw attached to it). We would need to find a way to secure the dome to the wooden base. A small power adapter (the "USB wall wart") should fit in the dome as well. I am thinking that even a glass jar can be adapted for the job, and it would be easier to attach the screw to the metal lid.
A servo will be required to rotate the display (to position it for the best viewing).
Also, a set of high intensity LEDs could be installed opposite to the display matrix, and used as directed, remote-controlable, light source. (now that this Arduino contraption is screwed where the old light fixture was).

I see a few challenges that need to be resolved:

  • mic and buzzer are inside the jar/dome/bulb now;
  • IR receiver should be reachable by remote even when the whole thing is rotated 180 degrees and not facing the remote (can you have 2 IR receivers in parallel?);

And, listen to this: if an accelerometer is included (or some positioning sensor), then the contraption can be screwed up in the ceiling (hanging down) or screwed down in a desk lamp, and the display will still show the text in the correct stance.

What do you think?

A bit of an update on the slow progress of my version of "Life Clock" (I could not resist :-[):

  • I switched to atmega 328, $2 more expensive, but lots of memory for future expansions;

  • I was able to store my character set definition (8 bytes per character x 96 characters) in the local eprom (1K now); so now the 24LC256 eprom has only messages (32K, aprox 16 book pages);

  • implemented "sleep mode", through remote control; in sleep mode, the whole thing is taking now 3.5 mA (an off-the-shelf arduino takes at least 15 mA in sleep mode). For this purpose, I had to build a custom arduino board, basically a protoshield (the small/short version) with only the processor on it. I eliminated the power LED (20 mA wasted right there), the FTDI chip, and the voltage regulator and the reset button (I always use a shield that has a reset button).

  • I am still waiting for the LED matrix shields from seeedstudio; they should be available for everyone soon;

I think there would be a need for yet another arduino-compatible board, one similar to Arduino Pro from sparkfun, but with an atmega 328 on it and no LEDs, plus some other provisions for sleep mode.

BroHogan,

Could you send me a copy of the schematics and code? I'm really interested in the code for loading and reading the eeprom for font data. I'm looking at making a sign, but the main part i'm hung up on is the way to take a message and lookup the font data in eeprom. Nice project! :slight_smile:

More progress! Today I received the shields from seeedstudio. Everything worked like a charm, no glitches, no surprises, almost unbelievable!

This is how it looks like:

More photos here:

I added a (poor quality unedited) video as well:

That looks amazing. Great work. I just posted the other day asking for an update on the RainbowDuino http://www.seeedstudio.com/blog/?page_id=187

Can I assume that you are using what will be that product?

Thanks.
I reckoned that using a glass dome would be suitable for a clock. Plus, being transparent, it gives access to the IR receiver.

No, I did not use the seedstudio's RainbowDuino. I designed my own and I got it manufactured by them. (My previous posting has a link to the photo of the little black board, the LED matrix shield).

I can provide more hardware details if you are interested.

Yes, more details please! :slight_smile:

Did they do this for you as a one-off, or are they going to manufacture your design?

Seeedstudio offers this so called "Propaganda PCB service" , check it out at http://www.seeedstudio.com/forge/wikka.php?wakka=Propaganda.
You email them the Eagle board file (must be open source) and they send you 5 boards for $30.

I had the shield for the 8x8 RG LED matrix made by them.
Theoretically, you should be able to buy the boards I designed from their website, although I did not see them posted yet. Just ask. Anyway, I just finished revision 1.1 and I will get it manufactured in bigger batch.

As for the arduino, I used one made on the small prototype shield, since I wanted all the boards in the sandwich to have the same dimensions, and also because I wanted to eliminate some components (from the original arduino) that I did not need and which took some juice out of the batteries. I almost finished the design of this board (waiting to get a few more components). This should be also available soon.

After much thinking, I came to realize that Mr. BroHogan's original "sandwichduino" is the best approach for this kind of project. And coming up with a case is as challenging. The glass dome I used is not cheap, but the cherry case required even more effort, I assume.

The project is still in development, since I plan to add a few more things, as suggested in previous postings here.

Here is a new version of the clock project:

The idea was to be hung on a wall. I had a few options for the case, but they would require some fine work and skills, so I opted for the easiest and quickest, a bent piece of plexiglass (clear acrylic).
The circuitry fits on one custom board. It should have been black, but I forgot to ask when I ordered it.

My friends asked for a larger display. Using the same LED driver circuitry, I replaced the bi-color 8x8 LED matrix with two, single color (red), 8x8 LED matrices. The result is shown below.

(The case, bought from a photo shop, was designed for storing 4x6 photos. It has a hinged glass door, held in place with small magnets. It can be also hung on the wall (this has become an obsession, it seems :'())

wow, i'm impressed. I like how your project got increasingly more complicated!

as a sidenote... any figures in terms of total cost?

The good thing about using 74HC595 is the price. The bad thing is that most of the digital outputs are used, there is no room for other add-ins like an ethernet card

Not sure what you mean by that. You only need 3 pins to drive 74HC595's.

Mike,
My approach uses a combination of 595 (2 pieces) and direct outputs, as shown in the schematic here:
Imgur
I could have used a third 595 to drive the rows and save some 5 outputs.
Since I dropped some "requirements", there are still 3 analog/digital pins available (for alarm/buzzer/x10, for example).
As for the input pins, I only need to use two: one is for IR receiver, one for a redundant push button. I am trying to funnel every user input through the remote control, including setting the time and the alarm.

Regarding the cost: the parts, PCB included, would run between US$60 (digikey) and $75 (sparkfun).

I see. Nice project by the way.