Pages

Monday, April 4, 2011

Pieces of Eight


Seven is supposed to be the perfect number. It can be found throughout history in almost every religion and culture: the seven-day week of the Christian calendar, the seven heavens of Islam, the seven worlds and seas of Hinduism, the seven branches in a Menorah, the seven lucky Gods of Japanese mythology, and even the seven-fingered, seven-toed Irish hero, Cú Chulainn. For over 4000 years of recorded human history, seven's dominance has remained largely uncontested. That is until the dawning of the second half of the 20th century, when a new number gradually began gaining support from the most unlikely members of society. We call ourselves Computer Scientists; and our number is eight.


Mostly importantly, there are eight bits in one byte (four bits in a nibble), which is also two cubed. So what? Well, lets just say, computers like two's. And so people who like computers also like two's. Computers are also more efficient at working with numbers that are powers of two. For example, to count eight numbers (0-7) you need three bits, count just one more, and you'll need a fourth. But why did we choose eight, not four, or sixteen, or thirty-two? Officially AT&T set the standard in the 1960's when they used 8-bit characters on their long-distance digital telephony service. But personally, I think its because its the option that can most easily be counted with ten fingers. Interestingly, the smurfs have eight fingers exactly.

Although a computer scientist's preference for the number eight is clearly very logical, we often take it to entirely illogical levels. For example, I will rarely use a gym locker that is not numbered a multiple of eight, or if push comes to shove, is not in the form of 2^n - 1. Taking that into consideration, it should come as no surprise that the number eight often heavily influences the things that I create. Regular readers of my blog will know that a major, ongoing project of mine is the design and construction of a computer-controlled, incandescent light-bulb chandelier (read my previous posts regarding my chandelier: On the Glowing of Bulbs and Dim Flickers of Progress ). This particular project is no exception, as almost everything has become a multiple of eight. Firstly, the chandelier will consist of eight independent groups of eight bulbs in each. This comes to a grand total of sixty-four (8 x 8) light bulbs, each one glowing at one of the 256 (2^8) allowable brightness levels, and resulting in a combined peak current of 8 amps :) My last prototype could only control a single bulb, which simply ramped up and down in brightness. So the next step in achieving my 64-bulb behemoth was to improve my prototype so that it was capable of randomly undulating the brightness of the eight independent bulbs subsets. I have recently succeeded in adding this functionality to the prototype, and below is a short video demonstration of the device:



This second-generation prototype consists of four modules: the eight incandescent light-bulbs themselves (pictured at the top of the post), the AC driver unit that delivers power to the bulbs, the Arduino-powered micro-controller unit that handles all the digital logic, and lastly, the user-control unit that allows the user to set the brightness, speed and variation of the system.


Pictured above is the AC driver unit. It is essentially eight copies of the triac-controlled dimmer circuit that I describe in detail in Dim Flickers of Progress . However, new additions include an unregulated 7-11v DC power supply, and eight resettable poly-switch fuses on each channel.


Observant readers will notice that I have replaced the ATMEL GT16-based micro-processor board with the popular Arduino Uno board pictured above. Arduino is an open-source electronics prototyping platform (based on the ATMEL AVR family of chips), and it is quickly becoming the standard in DIY micro-electronics. So far I am very impressed with the platform's processing power, Apple compatibility, as well as the vast quantity of user-generated documentation available online. If anyone is interested in getting into the hobby of DIY microprocessing, I would highly recommend purchasing yourself one of these great devices. I got mine for R300.00 from Netram Technologies.


The user-controls module simply consists of three 10kΩ potentiometers, which link to three of the Arduino's analog-to-digital converter channels. I am still undecided as to whether I want the final chandelier to have two or three controls. The three controls used in this prototype offer the greatest flexibility, but I am starting to think that having to set three individual controls every time you adjust the chandelier might be asking too much of the user. Perhaps combining the speed and variation controls into an 'energy' control would be a good compromise.

So that is where the chandelier project stands at the moment. The next thing on the list is to test multiple bulbs connected to each independent subset, to see if the AC driver can handle the higher current load. I am also playing around with throwing human proximity-sensing into the mix, but I will leave that for another post. Thanks for reading.

3 comments:

  1. Interesting. I see the lamps all go at the same rate... wouldnt it have been easier then just to make 1 channel with 8 lamps attached?

    ReplyDelete