Introduction: Color Changing Bubble Lamp
the color changes every 60 seconds
OK so lets get started go to the next page to find out what you will need.
Step 1: How This Works
So the way this works is the pump pushes air into the water filled tube which creates air bubbles and since air is lighter than water the bubbles rise to the top. So we MUST put a hole in the top for the air to escape or else the the air pressure will build up and eventually pop a seal some were or the pump will stop.
The lights use an attiny 2313 micro-controller to change the color every 60 seconds by basically flipping a switch on inside the micro-controller which sends power to that pin then waiting 60 seconds and turning that switch (pin) off and turning another on and doing it over and over again until you turn off the power to controller. mine changes from blue to green to red to white but you can use any colors you want. you can also add add more than four different colors. I did not use RGB LEDs because I did not have the money to get them from radio shack nor the time to get them from ebay and it was much simpler to program it this way.
if you want more info on how micro-controllers work check out the link below.
Step 2: Tools and Parts
For the Bubbles you will need:
1. An air pump I used a fish pump I got from petsmart for 10 dollars.
2. Tubing to fit on the air pump you can get this at petsmart also.
3. A check valve to keep the water from going back in to the pump also at petsmart.
4. Some kind of base to put every thing in and put the tube on.
5. A tube for the water and bubbles.
for the lights you will need:
1. An Attiny 2313 what I used but a attiny 13 or attiny 45 would also work.
2. A programmer for the attiny I used this one but there are a lot of programmers out there like this one which is what lot of people use.
3. A computer to program the attiny with.
4. 2-4 leds of each color that you want. you can get lot of these for a little on ebay
5. A breadboard radio shack has these.
6. 3-6 volt battery pack
7. dip socket that your attiny will fit in.
1. hot glue gun.
2. soldering iron and solder.
3. razor knife
Step 3: Preping the Tube
First you need to drill some holes, one in the cap or bottom of the tube for the air tube to fit into just slightly smaller than the air tube (tip, if you drill your hole in the cap you might want to try it through the side to help keep it from leaking. And now one on the top, you will want this one to be kind of small, if you make it too big it will be noisy as the air pushes out. Next you need to mix up the epoxy, directions are on the back the package. Now start sealing up the cap and all the way around the tube, don't put any water in until the epoxy has completely dried. Now cut a hole in the lid of the base for the bottle to go in and hot glue or epoxy it there.
Step 4: Programing the Controller
For programing you will need to have the drivers for your programmer installed, to do this check the website that it came from or the CD that you might have got depending on what controller you bought. Here is a link to the website I used to get started. I will summarize some of it but you should really just go to that website. Ok you need to find the datasheet for your attiny just do a Google search for "attiny(your attiny's number) datasheet " once you found that find the page that has the pin on it and look for the following, MISO, VCC, SCK, MOSI, RESET, GND, +VCC, now look at your controller and find the same pins and match them up with the pins on the attiny and the plug in to you computer. now download avrstudio 4 and the services packs (if any) staring with #1 WinAVR and the hex file below. when that's done open avrstudio up and follow the step on this website to upload the code to the attiny.
If there is any problems with the code or trouble programing the attiny please leave a comment and I will try to answer you question.
Step 5: Wiring
Now the fun part, wiring
The diagram below should explain everything pretty well but just in case i will try to summarize it
there are going to be 4 LEDs of each color wired in 2 sets of series(series is were you connect the positive to the negative and end up with one positive and one negative lead) and then those will be wired in parallel which means you connect the positive to positive and the negative to negative. Now connect the positive lead of the color you want to light up first to the PB1 pin on the attiny and negative lead to the ground pin, do this to all the colors up to PB4. If you use red LEDs you must use 150-ohm resistors they are should be attached to the ground leg of the led. now get out your dip socket and programed attiny. first solder all the points on to the socket and then put in the attiny. I did not use a socket because I did not know I would need it but you really do to keep the legs from breaking and from getting to hot.
Step 6: Finishing
the final step fitting it all in the box and filling it up.
the box part should be simple one thing to remember is to make sure to put the check valve on right. the package should tell you this.
to fill it up I took a 2 litter bottle filled it with water and then drilled a hole in the cap for the extra tube to fit in then screwed on the cap put the other end in the hole on top of the bubble lamp and squeezed, not to hard thought or it could break a seal.
hope this was helpful any questions please leave a comment.
P.S. post some picture of you bubble lamp.