Infernal RGB Dazzling Flowing Diamond Lamp (Attiny85+Neopixel)

by The Elusive Tinkerer in Circuits > LEDs

289 Views, 5 Favorites, 0 Comments

Infernal RGB Dazzling Flowing Diamond Lamp (Attiny85+Neopixel)

MVI_1576 - frame at 0m25s.jpg
IMG_1581.JPG
FH2JN62LJIL5PLS.jpg

----My first Instructable----

Also known as "Gillian's diamonds"

A project I saw on YouTube which had been eating away at me until I eventually had to make it. Unfortunately it wasn't as easy as it seemed (that's the "infernal" bit) but luckily I've made the mistakes so you don't have to.

The idea is quite simple. The jar is filled with salt water so the diamonds have a fairly neutral buoyancy. A ring of LEDs light up the diamonds through the base, as the LEDs warm the salt water it starts to flow and it becomes... mesmerizing!

This design features six Modes with adjustable speed thanks to a neopixel ring and an ATTiny85.

Supplies

IMG_1547.JPG
IMG_1548.JPG
IMG_1556.JPG
IMG_1557.JPG

The lamp

Glass jar (best without metal latch as mine rusted, funny that)

--I recommend it is at least 2-3 times its width in height

--needs to have a good seal

--I recommend about .5 - 1.5 liters (2 liters was too much)

Bag of acrylic diamonds (I recommend having a few different sizes)

Water (yep)

Salt (important info in step one)

Dish soap (liquid)


Electronics

12,16, or 24 NeoPixel Ring

--Or a compatible substitute, I used a Jaycar led ring with no problems

--Needs to be smaller in diameter than jar

ATTiny85 or larger Arduino board

-- If using ATTiny85 you will need a larger Arduino board to program it

1 X 20-50K potentiometer (linear) + knob

6 Position Rotary Switch + knob

On/off switch

USB socket (PCB or panel mount)

5 X Identical Resistors (5-15K)


For optional heater:

A nice button (Push on Push off type) or Switch

4X 2-4 ohm 1 watt resistors

LED + Resistor


Libraries

"Adafruit Neopixel" library (found in Arduino IDE under manage libraries)


The base

I used wood but you can use your imagination.

The Problems and the Solutions

Throughout making the lamp I had issues with the salt and the effects of ambient temperature, this section outlines the problems and solutions (hence the name).


The salt:

Not knowing the design would work I used the cheapest salt available, this unfortunately included a non-soluble "anti caking agent" (and when you get rid of cake, you get rid of fun). Its actually used to stop the salt clumping together with moisture but as it doesn't dissolve it tends to makes the water very cloudy. So I had to filter it out, unfortunately that's not as simple as it sounds. originally I used a paper coffee filter but it was too delicate and to coarse. So I used paper instead, this was slow, only partially effective and extremely annoying as only certain types of paper were dense enough to filter it out. Ultimately I used a Mix of filtering through paper and waiting for the powder to settle before scooping and even pumping the clear water from the top.


Choosing and testing your salt:

When choosing your salt take a good look at the packaging to ensure it doesn't include an anti caking agent, but if it is the only viable option you will need to separate it as detailed below.

I highly recommend you test the salt you intend to use by putting a teaspoon or two in a glass of water, After it dissolves if there the water is cloudy or there is a white powdery substance at the bottom you will need to take extra steps to separate the salt from the anti caking agent or a use a different salt. If the water is clear you can skip the "cleaning" process.


"Cleaning" the salt

I found a one litre jar will take about a day to separate but sizes smaller then about half a litre can be done in an afternoon or so. Settling a jar larger than one litre took a while so I decided two make separate one litre jars to let the powder settle, extract the clear water and then fill the main jar. It is also advisable to settle the mix in a jar that is tall and skinny allowing easy extraction of the clear water without disturbing the sediment below.

To extract the clear water we need to let the fine powder settle then take the clear saltwater from the top, to do this we mix the salt with the water until it is saturated then we leave it to settle for about a day. You will see the cloudy area reduce and drop until it leaves a a white mess settled at the bottom with clear water above. You have a few options to remove the salt water.

It can be scooped out with a small container, but this is difficult and its easy to disturb the sediment and have to settle it again.

A better option is to use a large syringe (or turkey baster kind of thing) and slowly suck out water from the top and into the display jar.

If available the best option I found is to use a slow pump normally a peristaltic pump, to pump the water from until their is about 1 centimetre left. The pump mustn't be too fast as it will disturb the sediment.

While writing this I realized you could place one jar on something to raise it up, get a hose to go down to the other jar and use the siphon effect. This should work well as it wont flow too fast and doesn't need fancy equipment.


The ambient temperature:

At first I planned to use a bag of diamonds that were all the same size, but I couldn't find any, this turned out to be a good thing. As the room temperature changes throughout the day the diamonds become more and less buoyant thus floating and sinking, as the do this they become too heavy or light to flow properly with the lamp on, this would have been a problem if I was using one size of diamonds. However having different sizes each with a slightly different buoyancy allows some to float at the top some in the middle and some at the bottom so as the temperature rises the floating ones become more neutral and as the temperature decreases those sitting on the bottom start to float.

Basically this means multiple size diamonds can allow it to work in a wider range of temperatures with different effects.

Mixing, Filling & Adjusting

IMG_1123.JPG
IMG_1133.JPG

It's the annoying part...

Theres no exact science to this so it is helpful to start at a small scale, take a small glass of water about half full (or half empty if you think like that) and slowly mix in salt until any more salt added just stays solid at the bottom. The mixture is now saturated, place a few diamonds in the mix and see if they float, If they don't then different diamonds will have to be used. Assuming they float slowly add fresh water until they start to sink and note the approximate ratio of saltwater mix to fresh water.

Now we scale it up, estimate or calculate the amount of saltwater to make based on this experiment and mix in a holding jar. Make a few cups extra to keep for adjustments. Follow the cleaning process above then move the estimated amount minus the extra cups into the actual display jar. Add a few diamonds to test the buoyancy and In stages pour in an estimated amount of fresh water.

If they float Slowly add fresh water or if they sink add more saturated saltwater.

Eventually you will get the feel of how much adding saltwater of fresh water affects How the diamonds float. As the adjustment goes add smaller and smaller amounts until the diamonds stay around the lower middle of the jar. Only a few drops can be the difference between a balanced and unbalanced lamp!


If at any time the density of the water needs to be adjusted "clean" the salt water first, as even a little bit of anti caking powder can really disturb the clarity!

The Base/Box

IMG_1551.JPG
IMG_1555.JPG
cc1cd36c-a7fa-4646-90ff-9eab06382466.jpg

My design for the box was nothing special, I wont go into detail on the steps and processes just some general ideas and thoughts about construction.

The box can be made in many different ways, and I had a few options that came to mind


My options

--3D printing a base

--An electronics enclosure

--Wood

I would have loved to make a cylindrical 3D printed base but without a 3D printer at the time that wasn't an option. I also considered using a pre-made plastic enclosure but for the size of the jar it didn't seem practical, so that left one option for me, wood.


My box

I made a wooden box measuring around 20*20 centimeters out of recycled 12mm pine. The four side panels were internally mitered for a smoother look and the box lacquered. I used the lid from a small electronics enclosure to mount the controls.


I have also included a 3D model of the part I used to mount the USB socket into a 19mm hole. In hindsight the USB A to USB A cable needed to plug this in had to be custom made and was not a great choice so I may change it in the future.


Some hints and stuff

--The overall size really depends on the size of the jar, the NeoPixel ring and then leaving enough room for the controls.

--Make sure the controls are able to fit on the base in a user friendly manner.

--If your using a thicker material like wood you may need to counterbore to fit some items and some drilling may need to be done before the box is glued.

--Have lip around the jar to stop it sliding and allow room for the LED ring under it.

--Don't use switches and buttons that are too hard to push as the lamp can become unstable.

--use you're imagination, I would love to see what ideas are out there.

--Keep in mind the optional heater can get quite hot and may affect the enclosure

Downloads

The Electronics, Program, Power & Heater

Lamp Circuit.png
IMG_1544.JPG
IMG_1543.JPG
IMG_1552.JPG
IMG_1790.JPG
IMG_1792.JPG

Electronics & power

The wiring is pretty straightforward, I have re-created the circuit in Tinkercad and added it to the pictures.

It is important to note that some connections may need to be removable if panels may need to come off.

The lamp is designed to work on five volts from a USB charger or power bank, it draws 1.5 amps with the heater on and 900 milliamps without it. Note that if you include the auxiliary heater it will require a 2 or more amp(10W USB) charger to operate.

If you decide to use a different power source keep in mind the heater is designed for 5v and the ATTiny85 can only handle up to 5.5v.

I found it was best to put the chip in a socket and mount it on a board, allowing all the wires to to be soldered through hole as it was stronger and neater. The mode selection is done with a rotary switch wired with a string of resistors as a voltage divider, a potentiometer can be used instead but this method gives a better quality feel.


Optional heater

The heater is largely a separate circuit, It draws about one amp and is used to boost the flow particularly when the temperature is not ideal. To make it simply wire four 1 watt resistors in a ring and cover them in heat shrink to provide electrical protection and help diffuse the heat. I used 1.5 Ohm resistors but I would recommend closer to 2 or 4 ohms as my setup is a bit too aggressive.

Warning The heater gets quite hot, ensure there is an indicator when it is running and do not leave lamp unattended while it is active.


Program

I wont cover the process for programming the ATTiny85here but its delightfully simple.

The program itself is attached below, it uses a different subroutine for each mode allowing modes to be added, removed and modified relatively simply. It's currently configured for a 24 Neopixel ring but can be changed near the start of the program.

Downloads

Conclusion & Evaluation

IMG_1581.JPG
IMG_1583.JPG

Evaluation

--The first thing I have to say is the choice of jar was not ideal, it's a little bit rough and not super clear but it was the best one they had. Another avoidable problem is that the metal latch on the jar has rusted heavily but i really should have seen that coming...

--Sometimes the temperature is out of the useable range, but only extreme cold or hot days seem to upset it.

--I'm happy with the software but will probably still tweak it.

--The box is good and looks nice although I may change the USB socket on the back.


Overall I'm quite happy with the results.


Sorry if this is a bit text-heavy but I really wanted to cover all the information I had. Anyway, I would love to hear your feedback (and praise 😉) and I would also love hear any ideas/modifications you come up with.

Also questions are always encouraged.

-If your still reading this I applaud you.