Chucky 1.0

My idea is to remake the 6 DOF BRAT biped Kit, which retails for $299, for less the half the price using popsicle sticks and glue for the frame, cheap Hitec HS-55 Micro Servos and an Arduino for the brain. I already have my design drawn up and ordered the parts which I should get in a few weeks. Now to get started on the hard part. I have never attempted to write a 6 DOF (2 Ankle Servos, 2 Knee Servos, 2 Hip Servos as seen in the picture) biped walking gait code so this should be very interesting/difficult :). Any help, input, ideas or comments is welcome! Thanks! 

Will update as I make progress. Stay Tuned

*Update: 12/19/2010*

Servos finally came in the mail after a month. 8 servos for $17.10 on Ebay. $5.23 for Popsicle Sticks and Glue. Will recycle an Arduino from my object avoidance bot.

Parts: 6 Servos, Popsicle Sticks, Rubber Cement, Tape

Took about an hour to build the Leg Sections and allow the Rubber Cement to dry. Used Scotch Tape to reinforce all glued parts.

Assembled the Leg Sections. Looks alot like the BRAT walker to me huh?

Issues:

How to add/balance the batteries pack and arduino. 

Will these cheap micro servos and glue/tape joints be able to handle all the weight once the Arduino and Battery Pack are incorporated.

Can I properly power the Arduino AND all 6 servos and maybe an LED using 6 AA batteries connected in parallel? without potentially damaging any components?

Writing the walking gait code... writing code is NOT my strong point :( .. might take some time. HELP....

What do you guys think?

*Update: 12/20/2010*

Drilled holes where the servo heads connect to the servo and used small screws to attach everything for extra support and strength.

Added the Arduino and Battery Pack on top. Everything is balanced and pretty sturdy. Working on the code now.

*Update 12/21/2011*

Wired the Arduino, Battery, and Servos. Added an On Off switch.

*Update 12/22/2010*

Tried a couple of programs and a few make the legs move but theres always this constant shaking as soon as I turn the Arduino on. It does this when I set all the servos to center "servo.write(90)". When I try and turn the servos in one direction with my hand it pushes back... So far its been real good at balancing itself despite being heavy on top... no walking yet :(. See the video to understand better. 

 

*Update 12/23/2010*

Thanks to ChristheCarpenter for the tutorial on for loops. Finished writing a working code and it took its first steps easily. Only issue now is the constant rattling as seen in the video will not stop. Sometimes It wont happen but the majority of the time it does. I tried bringing the voltage to the servos down from 7.2 V to 6.0 V and this did not fix the problem. Im now thinking maybe its due to the stress on them and they're shaking to try and maintain the position. The only problem here is that the only servos doing the shaking are the hip servos. Wouldn't the ankle servos be subjected to more stress when shifting weight to one foot. They do not rattle at all. Trial and error untill I get results....

*Update 1/6/2012*

I replaced the Hip Servos and they were working fine on 6.0 V untill i ran them at 7.2V and the rattling began again. Went back down to 6.0 V and it didnt go away. The lesson learned here is that 7.2V damages cheap micro servos. I reduced the size of the battery pack by using 4 1.5V AAA (= 6V) non rechargeable batteries. Going to upgrade to 5 1.2V (also = 6V) rechargeables. 

Also redesigned the top half using less popsicle sticks. The decrease in weight helped it ALOT. Made MANY improvements and tweaks to the code after HOURS of trial and error lol, it is now walking smoothly. Because of the cheap contruction (popsicle sticks and glue) and damaged servos causing it to wobble it can only walk stable at a slow pace.

Overall this project was a pretty good learning experience. Learned alot about writing Arduino code and biped construction. Not bad for my first Biped huh? 

Chucky 2.0 Coming soon!

Planned Improvements: Upgraded servos, Object Avoidance, Stronger Construction, all while still keeping the price half of the BRAT Biped.

See 2nd video clip of it in Action!

Walk for now

  • Actuators / output devices: 6 micro servos
  • CPU: Arduino Duemilanove

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

Using the pictured base,

Before you start walking, you will need to bend the knees and also bend at the hips, so, you have your base hunched down somewhat. Then, you will need to shift the weight/rock an ankle to one side and kick forward. Set that foot down, rock the other way and repeat.

That is my impression of how to accomplish a walking gate with the above platform.

Good luick with this. I will

Good luck with this. I will watch the progress :wink:

Theres a few videos of this

Theres a few videos of this frame in action showing just that on youtube. The hard part is going to be gettin all the angles right and servos to move accurately and in sync.

If knowing angles is important, and,

your soldering skills are up to snuff. You could use the following, https://www.robotshop.com/letsmakerobots/node/27206 , trick to know the approximate angle of each servo at the cost of one analog pin per servo.

Or, you could build a second platform that you use to teach/mimic the movements you want the real platform to follow. Doing something like what is shown here: https://www.robotshop.com/letsmakerobots/node/25627

I was thinking about

I was thinking about experimenting with a BUNCH of combined “servo.write(angle)” functions for each leg untill fine everything is fine tuned. Those ideas seem like they might save me some time lol. thanks

seems i get something to do

seems i get something to do within the next weeks since i got a bunch of Popsicle Sticks lying around at home ;-)

I jus put the battery on top

I jus put the battery on top and it fell apart where the servo head connects to the servos… need to redesign with some kind of support… battery is way to heavy

yea your right im probably

yea your right im probably going to have to put the battery in the feet… to heavy to go on top

haha, same here. The first

haha, same here. The first steps of my Chopstick Junior made him loosing all his legs since I did not put the screws in :wink:

Do it again…i am sure you will figure out how to balance it.

haha yea… I screwed the

haha yea… I screwed the tops on. problem solved.

Check the connections too
Check the connections too

Code

In the video I ommitted the last few lines. I am trying to get it to stand up straight without shaking first.

#include <Servo.h>
Servo LeftAnkle;
Servo RightAnkle;
Servo LeftKnee;
Servo RightKnee;
Servo LeftHip;
Servo RightHip;


void setup()
{
 LeftAnkle.attach(8);
 RightAnkle.attach(11);
 LeftKnee.attach(9);
 RightKnee.attach(12);
 LeftHip.attach(10);
 RightHip.attach(13);

}

void loop()
{
 LeftAnkle.write(90);
 RightAnkle.write(90);
 LeftKnee.write(90);
 RightKnee.write(90);
 LeftHip.write(90);
 RightHip.write(90);
delay(3000);

 LeftAnkle.write(85);
 RightAnkle.write(85);
delay(300);
 LeftHip.write(85);
 LeftKnee.write(105);
delay(100);
 LeftAnkle.write(90);
 RightKnee.write(90);
delay(500);
 RightAnkle.write(95);
 LeftAnkle.write(95);
delay(300);
 RightHip.write(95);
 RightKnee.write(75);
delay(100);
 RightAnkle.write(90);
 LeftKnee.write(90);
delay(500);

}

**class!! **

class!!

 

for loops --need 'em

The code does not look too bad as it sits. I would say that your delays are probably not long enough. In two places you have a 100mS pause there --that means that you are giving those servos 1/10th of a second to get where they are going. Probably all the pauses are too short. 

Again, this can be fixed (and will allow MUCH smoother transistions) by using “For loops” for all your servo moves and slowly move them from point A to point B instead of “slamming” them there and then waiting a bit. Fluid control of the servos can also help with spikes on the power and may help things as well.

this code is supposed to be

 

this code is supposed to be used with visual basic. not too familiar with that.

//----star posion for all servos----//

 

#define ankleLmid 1500

#define ankleRmid 1500

#define kneeLmid 1500

#define kneeRmid 1500

#define HipLmid 1500

#define HipRmid 1500

 

#include <Servo.h>

Servo ankleL;  

Servo ankleR;

Servo kneeL;

Servo kneeR;

Servo HipL;

Servo HipR;

int turnRate     =  10;  // servo turn rate increment (larger value, faster rate)

int refreshTime  =  20;   // time (ms) between pulses (50Hz)

int moveServo;

 

void setup() {      

ankleL.attach(3); 

ankleR.attach(4);

kneeL.attach(5);

kneeR.attach(6);

HipL.attach(8);

HipR.attach(9);

ResetAllServos(); 

Serial.begin(9600);

delay(2000);

}

//-----RESET SERVOS-----//

void ResetAllServos() {

ankleL.write(ankleLmid); 

ankleR.write(ankleRmid);

kneeL.write(kneeLmid);

kneeR.write(kneeRmid);

HipL.write(HipLmid);

HipR.write(HipRmid);

delay(1000);

}

//-----serial port data-----//

void loop() {

 

static int val = 0;

static int s=0;

static int serv=0;

 

  if(Serial.available()) {       

    char ch = Serial.read();                   

 

switch(ch) {           

case ‘0’…‘9’:               

     if (s==1) {

       serv =serv *10 + ch - ‘0’;

     }

     else if (s==0) {

       val = val * 10 + ch - ‘0’;               

     }

  break;           

 

case ‘s’:

   if (s==1) {

      if (serv==1) {

             ankleL.write(val);

              val=0;

              s=0;

              serv=0;

      }

      else if (serv==2) {

             ankleR.write(val);

              val=0;

              s=0;

              serv=0;

      }

      else if (serv==3) {

            kneeL.write(val);

              val=0;

              s=0;

              serv=0;

      }

      else if (serv==4) {

             kneeR.write(val);

              val=0;

              s=0;

              serv=0;

      }

      else if (serv==5) {

             HipL.write(val);

              val=0;

              s=0;

              serv=0;

      }

      else if (serv==6) {

             HipR.write(val);

              val=0;

              s=0;

              serv=0;

      }

 

   } 

   else if (s==0) {

      s=1;

   }

}

  }

}

 

connections are good…

connections are good…

I would not use the second code

The second code is way complicated for what you are trying to do here. Not to mention, it is not complete. Stick with the first code you posted, add for loops for all the moves and go from there.

Thanks. good idea. Im going

Thanks. good idea. Im going to study “For loops” and add more times in the delays. I do think that shaking is power related.

cheers!

another bipped!!! very cool! and in popsicle sticks! priceless!!!