Wednesday, June 18, 2014

Leg Data and a 1501MG  Servo Problem                                                                                         


Piston characteristics
I connected the servos, the pressure sensors and the hip rotation sensors to an Arduino test program. This allowed me to measure the pressure in each piston as the servos moved though their entire range. This back-pressure is caused by the heavy return springs pushing in on the piston, slightly compressing the air inside. Because the piston head has seven square inches of surface area, I can calculate the force on the springs as well. I also measured the knee angle and hip to foot distance for each servo position. The results are summarized in the excel graph.

Rotation sensor data.
The hip angle sensors produced these digital outputs and  voltages for each hip angle. Note that the right and left leg data are mirror images. The leg is perpendicular to the floor at an angle of 90º. The angle gets lower as the leg swings forward; higher as it moves backward.





Power HD 1501MG servo
I am somewhat disappointed with the performance of the Power HD 1501MG. These servos are inexpensive, are incredibly strong and have excellent metal gears, but the electronic driver circuit design is flawed. The problem is that during fast moves, the servo easily looses it’s position. This is because the potentiometer position feedback loop inside the servo only works within a narrow band around the target position signal. Yes, this is true. If the servo position is more than about a dozen degrees from the target position then the servo goes dead; not to become live again until the target signal eventually finds the servo’s true position. Perhaps this design is a way to protect the servo from self destructing when asked to produce torques higher than rated. All I know is that I cannot afford to have a servo lose control during a leg move. ***

I think I found a solution to the servo problem. I am going to convert these analog servos into digital servos. I found an excellent white-paper on how to do this: 


Analog to digital servo conversion.
In the servo, the potentiometer is replaced with two fixed resistors; causing the servo input signal to control servo speed, not servo position. The servo potentiometer output is sent back to the microprocessor to use to control the servo speed. Added benefits are: real-time info on the servos actual position, and also, direct control over servo speeds, making movement smoother. The down-side is that I will need two more controller analog inputs and that my code will be more complex. 


*** The 1501MG servos are good. See July 19, 2014 entry for explanation.


Tuesday, June 10, 2014

Leg Sensors and a Catch                                                                  

Pressure sensor amp circuit.
I built two small amplifier boards for the piston pressure sensors and mounted them in boxes attached at the top/back of the piston body. The circuit converts the tiny millivolt differences that are produced by the pressure sensors into voltages that the Arduino is able to understand. For every one PSI of pressure inside the piston, there is a 0.1 volt increase in the amp output, starting at a value of 1.000 V for no pressure at all. So piston air pressure of 10 PSI gives an output of 2.000 volts. This value corresponds to a force of 70 pounds being exerted by the leg. A maximum voltage of 5.00 (40 PSI) would indicate 280 pounds of force per leg. 

Rotation sensor.
I attached a small magnet to a bracket on the lateral side of the “thigh bone” such that the magnet rotates about the “hip” axis as the upper leg moves. The direction of the rotating magnetic field is picked up by a stationary Hall effect sensor (Mouser 771-KMA199ET/R $6.99) and is converted to an analog voltage signal between 0 and 5 volts.







The legs have no powered mechanism to move them from front to back or from back to front. The legs dangle on the hip axel in any way they want! So just how is it that I’m planning to have these legs pull me in a cart?









Leg movement simulation.
As the cart moves forward, the legs move backward and, if the “foot” is behind the line of the hips, then a component of the vertical weight on the leg is directed as a forward force in the direction of travel. Basically the leg is falling forward and it’s taking the cart with it. The leg must keep extending if the cart height is to be kept constant. The other leg better be in place to begin the next step before the first leg gets to the end of it’s travel or the legs will trip and hit the ground. To swing a leg forward rapidly though the air, the leg’s knee must be sufficiently flexed such as to not hit the ground on the way forward. 



Catch mechanism.
This bending of the knee takes a moment, during which time the leg cannot be permitted to swing forward as of yet. So there is a mechanical catch in the err... “inner thigh” region that engages as the leg extends backwards past a certain point and keeps the leg from moving forward. The catch remains engaged until it is released by the action of the knee flexing backwards to a nearly 90º position. The flexing of the knee back and up, increases the leg’s potential energy such that when the catch is released the leg now swings fully forward and can be redeployed in a forward position. If the foot is deployed in front of the line of the hips, then very little pressure is applied to the ground (unless it is desired to slow down or stop the cart). This is the plan anyway.


The building of the legs is done. Time to hook the legs up to the Arduino, here in the doghouse, to do a few tests and to collect some data.