“Shy Light” uses Dual ATMEGA 168’s and X10 Control

Here’s the elevator pitch:

An electric lamp doesn’t like anyone to see it when it’s turned on. It hides under a bushel basket and when it’s exposed, it fades out. When the basket is replaced, it lights back up.

This is another project in the series “The Technology of Good Intentions”: these works are intended to focus the viewer on the role of failure in design.

X-10 Modules: Lamp Control (left) and Power Line Interface (right)

The entire assemblage uses two X-10 modules: an PL513 Power Line Interface (PDF) and an LM465-equivalent lamp module. The PL513 provides an interface from the microcontroller to the X-10 protocol, and the LM465 accepts commands (such as dim light and brighten light) to control the light.

Why X-10?

A primary project requirement was the ability to have the microcontroller dim and brighten the lamp on command. I investigated three ways of doing this:

  1. Making a light dimmer using a triac and opto-isolation. This is easier said than done. I found that there are complications, such as buzzing, radio-frequency interference, and of course, safety, since I was playing with 120v AC current. I experimented with triac control using low-voltage AC, and decided it wasn’t worth the effort in trying to overcome the drawbacks just to save a few dollars.
  2. Buying a hardware-store light dimmer switch and using an actuator—such as a servo or stepper motor—to engage the dimming and brightening. At an early stage of the design process, I had decided that the project was much more complicated than I first thought, and I wanted to avoid making it look like a Rube Goldberg device.
  3. Using the X-10 system, which transmits commands through household AC power. The Power Line Interface module uses 4 wires to connect to a 5-volt microcontroller, via a standard RJ11 telephone plug.

I had used the X-10 as an automatic light dimmer years ago, and though I found it sometimes quirky, it worked 95% of the time and was super-safe. Plus, no moving parts were involved. I chose door number three.

How’s It Work?

  1. The overturned basket is closed. The user activates the gadget using a foot-switch.
  2. The switch sends an electrical pulse to a box enclosing two interlinked ATMEGA168 microcontrollers. In this case, the “Master” controller receives the foot-switch signal.
  3. The Master ATMEGA signals the “Slave” controller to direct a servo motor to open the basket. The sole purpose of the Slave controller is to generate the pulse-width modulation commands to the servo motor.
  4. The Master controller also sends a “dim lamp” message to the X-10 power line interface, which is plugged into a 120-volt power wall socket. The interface translates the 5-volt pulse generated by the Master controller into an encoded series of pulses on a 120 kHz carrier wave, on top of the 60 Hz AC power signal.
  5. The commands generated by the X-10 power line interface are received by the X-10 lamp module.
  6. The lamp under the basket dims as the basket opens.

Why TWO Microcontrollers?

The Dual-Microcontroller Circuit: Master (right) Slave (left)

The Master Control microcontroller handles the foot-switch input, orchestrates the timing of the opening/closing of the basket (using commands to the Slave Control unit) and the lamp dimming. Initially, I had no idea that the project would require two; there are enough analog and digital pins on one microcontroller to do it all, but—and I’m not absolutely certain about this because I didn’t keep detailed notes about this—I think that I was forced into a dual processor arrangement because of the complexity of the program timing. As I designed the circuit, I came to the realization that the timing required by the various elements was going to be difficult for me to accomplish as an amateur C-coder if I tried to stuff it all into one controller. So I don’t want to say that “it can’t be done with one chip”. I just decided that it was simpler for me to compartmentalize the various tasks with hardware. So I added another ATMEGA168, at an added cost of about $5.00.

Physical Considerations

The Lamp

6W LED bulb

Before starting the design, I had ordered an LED light bulb from Dealextreme: this 128-LED bulb uses an E27 socket (the familiar screw-in type found in most incandescent and compact fluorescent bulbs) and draws 6 watts. It has a diffusion enclosure that makes it look somewhat like a typical light bulb. This LED bulb was preferable because I wanted the light to stay on under the basket when it was closed. It’s lower current draw resulted in less heating in a small enclosed space. There was only one problem: when combined with the X-10 dimmer, I discovered that this bulb wasn’t fully ‘dimmable’!

After I recovered from this mild disappointment, I elected to use a clear “BT” shaped halogen lamp. Halogens put out a lot of heat, so I had to add a routine to dim the lamp after a short delay whenever the basket covered the lamp. Additionally, although this dimming routine never failed while it was on the testbed, I was concerned that this X-10 ‘dim’ command might, at times, fail to dim the lamp, heating the inside of the basket, causing a fire hazard. So I added a second level of safety: a CDS cell monitors the light level when the basket is fully closed. After the basket closes and the unit goes into idle, the state of the light sensor is polled: if the light level is above a certain level, the X-10 issues an immediate “light off” command. This certainly doesn’t cover all contingencies—especially if the X-10 suddenly fails while the lamp is on—but I’m less concerned about the fire hazard issue now.

Construction Notes
The servo and linkages are bolted together using Meccano hardware. The main hinge that connects the base of the basket with the base is also Meccano: to secure the hinge, I used a dab of thread locker on the bolts. The servo is a heavy-duty unit (SG-5010) that has metal gears and a stall torque of 3kg. As I found in design and testing, this amount of torque is enough to wrap the 17 gauge steel linkage wire around the servo shaft!

The Next Iteration…

The next version, if there is one, will dispense with the X-10 control and use high-powered DC LED illumination. Rather than a light in the centre of the base, I would consider attaching the lighting to the inside of the basket.

View the Shy Light Schematic (PDF), and here’s the Arduino code for the Master and Slave microcontrollers (Github).

Shy Light Mechanical Drawing (PDF)

“Taking Hostages” goes to press

“Taking Hostages: Exercises in Design Détournement” is now online. The 114-page book contains “design fiction” essays by 13 students from the NSCAD Master of Design class of 2012, edited by me, with a foreword.

Design Détournement

The concept of “détournement” comes from Guy Debord, a poet connected with the “Situationist Internationale” that was active in the 1950’s and ’60’s.

For the Situationist, détournement is “plagiarism, where both the source and the meaning of the original work was subverted to create a new work.” (Urban Dictionary) Subsequent forms of détournement have taken the form of “culture jamming”, where standardized commercial and promotional practices are subverted by campaigns such as Adbusters’ “Buy Nothing Day”. I would argue that these approaches are ultimately self-defeating because they are so easily re-integrated into a corporate agenda.

Culture jamming has been quite recently exercised, for example, in the “Hitler meme” of countless YouTube videos using the movie “Downfall”. In these works, a portion of the movie where Hitler rants emotionally about his Generals’ incompetence and perfidy (which is filmed with actors speaking German) is re-subtitled with text that might lead non-German speakers to believe that Hitler tirade is actually about a lost football match, or the use of the “Comic Sans” font in Nazi propaganda, or how to find a tub of ice cream in war-ravaged Berlin. This phenomena gained its counter-culture cred when the movie’s copyright holder exercised “YouTube takedown” actions, only to reverse them a few months later after an extensive internet brouhaha.

Another recent example of contemporary détournement is Limor Fried’s “TV-B-Gone”, which is a powerful infrared TV remote which allows the operator to switch off a television—or otherwise “jam” it—surreptitiously and anonymously from a distance, or her “Wave Bubble”, a (completely illegal to use) RF jammer that prevents cellphone use. These are just a few more current examples of détournement. Designers can and do make use of parody and—as Limor Fried calls it—“design noir”.

The Essays

The work in “Taking Hostages” are speculations which use as their foundations the work of others. They share a purpose to satirize, and not lecture, but their point is not to merely elicit laughter. Nor are they intended to be didactic or by frontal attack attempt to batter down the walls of our credulity. Each work seeks, with subtlety, to “express our indifference toward a meaningless and forgotten original, and concern itself with rendering a certain sublimity.” (Debord, 1967). This book’s design projects and accompanying essays serve to demonstrate the range of speculative concepts that can be released in a single spasm: “Taking Hostages: Exercises in Design Détournement” includes, among others, Joseph Rau’s tree design which lampoons designers’ inability to leave well-enough alone, Hodgkinson and Cianci’s pop-up store for garbage, Martyn Anstice’s hand-crafted newspaper, and Kevin Dahi’s Syrian T-55 tanks, détourned into ambulances.

[issuu width=520 height=200 backgroundColor=%23222222 documentId=120416145645-246b694ac3154a9c9f2047ef66cdb293 name=takinghostages_nscad_mdes2012 username=fire5ign tag=canada unit=px v=2]

Coming soon: Average Clock

This prototype module uses one MAX7219 to drive two clock displays. Size is 6 x 10 cm.

I’ve been working with the freeware version of Cadsoft Eagle and learning how to make my own printed circuit boards, in preparation for a new work in the “Technology of Good Intentions” series: Average Clock. I won’t go into the details, but the workings involve an extraordinary amount of electronic circuitry, so I elected to design it in submodules, using very thin (.25 mm!) double-sided printed circuit boards. After etching, I coat the copper with tin, and the end result looks Soviet-military. I quite like it!