IFAB 6: MOTORS, SERVOS, STEPPERS, MOVEMENT

Assignment

For the last assignment you will be mounting a motor/servo/stepper (one or more) to something as well as mounting something to that motor/servo/stepper.  It can be completely DIY, or off-the-shelf components, or a combination of the two.

The last assignment in IFAB was again a journey: I started off with a rough idea of working with magnets, cord and geometrical patterns and finished our 7 week introduction with a three-legged robo-dog that will mine doge-coin. 

But let's start with the first attempt to capture movement. The idea was to have a system of cords with magnets attached to them running in the background of an acrylic screen. The servos where supposed to move the magnets, the change in position would move magnetic material in the front of the acrylic plate. Here a very rough first sketch:

IMG_1994.JPG

After trying to prototype everything with cardboard, servos, fishing wire and magnets, I realized that this form of prototyping reaches its limits with moving elements. I thought a lot how I could move the magnets on the strings in the back without them interfering with each other - and came to the conclusion that this is not possible in our limited timeframe. Here parts of the failed cardboard prototype.

IMG_1949.JPG

Unfortunately I had bought all parts already for this project before prototyping - something to consider next time. 

So I was going back to a blank page and thought about my second idea - a robot arm. I like robotics and tried to come up with a fresh idea that would go a bit further than building an arm. Robots are always considered perfect machines - I set out to build a non-perfect robot, a robot that obviously is not just a mere slave for humans but got some imperfect characteristics: A three-legged robot dog. And as imperfection is a great source for creativity (and randomised operations) it should mine bitcoin (or doge-coin) while walking around. Its functionality should be considered secondary, the character should dominate the appearance of the robot.

IMG_1992.JPG

The three legs should be powered by three digital metal-gear servos that were once part of a mini-plotter. I wanted to keep the shape as minimal as possible - but still organic.

Now I had to tackle the mounting of the servo to the acrylic baseplate and of the legs to the servo horns. They were solid metal, so I knew they would not wear out that quickly. I decided to try to laser-cut the horn directly into the upper part of the leg. 

I took a picture of the spindle of the servo horn, hand-traced it in illustrator and tried out different diameters after measuring the horn to achieve a tight fit.

Screen Shot 2017-10-17 at 12.42.50 PM.png
IMG_1954.JPG
Screen Shot 2017-10-17 at 2.56.50 PM.png

I was very surprised after laser-cutting in 3mm cast acrylic that the last opening fit perfectly with the servo horn and seemed to be sturdy enough to withstand light movement. My hand-tracing was far from perfect or symmetric but this seemed not to be a real issue.

IMG_1955.JPG

After that I tried to come up with a concept for mounting the servo between to acrylic sheets like in a sandwich. Initially I wanted to cut acrylic clamps to hold the servos on the baseplate, then decided for zip ties. This proofed to be only in parts effective as the servos still had a bit of movement - I fixed this with glue in the end. I am not very happy with this mounting as I could not really glue them in perfectly after I attached the zip ties. I should have used glue and the zip-ties in combination for the beginning. But I wanted to avoid glue as much as possible for the mounting of the servos.

IMG_1993.JPG

After conceptualizing the mounting for the servo and the leg-attachment to the servo I created the shape of the dog in Illustrator and laser-cut all parts. I made one mistake: I copied one-side of the dog to the other not realizing that only one front side would need a leg opening - as it's a three-legged dog. Too late. 

Screen Shot 2017-10-17 at 2.38.11 PM.png

Before assembling the parts, I cut the two acrylic baseplate "sandwiches" that would sit in the middle of the side-panels with the bandsaw. Laser-cutting was not needed here, the rougher surface from the band-saw cutting took the glue very well. 

I used the laser-cutter again for the openings for the latches of the zip ties.

IMG_1966.JPG
IMG_1968.JPG

After that I put a spacer into the non-leg corner, attached the two side panels with acrylic glue and the help of clamps to the two baseplates, drilled holes for the node-mcu / ESP8266 controller that would control the servos and finally mounted the legs.

IMG_1971.JPG
IMG_1973.JPG
IMG_1976.JPG
IMG_1979.JPG
IMG_1980.JPG

It stood by itself but I realized that any movement of the servos would tilt the construction to the side without the leg. To prevent the dog from falling a built a little stand to stabilize it and reduce the weight on the legs. 

IMG_1986.JPG

I kept the wiring and code very basic - the three-legged dog will not mine bitcoin yet with its random movements, I will have to re-wire and re-program using a python mining library. Here is the Arduino code specifically for the 8266 module that I found online and modified to my needs:

/* Sweep
 by BARRAGAN <http://barraganstudio.com> 
 This example code is in the public domain.
 modified 28 May 2015
 by Michael C. Miller
 modified 8 Nov 2013
 by Scott Fitzgerald
 http://arduino.cc/en/Tutorial/Sweep
*/ 

#include <Servo.h> 
 
Servo myservo_front;  // create servo object to control a servo 
                // twelve servo objects can be created on most boards
Servo myservo_b1;
Servo myservo_b2;

void setup() 
{ 
  myservo_front.attach(13);  // attaches the servo on GIO2 to the servo object 
  myservo_b1.attach(12);
  myservo_b2.attach(14);
} 
 
void loop() 
{ 
  int pos;
  // front leg
  for(pos = 60; pos <= 100; pos += 1) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo_front.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 100; pos>=60; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo_front.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  // back leg 1
    for(pos = 60; pos <= 100; pos += 1) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo_b1.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 100; pos>=60; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo_b1.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 

  // back leg 2
    // back leg 1
    for(pos = 60; pos <= 100; pos += 1) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo_b2.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 100; pos>=60; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo_b2.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
} 

And here is the three-legged dog in-motion. An imperfect robot with character. I am very happy with the result!