Introduction: A Sulky Lamp

About: I am an interaction designer and love physical computing.


I made a lamp that always needs attention. It was inspired by my wife. I am a graduate student so I am always busy with my schoolwork. My wife wants to talk with me when I come home. When I pay little attention to her, she gets sulky, and I walk on eggshells. I put her characteristic into this lamp. To keep turning on the lamp, a user has to wind up a key every one hour. The lamp will turn off when the timer goes to 0 minutes.

If you make this lamp, please treat it well. (Tick-tock sound is a bonus for you.)

Buying lists:

Arduino Nano (ATmega328P)

Basic Desk Lamp

5V 5W USB Light Bulb

USB Type A Female Receptacle Breakout board

Metal Clock Keys

Cooking timer

Hall Effect Sensor (A1301/A1302)

Magnets (6 X 2mm)

Flat Phillips Head Screw 6/32 (2-inch long)

Nuts, 6/32

Step 1: Laser Cut Bottom Part and Disassemble the Lamp

For the bottom part, I designed and cut acrylic panels by using laser cut machine.

Disassemble the lamp.

Step 2: Insert Magnets and Sensor / Connect a USB Lamp

1. Put the hall magnetic sensor in the body part for detecting the magnet on the rotation part.

2. Connect a USB lamp, hall magnetic sensor, and Arduino Nano.

3. Insert magnets in the holes.

Step 3: Code and Schematic

Schematic ^


<p>/////// HALL EFFECT SENSOR ///////////   <br>#define NOFIELD 505L
#define TOMILLIGAUSS 1953L
</p><p>// LED(USB Receptacle Breakout board) to digital pin 3</p><p>int led = 3; </p><p>// Hall effect sensor to analog pin 0</p><p>int hall = A0;</p><p>// The lines below are from <a href="" rel="nofollow"></a> by Rob Tillaart</p><p>int gauss;
int gaussX;
int gauss2;</p><p>
void setup() {
  pinMode(led, OUTPUT);      
  pinMode(hall, INPUT);
}</p><p>void DoMeasurement()
  int raw = analogRead(hall);
  long compensated = raw - NOFIELD;                 // adjust relative to no applied field 
  long gauss = compensated * TOMILLIGAUSS / 1000;   // adjust scale to Gauss
  gaussX = constrain(gauss, 0, 500);
  gauss2 = map(gaussX, 0, 500, 0, 255);
//    Serial.println(raw);</p><p>  analogWrite(led, gauss2);
}</p><p>void loop()

Step 4: Last Step