Monday, August 30, 2010

Programming DWex

All DWex boards are shipped with the latest software (available here) loaded and tested. The on-board ATmega328 controller has the bootloader already burned in.

I don't expect users ("experimenters" in the case of DWex :) not to modify and improve the code. In fact, I have a long list of TODOs myself. To help speed up the process, here are some tips and heads-up.


1. To upload the sketches, use the 3V3 FTDI breakout board or the 3V3 FTDI cable (remember that the board is designed to work at 3V; it is 5V tolerant though).

2. Use a 6-pin male header between the FTDI cable/breakout and the DWex board, inserted as shown below.















3. Make sure that the "green" wire of the FTDI cable (also marked on the FTDI breakout) goes to the pin marked "Green" on the DWex board.

4. The CR2032 battery must be inserted in the holder when uploading the sketch. The DWex board is not powered from the FTDI cable/breakout (pin 4 of the FTDI header is not connected).

5. In Arduino IDE, select the board as "Lilypad with ATmega328", as shown in the screenshot below.












6. The available pins (not taken by LED matrix and button) are:
  • D11, D12, D13 (MOSI, MISO, SCK respectively) accessible through the ICSP connector;
  • D0, D1 (Rx, Tx respectively) accessible through the FTDI connector;
  • D2, accessible and marked on the board as JP2;
  • D10, not connected to any pad.

7. The second (un-soldered) holder would connect another CR2032 in parallel. Although at the beginning it seemed to boost the power supply, I realized after some research that it may not be a good idea after all. I am still debating on this and I am open to suggestions.

8. With the current code, to set the time, hold the button pressed for 3-4 seconds, until the LEDs light up in circle, one after the other. When the correct time is reached, release the button. The time will then be saved in the RTC. Obviously, this method does not confer the highest accuracy.

9. The state diagram for the current implementation is shown below.

















Related posts:

Sunday, August 29, 2010

DWex - an alternative to Makerbot watch

I always wanted to buy a Makerbot watch, but never had the chance. That's because they were (and still are, at the time of writing) always "out of stock" in the Makerbot store. Then I decided to make my own and better version, called DWex, an acronym for Duino Watch for experimenters (introduced here a while back). I actually borrowed some of the ideas from Makerbot watch, including the round shape :) and the LED arrangement, as two circles of 12 LEDs.

Here is a brief comparison between the two:
  • DWex is based on ATmega328 running at 8MHz (as opposed to 16MHz); that should make it take less juice out of the 3V coin battery;
  • DWex has only one button (as opposed to 3); and even that could be eliminated eventually (replaced with a tilt switch, for example);
  • DWex has 4 fewer LEDs; the way to show the time (software) does not require the extra 4 LEDs of Makerbot watch;
  • DWex spends most of its time in sleep mode (I don't know how Makerbot watch works though, to be honest, but I think time is kept by the ATmega chip itself; therefore, no sleep for it); it only wakes up when the button is pressed, to show the time;
  • DWex is thinner, and that may be due to the much bigger crystal used by Makerbot;
  • DWex does not have a buzzer;
  • Like Makerbot watch, DWex has both the ICSP and FTDI connectors on board, making it an "Arduino environment on your wrist" as well.
  • They both cost the same, US$30 (plus $3 regular shipping to North America). DWex is in stock though. It is real and working.

Some of the features of DWex are:
  • time is shown by lighting/flickering only two LEDs, for hours and minutes;
  • time can be set by the user through the button, without connecting the board to the PC;
  • consumption is 12mA when the time is shown, 120uA when asleep; the CR2032 coin battery should last at least a few months;
  • can be re-programmed to make use of the alarms of on-board DS1337 RTC (this functionality is not implemented, but the hardware capabilities are in place).



 US$33, including regular shipping to North America

 US$36, including regular shipping to anywhere in the world


Related posts:

Friday, August 27, 2010

Nixie clock

I could not resist adding yet another clock to my collection. This one is Nixie, although not Arduino-based. I bought the kit on ebay and assembled it in a couple of hours. It's got a PIC microcontroller and a DS3231 "extremely accurate RTC". In the process I learned that Nixie tubes need around 170V to work, voltage generated by a DC-to-DC converter built with a 555.

Although the schematic is provided, the code is not.

Here are a couple of photos.













The kit did not come with an enclosure, so I mounted the board between two laser-cut acrylic plates.














A wooden (oak) frame should give it a better look. But that's another project in itself.

Sunday, August 1, 2010

Features added to Wise Clock 2

The latest version of Wise Clock 2 includes a couple of new features:
  • displaying UTC time along with local time (menu item UTC); the time zone (for calculating the UTC) is specified in the file time.txt, as follows:
15:18:45Z2010-07-05-1:UTC+05
  • displaying the time in big font (menu item BIG); time will be shown as H12:MM; the digits are defined in grids of 6x12 pixels (file fontBig.h).

The good thing about ATmega644 is that one, apparently, can add code without thinking (yet) of memory limitations.
A few more ideas to follow in the future are:
- display bitmaps loaded from SD card;

The current version defaults to the RED 16x24 display.
If you plan on uploading this version and you have the green display, do not forget to un-comment the line
//#define _GREEN_DISPLAY_
in file ht1632.cpp.


Related posts:
  • Wise Clock 2 - alarm clock with large LED display
  • Duino644 - Sanguino compatible board with extra features