Monday, October 18, 2010
Dim Flickers of Progress
I think I have always been more of a 'thinker' than a 'do-er', and I would suspect that anyone who knows me well enough would say the same. Whether out of pure laziness, or perhaps just a general disinterest, many of the things that I dream-up never get to see the light of day.
I used to rationalise the problem by arguing that the inception, development and final refinement of a design far outweighed its boring practical implementation in terms of creativity. I mean throughout modern-history, it is the work of designers and thinkers that is remembered and celebrated, not the manufacturers. In fact, the manufacturers are relegated to a level just slightly higher than 'un-skilled' labour; uninspired drones who mindlessly implement the illuminated designs of intelligent men. I do not believe that I was the only one who thought this way. Next time you listen to your iPod, or boot up your Mac, look at the back, and read "Designed by Apple in California. Assembled in China."
While the previous rationalisation has worked for me in the past, I have recently started seeing some holes in that argument. Firstly, if a 'design' is defined as: "an outline, sketch, or plan, as of the form and structure of a work of art, an edifice, or a machine to be executed or constructed.", can a design actually exist without the intention of one-day executing or constructing it? Surely without such intentions the design is meaningless, nothing more than an anecdotal thought-experiment of the most abstract kind. And furthermore, to continue to call it a design without the aforementioned intentions is to be dishonest and delusional; in the same way as a person who professes to want to learn another language or take-up swimming, yet scoffs at the necessary sacrifices. To this end, I am making a concerted effort to try and 'do' more of the things that I think. And in fact, one of the primary reasons for starting this blog (and including 'Tinkering' in the title) was to stimulate the conversion of my half-baked schemes into functional existence.
In my last post, 'On the Glowing of Bulbs' I described a computer-controlled chandelier that I wished to build - with about 64 incandescent light-bulbs that would flicker and glow organically. I first came up with that idea well over a year ago, and while I would often think about it and even draw-up some rough design sketches, I did not manage to physically implement anything within the past year. But I am pleased to report that this blog is having an effect on me, as I spent almost the whole of last weekend designing and building my first working prototype. This first prototype only has one bulb, and instead of randomly flickering, its brightness just ramps up-and-down in a simple cycle. But despite these simplifications, it is real, it exists. No longer a mere figment of my imagination, the chandelier has taken its first step to being realised, and I for one am very proud. So proud, that I have included a short video of it working at the top of this post. The rest of this post will be technical design details of the prototype, and so unless you are technically minded, it will seem rather dull and dry writing indeed. So don't feel bad to stop here.
The image above shows the functional units of the dimming prototype (click the image for a larger version). The 3 main blocks (blue) are the micro-controller (uC), the zero-crossing detector (ZCD) and the optically-coupled triac (OCT). The zero-crossing detector outputs a pulse whenever the the AC input crosses (or comes very close to crossing) the 0v level. Since we use 220v 50Hz AC in South Africa, the output of the ZCD is a 100Hz rectangular pulse train, and this output is connected to a hardware interrupt pin on the uC. The OCT uses the signal from one of the output pins on the uC to trigger a triac connected to the AC line. The OCT allows for very accurate timing, and once triggered allows AC current to flow until the next zero-crossing, all the while electrically isolating the uC from the AC current. Within the uC itself, there is a high precision timer running from the internal bus-clock. When this timer times-out it produces an internally wired hardware interrupt.
The next image shows a simplified description of the software running on the uC. When an interrupt caused by the ZCD is detected, the timer is enabled which in turn starts timing-out every 39us (there should be 256 time-outs per zero-cross). Each time-out increments a counting variable, and when this variable equals a precalculated value, the appropriate output pin is driven high. This has the effect of triggering the OCT at a precise time in the AC half-cycle, and thereby it is able to restrict the flow of power to light bulb. Whenever the program is not in an interrupt routine, the main loop utilises all free clock-cycles to calculate new brightness levels. The overall effect of the program is shown in the diagram below, along with all the other waveforms involved in the device (the timeout period of the timer has been extended in the diagram for clarity).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment