Bubble Experience Fail? 😰

Team 👻 Group Member Names: John Boran, Evie Cheung, Eugenia Ramos, Yangying Ye

dog-bubbles.jpg

In an Ideal World: An Uplifting, Immersive Bubble Experience

If our project had worked as planned, this motion-sensor bubble machine would be great in multiple settings. It could be used for the following:

+ To bring delight to children at a hospital and be an uplifting reminder against the typical, drab hospital environment

+ A fun entranceway at a party or exhibition

+ A Pavlovian conditioning experience for your dog with bacon bubbles

+ Or, you know, board rooms before a corporate meeting to make everyone a bit more happy before talking about money things.

Below, you can read about our exploration with the PIR motion sensor + DC motor + bubble machine.

Prototype 1: Motion-Sensor Activated Motor

Starting with the Input/Output “A Moment for Motors” lesson to guide us, we wired our Arduino board as such, so that turning the knob controlled motor action. Then, we replaced the knob with the PIR motion sensor. This meant when the PIR motion sensor was activated, the motor was then triggered and started to spin. You can see this in the video above.

We were happy that we figured out how to do this pretty quickly! Unfortunately, the next steps were not so easy…

Prototype 2: Attempt to Connect Bubble Machine & Motion Sensor Using Arduino

Here is a video of the bubble machine that we ordered from Amazon! Such a party, right? Also in this video, you can see the wiring of the original switch.

Unfortunately, this bubble machine gave us a whole lot of grief. Here’s a photo of us taking it apart:

process.jpg

During our first few attempts to connect the PIR motion sensor and bubble machine using Arduino, we unfortunately did not realize that the voltage of the bubble machine was 12V, which is significantly higher than Arduino. We kept getting the following error…

Screen Shot 2017-11-05 at 1.53.09 PM.png

And for the longest time, we didn’t know what was wrong…and then we figured out that we blew out that Arduino board. And then we blew out another one. We also blew two fuses. And then we emailed Becky and realized that we needed a transistor in between the bubble machine and Arduino.

Using this resource and diagram that Becky gave us, we ended up soldering a TIP 120 transistor in between the bubble machine and Arduino. Here’s the diagram that we based our circuit off of:

tip120-lightbulb1-400x225.png
via bildr.org

For some reason though, this is when our code that we had written in the previous class stopped functioning, and so we reverted back to this code:

//  _ ___ _______     ___ ___ ___  ___ _   _ ___ _____ ___ 
// / |_  )__ /   \   / __|_ _| _ \/ __| | | |_ _|_   _/ __| 
// | |/ / |_ \ |) | | (__ | ||   / (__| |_| || |  | | \__ \ 
// |_/___|___/___/   \___|___|_|_\\___|\___/|___| |_| |___/ 
// 
// Analog In, Serial Out, DC Motor
// 
// Made by Becky Stern
// License: Public Domain
// Downloaded from: https://circuits.io/circuits/3034234-analog-in-serial-out-dc-motor

/*
  Analog input, analog output, serial output

 Reads an analog input pin, maps the result to a range from 0 to 255
 and uses the result to set the pulsewidth modulation (PWM) of an output pin.
 Also prints the results to the serial monitor.

 The circuit:
 * potentiometer connected to analog pin 0.
   Center pin of the potentiometer goes to the analog pin.
   side pins of the potentiometer go to +5V and ground
 * LED connected from digital pin 9 to ground

 created 29 Dec. 2008
 modified 9 Apr 2012
 by Tom Igoe

 This example code is in the public domain.

 */

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0;        // value read from the pot
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255);
  // change the analog out value:
  analogWrite(analogOutPin, outputValue);

  // print the results to the serial monitor:
  Serial.print("sensor = " );
  Serial.print(sensorValue);
  Serial.print("\t output = ");
  Serial.println(outputValue);

  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(2);
}

Where Are We Now?

So after some more troubleshooting, we got it to the point where the PIR motion sensor is definitely working. The wiring seems to be correct. The bubble machine is functioning on its own, but only when connected to a power source (though it seems we may have blown out the switch, because it is not responding to it and permanently remains “on” when plugged in).

Then, we had a Google Hangout with Becky…

IMG_8991.jpg

And she informed us that there could be several things going on, such as:

1/ We have a poor connection between our Arduino wires and the bubble machine, because we connected them with electrical tape and did not actually solder them.

2/ We could be using the wrong code for this, because is actually Digital Output and not Analog Output. We will be trying to use the Digital Debounce code as a starting point instead of Analog In / Serial Out DC Motor code.

3/ Our wiring to the switch in the bubble machine may be incorrect.

So, in conclusion, we still have some work to do. But we learned a lot from our process , such as the importance of knowing the voltage when connecting two separate things, how crucial transistors are and how to troubleshoot different scenarios.

Author: Evie

A freelance photographer / writer working to inspire curiosity and world travel.

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s