Skip navigation

STEM Academy

2 Posts authored by: kitfud

77625492233d07cdc6f0cfcb1a94d9eb.jpg

After completing my last project, the "Rice Krispies Loader", I thought that a further use for my robotic arm could be turning it upside so that it became a robotic leg.

 

If you could print four of these and attach them then you'd have a quadruped "spider" robot. Though there is value in improving my version of the Rice Krispies Loader, so it could be a walking device of sorts; in the interest of time, I printed this compact and quick 3D print found on Thingiverse.

 

When printed the pieces look like this:

FullSizeRender (3).jpg

I then purchased these servos from Amazon.com. Click HERE.

 

When everything assembled:

FullSizeRender (2).jpg

This mini robot chassis is affordable and you can see how the 3D printed sheets (prior to assembly) are compact and could be easily produced for a classroom of students in a school which has at least one 3D printer.

 

Of course you need to add a micro controller to get the robot moving and for this I chose the Adruino Mega. The reason is that the device has enough digital pins to handle the 8 servo motors plus room for additional sensors. During the early stages of me programming the robot it was tethered to my desk as follows:

IMG_1826.JPG

On a cable "leash,"  the spider robot could be programmed in the Arduino IDE and then tested on the table. This was only possible because the feet of the robot would slip on the table's surface prevening it from dashing away.

 

If you had the robots set up in exactly this tethered manner; students could study bio-mimicracy; specifically programming the gait of a 4 legged animal. This would combine the subject areas of biology with technology (programming).

 

The following code could be shared with students so they could experiment with the variables and function construction and function parameters.

 

Testing the robot is easy with this code; just open the Arduino serial Monitor and use 'w' to go forward, 'a' to go left, 's' backward, 'd' right:

#include <Servo.h>
#include <SPI.h>


Servo myservo;
Servo myservo2;
//front right joins

Servo myservo3;
Servo myservo4;
//front left joins


Servo myservo5;
Servo myservo6;
/////back left joints


Servo myservo7;
Servo myservo8;
///back right joins


int pos;    // variable to store the servo position
int incomingByte;


int dspeed = 55;


void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  myservo.write(80);
//this is the left knee

  myservo2.attach(8);
  myservo2.write(150);
  //this is the left hip
  //------------------------------

  myservo3.attach(14);  // attaches the servo on pin 9 to the servo object
  myservo3.write(170);
//this is the right knee

  myservo4.attach(15);
  myservo4.write(30);
  //this is the right hip
  //--------------------------------------

    myservo5.attach(6);  // attaches the servo on pin 9 to the servo object
  myservo5.write(40);
//this is the back left hip

  myservo6.attach(7);
  myservo6.write(80);
  //this is the back left hip
//-----------------------------------------

    myservo7.attach(21);  // attaches the servo on pin 9 to the servo object
  myservo7.write(160);
//this is the back right hip

  myservo8.attach(20);
  myservo8.write(140);
  //this is the back right leg
//-----------------------------------------




  Serial.begin(19200);



}




void loop() {
  if (Serial.available()>0) {
    // read the oldest byte in the serial buffer:

    int val = Serial.read(); // read it and store it in val

  switch(val){

    case 'w':
      Forward();
      break;


    case 's':
    Backward();
    break;

    case 'a':
    Left();
    break;

    case 'd':
    Right();
    break;

    case 'y':
    Bow();
    break;

    case 'h':
    Rise();
    break;

      case 't':
    Sit();
    break;

    case 'g':
    Stand();
    break;

    case 'c':
    Snake();
    break;

      case 'r':
    Roll();
    break;

    case 'f':
    Jump();
    break;

      case 'v':
    Tip();
    break;






  }



  }
}








  void RightOut(){
  myservo.write(30);
}


void RightIn(){
  myservo.write(120);
}


void RightUp(){
  myservo2.write(40);
}
void RightDown(){
  myservo2.write(170);
}


void LeftOut(){
  myservo3.write(110);
}


void LeftIn(){
  myservo3.write(170);
}


void LeftUp(){
  myservo4.write(150);
}


void LeftDown(){
  myservo4.write(20);
}


void BackLeftOut(){
  myservo6.write(70);
}


void BackLeftIn(){
  myservo6.write(140);
}


void BackLeftUp(){
  myservo5.write(150);
}


void BackLeftDown(){
  myservo5.write(20);
}


void BackRightOut(){
  myservo7.write(90);
}


void BackRightIn(){
  myservo7.write(170);
}


void BackRightUp(){
  myservo8.write(50);
}


void BackRightDown(){
  myservo8.write(160);
}


void SlowForward(){
    LeftUp();
  delay(dspeed);
  BackRightIn();
  delay(dspeed);
  LeftOut();
  delay(dspeed);
  LeftDown();
  delay(dspeed);

BackLeftUp();
delay(dspeed);
LeftIn();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);

RightUp();
delay(dspeed);
BackLeftIn();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);

BackRightUp();
delay(dspeed);
RightIn();
delay(dspeed);
BackRightOut();
delay(dspeed);
BackRightDown();
delay(dspeed);
}








void Backward(){

RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightIn();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftIn();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);


BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightOut();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftIn();
delay(dspeed);


}


void Forward(){

RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightIn();
delay(dspeed);


BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightOut();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftIn();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftIn();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);










}


void Right(){
RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightIn();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftIn();
delay(dspeed);




BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightOut();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftIn();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);
}


void Left(){


LeftUp();
delay(dspeed);
LeftIn();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);


BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightOut();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftIn();
delay(dspeed);

RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightIn();
delay(dspeed);




}


void Bow(){


  RightDown();
  delay(dspeed);
  LeftDown();
  delay(dspeed);
  RightIn();
  delay(dspeed);
  LeftIn();
  delay(dspeed);
}


void Rise(){
  LeftUp();
  delay(dspeed);
  RightUp();
  delay(dspeed);
  LeftIn();
  delay(dspeed);
  RightIn();
  delay(dspeed);
}


void Sit(){
  BackRightDown();
  delay(dspeed);
  BackLeftDown();
  delay(dspeed);


}


void Stand(){
  BackLeftUp();
  delay(dspeed);
  BackRightUp();
  delay(dspeed);
}


void Snake(){
  BackRightUp();
  delay(dspeed);
  BackRightIn();
  delay(dspeed);
  BackRightDown();

  BackLeftIn();
  delay(dspeed);
  BackLeftOut();
  delay(dspeed);
  BackLeftIn();
  delay(dspeed);

  RightDown();
  delay(dspeed);
  RightIn();
  delay(dspeed);
  RightUp();
  delay(dspeed);

  LeftOut();
  delay(dspeed);
  LeftIn();
  delay(dspeed);
  LeftOut();
  delay(dspeed);
  LeftDown();
  delay(dspeed);
}


void Roll(){
RightDown();
delay(dspeed);
RightOut();
delay(dspeed);
RightUp();
delay(dspeed);
RightIn();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftIn();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftOut();
delay(dspeed);




BackRightDown();
delay(dspeed);
BackRightIn();
delay(dspeed);
BackRightUp();
delay(dspeed);
BackRightOut();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftOut();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftIn();
delay(dspeed);
}


void Jump(){
BackRightIn();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftIn();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftUp();
delay(dspeed);




RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightOut();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftOut();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);
}


void Tip(){

  BackRightOut();
delay(dspeed);
BackRightDown();
delay(dspeed);
BackRightUp();
delay(dspeed);
BackRightIn();
delay(dspeed);


LeftUp();
delay(dspeed);
LeftOut();
delay(dspeed);
LeftDown();
delay(dspeed);
LeftOut();
delay(dspeed);


BackLeftUp();
delay(dspeed);
BackLeftOut();
delay(dspeed);
BackLeftDown();
delay(dspeed);
BackLeftUp();
delay(dspeed);




RightUp();
delay(dspeed);
RightOut();
delay(dspeed);
RightDown();
delay(dspeed);
RightOut();
delay(dspeed);




}


















 

Activity Sequence:

1. Students assemble the robot with the micro servos. In this way they learn about the joins of the robot. This can be compared and contrasted with biology of the limbs/muscular structure of a cheetah. Look at the angles for all those limbs:

o-CHEETAH-facebook.jpg

You could then relate this to what Boston Dynamics has created. Therefore, situating students in the context of professional robotics designers in the classroom:

 

Task: Line 33 and down in the void setup()- each student must adjust the servo.write parameter so the the robot can stand. The standing position of the robot will be it's posture/stance when not moving. It is important that the robot is at least able to balance when first starting.

 

Task 2: Line 327 Experiment with the forward() function specifically, the sequence of movement for each limb. For example, should the robot raise it's leg and then extend out with the knee or extend the knee and then rotate outwards. The 2 degrees of freedom for each servo in the mini quadruped allow for quite a few combinations of movements; the ideal of which I have yet to figure out.

 

Task 3: This could be to create a forward, right, left backward movement for the robot. None of the functions for these in the code above is perfect and would be great material for students to refine.

 

Task 4: The robot could be turned into an obstacle avoiding robot which is not tied to a computer by cables. For this to happen students would have to also design and 3D print a housing unit to snap onto the mini quadruped to hold batteries and the micro-controller. In the picture below it is the purple housing unit attached to the robot. Additional, each student would have to learn about programming the ultrasonic sensor:

FullSizeRender (4).jpg

 

Power management is definitely an issue to figure out. The batteries were heavy and the inclusion of lipo-batteries would make the profile of an obstacle avoiding spider robot sleeker than what I produced.

 

Below is my first attempt at an obstacle avoiding Spider robot set to the tune of Jamaican dance hall music (a personal favorite), Jah bless!

 

There is plenty of value in running an activity like the one I outlined above. For one, the advantage on learning programming with a spider robot as opposed to a robot chassis is that a wheeled chassis needs more space to run and is no fun when "leashed" to a computer.

 

Bio-mimicry tied to programming really helps put the activity in a greater contexts and challenges students to replicate the physical world (the bounding gait of a cheetah) into the mechanical context of the mini-quadruped robot. In my opinion, this creates powerful connection for learners.

 

I hope that this concept for a classroom project inspires some of you to try something like this. Additionally, maybe this post will generate some discussion for how technology, programming, and biology can be interwoven into an innovative instructional design which challenges traditional conceptions of a classroom.

How can the Printerbot Simple Metal be used in the classroom? After all, I am a teacher and the whole point of getting the machine in the first place was not to make enough trinkets to rival a box of Kinder Surprise

kinder surprise.jpg

 

rather it was to have a lasting impact on the minds of the future....

kennedy.jpg

On short notice, for three 45 minute lessons over the span of a week this was the best I could do:

 

 

For those interested in taking a look at the lesson plan I wrote click--> here.

 

 

IMG_0120.JPG

So the story behind these mysterious objects and the lessons which spawned them is that I paced through my 6th grade technology units much faster than expected; this is class where I have been fortunate enough to develop the content from the ground up. Now that I had a 3D printer I felt it was time to make a power move and integrate it into my classroom.

 

The justification behind using the 3D printer in class is as follows:

 

Computer aided design (CAD) is an important skill and a mode of creation students should be introduced to early on. If not taught for some cognitive gain, perhaps as an ability to visualize forms in a digitized context, lessons can be for introducing a tools used in professions such as architecture, industrial engineering and contemporary art. On a side note, art may be being the most undervalued, dumbed down form of education in today's American school systems.

finger painting.jpg

 

 

Working with CAD reinforces the "iterative process" specifically, drawings are open to adaptation and recreation due to their format being digital and thus, flexible when reworked.

 

Creative thinking, what I define as lateral thinking, is a cognitive skill I try and incorporate into all of the classes. By designing a project based lesson with a relatively open interpretation a multiplicity of results can be produced. Students are then able to compare their work to each other in an process used for understanding alternative perspectives and the multiplicity of solutions. For me this was based on the problem statement: "how do you design a creative pencil holder?" Similarly, there are more ways to come to an answer like how do you add 2 numbers to equal 10? In the end, there must also be alternative answers to questions like how do we fuel our automobiles when fossil fuels run out? Maybe now you can see the importance of cultivating creative thinking skills in the modern classroom.

 

electric cars.jpg

 

The printing of an object in class creates an "artifact" which can be taken home and reflected upon. This is significant event because a memento from the classroom sparks recall later on. Furthermore, after years this spark may generate novel interpretations and ideas. Therefore, according to learning theories the artifact remains with the learner along the path for the crystallization of knowledge; in parallel with the maturity a learner gains with lived experience.

 

In general, my lesson was for students to design a creative pencil holder like the one I made called "Pencil Dream":

IMG_0137.JPG

 

Within the constraints of 40 mm by 40 mm I tried to design a pencil holder which could hold a pencil in more than one way. The same task was given to my students who were tasked with designing their own pencil holders.

 

Oftentimes, they did not need the full dimensions of 40x40mm or they even extended their designs outside of the project constraints. This was okay though, because the dimensional constraints were to get them thinking about design and not limit their process. After all, if you drive a Ferrari there are times when I do hope you'll break the speed limit.

 

An important note is before I enacted the lesson plan posted above; I demonstrated how to draw some shapes in Sketchup on a projector. Right afterwards students went and designed their creative pencil holders with traditional pen, pencils and rulers; old school style. I thought this would provide a nice comparison regarding the design process;the affordance and constraints of pen and paper vs mouse and computer. Those who wish to take on my lesson in their own classroom may want to set time aside to discuss this difference as a way to conclude the unit.

 

Here is an example of what one of my students made:

IMG_0134.JPG

 

The above model is different from what I would have initially expected but this is exactly the point! These days kids are so capable and prior to this activity I thought Sketchup would be too technical for 6th graders. How wrong I was; just examine the complexity of some of the objects they designed in the video at the beginning of this blog. Albeit some of these objects look like they were designed by Sponge Bob himself....

sponge bob.jpg

 

As my 3D printing lessons came to a close I’ll admit that the class was getting harder to manage. The reason, I think, is that the creative pencil holder project was too easy for them to complete and too open ended to push them to refine a model any longer than 20 minutes. Teachers who use a 3D printer in the class must strike a balance between articulating an activity which is challenging and will motivate students to persist through learning the CAD software while at the same time not frustrating them with an inability to see progress in their work.

 

For my high school classes next year I've thought about having my students collaboratively design a chess set (but a review of Yeggi.com will indicate that chess sets are old news). Or maybe, replicate a picture of an animal they like in some type of "novel" geometry. The other day I spent 2 hours designing a beetle in Sketchup only to have my progress lost when the software unexpectedly closed due to an error; unfortunately I had not saved my work

 

Another use for a 3D printer is making school "necessities." This year I coached a 3rd and 4th grade lacrosse team and we barely won any matches but hey, at this age everyone's a winner and everyone deserves a trophy (and apparently a pizza party). If only it were the same during my experience with dating . So for our lacrosse banquet I 3D printed an army of mini trophies; that printer was running day and night to produce these gems: scaled down cougar figurines I found on yeggi.com on top of a pedestal (in purple) which I drew in Sketchup-

 

IMG_0165.JPG

Like I said, printing 17 of these things took a long time and up until the day of our awards ceremony I was still churning out models like a Swatch factory. The same goes for what my 6th grade class made; 16 of their models took the printer 3 days running day and night.

 

Was it worth it?

 

In my opinion yes, because as we all gathered around a large classroom table as I opened a box with all of their creative pencil holders the look of anticipation and awe was truly the cutting edge of education. It was a moment when I looked into the future; where technology, arts and project based learning collided so that students implicitly learned something about geometry, design and themselves.

 

 

To read the blog posts leading up to this one click the links:

 

Intro: Reaping the Rewards/3D printing with the Printerbot Simple Metal

 

Reaping the Rewards: Issues with the Printerbot Simple Metal

 

Reaping the Rewards: Successful 3D Prints