Gyros and walking stuff
I've been thnking about how best to get my android to walk as it's very light weight and the motors move quite quickly. I think I'm going to get a gyro like the GWS PG03, which appears to output a servo-compatable PWM signal as you tilt/turn it which is cool for picaxe interfacing.
Then I thought about how to integrate it into the robot because I have two hip motors for side ways movement... I guess ideally I need three gyros - one for each leg, and one in the body - all of them for side-to-side movement. Then the main picaxe or whatever can read them all to work out how to position the other joints. However, for now I don't really want to buy 3 so I'm going to put one in the body and just use that as a kind of safety-switch to stop it tipping over.
I'm going to have my 3 picaxes driving the 6 leg motors. One will be interfaced to the gyro and be responsible for leaning side to side with the two hip motors - back and forth in quick sucsession with hard-coded postitions. If it tips too far (from the gyro data) it will pause before tipping back the other way so it doesn't further over balance. It could also set of an alarm if it's going to fall over so I can catch it. Once this works ok I will use spare output pins going high at stages during the side-to-side motion to trigger the other two picaxes which control the 4 leg motors (two each). These will 'play back' each legs' motions to take steps while the weight is on one foot (small movments to start with to kind of coax it along).
I'd like to also modify the hard-coded positions of the side-to-side hip motors depending on what the gyro says but I need to think of a way to stop them sort of getting out of line with each other... i.e. if it leans until the gyro says stop then how do I make sure the legs are evenly spaced... probably by making sure they aways return to a fixed centre position and taking my chances.
Once all the main parts of the android are made then I'll be able to start testing since I'll have most of the weight on board. I'll probably start a new article for the testing and some flow charts to go with various control methods.