Pages Navigation Menu

Project: Wheeled Platform – Ladybug

Project: Wheeled Platform – Ladybug

This basic dc-motor driven platform utilizes the DFRobot Romeo 4WD platform. The build and customization difficulty rating is low. The expense rating is low. This system is ideal for the rookie robotics student to create a working system and begin exploring programming. The basic platform easily modified with a simple “shell” to give it distinctiveness and fit it into our end display. This project will be one of the first stepping stones for all students entering BotClub.

Create a wheeled platform on which to mount a variety of animal-like shells for the exhibit
Arduino based on Phoenix sketch

//Standard PWM DC control

int E1 = 5;     //M1 Speed Control

int E2 = 6;     //M2 Speed Control

int M1 = 4;    //M1 Direction Control

int M2 = 7;    //M1 Direction Control

 

int  adc_key_val[5] ={

30, 150, 360, 535, 760 };

int NUM_KEYS = 5;

boolean on = false;

 

 

 

void setup(void)

{

int i;                //Set Pins 4-7 to Output

for(i=4;i<=7;i++)

pinMode(i, OUTPUT);

for(i=8;i<=11;i++)    //Set Pins 8-11 to Input

pinMode(i, INPUT);

 

digitalWrite(8,HIGH); //Internally set input pins high through a pull-up resistor

digitalWrite(9,HIGH);

digitalWrite(10,HIGH);

 

Serial.begin(9600);

Serial.println(“Hello There”);

}

void loop(void)

{

boolean LeftSwitchOn = digitalRead(8)==LOW;

boolean CenterSwitchOn = digitalRead(9)==LOW;

boolean RightSwitchOn = digitalRead(10)==LOW;

boolean               = digitalRead(11)==LOW;

Serial.print(LeftSwitchOn?”Left Front”:””);

Serial.print(”  “);

Serial.println(RightSwitchOn?”Right Front “:””);

//Turn the robot on when any of the switches are pressed.

if(!on && (LeftSwitchOn || CenterSwitchOn || RightSwitchOn))

{

on=true;

LeftSwitchOn = false;

CenterSwitchOn = false;

RightSwitchOn = false;

delay(1000);

}

if(on)

{

if(LeftSwitchOn && RightSwitchOn)

{

on=!on;

stop();

delay(3000);

}

else if (LeftSwitchOn)

{

stop();

delay(100);

back_off(200,200);

delay(1000);

turn_R(200,200);

delay(1000);

//Serial.println(“Left”);

}

else if (RightSwitchOn)

{

stop();

delay(100);

back_off(200,200);

delay(1000);

turn_L(200,200);

delay(1000);

//Serial.println(“Right”);

}

else

{

advance(128,128);

}

}

}

 

 

////////////////////////////////// Supporting Functions ////////////////////////////////////////////

void stop(void)                    //Stop

{

digitalWrite(E1,LOW);

digitalWrite(E2,LOW);

}

void advance(char a,char b)          //Move forward

{

analogWrite (E1,a);      //PWM Speed Control

digitalWrite(M1,HIGH);

analogWrite (E2,b);

digitalWrite(M2,HIGH);

}

void back_off (char a,char b)          //Move backward

{

analogWrite (E1,a);

digitalWrite(M1,LOW);

analogWrite (E2,b);

digitalWrite(M2,LOW);

}

void turn_L (char a,char b)             //Turn Left

{

analogWrite (E1,a);

digitalWrite(M1,LOW);

analogWrite (E2,b);

digitalWrite(M2,HIGH);

}

void turn_R (char a,char b)             //Turn Right

{

analogWrite (E1,a);

digitalWrite(M1,HIGH);

analogWrite (E2,b);

digitalWrite(M2,LOW);

}

// Convert ADC value to key number

int get_key(unsigned int input)

{

int k;

for (k = 0; k < NUM_KEYS; k++)

{

if (input < adc_key_val[k])

{

return k;

}

}

if (k >= NUM_KEYS)

k = -1;     // No valid key pressed

return k;

}

 

  • Kevin – Individual Project
  • Mengjue – Assisted with Shell Vacuum Forming

Tentative Schedule

  • November 29: Create prototype shell
  • December 6: Set exhibit interactivity plan
  • December 13: Final assembly (shell, sensors, motors)
  • January 3: Finalize code
  • January 10: Beta test with library patrons
  • January 17: Create creature environment for exhibit
  • January 31: Install exhibit

Pictures

Schedule

  • Aug 2014 – basic car assembly
  • Sept – integration of limit switches as tactile sensors
  • Oct – refined program
  • Nov – ladybug shell
  • Dec – refine design and program for exhibit

 

Shell Design and Creation

The ladybug configuration is particularly attractive as a unique and un-expected exhibit for small children. Though they will likely recognize the insect, the scale of it will be new. The insect antennae will be used as tactile sensors. The split shell will be motorized to reveal the underlying robot platform.

Development Steps

  • Scrap FOAMULAR laminated with Gorilla Glue to form a large “block.”
  • Rough shaped the block with wirebrush on drill.
  • Sanded smooth with drywall sanding screen.
  • Applied thin layer of drywall mud to fill irregularities and sanded smooth again.
  • Vacuum form acrylic panel over mold (DIY vacuum setup will be documented soon).
Styrofoam shell for mold

Styrofoam shell mold for ladybug. Thin layer of drywall mud for heat protection during forming. Placed on 12″ tile for scale.

Failed first attempt to vacuum mold acrylic ladybug shell. Heat box is not providing uniform heat resulting in localized rupture.

Failed first attempt to vacuum mold acrylic ladybug shell. Heat box is not providing uniform heat resulting in localized rupture.

Eventually…
Image of servo activation mechanism

Resources

2 Comments

  1. Sorry, I wasn’t checking the website. I will do #3.

  2. We have a shallow heat box. This complicates getting a uniform heat distribution. Using two 1500 watt heat guns was sufficient to heat the 21″x 24″ acrylic…but some sections melted through completely before a smooth sag formed. Options from here:
    1. Go back to griddle heat design, but supplement with heat guns from above.
    2. make a deep heat box and use a radiant heating element
    3. add baffles within the heat box to disperse the airflow from the heat guns.

    Decisions…Decisions.

Leave a Comment