The Bubble Maker Machine

by udubinsky in Circuits > Arduino

1617 Views, 17 Favorites, 0 Comments

The Bubble Maker Machine

IMG_2294.jpg
IMG_2259.jpg
IMG_2275.jpg
IMG_2248.jpg
IMG_2267.jpg
IMG_2281.jpg
IMG_2284.jpg
IMG_2296.jpg
IMG_2299.jpg
IMG_2302.jpg
IMG_2305.jpg
IMG_2310.jpg
מכונה לבועות סבון מארדואינו

The idea i got from a lasercut plastic similar machine i've seen the the Geek Picnic festival.
Since i dont have access to a laser cutter i have desided to made it out of wood cut with simple tools like a jigsaw and a dreamel.

This is kinda an upgrade for me since this is the first time i made a fisical machine wich does something in the fisical world and the first time i make a machine wich has moving parts and joints.

Watch it works :
https://www.youtube.com/watch?v=We_FukEYkqQ

Materials :

LA-12V4.JPG
220ohm resistor.jpg
Breadboard_part_the_trois_3_of_3.jpg
Servo3.jpg
75x75x30mm-7cm-7530-font-b-Computer-b-font-Centrifugal-Radial-75mm-DC-Blower-font-b-Fan.jpg
4bat case.jpg
arduino pro mini.jpg
on-off switch.jpg
Plates.jpg
shaft.jpg

- Arduino pro mini
-2 Mini Breadboards
- Servo
- computer side fan
- 12v Battery
- 4 AA batteries
- 220 ohm Resistor
- Some Jumper Wires
- Some wood plates (see pic)
- A Shaft
- 2 Popsicle Sticks
- A String
- A Bowl
- Soap and water

Structure

plates compiled.jpg

Build the structure, install the servo and connect the shaft through the shaft hole to the servo.
Then connect the popsicle sticks as arm on the shaft and connect the string tto the arm.
Configrue it in a shape of a circle or a squere.

Make a Connection

bubble machine_bb.jpg
IMG_2280.jpg

Alright, first thing we have to bear in mind is we have two suppliers, 4 AA batteries, together suplies the arduino with 5 volts (6 actually) and a big bulky battery suplies both the fan and the servo with 12v.

The fan is no problem since it can have its own secruitry and be activated through the relay, the servo however gets its position from a PWM pin 9 of the arduino so it uses both supliers, wich means to us that we have to have common ground.

Servo :
VCC - Realy NO
Data - Arduino D9
GND - GND

Relay (Servo's) :
NO - Servo VCC
COMM - 12V+
VCC - 5v+
GND - GND
IN1 - GND (that way the servo will only get power while the arduino is on)

Fan :
VCC - Realy NO (Fan's)
GND - GND

Relay (Fan's) :
VCC - 5v+
GND - GND
NO - Fan VCC
COMM - 12v+
IN1 - Transistor Collector

Transistor :
Collector - Relay (Fan's) IN1
Base - both to a 220ohm resistor to GND and to Arduino D6
Emitter - GND

Arduino :
RAW - 5v+
GND - GND
D9 - Servo DATA
D6 - Transistor Base

The Code of Life

logo_arduino.jpg

The code is actualy the Servo example wich come with the arduino IDE, only i changed few things :
- Changed the servo pin to be correct with mine (9)
- Added the fan acitvating pin (6)
- Made the servo to go from 5 degrees to 75 (insted of 180)
- Paused for 5 second while the fan is on at the up position.
- Added a 1 second delay while the arm is in the soapy water

#include Servo myservo;  
int pos = 0;    // variable to store the servo position
void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  pinMode (6, OUTPUT);
  digitalWrite (6, LOW);
  Serial.begin (9600);
}
void loop() {
  for (pos = 5; pos <= 75; pos += 1) { // goes from 5 degrees to 75 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    Serial.println (pos);
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  digitalWrite (6, HIGH);
  delay (5000);
  digitalWrite (6, LOW);
  
  for (pos = 75; pos >= 5; pos -= 1) { // goes from 75 degrees to 5 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    Serial.println (pos);
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  delay (1000);
}