Instructables
Picture of Bubblebot: Gigantic Bubble Generator
IMG_0815.JPG

Welcome

Here is one grand weekend project!

Make this awesome Bubble Bot:


While being a bit lengthy and requiring experience with Arduino, this contraption is bound to grant you infinite glory among your friends, toddlers and grownups alike!


Avast, then!
 
Remove these adsRemove these ads by Signing Up

Step 1: What You Need

Here's a list of the materials and parts I used:

The Frame

* 5 x 4-feet long rectangular profile (0.5" x 0.5") pieces of wood, as solid as possible.
Although you could probably get away with plywood if you wanted to, I always like to go for something sturdier than what I actually need, to compensate for unexpected shortcomings.

* 12" x 4"  x 0.5" piece of wood for holding the fan and servo.
From now forth I'll refer to it as the wooden shelf. Please excuse my English, I am Israeli.

* 2 hinges, mine were about 1.5" in length.

 * 4 Colorful plastic floats a.k.a "Wacky Noodles", ~5 feet long.
these, for instance.

* 20 medium-size zip ties for securing the plastic floats to the wooden frame
alternatively, you could go with glue...

* 5 tiny-size zip ties for attaching the opening-closing arm to the servo
Make them colorful if you can, to go with the rest of the design!

* Some bolts, nuts, washers
I used 1/8" diameter ones, various lengths. Sorry for being somewhat vague, it'd take quite a coincidence for you to get exactly the same parts, do your scavenging & adjustments

* 6 feet fishing line
This will be used to connect the motor to the arms, so better get a strong one

* 6 feet thick thread for making the bubbles, preferably made of cloth
Use a thread that is both absorbing and flexible - important for bubble making, as you'll find out.
I actually used a mountaineering thread I had, about 5mm wide. The important features you want are: a. that it would be able to absorb the soap and b. that it would be flexible enough and not form knots. One of the reasons I like using distilled water, is that the thread will never hardens.

* 2 round wooden sticks, 2 feet long, 3mm in diameter
(Or zip-tie together two 1-feet sticks)
These will be used as the poles holding the threads that create the bubbles. One of them will be fixed to the piece of flat wood, and the other will be mounted to the servo - this means they need to be as light-weight as possible
.

* 1 round wooden stick, 2 feet long, 5mm in diameter
(Or - zip-tie together two 1-feet sticks!)
This will be used as the lever allowing the motor to bring the arms up and down, using the fishing line. Therefore, it should be sturdier than the others.


* 10 1.5" long wood screws, 3-4mm in diameter

* Plastic tub for the soap fluid



The Brains

* 3 feet of ordinary 1-lead wire

* A levered micro-switch, something like this one
.
* A Servo, preferably not the lamest one you can get.
I got mine for free in a time of blissful need from someone during geekcon2010, but it was roughly similar in size and torque to this one.

* 6V Geared motor
This one's responsible for raising and lowering the arms that go into the soap bucket and spread open in the air, so it better be geared to take some load. I used a geared motor module I disassembled from a scanner/printer, but you can use anything, as long as it's 6v, around 5-10 RPM

* A roller/pully, used to collect the wire
It should be attached to the motor's shaft, so make sure you get parts that can play nicely together. I got mine by taking down all solder from my soldering kit's roller (see photo). Not the best option, I'll admit.

* 12V Tower-rack computer fan.
I used a 4.7" X 4.7" one. You can always slow down a fan by rapidly switching it (using PWM or otherwise), but not the other way around.

* 10 feet of  3-pin servo leads extension cables
I used these ones , which are hassle-free 

* Circuit Prototyping board, I use something that looks like this

* 1 Arduino or an Arduino-clone.
I use this RBBB from ModernDevice, which is pretty cheap and easy to work with. Instead of the supplied transistor I install a 7805 regulator to take down my 12V input (mopad battery)

* 1 plastic kit-box for the electronic components. Mine was 5" x 3" x 2".

* 12V battery / Power adapter
I use my mopad's battery when outdoor or the adapter when in civilization.

* H-Bridge components:
2 x TIP107 PNP Darlingtons
2 x TIP102 NPN Darlingtons
4 x 2N3904 transistors
4 x 1/4W 1K resistors
4 x 1/4W 10K resistors
I am grateful to Chuck McManis, who wrote this must-read piece on H-Bridges which I pretty much implemented as written. See schema in photos.


Soap Mixture

I used the instructions published by these guys , quantities multiplied by 4:

4 liter of distilled water
3.2 liters of a pre-made bubble mixture 
1 deciliter of detergent (I used regular green Fairy with great success)
1 deciliter of glycerin



Tools

* Solder iron and solder

* Hot Glue Gun:
Although abominable when overused, there aren't many engineering problems that cannot be solved with enough hot glue. Or design-related problems, coming to think of it. Hack, it'll probably solve most kinds of domestic problems, too. Not that I preach for this kind of usage, but hey, I'm just sayin'. The hot glue gun is our weapon in the war against sophisticated (as boring) product assembly lines.

* Electric screwdriver/drill
We will drill some holes and screw some screws when building the frame

* 3mm and 5mm wood drills

* Wood Glue

* Hand Saw, Awesome!

sodenkamp2 months ago

I made a little setup but the fan won't start.

This is the code /**

*

* BubbleBot Control Code

*

* By: Zvika Markfeld, Jonatan Bien, Uri Kareev

*

**/

#include <Servo.h>

#include "HBridge.h"

// scan limit switch pin

const int switchPin = 2;

// arms spread servo pin

const int servoPin = 3;

// fan source pin

const int fanPin = 4;

// H-Bridge control pins

const int positive0Pin = 5;

const int positive1Pin = 6;

const int negative0Pin = 7;

const int negative1Pin = 8;

// Servo boundry values

const int min_pos = 85;

const int max_pos = 127;

const int NUM_OF_SPREADS = 2;

const int SPREAD_SPEED = 30;

const int UNSPREAD_SPEED = 20;

const int SPREAD_DURATION = 3000;

const int SPREAD_DURATION_DECREASE_FACTOR = 3;

// H-Bridge controller (based on http://www.mcmanis.com/chuck/robotics/tutorial/h-... but not as nice)

HBridge hbridge;

Servo myservo;

boolean forward = true;

void setup() {

myservo.attach(servoPin);

myservo.write(max_pos);

hbridge.init(positive0Pin, positive1Pin, negative0Pin, negative1Pin);

Serial.begin(115200);

Serial.println("setting FORWARD for the first time");

hbridge.forward();

}

void loop() {

// detect arms up

if(digitalRead(switchPin) == HIGH) {

Serial.println("SWITCH Detected");

hbridge.idle();

// switch fan on

digitalWrite(fanPin, HIGH);

int pos;

int times;

for(times = 0; times < NUM_OF_SPREADS; ++times) {

// spread arms

for(pos = max_pos; pos>=min_pos; pos-=1) {

myservo.write(pos);

delay(SPREAD_SPEED);

}

int currDelay = SPREAD_DURATION * (SPREAD_DURATION_DECREASE_FACTOR - times) / SPREAD_DURATION_DECREASE_FACTOR;

Serial.print("Delay: "); Serial.println(currDelay);

delay(currDelay);

// close arms

for(pos = min_pos; pos <max_pos; pos += 1) {

myservo.write(pos);

delay(UNSPREAD_SPEED);

}

}

// switch off fan

digitalWrite(fanPin, LOW);

// start bringing arms down

if(forward) {

Serial.println("setting BACKWARD");

hbridge.backward();

forward = false;

}

else {

Serial.println("setting FORWARD");

hbridge.forward();

forward = true;

}

/// wait until arm goes down and switch is off

while (digitalRead(switchPin) == HIGH);

}

}

If I use a simple test code the fan works

int motorPin = 4;

void setup() {

pinMode(motorPin, OUTPUT);

}

void loop() {

digitalWrite(motorPin, HIGH);

delay(1000);

digitalWrite(motorPin, LOW);

delay(1000);

}

Can somebody help me out?

zvizvi (author)  sodenkamp2 months ago
Hi,

Glad to hear you're building BubbleBot :)

if the fan does not start, this might be to various reasons:
fan pin burnt out (needs a reason, of course)
transistor not connected properly
transistor burnt out due to lack of resistor
input voltage too low (should be 12V for most fans)
fan polarity reversed (red wire should get the Plus)
and a few others

best way to debug:
with a voltmeter, make sure that the fan pin goes to high when the arms are spread open,
then make sure that the 12V's plus is connected to the fan and that the minus is connected to the arduino's GND
measure the voltage at the transistor's collector pin, see if you get (with the 12v's plus) a reference voltage of about 11V
somewhere along the way you will hopefully find the problem...
good luck,
Zvika
sodenkamp zvizvi2 months ago

Hi,

thanks for your reply.

i checked the fan with a simple sketch and it was working.

Then I found out that i had to add a line to your script:

pinMode(fanPin, OUTPUT);

and now it is working.

But i have another question.

If the switch is on then the servo keeps on running.

So it needs to get a pulse instead of a closed connection.

How did you do that because if i use your script it only works if a press the switch and release it. i assume the switch will be in if the arms are up.

regards alan

zvizvi (author)  sodenkamp2 months ago

Hi Alan,

Nice catch! that of course is a bug, this script is pretty old and I have since changed it quite a lot...

Regarding your question, the flow is after detecting the switch (signaling that the arms are in their up-most position), the arms are opened and closed based on NUMBER_OF_SPREADS and the rest of the parameters, and then a command is sent to the motor to go down. after that, the sketch waits for the switch to clear, in:

while(digitalRead(switchPin) == HIGH);

So, assuming the switch is not wired in reverse, causing the HIGH to signal a "switch free" state, I guess you are looking at a debouncing problem. the shortest way to solve that would be to add a delay right after the while statement above. for example,

delay(500);

should do the trick.

hope that solves your problem,

let me know if not and I'll try to help

Happy bubbling!

Zvika

This is sooo cool! I want one, but it's too hard. (sigh) I know I'll make my dad do it!
zvizvi (author)  DTninjagirl1 year ago
thanks, dtninjagirl! its not as hard as it looks, if you're willing to learn some electronics.... good luck anyway, I hope you get your bubble bot soon
emmanuel7202 years ago
it's amazing! but have a question... How do you connect the motor to Arduino??? hope you can help me :)
zvizvi (author)  emmanuel7202 years ago
Hi Emmanuel,

Thanks!

There are a few ways of connecting a motor to an Arduino, choose the one most suitable for you.

In case you need to spin it both ways, an H-Bridge would be needed.
See http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/ for theory and instructions, then either build one from scratch or (less laborious) get a solid-state monolithic unit such as the one that I've used, L298N (available on http://www.sparkfun.com/products/9479). Most convenient option however would be using a motor shield, such as http://www.dealextreme.com/p/l298n-stepper-motor-driver-controller-board-for-arduino-120542?item=1 or http://store.arduino.cc/eu/index.php?main_page=product_info&cPath=11_5&products_id=204
In any case make sure you have a flyback diode protecting the Adruino from back-induction coming from the motor due to its existing speed, once current stop flowing from the arduino control.

If you need to spin it in one direction only, just use a Darlington transistor to drive the high current, as explained in: http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

Hope that helps!
Good luck,
Zvika
try putting 50 of them on your roof!!!
:) :) :0
Luz.Lopez2 years ago
So cool! I'm gonna try to do some like that... wish me luck :D
zvizvi (author)  Luz.Lopez2 years ago
great!
if you want, you can consult lfreundl, who just tackled a few building questions elegantly with a bit of my remote guidance. I think we even found a bug in the wiring diagram of the arcade controller
be sure to also check:
http://makeprojects.com/Project/Gigantic-Bubble-Generator/1364/1

and do post some photos! I'm happy to hear of the bubblebot genome replicating :)
good luck!
rimar20003 years ago
Great work!
instruct393 years ago
omg, so cool, i would to make it if i had all the parts
Paulys3 years ago
Nice job! We like it so much we blogged about it.
http://www.robotliving.com/diy-robot/bubble-bot/
zvizvi (author)  Paulys3 years ago
cool! thanks
snelpiller3 years ago
awesome!!
zvizvi (author) 3 years ago
:))
thanks, everybody!
your feedback is really a more than fair return for the effort of writing
marcsulf zvizvi3 years ago
zvizvi wrote:
>>Circuit Prototyping board, I use something that looks like this ...sorry, after pressing this link you'll get a 404 and will need to refresh the page, for some reason<<

The reason for the error is there is a space (manifests as %20 in html) at the end of your link. If you remove the space, it will link correctly.

Great instructable, BTW. My kids are going to love this!
zvizvi (author)  marcsulf3 years ago
thanks! fixed
wobbler3 years ago
This really is an Instructibubble!
Kinnishian3 years ago
I love this! Thanks. It combines the awesome of relatively complex machines performing simple functions with the awesome of bubbles!
odedon3 years ago
cooooooooooooooooool !
keler3 years ago
Sweet!
My kids love those huge bubbles! This is a must-do project, will add to my ever-growing list :)
If only you could freeze those bubble mid-air... Just thinking...
Anyways, thanks for posting, and for the detailed instructions.
zvizvi (author)  keler3 years ago
Thanks!
freezing bubbles is something you can easily do with small ones, just a minute or two in the freezer. Originally my idea was to electrify the bubbles, and taking photos right at the split second...
yuvaleshel3 years ago
Inspiring !!! This machine seems to have a real uncle-like personality. like!
zvizvi (author)  yuvaleshel3 years ago
:)))
cheers, HABUB!
bertus52x113 years ago
Great. I was considering making a bubble machine for the Sprakfun contest. Now I'm glad I didn't. Yours is awesome!
This is just ridiculously sweet. The padding makes it perfect for children chasing the gigantic spheres of beauty. We had a small toy like this when I was little. It did a decent job but the satisfaction of destroying a big one wasn't there.