This (2nd) Prototype:
The Bubble Machine Robot is an autonomous robot that blows bubbles at five different targets arrayed in a semi-circle. The robot uses the feedback from the targets that it hits to adjust its aim toward the center target. When the robot manages to hit the center target a fan turns on and blows out the candle. If the robot doesn’t achieve its goal fast enough the candle burns to the ground and the fire spreads!
Earlier (1st) Prototype:
The first iteration of the bubble machine used an led and an ambient light sensor to pick up the quantity of bubbles in the air by the shadows they cast. This iteration was less successful because bubbles are mostly clear and cast almost imperceptible shadows.
The Next (3rd) Prototype:
In the next iteration of the Bubble Robot we will experiment with foam instead of bubbles in an effort to trigger the sensors more easily. We will also continue to improve plastic wrapping and containment methods for the soapy water.
Photos:
Arduino Code:
/* Sweep by BARRAGAN <http://barraganstudio.com> This example code is in the public domain. modified 8 Nov 2013 by Scott Fitzgerald http://arduino.cc/en/Tutorial/Sweep */ #include <Servo.h> Servo myservo1; Servo myservo2; int pos = 0; // variable to store the servo position int potpin1 = 0; // analog pin used to connect the potentiometer int val1; int potpin2 = 1; // analog pin used to connect the potentiometer int val2; int potpin3 = 2; // analog pin used to connect the potentiometer int val3; int potpin4 = 3; // analog pin used to connect the potentiometer int val4; int potpin5 = 4; // analog pin used to connect the potentiometer int val5; int spin = 0; void setup() { myservo2.attach(9); // attaches the servo on pin 9 to the servo object Serial.begin(9600); pinMode(8, OUTPUT); myservo1.attach(10); } void loop() { val1 = analogRead(potpin1); val2 = analogRead(potpin2); val3 = analogRead(potpin3); val4 = analogRead(potpin4); val5 = analogRead(potpin5); myservo1.write(pos); // tell servo to go to position in variable ‘pos’ myservo2.write(spin); digitalWrite(8, LOW); spin = spin + 2; if( val1 == 0) { pos = 54; } else if(val2 == 0 || val4 ==0) { pos = 90; } else if(val3 == 0) { // digitalWrite(8, HIGH); } else if(val5 == 0) { pos = 126; } else { digitalWrite(8, LOW); } Serial.print(val1); Serial.print(” | “); Serial.print(val2); Serial.print(” | “); Serial.print(val3); Serial.print(” | “); Serial.print(val4); Serial.print(” | “); Serial.println(val5); }A video of the bubble blowing mechanism:
]]>
The Pololu A4988 module is a newer, compatible replacement for the A4983 module used in the stepper motor exercise.
The A4988 is rated for an 8-35V motor supply voltage, so it is not compatible with the 2.7V stepper motors.
The DRV8834 stepper motor driver is rated for a 2.5–10.8V motor supply voltage and should be compatible with the A4988 pinout.
The pins should be soldered on the back side of the A4988 such that the driver chip is visible. This does mean that the pad silkscreen text is on the bottom and out of sight, but allows the chip to dissipate heat. If your module is *not* soldered in this orientation, please be especially careful when wiring the circuit.
If you are unclear on the wiring of a stepper motor, use a DMM to measure the resistance between the wires. A bipolar stepper will have four wires, two per coil, and the low-resistance of the coil should be unambiguously measurable.
The digital input using a switch needs a pullup resistor to function properly, otherwise the input pin is switched between an ambiguous ‘floating’ state and ground.
The thermistors we have in stock are Vishay parts from SparkFun, who hosts a data sheet.
]]>You put the URL and WordPress automatically embeds.
The html for this post simple looks like this:
Here's a video:
http://www.youtube.com/watch?v=I2TU0FipXes
You put the URL and WordPress automatically embeds.
]]>
First day of class!
]]>