Friday, October 21, 2011

Mixed breed Wise Clock (with I2SD)

The great I2SD board from Wyolum (also introduced here) offers almost everything one needs to make a simple Wise Clock:
  • it's an Arduino with ATmega328 (and FTDI connector);
  • has on-board RTC (DS3231) with backup battery;
  • has on-board SD card (with the 3V3 regulator and voltage level shifter).
In other words, I2SD is equivalent to Arduino + Adafruit Logging shield, but equipped with a better RTC (DS3231 instead of DS1307). And it is much smaller. And cheaper (I think).

One of the essential ingredients in making the clock is the display. I chose to use the simpler 3208 LED display because it requires only 3 wires (CS, WR, DATA) in addition to the Vcc and GND and it's easier to manage in software (requires less code).

Here I show how to connect the I2SD to 0832 display from Sure Electronics.

First, we need to realize that this is a hack. I2SD was not designed to be used as a full-fledged Arduino. Most of the digital pins are not accessible through headers. Well, in our case, we only need access to 3 digital pins. It just happens that D5, D6, D7 and D9 are connected to some test points, basically holes where we can solder wires. It also happens that in other 3208-related sketches, I used these almost same pins as well. So, we will connect the nicely aligned D6, D7 and D9 to DATA (pin 7), WR (pin 5) and CS2 (pin 1), respectively, as shown in the photos.















The rig is a helper for the display connector. If you want to follow the same idea, this is the sequence of actions:
  1. solder the 3 wires to the I2SD board, on the top side;
  2. on the rig board, solder the connector (near the side) and the wires (to pins 1, 5, 7, 15 and 16);
  3. solder the three I2SD wires (D6, D7, D9) to the rig.















It is now time to run the test sketch. It requires a small change in line 31, where we replace 8 with 9 (as I said earlier, we are using the easier-to-access D9 instead of the usual D8).

Note: Make sure you know how to handle the 3208 display you have, since there are two different types (see this post).


Now that Test_3208.pde runs successfully, we will work on integrating the SD card and RTC into the software (which shouldn't be a problem, since I will just copy chunks of tested code from the older sketches). The clock will alternate between displaying the quotes from SD card and displaying the time from RTC. Stay tuned.

PS It's worth mentioning that even with this hack applied, I2SD can still be used as initially intended: none of the headers was taken over and all connectors are still accessible. Nice and clean hack :)


Related posts:

1 comment:

  1. Wow Florin. That is really cool! I am looking forward to the video.

    We "broke out" as many of the pins as there was space for, but you are the first one to use any of them.

    ReplyDelete