A Heartbroken Lamp




Introduction: A Heartbroken Lamp

Background story:

It's a lamp which enjoys himself. Without human interupt, he opens his lid and listens to his favorite music.

But when people approach to him at a certain distance, due to a bad memory of previous mater, he tries to hide himself by shutting down its lid, turning off the light and music. He completely hide himself from any human beings. What a poor lamp..

Here are materials and instructions that I used. Hope you enjoy it!:)

Step 1: Tools & Materials



Servo motor (X2)

Ultrasonic sensor


LED (Amazlab UB2 LED Retro Bright Idea Lightbulb USB Powered)

USB Type A Female Receptacle Breakout board


Black cardboard

Wooden sticks (X4)

Cable ties

Step 2: Write and Test a Code (Arduino)

First of all, I wrote and tested a code one by one until I got everything work.


When people are away from the lamp

1. Activate a ultarsonic sensor-when the distance is more than 40cm


2. Show 'ON' sign (rotate a servo motor 180 degree from 'NO' sign)

2. Open the lid (rotate another servo motor 90 degree)

3. Turn the LED on

4. Play music track #1

When people apporach to the lamp

1. Activate a ultarsonic sensor-when the distance between the lamp and him/her is less than 40cm


2. Show 'NO' sign (rotate a servor motor -180 degree from 'ON' sign)
3. close the lid(rotate the other servo motor back)

4. Turn off the LED

5. Music off

Step 3: Create a Box & Put Stuff Together

I used a light material, a cardboard, which a servo motor can easily support.

After making a simple box, I drilled holes to put ultrasonic sensor on the front aspect and holes for two servo motors on each side. Servo motors should be firmly attached in order to make the wing ratates, otherwise, the motor itself revoles. Eventually, I put both motors on the surface of the box directly. And for the support, I colored wooden sticks in black and used cable ties to adhere together and used glueguns to fix them firmly.

Making part is not really challenging but figuring out where to attach the servo motors. I'd recommend you to use a hinge machanism (https://www.youtube.com/watch?v=kh252HOZrqc) and try it with a light material if you going to use normal servos. Or you can use any material you want and use DC motors which is more powerful than servo motors.

Step 4: Enjoy!!:)

You can go back and forth in front of the lamp and play!!

Be the First to Share


    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Super-Size Speed Challenge

      Super-Size Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020

    6 Discussions

    DIY Hacks and How Tos

    Fun robot. Have you thought about using a PIR motion sensor. It wouldn't let you make it distance sensitive but it would give you a broader range.


    Reply 2 years ago

    Oh cool, I will look it up! It can be also replaced with an IR sensor:)


    2 years ago

    This Ible rocks on so many levels! A maladjusted robot lamp. Fabulous! Misung, you need to post some more. I may not duplicate your project exactly, but it does inspire me. Thanks!


    Reply 2 years ago

    Thanx for your encouraging comment:) I will try to update soon!

    Alex in NZ
    Alex in NZ

    2 years ago

    Really neat! Thank you for sharing this :-)