Homework - Ils Van Aken

I am Kevin Ilse's partner. I would have loved to follow your course as well, but I am a professional violinist and in our timezone your workshop starts when I usually leave for a gig...  So I couldn't do it. I have heard nothing but good things about last session. Ilse is very enthusiastic and is (finally) completely mesmerised by Arduinos I could not be more grateful for that!

I made a remote controlled bear a while ago. I use it on live shows for little kids... You should see their faces when it starts to move...
Ilse suggested we made a new one, smaller and better using your skills and experience to guide us to the next level. If it is alright with you she would like to use that as her homework assignment.
 I made a couple of pictures of what we did this week. 



The bear necessities

We would like to make a new bear puppet. The prototype (the one you saw last time) is heavy, and big and and a bit sluggish. We found another bear in a garage sale, he's cuter, smaller and more suitable for our needs. However putting everything in there might prove a challenge. 


Goals :
1. 
Move head horizontally
say no
2. 
Move head vertically
say yes
3.
Move Legs 
get up / get down
4.
Raise arm 
say hi

If possible : 
5. Blink although we have no idea how this could be done.

What we've done so far :


There is not a lot of room in the head. The head is in itself only about 11cm. So I think it is best to put all the mechanics in the body





We think a fio would be best because it has room for an XBEE on board



We crudely mounted and taped six servo's together. Maybe taping is not the best way to go but, just for proof of concept it works...





We were thinking about using the metal gear sego's by adafruit with analog feedback… So we can manually centre the servo's and have feedback. 


we were thinking of using the adafruit pwm-servo driver to prevent jitter and timer issues.



Comments

  • Looks beary good ;)

  • Homework number two...


    void setup() 
    {
    Serial.begin(9600); 
    }

    boolean bearSitting=true;

    void loop() 
    {
    if (Serial.available()) 
    {
    byte c = Serial.read();
    if (c=='y') sayYes();
    else if (c=='n') sayNo();
    else if (c=='h') sayHi();
    else if (c=='d' && bearSitting==true) getDown();
    else if (c=='d' && bearSitting==false) getUp(); 
    }
    }


    void sayYes()
    {
    Serial.println("Move yes-servo");
    }

    void sayNo()
    {
    Serial.println("Move no-servo");
    }

    void sayHi()
    {
    Serial.println("Move Hi-servo");
    }

    void getUp()
    {
    Serial.println("Move legg-servo's UP");
    bearSitting=true;
    //Serial.println("One servo normal, one inverted");
    }

    void getDown()
    {
    Serial.println("Move legg-servo's DOWN");
    bearSitting=false;
    //Serial.println("One servo normal, one inverted");
    }

  • #include <Wire.h>
    #include <Adafruit_PWMServo.h>
    Adafruit_PWMServo pwm = Adafruit_PWMServo();

    void setup()
    {
      Serial.begin(9600);     
      pwm.begin();  
      pwm.setPWMFreq(60);
    }

    boolean bearSitting=true;

    void loop() 
    {
      pwm.checkServos();
      
      if (Serial.available()) 
      {
        byte c = Serial.read();
        if (c=='y') sayYes();
        else if (c=='n') sayNo();
        else if (c=='h') sayHi();
        else if (c=='d' && bearSitting==true) getDown();
        else if (c=='d' && bearSitting==false) getUp();        
      }
    }
     
     
    void sayYes()
    {
      //Move yes-servo
      int Servo_Num=0;
      int Servo_start_degrees=70;
      int Servo_stop_degrees=110;
      int Servo_NumberOfTimes=7;
      int Servo_Move_Speed=8;
       pwm.moveRepeated(Servo_Num, Servo_start_degrees, Servo_stop_degrees, Servo_NumberOfTimes,Servo_Move_Speed);
     
    }

    void sayNo()
    {
      //Move no-servo
      int Servo_Num=1;
      int Servo_start_degrees=70;
      int Servo_stop_degrees=110;
      int Servo_NumberOfTimes=5;
      int Servo_Move_Speed=6;
      pwm.moveRepeated(Servo_Num, Servo_start_degrees, Servo_stop_degrees, Servo_NumberOfTimes,Servo_Move_Speed);
     
    }

    void sayHi()
    {
      //Move Hi-servo;
      int Servo_Num=3;
      int Servo_start_degrees=30;
      int Servo_stop_degrees=110;
      int Servo_NumberOfTimes=1;
      int Servo_Move_Speed=10;
      pwm.moveRepeated(Servo_Num, Servo_start_degrees, Servo_stop_degrees, Servo_NumberOfTimes,Servo_Move_Speed);
    }

    void getUp()
    {
      //Move legg-servo's UP;
      bearSitting=true;
     
      pwm.moveTo(4,120);
      pwm.moveTo(5,30);
      //Serial.println("One servo normal, one inverted");
    }

    void getDown()
    {
      //Move legg-servo's DOWN;
       bearSitting=false;
      pwm.moveTo(4,50);
      pwm.moveTo(5,112);
      //Serial.println("One servo normal, one inverted");
    }

  • Ils, please don't forget to post a video.
  • Yukako, David, our first video is on facebook. Unable to upload on youtube. don't understand the problem... Hope you two are happy with the bear!
Sign In or Register to comment.