Levitating Flower Light

by James_rhodes in Circuits > Arduino

1004 Views, 5 Favorites, 0 Comments

Levitating Flower Light

IMG_20190929_164441.jpg
IMG_20190929_164438.jpg
IMG_20190929_164500.jpg

Hey guys, this is my first ever instructable so apologies for anything that I miss. So I built this levitating flower light as a birthday present for my amazing girlfriend. It has 4 modes.

1. Cycling through all the colours every 10 seconds or so.

2. The ability to choose any colour for it to maintain based on the position of the knob.

3. Plain white light.

4. Lights off with levitation still on.

The modes are cycled through with the use of the push button and there is a switch to turn the power on or power off.

Supplies

The things you will need for this project are:

1. 1x analog magnetic levitation kit - Like this

2. Wood (whatever suits but I used particle board as it was being painted)

3. 1x Arduino nano

4. 3x MOSFETs (IRLB8721 work well)

5. 1 metre of RGB LED strip (commonly bought cheaply in 5m strips)

6. 1x Momentary push button

7. 1x switch

8. 1x potentiometer (I used 10k ohm)

9. 1x White acrylic

10. 1x perfboard

11. 1x 12 volt supply and DC power jack that fits it.

12. 1k ohm resistor

Building the Magnetic Levitation Kit

Screenshot_20190923-064814.png

Okay, so this is my one copout for this instructable. I really wish that I had the electronics experience to design and create my own magnetic levitation circuit but in short, at this stage, I simply do not. I learnt a lot in the building of this kit however and it has really inspired me to learn more about this style of electronics (I'm currently a 2nd-year electrical engineering student so understanding how to design this circuit is something im deeply interested in). Building this circuit was loads of fun however it definitely wasn't the easiest. It had many components to solder on and the instructions were not the best. After a few hours of soldering, you should be able to get the kit up to scratch and you can adjust the X-Y trimmers to improve the stability of the levitation so it'll float without falling after a period of time.

Building the Box

Screenshot_20190923-064945.png

I am not much of a woodworker and I was using very basic hand tools to create my box (all I have at my disposal) however, some tips on the dimensions of the box. I'd recommend leaving plenty of room in the box to fit the Arduino and LED's. My box was 15cm x 15cm and it fit everything with jut enough wriggle room. The depth of the box did not come easy for me as I wanted to give the flower as much room as possible to float but also make sure that the lights could saturate the acrylic as much as possible. I used layers of thin cardboard to lift the inside of the box up until the coils of the magnetic levitation kit was only just below the acrylic. I then placed some wooden pegs in the corners for the acrylic to sit on top of, I used some rubber stoppers for the acrylic to sit on top of.

I then gave the box an undercoat and then a few coats of paint. I also put some non-slip rubber soles on the bottom cporners of the box (the kind you put on furniture to avoid scratching the floors) in order to raise it up a bit and also if im being honest, to account for any wobbliness that came from my ahem... woodworking abilities.

Wiring

00000IMG_00000_BURST20190930001453521_COVER.jpg
Screenshot_20190923-064900.png

The wiring to this project was tedious but not too difficult. I basically placed the lights Arduino and levitation kit all in parallel with the 12V source I had. The wiring is as above although I am aware that the wiring diagram is probably not the easiest to follow. The connections are as follows. For the LED's:

12V - 12V

R - D5

G - D3

B - D9

For the potentiometer:

Vcc - 5V

output - A0

GND - GND

For the button:

I connected one side to 5V the other side through a 1k resistor to ground and also to D2. In hindsight, I wish that I had placed a capacitor with the button for debouncing purposes. Even though I did attempt to debounce in the software it would have been less effort if the capacitor was there.

For the switch:

The switch was connected such that it would switch everything off in one position and switch everything off in another.

Simply upload the code I have provided and if all is connected correctly it should run without a hitch. Also, I did not write the part of the code that cycles through the colours so I would like to thank the author of it but unfortunately I have lost the link. If anyone can provide me with the author of that section of the code that would be greatly appreciated.

Apologies if this is vague. I am happy to answer any questions anyone may have.

Assembling

1841546796.png
IMG_20190929_164456.jpg

All thats left to do is put it all together. This involves placing the buttons in the box and making sure that everything fits. Once I was certain everything was working I had a sheet of white acrylic cut to size and I placed that on top of the box. I also found a bunch of nice flower heads that could be attached to the levitating magnet (via blutack in my case for a removable option).

This was the end of my project, thank you for giving this a read through, I hope you could find something that may inspire your own creations.