Autonomous Robot Part 2 – Search

Group Members (and Roles)

Annabelle Lee

(Scribe and Designer)

Joe Mallonee

(Designer and Tutor)

Riya Savla

(Integrator and Designer)



Our project centers around the idea of finding substance in a world where Coca Cola can steal ground water, use fossil fuels to ship their products around the globe, and still have a polar bear as an advertising mascot. The eye flower continuously moves, looking out at the surrounding environment and avoiding contact with the Coca-Cola advertisements.


Technical Notes

The advertisements are suspended by metal wire which runs into the Arduino’s ground pin. The flower is hooked up to a pull-down resistor and given five volts. When the wire wrapped around the stem touch the grounded shapes, it sends a signal to a digital input pin (pin 2). This allows us to detect movement and send the flower in the reverse direction.

Circuit Diagram

Above: Parts used are Arduino, breadboard, two servos, high resistance resistor (10k ohms), switch. Two wires (probe and ground) run out to their correct respective mechanical components.




Arduino Code

#include <Servo.h>
Servo servo_up;
Servo servo_down;

//setup servo variables and values
int val_up = 90;
int val_down = 90;
int inc_up = 1;
int inc_down = -2;
const int lowerbound_up = 5;
const int upperbound_up = 110;
const int lowerbound_down = 5;
const int upperbound_down = 180 – lowerbound_down;

const int contactPin = 2;  // the number of the pushcontact pin

long lastContactChangeTime = 0;
long noMoreChangeDelay = 3000;

void setup() {

pinMode(contactPin, INPUT);
void loop()
// read the state of the switch into a local variable:
int reading0 = digitalRead(contactPin);
int reading1 = digitalRead(contactPin);
int reading = reading0 & reading1;

Serial.println(millis() – lastContactChangeTime);

if ((reading == HIGH) && (((millis() – lastContactChangeTime) > noMoreChangeDelay)))
inc_up = -inc_up;
inc_down = -inc_down;
lastContactChangeTime = millis();

if((val_up <= lowerbound_up) || (upperbound_up <= val_up)) {
inc_up = -inc_up;

if((val_down <= lowerbound_down) || (upperbound_down <= val_down)) {
inc_down = -inc_down;

val_up = val_up + inc_up;
val_down = val_down + inc_down;


Structural Aspects

The flower’s movement is the result of two servos controlled by an Arduino. One of them alternatively rotates clockwise and anti-clockwise. It rotates a disk, through which a shaft sits. The second servo sits on top of this shaft and supports and controls an arm. Thus we get trace out a spherical path with the two servo arms mimicking the longitude-latitude system. The shaft and the top servo are balanced with the help of multiple acrylic disks that rest on low-friction spherical balls.



Flower In Coca Cola World

Above: Flower In Coca Cola World


Top View

Above: Top View


Side View

Above: Side View