Thursday, December 5, 2013

Wyolum 3rd annual Innovation Grant - 2013

Are you working on a cool project? Do you want to make $2,000? Share it with the world by open sourcing it and you may win the Wyolum Innovation Grant! Now in its 3rd year!

This is the place to submit your project, find out the rules and deadline, and generally learn more about this generous team of innovators!

Wednesday, December 4, 2013

Eulogy for my Chumby

My beloved Chumby One died today. I first thought to be a software glitch, since the booting seemed to take a long time, then it seemed to re-boot itself after a little while. After a few cold resets, the screen started to literally flash, like the flash of a camera, once every 2 or 3 seconds. Not a good sign. I opened it up, for the first time. Beautiful on the inside too. Regretfully, it does not look like something I could repair.

My Chumby served me faithfully and inspired me (I am not kidding) for the last 4 years or so, mainly as a desk clock . It had all the features I wanted in such a device: fairly sized touch screen, good WiFi, great speaker (bass reflex nonetheless), reasonable radio, rotary encoder for volume (or menu scrolling), backup battery, USB socket, internal SD card for the operating system. In the beginning, the OS allowed for various apps to be downloaded and installed (support was cut after the company went bankrupt). The app-installation process was seamless, comparable with today's Google Play, just earlier. The alarm clock app I used was perfect, with snooze, night dimming, always displaying accurate time (acquired from ntp time server). Other apps I installed showed photos from flickr, displayed RSS streams, played mp3s from USB stick; there was even a piano app that used the touch screen capabilities. Chumby was really a much cheaper alternative to a tablet, with a similarly great potential. Compared to a smart phone, Chumby's only missing feature was the GSM/GPRS, which I bet was considered to be added (since it has a microphone too). I also liked its stable shape, simple design and ease of use (great way to re-connect to the WiFi network too).

I never understood why it did not have a greater success.

Sunday, December 1, 2013

My first impression on Cogwheel Nixie clock

Many months ago I bought, attracted by the clearance price, the PCB for the "Nixie Driver Board Rev A" from "Cogwheel circuit works" store. I was hoping that, with all documentation in place, I would be able to build it on my own, considering it's controlled by an ATmega328 and the software was available, though not the source code.

First thing to note is that the board uses mostly SMDs. If anything went wrong (and there was a high chance, since the PCB was already described as a "mistake the board house made"), the board would become a coaster.

The schematic includes some exotic components, like the HV513 Nixie driver, not offered by digikey. Others are the DS1302 RTC and the optional DS32KHZ oscillator for RTC, which I heard of for the first time. But thanks to the detailed BOM, gathering the components was relatively (some of them are already discontinued, for example) easy.

High voltage for the Nixie tubes is generated by a hardware PWM under software control. So, like the Ice Tube Clock, in order to measure the high voltage and make sure the HV circuitry works, some software must be uploaded onto the processor. I expected the released software to do that. Unfortunately, the highest voltage I saw was under 9V.

After some digging (and learning in the process), I ended up with this simple sketch, adapted from Satashnik Nixie clock, which generates a stable 190V. I know, I was surprised too :)

#include "Arduino.h"

#define BV2(a,b) (_BV(a)|_BV(b))
#define BV6(a,b,c,d,e,f) (_BV(a)|_BV(b)|_BV(c)|_BV(d)|_BV(e)|_BV(f))
#define VOLTAGE_WASTE   370                     //!< ~180V
#define VOLTAGE_SAVE    355                     //!< ~170V

volatile uint16_t voltage; 
static volatile uint16_t voltage_setpoint = VOLTAGE_WASTE;
static const uint16_t ocr1a_reload = 60;

void pump_init()
    // set fast pwm mode
    // COM1A1:0 = 10, clear oc1a on compare match, set at top
    // COM1B1:0 = 00, normal port operation
    // no FOC
    // WGM11:10 (WGM = Fast PWM, TOP=ICR1: 1110) = 11
    TCCR1A = BV2(COM1A1, WGM11);
    TCCR1B = BV2(WGM13,  WGM12);
    OCR1A = ocr1a_reload; 
    ICR1 = 170;
    TCCR1B |= _BV(CS10); // clk/1 (16MHz)
    DDRHVPUMP |= BV2(1,2);

void adc_init()
    voltage = 0;
    // PORTA.6 is the feedback input, AREF = AREF pin
    ADMUX = 6;  
    // ADC enable, autotrigger, interrupt enable, prescaler = 111 (divide by 32)
    ADCSRA |= _BV(ADSC); 

/// Start voltage booster
void voltage_start()

    voltage = (voltage + ADC) / 2;
    if (voltage < voltage_setpoint) {
        OCR1A = ocr1a_reload;
    } else {
        OCR1A = 0;

void setup()
    voltage_start();        // start HV generation    

void loop()
  // clock functionality in here;

The next big step is to write the software to drive the tubes and actually show the time, which is essentially re-writing the Cogwheel Nixie clock code (or at least the basic functionality) from scratch. Then open source it. Any help would be appreciated :)