DNA Lamp
I have seen this project:
https://create.arduino.cc/projecthub/john-bradnam/...
and was inspired to do my own hot glue lamp. The first experiment was to bend the sticks with a hairdryer. This resulted in the arc-lamp shown above. I have bent the hot glue sticks with a hairdryer. This instructable is not about this lamp, but you could imagine how this works when you read this instructable. I got the idea for the DNA lamp a little bit later. But basically they are similar and the software for the DNA Lamp evolved from this experiment.
When I did some experiments with different colors on the ends of the gluestick I had the idea of building a DNA lamp. So basically a double-helix of LED strips with the two helixes connected with hot glue sticks. This looked already pretty awesome, but it needed some kind of outer design. The following ideas came up:
- Use cardboard and foamed plastic as in Experiment1: This is easy and cheap, but doesn't look so nice and has no stability.
- Use wood: I tried this, but bending the wood was not easy furthermore It probably gets too big. See my instructable https://www.instructables.com/Tiny-Wooden-Lamp/ how I bent some wood for a similar project.
- Use a 3D printer: I don't have one and I liked the idea of hand crafting the lamp more. This makes it possible to have different designs.
- Use modeling clay: I didn't have much experience with it, so I wanted to learn it. And hey, the kids are doing it in the kindergarden, so how difficult can it be?
- There should not be any switches on it and it should be battery powered. No switches are also in Experiment1, but battery powered is more of a challenge.
After some furhter experiments I finished two prototypes one of them is pretty crooked, but I like it as it is and want to show you how I did it. One of the lamps is battery powered while the other uses a USB cable. I will discuss both of them in this instructable.
Supplies
- 2x SK6812 LED strips with 12 leds each (can be more or less)
- Arduino Uno OR Nano. For the battry powered version an Arduino Pro Mini is needed instead.
- Cables
- Glue Sticks 11mm OR 7mm
- Modeling Clay Air Drying. I use the FIMOAir Basic.
- Copper foil or Tinfoil
- 3 x 2Megaohms resistor
- Some wood for more stability
-
micro-usb connector for the Arduino Pro Mini version
Optional for battery powered version:
- TP4056 battery charging module
- li-ion battery (I use a 18650). the TP4056 supports also li-poly batteries. Be sure it has at least 1000mAh since it will otherwise be too weak and the TP4056 would have to be modified as described in this instructable
- Mosfet which is able to drive 50*LEDS milliamps (1200) for the shown lamp. I use the IRLD024 which drives 2500 milliamps.
- 10 KOhms resistor
- miniature switch to disconnect the battery.
Design Considerations. Lessons Learned
At first I thought it would be a good idea to wrap the led stripes around a pillar and cover it with clay. To stabilize it I also added some thick wire. The big advantage of this method is that the led strip is wound very accurately. Especially when you mark the line how the strip has to be wound around the pillar. The big disadvantage is, that it is difficult to add clay to the inside once the outside is dry. The fresh clay just don't want to stick to the dried clay.
I was also not aware that I would be a good idea to glue the sticks onto the LED strip. The result was loose sticks breaking out of the clay which itself broke apart. Therefore I abandoned this prototype and started a new one.
Here I glued the sticks to the LED strip. First by heating them up with a hot air gun. I don't reccomend this since it makes the sticks too soft and may lead to different lengths due to the difficulty in finding the correct heating. Furthermore they get really thick at the ends. The solution is simple: Just use your hot glue gun and glue the cold sticks to the LED strip.
First of all glue all of the hot glue sticks to one side and let them cool down. Afterwards take the second LED strip and start at one end of the first strip. Glue the LED strip in an angle of approximately 90 degrees to the other ends of the glue sticks. Make sure you keep the same angle for the whole strip. It automatically winds up to the double helix.
The angle directly influences the height of the lamp and also the distance of the sticks to each other. A smaller angle results in a taller lamp, a higher angle in a lower lamp. The picture here has a smaller angle and winds up higher.
The length of the sticks also influences the design of the lamp. shorter ones may be interesting for taller lamps, but don't light as much due to smaller lighting surface. Longer sticks may not light up completely since hot glue sticks are not so good in transporting light. It also depends on the transparency of your sticks.
The size also influences the space you have for the electronics. When you want to have a battery powered lamp be aware that you may not be able to fit your battery into the base when the sticks are too short and the base is therefore also smaller. You could also use the directly powered version where you don't need battery and charger.
I like 8-9 cm (3-3.5 Inch) most. To use a 18650 battery you should have at least this size.
Prepare the Glue Sticks and Glue Them to the LED Strips
Now you can start to glue the sticks to the LED strip. Just pour some hot glue on the stick and press it to the LEDs of the LED strip. Then take the second LED stip and glue it to the sticks. Be careful to keep the angle between the stips constant otherwise you will end in a croocked model as I did.
Also check that your LED stips are the right direction. Both ot them must have the data in at the same side. I recomend to solder the wires to the strips before, so you always see where the bottom is.
I recommend to test the helix now. You may want to use aligator clips to avoid soldering. It already looks quite nice!
Now stabilize the resulted double helix with thick wire. Make sure it is isolated to avoid short circuits. This makes it easier to add the clay and to keep the stability until the clay is hard enough to keep the stability.
Build and Sculpt the Base
To give the base more stability and make it easier to fit the electronics in it, I built a wooden scaffolding. I have cut a circle with my jigsaw and added some wooden blocks to it. Since all gets covered with modeling clay afterwards this could also be cardboard which is stable enough to keep the weight of the lamp during drying. Afterwards the clay is stable enough and you can even remove the cardboard again.
You can add the toch sensor foil now or later. Be aware that altough the sensors work through some material, it should not be too thick. More than 3mm (0.1 inch) is probably difficult. Therefore you could also model the lamp first, add the sensors and cover them afterwards with a thin layer of clay. You can also decide to not cover them at all, but you should know that they get darker over time by touching on them.
Connect Base and Double Helix
Now it is time to connect the base and the double helix. you can use the wires you added for stability to do this.
In my prototypes I have coverered the base and the double helix with clay before I put them together. But it is difficult to fit them together accurately since both parts where modeled individually and do not fit perfectly. It is easier to align everything before adding the clay.
Make sure the cables from the LED strips are ending in the inner part of the base. When possible keep them away from the sensor foil to avoid unwanted interference.
Check if everything is perpendicular. It will not be possible to correct this once the clay is added and dried.
You can cover the sensors now or later when everything is finished.
Solder the Electronics for the Usb Powered Version
For the usb powered version you should use an arduino with usb power connection. This way you don't need:
- Usb Power adapter
- Programmer
- Battery
- Battery charger
- Mosfet to turn off LED strips. You can use it, but it is probably not worth it.
We have two parts to solder:
- sensor foil: The sensor wires are sensitive to other wires. When possible route them separately and make sure they are not too long and are not located near to other wires.
- LED strip connectors: All vcc can be connected together. The data wires have to be connected to the corresponding arduino pins.
Solder All the Electronics for Battey Powered Mode
When you want your lamp to be battery powered, it is more complicated than direct USB power, but you can carry the lamp around and it still turns on when you touch it. The maximum time the lamp is independent from power depends on the battery used. Remove the power LED from your pro mini as described in this instructable to get to the high standby times. otherwise standby will only be a few days. I haven't cut the pcb as described there since it makes it more difficult to reprogram the arduino.
My 18650 battery has 3000mAh and runs for about 2000 Hours in standby (about 80 days) and 10 Hours with the highest brightness level. Lower brightness levels run up to 5 times longer. I haven't tested all the values, but they are calculated from the battery capacity and my power measurements. Always be careful when handling li-ion or li-poly batteries as described in this instructable li-ion are electrically similar, but have different chemistry. The used charger can charge both of them.
We have fife parts to solder:
- sensor foil: The sensor wires are sensitive to other wires. When possible route them separately and make sure they are not too long and are not located near to other wires.
- LED strip connectors: All vcc can be connected together. The gnd (ground) pins have to go to the mosfet. The data wires have to be connected to the corresponding arduino pins.
- Battery / battery charger: The battery charger has an micro usb port. To be able to charge the lamp later on position it on the backside of the lamp where you have no sensor foil. You may want to fix it later once the sculpting is finished. You may want to remove the LEDs, so the lamp does not glow from the bottom when charging. Make sure you add a switch between charger and battery to be able to isolate the battery when the lamp is not used. You can also use a battery holder and remove the battery.
Important: Disconnect the battery when programming the arduino. Otherwise the battery may get damaged from overvoltage! - Mosfet: The LED strips can be disconnected via a mosfet when the lamp is turned off. It needs a 10kOhm resistor between gate and source. Be sure to look at the datasheet of your mosfet for the pinout.
- Arduino: Add the programming adapter and all cables.
Program Arduino
Make sure to switch the battery off when you program the arduino. Otherwise the battery or your computer may be damaged or catch fire.
It doesn't matter which arduino you have, but when you are using the pro mini be sure you have the equipment you need to program it. Also be sure that you may want to add a programming connector in case you need to reprogram your lamp later on. There are many instructables like this describing how to program the pro mini. I don't describe the pro mini in detail in this instructable.
When you program the arduino via the usb programmer, the lamp is powered by the computer. When you don't have more than 15 LEDs on each side this is still within the specifications of the USB bus.
The program can be found on github.
You can use the coding with Arduino IDE. Just open the DNA_Lamp.ino file. You need to install the libraries manually. See this instructable for details.
Then select your board and port, compile and upload.
When using PlatformIO you need to set the board in the platformio.ini file. Just uncomment the block you want to use and comment or delete the others. Compile and upload.
See the calibration step below for instructions how to do a calibration of the sensors. This is most probably needed. Since your sensors will be covered later on their sensitivity changes tremendously and needs to be recalibrated again.
When everything works fine, it is time to do the sculpting work!
Sculpt It
Now everything is constucted, we can do the sculpting work.
I am not sure how to do this correctly. I just did this as I would be a kid and just covered everything. It worked quite well. I used a lot of water to make the surfaces smooth. Make sure all cables end in the base and you know which one is which . Especially where positive, negative and signal of the LED strips are.
Then It has to dry for at least one day. After half a day you can still do some corrections although the clay has some stability.
When you get clay sains on the gluesticks, just ignore it for now. It is possible to wash them afterwards with water.
Add the Power Connector
When the base is dried, make a hole in the bottom to add the power connector. I used a normal drill since it is not so critical when it is not so accurarte. Once there is enough space, glue the adaptor or the arduino nano in there. Afterwards fill the gaps which are too big with modeling clay. I had also holes at strange places which I filled afterwards.
For a usb connector do it the same way. You may want to use hot glue to fix the connector.
Calibrate.
Now everything should be wired up completely and the arduino is programmed. Furthermore you have put the clay all around and sculpted it nicely.
Since the clay heavily influences the sensitivity of the sensors we need to recalibrate. But be sure the clay is completely dried as any huminity changes the sensitivity. When you see that the system cannot distinguish between the sensors, the clay is probably too wet. Let it dry for some time and come back here.
To calibrate everything there is the constants.h file in the project. Uncomment the //#define TESTMODE 1 line (remove the //) and upload the program. The lamp is now in testmode.
Check the lower 4 bars. They should be red, green, blue, white. When this is different, change the
#define RGBWSEQUENCE NEO_GRBW definition as described in the comments above
Look at the bars above (5-12) they should be off or just bar 5 shows something. When you touch a sensor (which you probably covered with clay, but you still know where you put them) the bars should light up. Red for the middle (on/off), green for one side(switch pattern), blue for the other side(switch brightness). The bars should go up at least 4 bars and less than all bars. When the sensors are swapped you can exchange the pin assignment in this section:
#define TOUCH_ONOFF 8
#define TOUCH_2 9
#define TOUCH_3 7
When fewer than 4 bars are lit up for all bars, decrease the value at
#define SENSITIVTIVE 20 to a lower value.
When all 12 bars are lit up, increase the value.
When some sensors show very high values while others not, check you cabeling. The cables should go as direct to the arduino as possible. Having long wires winding through the base may lead to this behaviour. Also wet clay may influence this.
Now count the bars for each color when you touch them as you would do later on. When a bar is constantly flickering, then don't count it. Enter the values in:
#define SENSORGREEN 7 // Pattern
#define SENSORBLUE 7 // Brightness
#define SENSORRED 7 // ON/OFF switch
This will calibrate the lamp.
comment the
//#define TESTMODE 1
line again and upload the program.
To check the calibration later on again, the lamp can be set into calibration mode by holding the pattern selection sensor for some seconds without the need to upload the TESTMODE coding. To leave testmode hold the on/off sensor for some seconds. To enter a changed calibration of course a reprogramming is needed.
Conclusion
Although this was a lot of work, it was totaly worth it. It took me almost one month to build all these prototypes and lamps and several weeks to take the photos and videos and to write this instructable. The result is really fantastic and I learned a lot about modeling clay, interaction of hardware and software, making my work reproduceable, taking lots and lots of photos, finding the right light for the photos and writing a instructable.
Especially the software is more sophisticated as it would usually be, but this makes it possible to reproduce my instructable without frustration. Of course you need some skills like soldering and programming, but the simple version without battery is not too complicated.
Have fun creating your version of the lamp. I wanted to make every step configurable, so you may customize it to your preferences. In case of questions use the discussion on this instructable.