BuoyBot

BuoyBot is my submition for the Single Motor Robot Challenge.

 

 

General Structure:

BuoyBot is powered using one 9v battery, has a screw top lemonade mix container as a chassis/hull, a single micro servo for movement, 4 LDR's to track light, a breadboard power rail to distribute power while minimizing wire clutter and an Arduino Uno to control everything.

 

 

Locomotion:

BuoyBot uses a single fin moved by a single micro servo to achieve locomotion. It uses 3 different strokes to successfully move around a pool of still water. (note: Because of the curvature of the hull, the center position is actually 95 degrees.)

 

Forward Stroke:

 

Right Stroke:

 

Left Stroke:

 

Sensors:

BuoyBot's head has for cadmium sulfide photo resistors to enable it to follow a light source. Each one is connected to a self-contained voltage divider that uses a 10k ohm resistor. The first three light sensor bundles are facing forward, left and right. By comparing these values (modified by calibration integers to insure accuracy), the robot can decide whether to perform a forward, left or right swim stroke. The fourth light sensor bundle is placed facing upwards with a small segment of blackened straw to allow BuoyBot to know when it has successfully reached the target area. Together, the 4 light sensor bundles allow for an intuitive light tracking program to be made.

 

 

 

 

 

Code:

#include <Servo.h>
 
Servo fin;

//int topLDR = A3; SENSOR ERROR, DATA OMMITED
int forwardLDR = A2;
int leftLDR = A5;
int rightLDR = A4;
int pos = 95;
 
void setup()
{
  Serial.begin(9600);
 
  fin.attach(9);
  fin.write(pos);
  delay(1000);
 
}
 
 
void loop()
{
  //int topLDR = A3; SENSOR ERROR, DATA OMMITED
  int forwardLDR = analogRead(A2);
  int leftLDR = analogRead(A5);
  int rightLDR = analogRead(A4);
 
  if (leftLDR > 50 + rightLDR)
  {
    left();
  }
  else if (rightLDR > 50 + leftLDR)
  {
    right();
  }
  else
  {
    forward();
  }
  Serial.print("left - ");
  Serial.print(leftLDR);
  Serial.print("      right - ");
  Serial.print(rightLDR);
 
}

void forward(){
  // 50 to 140
  for(pos = 95; pos < 140; pos += 1)
  {
    fin.write(pos);
    delay(5);
  }
  for(pos = 140; pos>=50; pos-=1)
  {                               
    fin.write(pos);
    delay(5);
  }
  for(pos = 50; pos<=95; pos+=1)
  {                               
    fin.write(pos);
    delay(5);
  }
}


void left(){
  // 95 to 170
  for(pos = 150; pos < 180; pos += 1)
  {
    fin.write(pos);
    delay(10);
  }
  for(pos = 180; pos>=150; pos-=1)
  {                               
    fin.write(pos);
    delay(3);
  }
}


void right(){
  //95 to 20
  for(pos = 40; pos >= 10; pos -= 1)
  {
    fin.write(pos);
    delay(10);
  }
  for(pos = 10; pos<40; pos+=1)
  {                               
    fin.write(pos);
    delay(3);
  }
}



This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/buoybot

Wow, that is so cool. I

Wow, that is so cool. I really thought about such a solution too but had no time and no concept yet. Please, shoot a video and show us how it works…quick :slight_smile:

How did you seal the hole

How did you seal the hole through which the fin is protruding? It seems like it would leak easily…

Awesome design and very quick implementation, by the way.

Wonderfully Elegant!
This is a wonderfully elegant solution to using a single motor to control both speed and turning.

My hat’s off to you!

The joint uses 2 levels of

The joint uses 2 levels of security. The first is a puddle of grease around the joint. Because grease is not water soluble, it provides a waterproof layer of protection for the servo. The second layer of protection is a large amoun of hot glue surrounding that joint, insuring that if the first layer was to fall, the only part damaged would be the $2 micro servo.

This is cool and very
This is cool and very simple! Can’t wait for the videos!

That is so clever! Very

That is so clever!  Very cool.

Regards,

Bill

Thank you for your kind

Thank you for your kind words!