Introduction: Modern Tensegrity Lamp
As a Christmas present, I got a power bank from the company I work at. I kind of liked the idea to build a table lamp for our terrace in which I could integrate that power bank. At that time I started to browse instructables to get some impressions of a possible design.
Since I do like the concept of this site - and I have seen the "make it glow" contest, I decided to be a part of this great community and share my first instructable with you.
Please be gentle, it's my first time:-)
To build this lamp you need the following supplies:
- Esp32 microcontroller Aliexpress
- An big enough LiPo battery (10000mAh) Amazon
- An Charger / Power bank module (TP5400) Amazon
- Some Ws2812b LEDs Amazon
- Some female / male pin headers Amazon
- 3V to 5V level shifter Amazon
- Some wood
- Steel cables (copper would look nice also)
- 2mm / 3mm Aluminum sheets
- 8x screw terminals
- 4x 5mm countersunk screws
- 4x 3x15mm countersunk screws
- 1.5mm ferrules
- electrical tape
- Felt glider
- CNC (I would recommend)
- Soldering Iron
- Metal saw
- Japanese saw
- Hot Glue
- wire cutter
- Sketching/CAD Software
- CAM Software
- Arduino IDE
Step 1: Find the Design Step 1 (Define the Goals)
Unfortunately I was not able to find a decent looking lamp that matched with my ideas. So I decided to do a design on my own.
Since this is my first instructable and I actually learned a lot during my work, I would like to share every step with you. If you just want to see the building process, please skip to step 4.
In all my former projects I never went thru such particular designing process, but due to the fact that I wanted to improve my skills, I decided to do so.
First of all, I had to define my goals:
- Table lamp with integrated battery (power bank)
- Small and handy
- Use of ws2812b LEDs
- Possibly IOT / smart home integration
- No dazzling
- Modern design to achieve a high WAF
Step 2: Design Step 2 (Design the Lamp)
I did a bit of research and thought about some possible attempts.
Due to my "goals" I had to make a "base" which included the power bank/battery and the microcontroller. Otherwise I would have to include them somewhere else which would have made the enlightened part bigger.
Also I wanted to have the light more or less shine 360 degrees, but with minimal, or even better, no dazzling.
Therefore the light has to shine from top down or it must be mechanically assured.
During research I came across the tensegrity stuff which I kind of liked and which gave me the possibility to set up a base (with included electronics) and a top layer (with LEDs).
Both elements could be connected via wires to make the electrical connections.
Also it meets at least my idea of a modern design.
An other attempt was a base with a "flame" as enlightened part, but there it would be harder to get rid of dazzling. Also it was not possible to get the 360 degrees without making some design compromises.
So I decided to go with the tensegrity style lamp.
My first sketch consists of a 20cm base to fit everything into, but that wouldn't match with the goal to keep it small. So I had to think about other ways to power up the lamp since the power bank is the biggest part in the base. After some research I ordered myself a small 10000mAh LiPo battery and a fitting charge/supply board which I could easily use.
Therefore it was possible to decrease the size to 16cm which made the whole thing more handy.
Also during "proof of concept" I came across another topic why the use of the Power bank would have another issue.
Step 3: Design Step 3 (proof of Concept)
After I was totally happy with the design idea, I had to make sure that the lamp will function properly.
So I had to do some kind of "proof of concept" to ensure that the electronics will suit my design.
Therefore I set up a test environment which consists of the esp32, 17 ws2812b LEDs and some cables.
I did the following tests:
- Usage of touch sensors
- Wake Up an Deep sleep by touch
- Usage of ws2812b with esp32
- Setting all up with the Power bank
Part one and two were kind of easy due to the great examples in arduino IDE, but as I tried to integrate the ws2812b LEDs, I got some kind of party / disco feeling.
I tried everything I learned in the past regarding ws2812b LEDs, but nothing worked. I searched the internet and found a solution regarding the use of RMT functions.
Anyway, that helped me a lot to go through step three, so time for another issue.
I set up the electronics and hooked everything up to the Power bank, just to see - nothing.
Just the red led of the esp32 was blinking. I first thought of an cabling issue, but was not able to find one. I know that the fast blinking could be caused by a unstable power supply so I tried to connect both devices, the esp32 and the ws2812b LEDs to the both USB outlets of the Power bank. That solved the issue and saved me a lot of headache.
After some testing I have sent the esp32 to deepsleep and went to get a coffee. After about 5 min I came back to play around with my new toy, but I was not able to wake up the esp32 anymore.
At that time a new feature of the Power bank was introduced to me, the ports will be deactivated automatically if no relevant load is attached.
With that "feature" in mind it was way easy to order a smaller LiPo battery and the necessary charge / supply board. After both arrived, I had to set up a new test which was successful, so I was able to start sketching.
Step 4: Sketching
Here is a short one, I promise.
I measured all components and thought about the arrangement in the base. Surely the battery had to be centered and the esp32 had to be below the touch sensors. On the other side the charge / supply board took its place. I decided to use fusion 360 to draw the design since I wanted to create a 3d model later.
Actually I never did...
So I drew the base, top and all the sensor plates in fusion and exported it as DXF. I printed it and noted the depth of the cutouts manually.
Be sure that every cutout is set to the correct depth!
Now it was time to do some cam action :-)
Step 5: Cam Action
My favorite CAM tool is Estlcam from a German developer. I really like the software since it is kind of easy to use for some hobbyists like me and it is very cheap also. You can get a free version of it, but every time you are saving your project you have to wait for some time which can get very annoying.
After I loaded the dxf files I had to set up the tool paths. That can be done very easy by selecting the kind of tool path you want to create (inner or outer) and using the automatic path creation. Sometimes due to my fusion 360 skills it could be that the path must be selected manually, but that is also kind of easy.
In my setup I used the following end mills:
- 32mm face milling cutter
- 1/8 "dual Up/Downcut for the wooden parts
- 30° engraver for the sensor icons
- 1/8" singe upcut for aluminum parts
Since my shapeoko 2 is not that rigid, I had to be a bit conservative regarding speeds and feed rates.
Attached you can find a sketch where I have documented the depth of the pockets.
"K" equals the complete height of the base, so if "K" is assigned it needs to be cut out completely.
Step 6: Machining the Wooden Parts
First I had to flatten the base part, for that I used my 32mm face milling cutter to get a nice and flat finish.
I had to mill just enough material to get nice surface, but leave enough to get the biggest possible height.
After that I turned the part around and used the 1/8 inch Up/Downcut to mill the pockets and the whole part.
I splitted the process to several steps to ensure I won't miss a cut or mix up the depths.
The part where the touch-plates are was cut all the way through, but with a much slower feed rate since I don't wanted to brake the small parts between two plates.
Then I changed to a 2mm drill bit to drill the holes for the steel wire.
The upper part was made in the same way, but first I had to cut a board that had a rough heigth of about 15mm.
That was done with a "japanese saw" and a lot of muscle power...
There I had to flatten both sides, again I used my 32mm face miling cutter. The deeper pockets were made with the 1/8 Up/Downcut and ast but not least I drilled the holes with the 2mm drill bit.
After that I used 220 grit sandpaper to smooth the edges and clean the surface.
Step 7: Machining the Aluminum Parts or "mill, Fail, Repeat..."
Actually that was the second time ever that I used my CNC to mill Aluminum, but the first attempt was way easier since it was a much smaller part.
First I used 3mm Aluminum for the touch-plates. The idea was to put all parts on a single sheet, engrave the icons first and then cut out the rest.
In my first attempt of engraving the icons, my 30 degree engraving bit broke at least 3 times due to the feed rate.
I had to go with ~50% feed rate (about 200mm/min) to engrave the icons.
Afterwards I started te milling with the 1/8 inch Up/Downcut when the issues started...
In the first few moments the bit just dived deeper into the aluminum and the whole machine made a terrible noise so I stopped the process and started to ask myself an google what went wrong.
Using an Up/Downcut seems to be the worst choice on such an machine, so I went ahead and used my last 1/8 inch single Upcut, which actually worked great.
During the process my Laptop came to the conclusion to not work anymore and showed me a Bluescreen.
So I restarted everything and took a new plate of Aluminum and started again.
My 3rd attempt worked fine, but the aluminum was a bit arched in the middle, so my plates came out in a different height. I would suggest to use double sided tape in the future to avoid such an behavior.
Arches and Bottom plate:
Later I used a sheet of 2mm aluminum to mill the middle arches and the bottom cover. I again took the 1/8 inch single Upcut which did an awesome job.
I used a file to smoothen the edges and girt 600 sandpaper to get a nice finish at the aluminum parts.
My milling Parameters:
- 12000RPM Spindle
- Feedrate 400 (or 200 for the engraving)
- 25% rotational milling
- 1mm depth
Step 8: Electronics
To set up the electronic parts, I first did a quick setup on the breadboard as shown in the schematics (image).
I used a 10.000mA LiPo battery, connected to a so called "Power bank module" which consists of a TP5400 charging chip and a "Boost"-converter to get stable 5V to power the ESP32 and the WS2812b LEDs.
The WS2812b LED's are connected to the GPIO32 of the ESP32.
The four touch sensors are connected to Touch inputs 4-7 (GPIO13,12,14,27) of the ESP32.
I had several issues with random flickering of the WS2812b LEDs so I went thru the whole setup again.
Several tests later I added a level shifter which solved the issues. To keep the power consumption low I de-soldered the LED off the level shifter.
All components were masked with electrical tape afterwards.
Due to the height I had to get rid of the USB-A socket on the power bank module, a wire cutter did the job.
Step 9: Coding
Most of the coding was done when I made the "proof of concept", so let me explain the most necessary parts of the code:
Define the Network settings:
#define WIFI_SSID "*********" // WiFi network
#define WIFI_PASSWORD "**********" // WiFi network password
I definitely would suggest to use a static IP so that you can find the lamp for future updates!
Also I changed the Webserver for the Update function to Port 8080, keep that in mind or change it to 80:-)
In my setup, the lamp is reachable via browser "192.168.0.117:8080" to get to the Update page.
Define the WS2812b Settings:
#define LED_PIN 32
#define LED_COUNT 15
#define DEFAULT_COLOR 0xFE821E
#define DEFAULT_BRIGHTNESS 200
#define DEFAULT_SPEED 10688
#define DEFAULT_MODE FX_MODE_STATIC
Set the Threshold value:
int threshold = 40;
To get the best use of Ws2812b it is necessary to use RMT functionality:
Effect Wifi On:
Here you are able to set the effect when wifi is activated:
wifi_on = true;
Once the Lamp is programmed you are able to use OTA-Updates via browser.
I used the great WS2812FX library from "kitesurfer1404", feel free to add other effects / features!
Step 10: Finish the Aluminum and the Base
Process the Aluminum parts.
To make the arches, you have to mark a line 2cm away from one end and drill two mounting holes there. Then drill another hole, 1cm away from the other end for the steel cable. That must be done for both arches.
Use a countersink to fit the screws entirely.
Now the arches must become arches. I marked the middle of both arches and began to bend them to get 1/4 circle with about 10cm radius.
Make sure to bend the correct sides so that the countersinks are on the correct sides!
To ensure that both arches look similar, I clamped both into my wrench and adjusted the angles.
After that part I used sandpaper with grit 600 do get rid of the bending marks.
Then I used a 3mm drill bit to add holes into the baseplate. I first laid the plate on the base to get the points were I'm able to add screws later.
Finish the Base
To finish the base I had to add the hole for the micro-USB socket.
First I marked everything on masking tape and used a 2mm drill to go thru the wood.
Later I used a small file to get the correct size and shape.
Step 11: Further Tasks 2
The four screw terminals needed to be cut in half to save space and to get eight halves. Also I needed to shorten the screws so that the terminals could fit into the 10mm cutouts in the base. That was done with a hacksaw.
After that I soldered wires to 6 screw terminals, 2 times red (5VDC), 2 times black (GND), 2 times blue (DATA).
Two of the screw terminals were used for the arches, so no soldering necessary.
Solder cables to the aluminum touch plates is a bit tricky, but if you are patient, it will work as follows:
- Heat your soldering iron up to 500 degrees celsius and wait until it is hot.
- Use a file to remove the oxide layer
- Quickly use the soldering iron with a big portion of solder to heat the aluminum
- When the solder starts to stick to the aluminum, you can add the cable and wait until the solder is cooled.
After that I hooked all touch plates to the ESP and used to "TouchRead"-Example to see which Threshold-Value I could use.
Step 12: Soldering the LEDs
First I arranged the LED' s in the upper Part to see how many of them I could fit in a propper way.
Please make sure that the LEDs are oriented in the correct way since they all have an "Data In" and "Data Out" Port.
The First LED must be connected to the screw terminals, make sure that the wires are not too long!
- I used a screwdriver to remove possible coating on the copper pads
- After that I put some solder on the pads
- then I soldered the wires to the parts
- I hot glued the LEDs into the wooden part and measured the next cale length and repeted the process
Step 13: Build the Actual Lamp
You came a long way to this step, so lets start directly.
Mount the Touch plates:
- Push the touch plates gently into the Base
- If necessary rework either the plates or the base to get a nice fit
- Secure the plates with hot glue
Mount the Arches:
- Thread the arch through the Base until it is seated in the recess.
- Use a 2mm drill bit to pre-drill the screw holes. Keep in mind, the holes must not be deeper than 5mm!
- Fasten the arch with 5mm countersunk screws.
- Repeat the process for with the top
Insert the steel Cables:
- Push the steel cables through the Top part
- Insert the ends into the 1.5mm ferrules and press them with the pliers
- Put the cables into the screw terminals and pull the cable back
- Ensure that the cables match the position of the top!
- Glue felt gliders into the base to get space for the cabeling
- Use a felt glider to cover the Cable under the charge circiut
Insert the electronics:
- Use hot glue to keep the charge module in place.
- Keep the micro USB plugged in to ensure correct fit
- Plug everything to the ESP32 and put it all under the push buttons
- Attach the battery to do a last Test
- Make sure that everything fits nicely into the enclosure and all cables are secured
Close the Base
- Clamp the 2mm aluminum plate in place
- Make sure it is correctly aligned so that the base is closed correctly
- Use a 2mm drill bit to pre-drill the screw holes
- Screw the plate in place using 3x15mm screws
- Glue felt glider underneath the base
Finish the top
- Thread the steel cables through the outer holes and put them back through the inner ones.
- Connect the screw terminals to the wires and secure them
- Use a shorter cable to connect both arches together by using screw terminals
Align top and center
- Use a square to check if the top is alligned correctly
- If not, adjust the arches, maybe they are twisted
- Measure the distance between top and base where he cables are connected
- If necessary change the length to ensure a parallel fit
- If all suits your needs, tension the whole structure by tensioning the cable that connects the arches
- Shorten the cables with a wire cutter
You are done!! :-)
Step 14: Functionalities
Congratulations, you just finished to read my instructables!
I really hoped you enjoyed it or you actually want to build one on your own.
Let me explain the Features a bit:
To wake the Lamp you just have to touch one of the sensors.
It starts with a bright "warm white". By pressing "+" or "-" you can change the brightness level. By touching the "change" or "star" button you can switch between some effects and colors:
- Warm white (more red)
- orangerot (way more red :-))
- Cold white
- Rainbow Cycle
- Fire Flicker
- Fire Flicker sof
- Dual Larson
The built in effects can be changed via arduino IDE, just have a look at the great WS2812fx library.
To send the lamp to sleep, just touch the "off" sensor.
If you want to activate wifi and the Update server, just press the "off"-sensor and directly afterwards the "star" sensor. The lamp starts to "breathe" green when wifi is active.
Now the lamp is reachable via "192.168.0.117:8080".
To deactivate wifi, just press "off", followed by "star" again, the lamp will turn "red" for 1 second and will then return to default.
Finalist in the
Make it Glow Contest