Friday, October 23, 2009

Other "uzes" for Duino644

As mentioned in an earlier post, Duino644 can form the base for an implementation of the Uzebox project. A "uzebox shield" would be plugged in the Duino644 board, much as shields are used with Arduinos. The picture below shows my current effort in trying to get the "uzebox" working. Soldering is done, testing/debugging is next.


A few changes (from the Wise Clock setup) are required:
  • ATmega644 has a different firmware burnt in (not the Arduino/Sanguino bootloader);
  • the microcontroller, nominal frequency of 20MHz, is overclocked at 28.63636 MHz.
Many components on the main board are not necessary (RTC, battery, EEPROM etc). Instead of the LED display (2x8 female header) connectors, the four extension (8 pin female header) connectors are used.

I will post the results of this experiment later. I also plan to design a "uzebox shield" PCB.

On the same note (other uses), it was pointed out by fellow Arduino enthusiast BroHogan, of X10 fame, that the Duino644 is also compatible with his Nex10 board (I am grateful for the link on his page), so it can be used as the base for my next X10 project (following his instructions, obviously).

I will keep you posted on the Nex10 project as well, hopefully I will find the time to do it.

Saturday, October 17, 2009

Duino644 software updates

I was close to giving up on SDuFAT library in favour of FAT16, but my one last attempt worked. I was trying to implement a feature suggested by fellow Arduino blogger BroHogan, to set up the clock using a file on the SD card. Since real time clock is set up quite rarely, this idea makes perfect sense.
Here is how it works:
  • the user creates/copies the file "time.txt", which contains the time, formatted as HH:MM:SS, onto the SD card;
  • after reset, if "time.txt" is found, the clock is set with the given (in the file) time;
  • "time.txt" file is deleted, so the next reset won't find the file anymore;
It is always easier said than done.
Firstly, SDuFAT requires the file to have some characteristics, the most important being to contain a pseudo-EOF (0x03) character.
Secondly, the deletion of the file is not physical, the file does not disappear from the SD card, but it is rather modified so that its first character is the pseudo-EOF (0x03). The "deleted" file can be opened and its content read. The code decides that the file is "deleted" by checking the first character. How smart is that?

setRtcFromSDCard() shown below is the function that gets called in setup().

void setRtcFromSDcard()
{
numSectors = (int) SD.getSectors("time.txt");
if (numSectors == 0)
{
// try again;
delay(500);
numSectors = SD.getSectors("time.txt");
}

if (numSectors == 0)
{
#ifdef _DEBUG_
Serial.println("File time.txt not found.");
#endif

return;
}

// open file time.txt and read its content;
sectorContent = SD.readBytes("time.txt", 0);

// search for the time in the sector buffer;
boolean isTimeFound = false;
for (int i = 0; i<512; i++)
{
if (sectorContent[i] == 0x03)  // EOF
break;

for (int j=0; j<8; j++)
{
timeBuffer[j] = sectorContent[i+j];
}
if (timeBuffer[2] == ':' && timeBuffer[5] == ':')
{
// found the time;
isTimeFound = true;
break;
}
}

if (!isTimeFound)
{
#ifdef _DEBUG_
Serial.println("Could not find time (HH:MM:SS) in file time.txt");
#endif
return;
}

#ifdef _DEBUG_
Serial.print("Time from file is: ");
Serial.println(timeBuffer);
#endif

int hh = 10*(timeBuffer[0]-48) + (timeBuffer[1]-48);
int mm = 10*(timeBuffer[3]-48) + (timeBuffer[4]-48);
int ss = 10*(timeBuffer[6]-48) + (timeBuffer[7]-48);

#ifdef _DEBUG_
Serial.print("RTC time to be set to: ");
Serial.print(hh);
Serial.print(":");
Serial.print(mm);
Serial.print(":");
Serial.println(ss);
#endif

if (hh < 24 && mm < 60 && ss < 60)
{
setTime(hh, mm, ss);
SD.del("time.txt");
}
}


The other software change I made was also the contribution of BroHogan, who wrote (see reply #147) a few functions that perform "fast writes" to the LED display from Sure Electronics. Basically, the calls to digitalWrite() in ht1632_writebits() function have been replaced with calls to fWriteA(). This allows control over the speed of scrolling, ranging from fast to slow, rather than from slow to slower.


Monday, October 12, 2009

New Duino644 kit (revision 1.1)

Thanks for ordering Duino644 kits.
At the moment, all of the "original", revision 1.0 (first batch of) PCBs are gone. In the meantime, I designed an improved version, by adding a few more components, to bring it closer to its intended functionality as the backbone of the Wise Clock:
  • 3 right angle push buttons (for setting up time, snooze, dimming etc);
  • piezo buzzer, for the alarm;
  • bright blue LED, as a background (and power indicator) light;
  • a bit bigger PCB.
This is the schematic for revision 1.1 of Duino644 (download Eagle file here):

and this is the board (download Eagle file here):

To my estimation, I should receive the new PCBs by Oct 20.
Once the new boards are in, I will have to re-price the Duino644 kit to cover the cost of the extra components, essentially increasing it by US$4, to a total of US$58 (free regular shipping to North America) and US$62 (free shipping outside North America) respectively.

The orders placed until then, at the old prices, will be filled with the new design. Consider this as a "promotion" campaign and take advantage of the "reduced" price.

See also:

Friday, September 18, 2009

Buy Duino644 kit


Updated Sep 30, 2011 - DISCONTINUED
This kit is no longer offered. It was replaced by the Wise Clock 3 kit.


Updated Jan 27, 2011
A redesigned (revision 2.1) Duino644 is back in stock. Read more about it here.


Note: Although I added a few more components and I made the board a bit larger, I decided to keep the price unchanged. I hope this is appreciated :)
Also, the picture below won't accurately reflect the actual component set. Missing are the 4 right-angle push buttons (one is replacing the reset button), the micro-speaker and the high brightness blue LED.

I have a few Duino644 kits for sale, on hand and ready to ship. After they are gone, any order will be fulfilled in about 4 weeks time.
Duino644 kits are US$54, with free regular shipping to North America.

For only US$10 more, buy the 2416 LED matrix display from Sure Electronics (ebay), and you can have a nice gadget on your desk to impress your friends an colleagues.

The Duino644 kit includes the following parts:
  • PCB;
  • ATmega644 / 20MHz, with bootloader;
  • either 16 MHz resonator or crystal 16 MHz (plus 2 capacitors 22pF);
  • 40-pin socket for ATmega644;
  • SD card socket (SD card is not included);
  • DS1307 real time clock, either in DIP or SOIC package;
  • 24LC256 EEPROM, either in DIP or SOIC package;
  • 3V coin battery (CR1220 equivalent);
  • battery holder for CR1220;
  • crystal 32,768 Hz;
  • 2 x 16-pin (2x8) female headers;
  • 3 x capacitor 100nF;
  • 78L33 regulator (3V3);
  • 10 x resistor 10K;
  • 3 x resistor 4.7K;
  • micro push button (reset);
  • micro slide switch (power);
  • 6-pin angled male header (FTDI);
  • either USB miniB SMD connector or USB type B connector;
  • infrared receiver;
  • 40-pin female connector;
  • either molex 2-pin angled power connector or JST jack.





















Assembling instructions are published here.

Related posts:

Introducing Duino644

Updated Sep 30, 2011 - DISCONTINUED
This kit is no longer available. A very similar kit is the Wise Clock 3.

A simple name from a simple mind: think Arduino clone powered by ATmega644.

Compatible with Arduino software environment (thanks to the Sanguino board, from which it was inspired), Duino644 offers more capabilities than a regular, ATmega328-based Arduino, in the same price range.

Duino644 was originally designed to be used in an advanced new version of Wise Clock. It features the same combo RTC + EEPROM as Wiseduino, and also an SD card socket and connectors for the 24x16 LED matrix display from Sure Electronics.

Duino644 can also be used as a general-purpose Sanguino-compatible board, having all ports (input/ouput pins) exposed and available for use.

Here are some of Duino644 features:

  • PDIP (40 pin) ATmega644 on socket, running at 16 MHz;
  • compatible with Arduino software environment through the addition of Sanguino libraries;
  • directly pluggable into the 2416 LED display from Sure Electronics;
  • semi-pluggable (just one of the two connectors) into the 0832 LED matrix display from Sure Electronics; display type (2416 or 0832) is selectable through jumper;
  • compatible with uzebox game console (requires a different crystal and the "uzebox shield" (under development));
  • relatively easy to solder, with mostly through hole components;
  • on board socket for either SD card or microSD card;
  • on board RTC (DS1307) in either PDIP or SOIC package;
  • on board EEPROM (24LC256) in either PDIP or SOIC package;
  • 6-pin FTDI connector with automatic reset capability;
  • powered, with regulated 5V only, through either standard 2-pin power connector (MLX-WF02R from molex or JST jack from seeedstudio) or USB (type B or miniB connector);
  • power on/off micro switch, easily accessible on the side;
  • available interrupt output pin from RTC;
  • on board backup battery (CR1220), allowing RTC to keep time even when Duino644 is not powered;
  • infrared receiver for remote control;
  • all 4 ports made available through extension headers, spaced at 0.1" multiples, for use with prototype boards;
  • ISCP6 connector for AVR programming.






















A few Duino644 PCBs are shown in the photo below.












And this is an assembled Duino644, which is the base for Wise4Sure. With the current software, it works exactly like in this video.



















Assembling instructions can be found here.


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


References:

Related posts: