Thursday, December 31, 2009

BulbDial Clock

The idea about an "Indoor Sundial Clock" is not a new one. There are many patent applications filed over the years (some dating back to 70s), describing such devices. It is one of those "how come I didn't think of this" type of ideas - simple yet brilliant. David Friedman of described such device with a nice illustration (he might have come to this idea independently from the other inventors or not, but he is one of the first with a nice visual instead of the boring wording in patent applications). That's how the name of this clock came about - The Bulb Dial Clock. It was only natural, this idea to be picked up by Evil Mad Science and turned into a really nice kit. The kit is based on the Arduino platform, using Atmel AVR controller (ATmega168). When I saw the kit, I knew I had to have it - such a brilliant idea as a very well executed project = a must-have cool gadget!
I ordered the kit from Evil Mad Scientist as soon as it was made available.

The kit quality is simply superb. Extremely high quality PCBs and components! Everything is absolutely "top-notch", including the nice laser-cut enclosure (available in a few different styles). All components are sorted by type in labeled plastic bags and packed very well. Included in the kit are a few spare parts - LEDs and mounting hardware. The manual is not provided with the kit - it is available for download and it can be printed. A few words about the manual - probably the best kit manual I've seen lately (maybe even over-done) and it beats Heathkit! The kit is designed for beginners and the manual even includes a section on soldering. If you never held soldering iron, you should be still OK - just follow the instructions.

The build is straightforward. The most tedious part is installing and aligning the 72 LEDs located on 3 PCBs. This is the main BLUE PCB - it includes 30 blue LEDs for the "seconds hand" as well as the AVR controller and most of the components. The clock has 2 seconds and 2 minutes resolution - in other words - the "seconds" hand moves every 2 seconds and the "minutes" hand - every 2 minutes. This is actually not too bad - imagine dealing with 132 LEDs for full resolution - it would be crazy ! When LEDs are switched on, it can be done with "fading" which gives a nice smooth "analog feel" and makes up for the 2 seconds resolution (it actually interpolates the "in between" state)

There is a connector for accessing and re-programming the ATmega chip. I wish they had provided a socket for the IC in the kit. I felt that it is much safer to play with the firmware if the PIC was socketed, so I added a socket. There is also a provision for an on-board IC voltage regulator should one decides to use non-standard power supply. The design is very simple - ATmega168 chip, crystal oscillator (20ppm), a few current limiting resistors, 3 buttons and a charlieplexed matrix of LEDs. The source code for the firmware is open and the schematics are freely available for download - all in the spirit of the Arduino platform.

This picture shows the main board with the nice "bulbdial" face installed on stand-offs. There is machined gnomon in the center which casts the "shadow hands" The GREEN PCB is for the "minutes" hand and it has 30 green LEDs. The picture also shows the special laser-cut "LED leads forming tool" . All LEDs need to be pointed downward and aligned to produce nice centered hot-spot. There is an alignment mode in the firmware to assist this task. One should gently bend the LEDs. Sometimes it is necessary one of the solder joints of the LED to be heated with the soldering iron, while aligning the LED body in order to reduce the mechanical stress.

This the last of the 3 PCBs - the "hour hand" RED PCB. It has 12 red color LEDs.

The little circular board in the center of the picture is the optional ChronoDot. This board contains a high-accuracy real-time clock (RTC) based on the DS3231 chip. This option improves a lot the accuracy of the Bulbdial clock - without it the clock will drift aprox. +/- 2 min per month. With the ChronoDot, the clock will be accurate to +/- 2 minutes per year. This high accuracy is achieved by the built-in 2ppm Temperature Compensated Crystal Oscillator (TCXO) inside the RTC chip. The ATmega firmware will automatically detect if the ChronoDot is installed and will start using it instead of the software timers. One added benefit of the ChronoDot is the 3V Lithium battery on the back of the PCB (not visible)- it is good for up to 8 years and keeps the time even when the clock is powered down.

This is the completed PCB assembly. The LEDs of each board must be aligned before the next board is added to the stack. Power supply adapter is provided with the kit. The clock can also be powered with the optional programming cable (USB-TTL-5V) but only if the power supply is not connected. There is no ON/OFF switch. The Z (sleep) button is on the bottom side which is not the most convenient place - I wish the buttons were more accessible.

All 3 boards are inter-connected with 10 zero-ohm resistors (jumpers) and held together with threaded stand-offs and stainless steel hardware.

There are 4 modes of operation - Time Displaying Mode, Time Setting Mode, Alignment Mode and Optional Configuration Mode. The modes are selected by pressing and holding combinations of buttons. Once the clock is powered, it goes into Time Displaying Mode. In this mode the Z button is Sleep ( it turns off the display) and "+" and "-" control the brightness level.

There are a few different case styles offered with the kit. The case by itself is an optional item. The enclosure is made of laser-cut acrylic for the front and back faceplates and thin, flexible plastic elements for the sides to create the classic "mantle clock" look.

If all LEDs are properly aligned, the gnomon in the center will cast nice centered shadows in the LED's hot-spots. Because of the height of each LED ring above the face plane and the angle of the LEDs, each of the three shadows has different length much like the hands of a real clock. The kit that I got is with RGB LEDs but it is also offered in a "monochrome version" using only white LEDs for yet another style.

I just couldn't resist the "geeky" look with transparent front plate to show off the internal construction. IMHO it looks very cool, with a futuristic "tech feel"!

There are 7 user-adjustable brightness levels and even a "white balance mode", where the brightness of each color can be adjusted separately. At the highest brightness level the clock could almost serve as a night light. All of the configuration variables are stored in the ATmega's eeprom space. There is also a user-selectable "rear-projection mode" where the movement is reversed (CCW) in order to be viewed through the back if the clock is equipped with a semi-transparent face.

The Bulbidal clock is a fun project and the resulting clock is just beautiful to look at.

Wednesday, December 9, 2009

A very exciting day!

Today, I got the chance to personally meet and chat with the person who is responsible for my career as a computer engineer - the co-founder of Apple Inc. and the engineer who designed the famous Apple I, ][ and III - Steve Wozniak! The guy is practically a legend! Back in the early 80s when I was teenager, I had a poster of him on my wall. Applesoft Basic was my very first programming language! My second one - Assembler for MOS 6502. The first computer hardware I designed was for Apple II. Currently, Steve is the Chief Scientist of Fusion-IO - company creating a revolution in the data storage technology utilizing nano-flash memory. Today, they announced their partnership with IBM as their ioMemory technology will be used in IBM's family of System X servers.

It was only fair to show Steve how the Future meets the Past as I handed him my Apple II CFFA project card - a SSD (Solid State Drive) based on CF card for the Apple II family. This project was developed by Richard Dreher - a firmware engineer at Cray Inc.

This is my CFFA 2.0 card - I have 90% of my entire collection of vintage Apple II software on the CF Card! (yes! games too - who can live without a weekly game of Pac-Man or Space Invaders). The CFFA (Compact Flash For Apple) supports directly ProDos and GS OS partitions and also supports DOS 3.3 volumes via Dos Master.

Well, the card is now officially "Woz" certified! :-) Steve was very impressed with this piece of hardware (tnx Rich!!) but couldn't resist asking me the question - "Why do you guys, do this? What is it about the Apple II?" My answer was - "I hoped that you'll be one of the few who can understand it, Steve".

My collection of Apple IIgs computers - the bottom one is a ROM03 machine. The top one - ROM01, Limited "Woz" edition and now *Ultra* Limited edition with the real signature of the Master!

The "Owner's guide" for my Apple IIgs signed in the spirit of "Apple II Forever" :-)

Saturday, December 5, 2009

N2PK VNA - LLC calibration standard

The RF-IV sensor is very useful for performing measurments of high-Q devices. To improve the accuracy of such measurments, an extra calibration step is required - LLC or Low-Loss Capacitor calibration. It "provides reference of impedance with an accurate 90 degree phase angle in place of the 50 Ohm LOAD standard". A good read about the RF-IV method is this Agilent document. There is also a very informative application note from Agilent about High-Q measurements. MyVNA software allows for this calibration step since ver. 0.47. LLC calibration requires a special calibration standard - capacitor with very low ESR and very high Q (>10 000). Paul, N2PK recommends the use of a few loads which are "impedance of -j50 at the center of frequency range and maybe a 4:1 freq range - i.e. from Fc/2 to 2*Fc" or 3, 10 and 30 MHz for example. "Another option is to use a cap that has about the same reactance as an inductor whose Q is to be measured".
MyVNA software has a built-in model for the ATC 100B series (Porcelain Superchip Multi-layer) capacitors by American Technical Ceramics . These capacitors are ultra-stable, low ESR, High Q and low noise, specifically designed for microwave use. The accuaracy of the capacitance value is not extremely critical since the software allows you to enter the frequency at which the cap is expected to have -j50 impedance and correction can be made there. I followed Paul's example and made 3 calibration standards centered at frequencies close to 3, 10 and 30 Mhz using standard values available by ATC. The construction technique for the standards is exactly the same as the one I used to prepare my other BNC calibration standards (described here).

This picture shows the "30 Mhz LLC standard", using two 47 pF (tolerance 2%) ATC 100B capacitors in parallel for a total value of 94 pF (the impedance is -j50 at proximately 33.85 MHz).