Showing posts with label Wise Clock. Show all posts
Showing posts with label Wise Clock. Show all posts

Wednesday, January 18, 2012

MixiClock - 4 digits displayed on 8x8 LED matrix

So far, on a 8x8 LED matrix, I have only seen the time displayed with scrolling numbers (beside the geeky binary/hex/tix/dice/dots/bars or other coded formats). There is simply not enough room to statically display 4 digits at once, since the tiniest set of human-readable digits can be defined in a grid not smaller than 3x5 pixels.

I challenged myself to find an intuitive way to display 4 digits on the "standard" 8x8 matrix. I figured that this is possible if using 2 colors. Even though they may overlap a bit (quite literally), digits of different colors can be easily distinguished. This is because the overlap makes a third color: in the case of the bi-color (red/green) LED matrix, it will be orange.

I focused on two aspects:
  • font definition (3x5) as simple as possible, with minimal number of "on" pixels, but still readable;
// tiny 3x5 digits;
byte digit[10][5] = {
  {2, 5, 5, 5, 2},  // 0
  {1, 1, 1, 1, 1},  // 1
  {6, 1, 2, 4, 7},  // 2
  {7, 1, 2, 1, 6},  // 3
  {4, 5, 7, 1, 1},  // 4
  {7, 4, 7, 1, 6},  // 5
  {3, 4, 7, 5, 2},  // 6
  {7, 1, 2, 4, 4},  // 7
  {7, 5, 2, 5, 7},  // 8
  {2, 5, 7, 1, 6},  // 9
};
  • optimal placement of the digits on the 8x8 matrix, so the overlap is minimal (sometimes 1 pixel, very rarely 2 pixels). The photo below shows the starting point. There is more tweaking of the positions in the code, depending on the combination of digits.
















As for the name, there are not too many choices, most of them are already taken, so I hastily settled for "MixiClock" (I am open to suggestions though :).

The sketch, written for my 8x8 bi-color LED matrix shield (also used in the original glass-domed Wise Clock) can be downloaded from here. It should be easy to adapt it to any other RG 8x8 LED matrix. The code also features setting up the clock using two buttons.
















As you may have guessed, the top digits (green) indicate the hours, the bottom ones (red) the minutes. The position of the digits changes slightly depending on the combinations, so that there is no overlap or it is minimal (max 2 pixels, and those will be orange). The code is not final and I am sure it can be improved.

As always, comments and suggestions are welcome.

Sunday, January 1, 2012

Old projects revisited

I recently had to revisit the (original, glass domed) WiseClock and the SillyClock.

On WiseClock I streamlined the software (download from here) to only show the time and quotes. It also allows the time to be set from buttons as opposed to the Sony TV remote control (the Reset button on the 8x8 LED matrix shield was re-purposed/re-routed). As well, the character set is now defined in progmem as opposed to internal microcontroller EEPROM (font1.h contains the font definition).
The method I chose for setting the time is to show the hours in red and the minutes in green, and alternate between hours and minutes by pressing the left button (now named "Set"). The left button (the former "Reset") is now named "Inc" and connected to A2/D16 (a pull-up 10k resistor is also required), as shown in the photo.















This button is used for incrementing the hours or minutes. Once the right time is set, the clock will revert to displaying the scrolling quotes and time.

On SillyClock, the software (download from here) can now handle the tilt switch (on the "Dual RG bi-color LED matrix shield") and also sound the alarm.
Two hardware hacks are required:
  • addition of a pull-up 10k resistor on A0;
  • addition of a piezo buzzer between A1 and ground.

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:

Thursday, September 17, 2009

Assembling the "LED matrix shield" kit

Updated May 16, 2011
Fellow Arduino fan Scott graciously offered this PDF version of the assembling instructions.


Updated Feb 17/2010
The content of the "LED matrix shield" kit was slightly changed: the 40-pin female header used as socket for the LED matrix is now replaced with two 12-pin machined female headers, making a much better quality connector, suitable for the thin pins of the LED matrix.
Since these new headers are not as high, the IC sockets, if soldered, would impede on the complete insertion of the LED matrix in the headers; therefore, they have been dropped.

The LED matrix shield for Wise Clock kit includes the following components (also shown in the photo):



Like Wiseduino, the LED matrix shield kit requires some basic soldering skills.
One of the most important aspects of correctly assembling the kit is paying attention to the orientation of the ICs and the LED matrix. The ICs must be positioned to match their notches with those on the silkscreen. Pin 1 (and also Pin 13) of the LED matrix are clearly marked on the silkscreen. To eliminate any doubt I also hand-wrote the pin numbers on the back of the LED matrix.

Following are the steps for assembling the board:
  1. cut the male headers in 4 pieces (two 8 pins, two 6 pins) and solder them in their right places; the easiest way to perform the soldering is to insert the pins into the Arduino extension connectors, like you had a shield in place already;
  2. solder the two 12-pin headers;
  3. solder each 100 ohm resistor after placing it vertically (bend one terminal 180 degrees);
  4. place and solder the 2 push buttons;
  5. solder the remaining 2 resistors, R17 (10K) and R19 (100 ohms);
  6. solder the infrared receiver, then bend it 90 degrees so it becomes parallel to the board and also sticks out a bit;
  7. insert the 3 ICs, matching their notches with those on the silkscreen, then solder them (before inserting them, don't forget to bend their pins, as shown here);
  8. solder the 2 decoupling capacitors (100nF);
  9. carefully insert the LED matrix, paying attention to its orientation (the pin numbers are hand-written on the back, for easier identification).
In the end, the assembled LED matrix shield should look like this (shown plugged into Wiseduino):




The code for Wise Clock can be viewed and downloaded here.

Related posts:

Wednesday, September 16, 2009

Wise Clock sketch

In essence, what the Wise Clock sketch (download from here) does is to display, by scrolling from right to left, two pieces of information:
  • the current time, retrieved from a real time clock (RTC) and
  • a quotation (a one-liner piece of text) retrieved from an external EEPROM.

Some auxiliary functionality offered by the sketch:
  • allows user interaction through a Sony TV remote control and through the "Menu" push button (useful when testing or when the remote is not at hand);
  • displays selectable menu items;
  • sleep mode (turn display off);
  • time could be set through the remote control;
  • uses different colors for display.

Troubleshooting the Wiseduino board

One of the most common problem reported when building an Arduino-clone (not necessarily Wiseduino) is the failure to communicate with the board, that is, the sketch cannot be uploaded.

Here are a few things to check in this case.

- make sure the polarity is correct: the 5V and GND pins in the power connector are indicated in silkscreen;
- measure the current taken by the board; this would give an indication if there is a short somewhere; normally, when only the Wiseduino board is powered (no shields attached), the
consumption should not be higher than 30-50 mA, at most;
- the power switch must have the "lever" towards the female headers to power the board;
- the batteries must be rechargeables (1.2V each, making about 4.8V together); 4 regular AA (new) batteries would provide at least 6V, a bit too much for the ICs;
- make sure the FTDI cable is inserted correctly: ground (black wire) closer to the female headers;
- are the ICs properly inserted into their sockets (so that the notches match, see the photos for assembly instructions)?


A lot more explanations should be provided, no doubt. Your comments, observations, issues are welcome. Also, your contribution to the development and refinement of this code is appreciated.

Related posts:

Buy LED matrix shield kit - DISCONTINUED

Updated Sep 29, 2011
Check out the newest LED matrix shield here.


Updated Sep 1, 2011
As of today, this kit is no longer offered, since I ran out of LED matrices. If you are still interested in the PCBs (because you already have a compatible LED matrix, for example, or maybe you just want to adapt a similar one), drop me a line.


Updated Feb 16/2010
The 40-pin female header, meant as a socket for the LED matrix, was replaced with two 12-pin machined female headers (see this posting), a much better solution. In the same time, since these headers are shorter, the LED matrix will be closer to the board, touching on the ICs underneath. Therefore, I eliminated the 3 IC sockets, since they do not make sense anymore.
Also, the 220 ohms resistor was replaced with a 110 ohms.


Here you can order a kit of the LED matrix shield for Arduino.
Paired with Wiseduino, which has on board RTC (real time clock) DS1307 and EEPROM 24LC256, it makes the Wise Clock.
(Please check out The Shoppe for more kits.)


The LED matrix shield kit includes the following components:
  • PCB, black;
  • 8x8 bi-color (red + green) LED matrix, medium size (47 x 47 mm);
  • 2 x 74HC595 shift registers with 2 x 16 pin sockets;
  • ULN2803A with 18 pin socket;
  • 17 x 110 ohm resistor;
  • 2 x micro push button;
  • 220 ohm resistor;
  • 10K resistor;
  • 2 x 100nF capacitor;
  • 40 pin female header; 2 x 12-pin machined round female header;
  • 40 pin male header;
  • infrared receiver.














Schematic can be downloaded here (Eagle file).














Board layout (download Eagle file here)

















Assembling instructions are here.



















See related posts:

Sunday, September 6, 2009

Assembling Duino644

This the schematic (download Eagle file) for Duino644 revision 1.1 (Oct/09)

and the board (download Eagle file):

If you bought the Duino644 kit, you received the following components:
  • PCB with the SD card socket soldered on it;
  • ATmega644 microcontroller and its 40-pin socket;
  • DS1307 real time controller, in either 8-pin DIP (with a socket) or SOIC (surface mounted) package;
  • 24LC256 EEPROM, in either 8-pin DIP (with a socket) or SOIC (surface mounted) package;
  • CR1220 (or equivalent) coin battery;
  • coin battery holder;
  • either a 16MHz crystal and 2 capacitors 22pF, or a 16MHz resonator;
  • crystal 32,768Hz for RTC;
  • 4 right angled push buttons;
  • micro-speaker;
  • high intensity blue LED (SMD, 1206 package);
  • USB miniB-type connector;
  • JSP 2-pin jack;
  • JST 2-pin power connector (with red-black cables soldered);
  • 2 female headers 2x8 pins;
  • 40-pin female header;
  • L78L33 voltage regulator (3V3);
  • infrared receiver IC;
  • 6-pin right angled male header (FTDI connector);
  • 3 decoupling 100nF capacitor;
  • 2x3 pin male header (ICSP connector);
  • 10 resistor 10K;
  • 3 resistor 4K7;
  • resistor 75R.
As with the other kits, soldering the components is not for absolut beginners: this should not be the first kit you assemble. The challenge comes from the few SMD components. Although these are the biggest SMD (surface mounted) packages you will find (SOIC for ICs, 1206 for LED, and the USB miniB), you would still need, depending on your experience, tweezers, de-soldering braid, flux pen.

So here is how we should proceed with the assembling.

1. Solder the USB miniB connector first. Place the connector with its bumps in its holes, so it fits in its place. Then solder the 4 outside extremities to the pads, so it becomes solidly attached to the board. Now solder the 5 pins, with disregard to the bridges that may occur. The next step should be to remove those bridges with the braid.

2. Solder the 75 ohm resistor in its place (R14). This is the current limiting resistor for the LED.

Note: The kit has 3 color-coded resistor values: 10K (brown, black, orange, gold), 4K7 (yellow, purple, black, brown, brown) and 75 ohm (purple, green, black, gold, brown). To simplify identification for those who don't want to consult the color-code chart, use the following photo.


3. Next, solder the SMD LED. The cathode of the LED is marked (green dot, visible through magnifying glass). The cathode is marked on the PCB as well, with 3 dots. Melt some solder on the cathode pad; place the LED's cathode over that pad and solder it; then solder the anode.

4. Time to check that the board gets power from USB, by plugging in the USB cable. The LED should become bright blue. We have ignition!

5. Perform this step if you have the SMD (surface mounted) version of the RTC and/or EEPROM. For best results, moist their pads with a flux pen before you solder them. Avoid using the "de-soldering braid" to remove the eventual bridges, since these are temperature sensitive, unlike the USB connector soldered earlier. (Pay attention to the orientation of these chips: the dots marking pin 1 must be closer to the bottom of the PCB.)

6. Solder the 4K7 resistors (yellow, purple, black, brown, brown), R5, R6 and R7. Then continue with the remaining resistors, all 10K.

7. Solder the IC sockets, for ATmega644, RTC and EEPROM (if the last two were provided). Pay attention to their orientation, so that their notches match the notch in the silkscreen (this is not vital, but it will help later to correctly place the ICs).

8. Solder the two crystals (16MHz and 32768Hz), then the capacitors (C1 and C2 are 22pF, the rest are 100nF). The 16MHz (bigger) crystal goes in the three-hole spot (center is not used) close to the pins 11-13 of the microcontroller. Latest PCB version has this spot marked "XTAL".

9. Solder the battery holder. (I personally cut the 3 bumps underneath, so it gets closer to the board.). Then solder the ISCP (optional) and FTDI connectors.

10. Solder the 4 right-angle push buttons, the micro-speaker and the JSP (power) jack. Continue with soldering the 2 LED display connectors (2x8 female headers).

11. Solder the 3V3 regulator after placing it to match the silkscreen.

12. Insert the ATmega644 chip in its socket, then the RTC and the EEPROM (if you have the DIP version). Pay attention to their orientation, by matching the notches on the IC with the notches in the socket (if they were placed correctly in step 7 :) Also, remember to bend their pins just a tiny bit, on a hard surface (e.g. desk) to make them parallel, as so nicely documented in many of ladyada's instructionals (including this one).

13. Optionally, solder the infrared receiver. (This part should be visible to the remote control. Therefore, its final place will be dictated by the enclosure. Depending on that, it may be necessary for the infrared receiver to be "extended" with some wires.)
Pay attention to its orientation: when inserted, the bump should be facing inwards, toward the board. To be visible by the remote control, the IR receiver should also stick out from behind the LED display, so it would need to be bent 90 degrees, as shown in the photo below.

It has been suggested (thanks Mowcius) that a 3-pin female header can be soldered in place of the IR receiver. This will act as a socket, eliminating the risk of soldering the part wrongly, as it happened in a few instances. More, it will allow for the cables to be unplugged when the device need to be dis-assembled (assuming that the IR receiver is fixed to the enclosure).


At this point, Duino644 is assembled and ready for testing (continue here).
It should look pretty close to the one below (which is missing a few non-essential parts).

Sunday, August 30, 2009

Testing Wiseduino - EEPROM

This is the second post related to the testing of Wiseduino. The first one talked about RTC and it started by showing how to correctly plug in the FTDI cable or the FTDI breakout.

Now lets move on, to the external EEPROM, a 24LC256 memory chip, with a capacity of 32KB. It is connected on I2C (analog 4 and 5) and uses the Wire library to talk with the microcontroller.

We will test the EEPROM by loading some text from a file. This is how this works: a program on the PC reads the text file and sends the characters to Wiseduino, which, in turn, is running a sketch that reads the incoming characters and saves them to EEPROM.

Download the sketch here.

Some VBscript code is included at the bottom of the pde file. Cut and paste that VBscript code into its own file, and name it writeFileToCom.vbs, for example (the extension vbs is mandatory). (This is tested and working on Windows. On Linux or Mac OSX, this script needs to be re-written.)

How this works was explained earlier, in this post.

With the eeprom_quotes.pde sketch uploaded, Wiseduino waits for characters to be received from the PC. Now execute the writeFileToCom.vbs VBscript by double clicking on the file (Windows associates the file with its script engine, wscript.exe).
The VBscript opens the file C:\docs\quotes.txt, reads 10 characters at a time, then sends them over the serial port, until the end of file is reached.
Two things are required in preparation for the text transfer:

  1. create the C:\docs\quotes.txt text file (or download this file to c:/docs);
  2. in the VBscript, change the COM port number from COM7 to the one you are using;

The process of transferring the content of the file takes about 10 minutes for a 32KB of text at a baud rate of 9600.

We check that the text was saved correctly in the EEPROM by reading its content. We will use the same eeprom_quotes.pde to read data from EEPROM. To do this, open the serial monitor, then type "\l" (backslash, lower l) in its input box and hit "Send" button. The bottom window should start displaying the lines of text stored in the EEPROM.


Related posts:

Testing Wiseduino - Real Time Clock

Updated Oct 4, 2010
The most recent version of Wiseduino has pin 4 of the FTDI connector wired to Vcc (5V). Therefore, when the FTDI connector is plugged in, the board is powered.

With the Wiseduino board assembled, we can start testing it by uploading some sketches.

To upload the sketches, you would need the FTDI cable or the FTDI breakout.
Make sure that the FTDI cable or the FTDI breakout are plugged in correctly, as shown in the photos below.





















Also, make sure the board is connected to power (preferably 4 AA rechargeables) and the power switch is in the upper position, as in the above photos. This is because pin 4 of the FTDI header, with 5V coming from FTDI, is not connected to the board. There were two reasons behind this decision: 1) a switch between the external power and FTDI should have been used, and 2) FTDI cables and breakouts come in 2 flavours, 5V and 3V3.

Never power Wiseduino with more than 5V.
Do not connect the supplied battery snap to a 9V battery because it will damage your Wiseduino. The snap is for battery holders, normally holding 4 AA rechargeables (as in the above photo).


After launching the Arduino IDE, make sure the right board and serial port are selected, as shown in the images below.













Lets start by testing the RTC. First, download this sketch and install it (unzip it) in the arduino/hardware/libraries folder. A new folder, named rtc, will be created, and it will contain the RTC class (courtesy of Arduino playgroung) and the rtc.pde sketch in the examples subfolder.

Load the sketch into Arduino IDE (13 or later). Change the time in setup() function, then compile it and upload it to the board.

The sketch sets the current time into the RTC:


void setup()
{
  Serial.begin(9600);
  RTC.stop();
  RTC.set(DS1307_SEC, 20);
  RTC.set(DS1307_MIN, 49);
  RTC.set(DS1307_HR,  19);
  RTC.set(DS1307_DOW,  4);
  RTC.set(DS1307_DATE,22);
  RTC.set(DS1307_MTH,  1);
  RTC.set(DS1307_YR,   9);
  RTC.start();
}

then, almost every second, it retrieves the time from the RTC and it displays to the serial monitor:

void loop()
{
  updateTimeBuffer();
  delay(1000);
}


void updateTimeBuffer()
{
  int rtc[7];
  RTC.get(rtc, true);


  int second = rtc[0];
  int minute = rtc[1];
  int hour   = rtc[2];
  int day    = rtc[4];
  int month  = rtc[5];
  int year   = rtc[6];


  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.print(second);
  Serial.println("");
}

After uploading the above sketch once, the RTC has the current time and it will keep the time even when the Wiseduino board is not powered (due to the onboard backup battery). Now, modify the rtc.pde sketch by commenting out all lines in setup(), except Serial.begin. This will ensure that the microcontroller does not set the RTC every time the board is reset or powered.

Next, let's play with the EEPROM.

Related posts:

Sunday, July 26, 2009

The shoppe


Here are a few original kits you can buy from us. They are all open source, with schematics, board layout and software freely available.

Wise Clock 4 complete kit - US$125 US$115, free shipping to North America
Has support for wireless devices with an XBee footprint (XBee, Bluetooth, WiFi etc).
Includes everything needed to build the clock in the left photo except the SD card and USB cable (ask if you need those).


Wise Clock 4 kit - US$67 US$57, free shipping to North America

Includes the PCB and all parts to build the board in the left photo.





HDSP-2534 clock kit - US$40, free shipping to North America

Includes the PCB and all electronic components to build the clock in the photo. The phone dock/cradle is not included.




ProMini bubble clock shield - US$18, free shipping to North America

This kit includes mostly SMD parts to build the ProMini clock shield in the photo. Use your own ProMini.






ProMini OLED clock shield - US$30, free shipping to North America

This kit includes the parts, some SMD, some through-hole, to build the OLED clock shield shown in the left photo. Use your own ProMini.




WiFiChron alarm clock kit - US$47 w/o case /$61 with case

Make a desktop/nightstand alarm clock with WiFi capabilities.
Could be customized (through adapters) for other types of similar displays.





6-character alphanumeric Arduino shield kit - US$26 (free shipping to North America)

Quickly and easily add alphanumeric display capabilities to your Arduino projects.





wsduino - Arduino-compatible with on-board RTC and XBee support - US$27 (free shipping to North America)

Make a clock with no extra shields.






More stuff:

        The following have been discontinued and are no longer available. I may still have one or two laying around, so please ask if you really need any.
            • Wiseduino+ kit - Arduino-compatible featuring extremely accurate real time clock DS3231 - 

            Buy Wise Clock kit

            Updated May 14, 2011
            This kit is DISCONTINUED due to the availability (and affordability) of glass domes. You can still build this project if you provide your own 4" (height ) x 3" (width) glass dome (found on ebay). To complete the WiseClock, you will need the Wiseduino kit and the LED matrix shield kit.



            Wise Clock kit, ready to be assembled; requires soldering, of course.


             (US$79, free shipping in North America)

             (US$83, free shipping outside North America)


            The Wise Clock kit consists of:
            • the Wiseduino kit plus
            • the LED matrix shield kit plus
            • the glass dome case.
            Broken down to the components, this is what you get:
            • Wiseduino PCB;
            • ATmega328P programmed with the bootloader;
            • 28 pin socket for ATmega328P;
            • resonator 16MHz;
            • 24LC256 EEPROM, in either DIP or SOIC package (depending on the availability);
            • DS1307 real time clock, in either DIP or SOIC package (depending on the availability);
            • crystal 32,768 Hz;
            • coin battery holder;
            • 3V coin battery (CR1220 or compatible);
            • 4 x 10K resistor;
            • 4 x 100nF capacitor;
            • 40 pin female header;
            • 10 pin female header;
            • SPDT micro switch;
            • either molex 2-pin angled power connector or JST jack;
            • 6 pin male angled header;
            • Wise Clock LED matrix shield PCB;
            • 8x8 bi-color (red + green) LED matrix;
            • 2 x 74HC595 shift registers with 16 pin sockets ;
            • ULN2803A with 18 pin socket;
            • 16 x 100 ohm resistor;
            • 2 x micro push button;
            • resistor 220 ohm;
            • resistor 10K;
            • 2 x 100nF capacitor;
            • 40 pin female header;
            • 40 pin male header;
            • IR receiver;
            • battery holder for 4 AA rechargeable batteries;
            • battery connector + cable;
            • molex 2-pin female connector;
            • glass dome case.
            Assembling instructions for the Wiseduino kit can be found here and for the LED matrix shield kit here.
            Source code (sketch) can be downloaded here.

            Sunday, July 19, 2009

            Introducing Wiseduino

            Update Feb 15, 2016
            A new revision of this board, now renamed wsduino, is available here.

            Updated Dec 5, 2010
            Wiseduino has reached revision 1.7.


            Updated Oct 30, 2010
            Check out Wiseduino+ here.


            Updated Oct 4, 2010
            A newer and improved version of Wiseduino was introduced here. The main difference is a prototyping area, which can be cut off if desired (and used as a breakout board for a 8-pin SOIC surface mounted IC).


            Wiseduino is an Arduino-compatible microcontroller board, which includes a DS1307 real time clock (RTC) with backup battery, a 24LC256 EEPROM chip and a connector for XBee adapter for wireless communication.

            Wiseduino is completely compatible with the Arduino project software and IDE, and also pin compatible with the existing shields.

            Some of the features are:
            • PDIP ATmega328P on socket, running at 16MHz;
            • fully compatible with Arduino shields;
            • by design, the board accomodates either SMD or through-hole version of DS1307 and 24LC256, respectively;
            • small form factor, the size of the protoshield;
            • 6-pin FTDI connector with automatic reset capability;
            • standard 2-pin power connector (either MLX-WF02R from molex or JST jack from seeedstudio) for externaly regulated 5V;
            • power on/off micro switch, easily accessible on the side;
            • extra row of headers for digital pins, with 0.1" gap, for the use of prototype boards;
            • available interrupt output pin from RTC;
            • the onboard backup battery (CR1220) allows RTC to keep time even when Wiseduino is not powered;
            • minimal power consumption when processor is in sleep mode;
            • XBee adapter can be connected independently of shields, through its own separate connector (normally, the XBee device is required to be on top of the shield stack, to avoid RF "shielding");
            • remote sketch upload through XBee (see "how to" article).

            Schematic

            Circuit Board

            Download Eagle files:
            Shown in this photo is the Wiseduino test PCB (green). The release version will be black.

            This is an assembled (test) Wiseduino.

            Wiseduino is the base for Wise Clock, whose main function is to display scrolling time and quotations on a LED matrix display.

            You can order an Wiseduino kit here or visit The shoppe for more products.


            Creative Commons License
            Wiseduino by FlorinC is licensed under a Creative Commons Attribution-Share Alike 2.5 Generic License. Based on the work at www.arduino.cc.

            Wise4Sure - Wise Clock with LED display from Sure Electronics

            I was finally able to finish the "pre-prototype" of Wise4Sure, the version of Wise Clock that uses a 32x8 LED display from Sure Electronics. These LED matrices are single color (I have seen red, green and yellow so far), have a controller on board (Holtek1632) and can be bought for about US$10 (free shipping). Unbeatable. So, I could not resist the temptation of building Wise Clock around this display. Courtesy of Mr. Bill Westfield ("WestfW") who wrote the demo sketch (see here), displaying to the Sure LED matrix module becomes a trivial task. With a few small modifications (adaptations from the original 24x16 matrix to my 32x8), the sketch worked perfectly.

            Another "improvement" is the introduction of the SD card. Previous versions of Wise Clock stored the text quotations in EEPROM, which had a few inconveniences:
            - there was a limit of 32KB of storage;
            - the process of loading the EEPROM was relatively complex and time consuming.

            Replacing the EEPROM with an SD card solves these inconveniences and offers a few other advantages:
            - quotations (or any message for that matter) can be changed/updated much easier, since it involves only the modification of a text file;
            - quotations can be edited with a PC, directly on the SD card;
            - there is no need to transfer the text, from a file on PC to Arduino, through serial port.

            Integrating the SD card with Wise4Sure was the challenge. From h/w perspective, all SD solutions use the SPI (digital pins 10-13). As for the s/w, I opted for SDuFAT, from Arduino playground. It seems that this library is RAM hungry (I should mention that I did not look at the others, which may be as hungry). A big chunk of RAM, 512 bytes, is taken by the buffer that stores a sector after it is read from SD. (So, I assume that all other libraries should have this buffer as well).

            After I eliminated some variables and functions which I did not use, everything (scrolling quotations) seemed to be working fine. Until I included the code for RTC (DS1307), when the returned time was consistently same bogus value. I narrowed the problem down to, again, memory (RAM) use. I adjusted my own text buffer a million times, until I got the RTC working. You may ask, as I did, what has the RTC got to do with the memory? Well, I can tell you, when the RAM is in "short supply", the time returned from RTC is just wrong (for example, "18:00" at all times). Keep in mind that RAM is consummed by the processor/program stack as well: the more functions are called, and the more parameters are passed, the more RAM is taken.

            I said "pre-prototype" because, as SD card "shield", I used ladyada's Wave Shield. As for Arduino, I used my own Arduino clone, WiseDuino (just came up with the name, it used to be called Wise Clock, but this may lead to confusion). By the way, WiseDuino is now at revision 1.3 and the PCB is being manufactured by seeedstudio. I should be getting some boards soon and it seems that they will be also available for sale, under open source projects, from seeedstudio.com site.

            In the end I got it working, so here it is in action (video).

            The device is currently powered by 4 AA eneloop rechargeable batteries. The measured consumption is around 200 mA (as mentioned, using Wave Shield as SD card module). For practical purposes, this may require a wall wart power supply.

            Next step is to build a real prototype, on perfboard, attached to the LED display board. Basically a whole Arduino, with an RTC and an SD card, with connectors for the LED display (pseudo) "shield".

            Monday, July 6, 2009

            SMD & TH revisited

            Mr. kg4wsv pointed out a potential problem with the latest (revision 1.2) Wise Clock PCB: the SMD pads are "awfully closed" to the 2 DIP pads, so short circuits from accidental solder bridges may occur.
            Although the DRC check passed successfully, a closer look revealed that indeed, the pads are dangerously close.
            I fixed the problem by changing, in their respective libraries, the 2 pads of the DIP ICs, making them "round" instead of "long".
            This is how the latest PCB looks like:

            Saturday, July 4, 2009

            Wise Clock PCB goes SMD & TH

            Finally I succeeded in designing the Wise Clock PCB to accomodate both SMDs and through hole components. Well, not for all ICs, just two of them: DS1307 and 24LC256. Quite a challenge, since full overlapping is not possible (due to the different gauge between pins, although the widths are identical).

            To recap, Wise Clock is an Arduino clone, fully compatible with the existing Arduino shields. Wise Clock offers an RTC (DS1307) with a backup battery, and an EEPROM (24LC256), both connected on I2C pins (analog 4 and 5) of Arduino. Wise Clock is powered by a regulated 5V power supply (2 pin molex connector) and connects to the serial port through the FTDI connector (lower right corner in the image below).

            A new feature of the latest board (version 1.2) is the optional connection with an XBee adapter from adafruit. This is possible through the 10 pin female header at the bottom of the board. The XBee adapter also supplies the 3.3V to the Arduino "3V3" expansion pin. There is also circuitry on the board that allows to remotely reset of the microcontroller and to upload sketches (adapted from the adafruit XBee tutorial).

            Here is how the board looks like. The EEPROM and DS1307 are placed in the upper right corner (the SMDs cover pins 2 and 3 of the TH package).


            Now I could solder on the board either the SMD (cheaper) or the through hole. And since they somehow overlap, there is no chance to mistakenly solder both SMD and TH of the same component.

            Next steps are to order the board and actually build and test it.


            Thursday, April 16, 2009

            Wise Clock

            My first blog posting is about this clock I made, I called it Wise Clock.

            What does it do?
            Mainly, it displays the time on an 8x8 LED matrix display.

            Why is it wise?
            Besides the time, it can also display quotations, intense snippets of text invented by some smart people.

            What else can it do?
            What can one display on a screen with the resolution of 8x8 pixels? Not much: Conway's game of life, audio spectrum analyzer, maybe some animation with moving sprites, a la Space Invaders.

            How practical is it?
            It can be powered by batteries, which can last a few days.
            It can take commands from a TV remote control (infrared).
            It can be turned on and off by the remote control as well, much as a TV can.
            There are plenty of quotations, about 32K worth, so one does not get bored reading the same stuff over and over. Not that there is anything wrong with that (since the repetition is the mother of learning, and throwing quotations in one's discourses is guaranteed to show how smart one is).

            What's inside?
            I started from an Arduino board with atmega 168. I added a shield with the RTC (DS1307) and EEPROM (24LC256). I added a second shield with the led matrix display, with 595 shift registers. Then I combined the Arduino and the RTC shield on one PCB, the size of a small shield. So I ended up with an Arduino "clone" ("clockuino"?), with the display shield on top.
            I upgraded the processor to atmega 328. The character font is now stored in the internal EEPROM. The base board does not have the FTDI chip on it. Connection to the PC is done through the FTDI cable. Also, there is no voltage regulator, since the intention is to power it from 4 AA (rechargeable) batteries.
            I posted the schematics here.

            This is how the base (microcontroler) board looks like:



            and this is how the display shield looks like:




            A video of the Wise Clock in action can be seen here.