Sunday, February 7, 2010

Introducing the "Dual bi-color LED matrix shield"...

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


Updated Dec 18, 2010
A newer and better revision of the "Dual LED matrix shield" is available. Check it out here.
As of today, instead of the rotary encoder, the kit includes an infrared receiver, a tilt switch and two right-angle push buttons (see photos here).


... or, in other words, an Arduino shield that has two side-by-side, red-and-green 8x8 LED matrices. As probably everybody in the Arduino community knows by now, the most straightforward way to drive all these LEDs is through shift registers, specifically 74HC595. Which is exactly the way this shield is built: it has 4 of the 595 chip, each driving 8 columns of the same color. The 8 rows are connected to 8 output pins of Arduino (3, 7-13) through the ULN2803 transistor array.

The schematic is shown below (download Eagle file here).


This is the layout of the board (download Eagle file here).


The two LED matrices cover the components on the board and they get plugged into machined female headers for sturdy and reliable contact.

The LED matrix is UVP-2788 (datasheet here) and its internal circuit diagram looks like this:



This shield is used as part of the IllyClock. Originally it was designed to accommodate a push button and an infrared receiver, but these two components were dropped for an external (not on-board, but connected through wires) rotary encoder with push button.

You can buy the dual matrix shield here, as a kit containing the following parts (as seen in the photo below):

  • PCB;
  • two 8x8 bi-color bright LED matrices (side is 47mm or 1 7/8" in length, 5mm LEDs);
  • 4 x 74HC595 shift registers;
  • ULN2803;
  • 4 x 16-pin socket;
  • 32 resistors;
  • 4 decoupling capacitors (100nF);
  • 4 x 12-pin machined female headers;
  • 40-pin male header;
  • rotary encoder with push button and knob (not pictured).

(US$35, free regular shipping to North America)

(US$40, free regular shipping outside North America)



Creative Commons License
This work by FlorinC is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.


Related postings:

Friday, February 5, 2010

Introducing IllyClock - alarm clock in a coffee can

Updated Aug 3/2011
Check out the "minimalist" version here.




Borrowing from Ladyada's idea of encasing the MintyBoost in an Altoids tin box, I thought that a coffee can, Illy in particular, would make a good enclosure for an alarm clock.

The electronics is based on Wiseduino (Arduino clone with DS1307 real time clock on board), with a LED matrix shield sitting on top. The shield is built with 74HC595 shift registers that drive two bi-color (red, green, and orange by subtraction) 8x8 LED matrices.

The clock uses a rotary encoder with button as the only user input.
The functionality is simple and intuitive:
  • time is shown as hour and minutes;
  • clicking the button will show, using the symbol of a bell, the state of the alarm (enabled or disabled);
  • double clicking the button will show the alarm time and allow the user to set the alarm hour and alarm minutes (toggle between the two by clicking the button); increment the numbers by rotating the knob;
  • holding down the button will allow the user to set the time;
And here is an original feature: three hours before the alarm will sound, the time is shown in orange; one hour before the alarm will sound, the time is shown in red. So just by squinting at the clock, one can realize how much longer one can sleep.

Here it is in action:


A few details on the dual matrix shield can be found below.
(I will dedicate another post to this shield though.)





The shield was originally designed (as it is shown in the schematic above) to be equipped with an infrared receiver and a push button. "Hacking" it to take a rotary encoder instead is trivial.

The diagram below shows how the user can change the clock's state by either rotating the encoder or pushing the button.





Related:

Wednesday, February 3, 2010

Wise Clock 2 software release for February 2010

Updated Apr 1/2010
Here are a few things to consider when using the "Wise Clock 2" library:
  • make sure your boards.txt file describes the version of ATmega644 you have (644 or 644P); if you use the wrong description, you will get a "wrong signature" error when uploading the sketch;
  • in Arduino IDE 18, you may get a compilation error related to "main.o"; if that happens, copy the main.cpp file from hardware/... /arduino to hardware/.../sanguino;
  • line 48 in Wise4Sure.pde sketch (#define _GREEN_DISPLAY_) needs to be enabled/disabled according to the display you want to use; if you use a red display, then comment that line out;
  • there seems to be multiple versions of the Tone library; you may even have one already installed; in case you get an error related to Tone library, leave only the version coming with the Wise Clock 2 library (which is tested and confirmed working).

I uploaded a new release of the Wise Clock 2 software, which can be found here.

It includes support for the new, green, LED display from Sure Electronics, which has the display memory organized differently than the red one (I could not find a reason they would do that; just for the sake of change?).

It also includes a bug fix: parameters (scrolling speed, brightness etc) retrieved from the RAM of a fresh RTC (that is, they were never saved there), came back with bogus values (of course, how obvious was that?). The latest release detects this case and saves the default parameters before retrieving them.

I will soon post a video of the green display in action.

Tuesday, January 26, 2010

What a difference...

... can a header/connector make.
Until today I used to plug the 8x8 LED matrices into these cheap and ubiquitous 40-pin female headers:
The round and thin pins of the LED matrices won't fit snugly the wide gaps of the above female headers. These headers are designed to work best, I strongly suspect, with the thick rectangular pins of the, also ubiquitous and cheap, 40-pin male header:


My LED matrices did not make firm contact when plugged into the above pictured female headers. Even scarier, every little touch seemed to affect the contacts, regardless of my efforts to find an easy solution (bend outwards the matrix pins a bit, thicken them with solder, insert them as deep as I could etc).

The final and permanent solution was to replace those headers altogether, with these round machined female pins:

They are a bit more expensive, but make a huge difference in terms of firmness of the contact.
They are also shorter, bringing the LED matrix closer to the board. That requires some attention when sockets are to be used: they should be either inside or outside the matrix package itself.
(Unfortunately I am talking from experience, since I had to remove a socket which was spread under two matrices.)


A different topic, but under the same umbrella of lessons learned: buying and using USB adapter power sources.
To shorten the story, this is the conclusion: when you buy such an USB adapter, never assume the output is 5V and just plug it into your expensive device!
Out of about 10 I bought on ebay, shipped from their manufacturers in China, 2 of them output 9V, way above the expected 5V. Although not statistically accurate (is there such a thing?), this is a 20% failure rate. Before plugging it on, always measure the output voltage to make sure it is what you expect.

Saturday, January 16, 2010

Complete "Wise Clock 2" kit for sale


Updated May 5, 2011
The "Complete Wise Clock 2 kit" is DISCONTINUED due to the lack of displays from Sure Electronics. If you have your own 2416 display, you can still buy the Duino644 board to make the Wise Clock 2.




Updated Jan 27, 2011
"Wise Clock 2 complete kit" is back in stock. The Duino644 board is re-designed, with the following changes for revision 2.1:
  • the real time clock can be either DS1307 (and crystal) or DS3231;
  • the on-board EEPROM (which was not used by the software) was eliminated;
  • the voltage dividers with resistors were replaced with 74125 gates;
The price remains the same (US$88 with free shipping, see below) for the DS1307 version. The version with DS3231 is $5 more.
Read more about Duino644 revision 2.1 here.


Updated Jan 1/2011
"Wise Clock 2 complete kit" is currently out of stock. It will be available again around the end of January 2011.


Updated June 17/2010
Starting today, "Wise Clock 2 complete kit" has the ATmega644P microcontroller loaded with the latest version of the "Wise Clock 2" software (this is on top of the bootloader, of course). This means that after assembling it, there is no need for ATmega644P chip to be programmed anymore; this eliminates the need for FTDI cable, Arduino IDE, code download, compilation, upload, and greatly simplifies the construction of the clock. (Obviously, the software can be changed/upgraded any time through the FTDI connector).

I recently received a batch of laser-cut acrylic covers designed as enclosures for the Wise Clock 2.
I decided to offer for sale a few complete Wise Clock 2 kits, which include:
  1. microcontroller board: Duino644 kit;
  2. display: red 16x24 LED matrix, from Sure Electronics;
  3. enclosure: 2 laser-cut acrylic plates, plus the auxiliary hardware (spacers, nuts, screws).
You can buy them for US$84, shipped free to any destination in North America.


 (US$88, free shipping to North America; I only ship to North America)

The assembled Wise Clock 2 should look pretty close to this one:


Note: Wise4Sure is the obsolete name for the Duino644 board. Duino644 can be used independently of the display from Sure Electronics, for example as the base for uzebox game console.


The photo below shows the content of the kit.




Assembling instructions are provided in this step-by-step "instructable".


In summary, Wise Clock 2 can currently (with the latest software release) do the following:
  • display current time;
  • read a user-editable file from SD card and display its content as quotations (hence the name "Wise Clock");
  • display current date;
  • set/trigger/sound/enable/disable alarm;
  • controllable from a Sony TV remote control;
  • user-selectable brightness for the high visibility display;
  • user-selectable speed for the scrolling text.