Introduction: Crazy Modular Lamp

The concept is to create a unique modular lamp that the users will configure as they like, taking advantage of the specific space they want to use. The lamp will be dimmable and controlled by touch. The modular use of this lamp is closing the circuit using the interchangeable bulbs.


Copper Tape Red


Copper wire

Copper mesh


Metal Tape

Hot glue gun and glue


Unstripped Wire


Ultrasonic Sensor

Round Force-Sensitive Resistor (FSR)

10k and 220 Ohm resistors

Solder + soldering iron




Step 1: Creating the Power Connections and Wires

To begin you have to set up the connector between the Arduino and the lamp.

In this case magnets are a great choice to make the power current flow and to have a detachable power cord.

You should have a complete power cable and then cut the two ends close to the Arduino end of the cable. By exploring the cable colors attach a magnet to each one of them and aisle (in this case with a lego piece) each one so they don't touch each other.

Now do the same with the other end of the cable so you can complete the power flow.

Tip: please be aware of the color setting and the direction to plug the cable.

Step 2: Exploring the Circuit

Now, explore the circuit with a bread board, following the structure in the pictures, assemble and test the circuit with a breadboard before you use the copper tape and soldering iron.

Tip: For the force sensor will use a 10K resistor and for the LED a the 220 resistor.

Step 3: Creating the Structure and Bulbs

To create the structure use your imagination, you should have 3 main things in mind.

1. The enclosure should have enough space for the arduino and circuit.

2. The enclose should have an easy access to the circuit.

3. The Structure should have a holder for the bulbs carrying positive and negative current from the circuit to close the circuit.

Use the wood and the materials you want to create the main enclosure and base for the lamp. You can use the shape of this lamp to have a idea for your design.

Step 4: Setting Up the Code

Use the example code to configure your circuit and the Arduino.

#include "SR04.h"
#define TRIG_PIN 12#define ECHO_PIN 13 SR04 sr04 = SR04(ECHO_PIN,TRIG_PIN); long a; const int sensorPin = A0; const int ledPin = 9; int fadeValue ; int value;

void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); }

void loop() {

value = analogRead(sensorPin); Serial.println(value); value = map(value, 0, 1023, 0, 255); while(value>1 && value<255){ a=sr04.Distance(); Serial.print(a); Serial.println("cm"); delay(100); if(a==3){ analogWrite(ledPin, 0); } if(a==8){ analogWrite(ledPin, 10); } if(a==12){ analogWrite(ledPin, 60); } if(a==18){ analogWrite(ledPin, 100); } if(a==22){ analogWrite(ledPin, 180); } if(a==30 ){ analogWrite(ledPin, 255); }



Step 5: Setting Up the Finished Lamp

Now that you have the structure and the bulbs you can set up the lamp. Remember:

1. The touch button allow the sensor to start reading.

2. The dimmer is controlled by your hand , if its close to the lamp it will turn off, if is further the light will be brighter.

3. You can change the bulbs at any time.

Tip: Remember that the LED bulb has a side (positive and negative).

Step 6: Enjoy Your New Decoration Feature

Place your lamp in your house and enjoy your new home made decoration feature.