Long Distance Love Lamp
The Love Lamp is a perfect project for you and you're loved one. Build 2 lamps, and then communicate with each other in a fun way. Tap the lamp and the other lamp lights up. If the other lamp is tapped animation is played on both lamps.
Supplies
You will need the following:
ESP32 WEMOS D1 MINI (Or any ESP for that matter, the D1 MINI will fit the 3D print)
2 WS2811B Ledrings with 12 Diodes
2 Capacitive touch sensors
Wires and a soldering iron
+ a 3D printer (You can also make this part out of wood or something else)
Links to buy the parts:
ESP32:
https://www.amazon.de/-/en/KeeYees-Bluetooth-Inter...
WS2811B:
https://www.amazon.de/-/en/QIQN-WS2812-Light-Integ...
Touch Sensor:
Creating the Main Hardware
This part is the hardest part and that's why we will start with that.
You will need all the stuff you ordered.
There are 2 parts. the Touch sensor, and the led ring.
The touch sensor will need 3 wires that are around 14 cm long.
The led ring will also need 3 wires but they should only be 4 cm long.
Connect the 2 positive and negative wires together from the sensor and LED. Solder the positive to VCC and the negative to GND. Now you have 2 data wires left. Connect the touch sensor to D17 or IO17 (depends on the board) and Connect the Led to D26 or IO26.
Now all connections are made and it is time for programming.
The Programming
Download the files from below:
There are 2 files. A Lamp file and a Config. It is super important that the config.h file & connection.ino is in the same directory as the LoveLamp.ino file. Otherwise, the program won't work.
To get the 2 lamps to communicate we are using adafriut io. Its a online webserver where the user can post data points and many other things. We will only be sending (0,1,2) that's all.
Follow the steps below:
- Start by creating a new account.
- Locate "Feed" and create a new feed
- Give it the name "lamp"
We will use this feed later. Now you are done with, the online part. Good Job.
To program the ESP's we will need to change a few things. In the config.h file, insert your WIFI SSID and Password. Then you need to add your Adafruit Name + the feed (In your case, "lamp"). Then you need to define the lamp numbers. There are 2 options, 1 or 2. Lamp 1 needs to be called 1, ofc. To do this change #define LampPart x; in the config file.
This will control what lamp is witch, so name lamp 1, "1" and then change it to "2" when uploading the program for the other lamp.
That's actually all done for the programming.
You may create your own animation and stuff, but that's up to you. just read the comments in the code and you will hopefully understand it.
Print the Parts
Now you need to print the parts. There are 4 parts that you will need to print.
- The Base
- The Defuser
- The Top
- The Small Button
The files can be found on cults3d.com. I haven't made them free, because I have used a lot of time on this project. So I would appreciate the "donation" I have made them the cheapest as possible, so like 0.75$. The design is designed and improved by me. You can find the files here:https://cults3d.com/en/3d-model/home/lovelamp or here: https://www.printables.com/model/873879-valentines-love-lamp
You can print them in whatever material that you wish to. but I used the following:
The Base
- PLA - MAT BLACK
- 0.2 mm pr. layer
The Defuser
- DEVIL PETG - WHITE
- 0.3 mm pr. layer
The Top
- DEVIL PETG - WHITE
- 0.2 mm pr. layer
The Small Button (Not needed)
- PLA - MAT BLACK
- 0.2 mm pr. layer
There is no need for support, the base has an integrated support feature inside it. So no need to add more. Just print the parts.
The parts should fit snugly, but if they don't, you can always use a thin layer of electrical tape around the joins for a better fit. If you wish, you can also, hot-glue the parts together. If you wish to disassemble the lamp, I would recommend just using the tape. that works just fine.
Assembly and Test the Lamps
Now to assembly the lamps. First, place the ESP32 and led-ring inside the base. They should fit perfectly, but to be sure, add some hot-glue, just a little bit around the corners. Then add the defuse part. Now glue the touch sensor inside the top part. and close up the lamp. Add the little button. This should fit perfectly. You can add some superglue to it. to make sure it will stay in place.
Powering the lamp, using a USB micro cable. You will need a 5V power supply or just any phone charger.
When first powering on the lamps, they will light up blue, this means that they are trying to connect to the Adafruit IO. When they are connected, they will blink white twice. Now they are connected and ready to be used.
If this is not happening, you might need to change something in the code. go back and see if you have written something wrong. Otherwise, contact me at quizendesigns@gmail.com or just write a comment.
If you have anything to improve, let me know.