Wednesday, 26 August 2015

Week 5

The rest of the leg test parts finished printing, and they fit almost perfectly. Here's a quick video of the hip and knee joints moving.




The code behind this motion is as follows:

#include <Servo.h>

// Instantiate servos
Servo sFLcoxaLat;   // Rotation around the vertical axis
Servo sFLcoxaLon;   // Rotation around the horizontal axis pointing forward

int pFLcoxaLat = 0;
int pFLcoxaLon = 0;

// Instantiate global figures
int servoSpeed = 2;

void setup() {
  sFLcoxaLat.attach(2);
  sFLcoxaLon.attach(3);
}

void loop() {
  // Raise femur
  for(pFLcoxaLat = 0; pFLcoxaLat <= 90; pFLcoxaLat += servoSpeed)
  {
    sFLcoxaLat.write(pFLcoxaLat);
    delay(15);
  }
  
  // Extend tibia
  for(pFLcoxaLon = 0; pFLcoxaLon <= 90; pFLcoxaLon += servoSpeed)
  {
    sFLcoxaLon.write(pFLcoxaLon);
    delay(15);
  }
  
  // Lower femur
  for(pFLcoxaLat = 90; pFLcoxaLat >= 0; pFLcoxaLat -= servoSpeed)
  {
    sFLcoxaLat.write(pFLcoxaLat);
    delay(15);
  }

  // Retract tibia
  for(pFLcoxaLon = 90; pFLcoxaLon >= 0; pFLcoxaLon -= servoSpeed)
  {
    sFLcoxaLon.write(pFLcoxaLon);
    delay(15);
  }
}

Really, it's quite simple for what it does. Each motion that the hexapod will make, such as walking and turning, will just be a function with similar contents to those of loop() above. 

The rest of the body will take about 6 hours of elapsed printing time to complete, so I've left a list of required parts that will hopefully be completed overnight for pickup on Friday. Optimistically, I think construction could be complete by the end of this coming weekend.

Tuesday, 25 August 2015

First print

The femur part of the leg (equivalent of the thigh) successfully printed. Here's a photo of it.



The resolution and quality of the print are very good, with no blemishes at all. The slots for the servo arm were almost perfect, being just slightly larger than the arms themselves. I'll have to secure them somehow, even if it's something as simple as Blu-Tack.


The remaining parts of the leg (the tibia (shin) and coxa (hip)) are currently printing and should be ready in about half an hour.

Monday, 24 August 2015

Servos arrived

The servos arrived today. Here's an emotive pseudo-selfie I took with them.

I'm not sure what I was thinking at the time.

Of the 20 that arrived, 1 was faulty, which is fine, since I ordered 2 extras for that reason. They don't have quite as much torque as I was expecting, but after fashioning a hook and testing their lifting capability, I think they should have plenty of power for the application.

On Wednesday I should be able to get started printing the chassis, and hopefully be into construction by the end of the week.

Wednesday, 19 August 2015

Week4

***Blogger deleted this post. Apparently in this case Ctrl+Z was a convenient shortcut for "irreversibly delete all text in the HTML editor". This is the rewrite, and as such is a but rushed and light on details.***

I did a good bit of research into servos today. I ended up ordering 20, to allow for 2 faulty ones since they're fairly low quality. Hopefully I won't have that many failures, but I'd be in trouble if I had to wait another 1-2 weeks for replacements to ship. The model I bought is the TowerPro SG90, which are a reasonable balance of torque (1.8kg/cm) vs cost (and far, far cheaper than Jaycar's $30 per servo).


Elliott recommended an ultrasonic rangefinder for use later on in the project, if I get that far.



Most excitingly, amidst concerns that I would have to design and construct the chassis and legs of the hexapod from scratch, which would have been extremely time consuming, I found this Thing on Thingiverse. It's a complete set of parts made specifically for SG90 servos, and I found it after ordering them. I still can't believe my luck.


Next up on the list of things to do is finish the design/parts list, start printing the chassis, and start wiring the circuit in anticipation of the servos arriving.

Tuesday, 18 August 2015

Arduino test #1

I bought a Freetronics Eleven on Sunday so that I could test my ideas at home, to see if they're viable. I haven't had time to do too much with it, but by splicing two example scripts (one to make an LED blink and another to make a servo sweep back and forth), I made it do both of those. Here's a video!




I'm a little worried that the servos might not be strong enough for the legs. I might have to double them up, which will add complexity to the design, since servos are fairly big on the scale of a small robot.

[EDIT]: On further research, it looks like one servo will provide plenty of torque, so that's one problem out of the way to make way for the next one that's popped up: holy crap, servos are expensive. Jaycar has them at around $30 each, and I need 18, minimum 12. Oh dear. eBay has listings of 5 for $15, but they're probably quite crappy.

[EDIT 2]: I uploaded the script that I used in the video to https://gist.github.com/halbrd/5a69cab14f40a11429cddb73a1ca7262.

Wednesday, 12 August 2015

Week 3

This week, we narrowed down what my research project will actually involve. The Arduino hexapod is pretty much locked in at this point (and I can't change the url of the blog). In theory, it should be very doable, since the most basic structure of the hexapod is just an Arduino board and 2 (or 3, depending on design) servos (or more likely stepper motors for their greater strength) per leg, with the legs themselves and a chassis. Anything else is, ultimately, optional. That said, I'm not by any means assuming that it will be that simple. I have no doubt that there will be plenty of obstacles to overcome.

After the project description is finished, I'll start the design.

This is the first post! It is a test!

I'm fairly optimistic about this project. I wonder how long that will last.